aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2005-11-01 18:12:32 -0800
committerRichard Henderson <rth@gcc.gnu.org>2005-11-01 18:12:32 -0800
commit745f2a84b9af863b30fa4eeaad778e0672feb4ab (patch)
treef8c7bb3ac6acc88ef7399b4180d01aa78289266f /gcc/testsuite
parent12674da393dd9681b088012753fb0111156ab1b1 (diff)
downloadgcc-745f2a84b9af863b30fa4eeaad778e0672feb4ab.zip
gcc-745f2a84b9af863b30fa4eeaad778e0672feb4ab.tar.gz
gcc-745f2a84b9af863b30fa4eeaad778e0672feb4ab.tar.bz2
re PR target/21518 (unable to find a register with -fPIC and -O2 and non inlining static function)
PR 21518 * loop.c (scan_loop): Do not propagate computations to a hard register destination with SMALL_REGISTER_CLASSES. From-SVN: r106373
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/gcc.target/i386/pr21518.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr21518.c b/gcc/testsuite/gcc.target/i386/pr21518.c
new file mode 100644
index 0000000..f2ac666
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr21518.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fPIC -fno-tree-pre" } */
+/* { dg-require-effective-target ilp32 } */
+
+extern void __attribute__ ((regparm (3)))
+drawPointsLines (char type, int first, int *dd);
+
+int
+do_locator (int *call)
+{
+ char prephitmp5;
+ int type;
+ int i;
+
+ if (call == 0)
+ prephitmp5 = 1;
+ else
+ {
+ type = *call;
+ i = 0;
+ do
+ {
+ if (i != type)
+ drawPointsLines ((int) (char) type, 0, call);
+ i = i + 1;
+ }
+ while (i != 2);
+ prephitmp5 = (char) type;
+ }
+ drawPointsLines ((int) prephitmp5, 0, call);
+ return 0;
+}