From 467fd7909a24165420749615272a713ffefd2a4a Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 27 Jan 2011 08:39:33 +0000 Subject: [PATCH] re PR rtl-optimization/44174 (can't find a register in class 'CLOBBERED_REGS' while reloading 'asm') PR rtl-optimization/44174 * gcc.target/i386/asm-6.c: New test. From-SVN: r169325 --- gcc/testsuite/ChangeLog | 7 ++++++- gcc/testsuite/gcc.target/i386/asm-6.c | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/i386/asm-6.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4414684c20e..a626d20230e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,9 @@ -2011-01-26 Mikael Pettersson +2011-01-27 Eric Botcazou + + PR rtl-optimization/44174 + * gcc.target/i386/asm-6.c: New test. + +2011-01-26 Mikael Pettersson PR rtl-optimization/46856 * gcc.c-torture/compile/pr46856.c: New test. diff --git a/gcc/testsuite/gcc.target/i386/asm-6.c b/gcc/testsuite/gcc.target/i386/asm-6.c new file mode 100644 index 00000000000..6aa37ef4276 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/asm-6.c @@ -0,0 +1,16 @@ +/* PR rtl-optimization/44174 */ +/* Testcase by Jakub Jelinek */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -fpic" { target fpic } } */ + +int f0 (int, int, int, int, int); +int f1 (void); + +void +f2 (void) +{ + unsigned v1, v2, v3, v4; + __asm__ ("" : "=a" (v1), "=d" (v2), "=c" (v3), "=r" (v4)); + f0 (f1 (), f1 (), f1 (), f1 (), (v4 >> 8) & 0xff); +}