]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/45296 (register long double ICE at -O2, -Os, -O3)
authorUros Bizjak <uros@gcc.gnu.org>
Tue, 17 Aug 2010 12:25:24 +0000 (14:25 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Tue, 17 Aug 2010 12:25:24 +0000 (14:25 +0200)
PR target/45296
* reginfo.c (globalize_reg): Reject stack registers.

testsuite/ChangeLog:

PR target/45296
* gcc.target/i386/pr45296.c: New test.

From-SVN: r163303

gcc/ChangeLog
gcc/reginfo.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr45296.c [new file with mode: 0644]

index 73462ffc54a6cc3a21db53d4c6e577929847417a..29e5007c1622a659161bfc00b4d9b329de1cdccb 100644 (file)
@@ -1,3 +1,8 @@
+2010-08-17  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/45296
+       * reginfo.c (globalize_reg): Reject stack registers.
+
 2010-08-17  Richard Guenther  <rguenther@suse.de>
 
        * tree-ssa-dom.c (struct edge_info): Use a VEC for the
@@ -24,7 +29,7 @@
        * c-decl.c (diagnose_uninitialized_cst_member): New function.
        (finish_decl): Use it to issue a -Wc++-compat warning about
        uninitialized const field in struct or union.
-       
+
        (finish_struct): Use strip_array_types.
 
 2010-08-17  Jakub Jelinek  <jakub@redhat.com>
        (decode_options): Update call to decode_cmdline_options_to_array.
        (print_filtered_help): Ignore driver-only options.
        (print_specific_help): Ignore CL_DRIVER.
-       (common_handle_option): Don't call print_specific_help for
-       CL_DRIVER.
+       (common_handle_option): Don't call print_specific_help for CL_DRIVER.
        * opts.h (CL_DRIVER, CL_REJECT_DRIVER): Define.
        (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_TARGET, CL_COMMON):
        Update values.
index 55d2b5b6f9d4ed10b21a6fe6c2010d2ae02a80a2..1510ce84ec5df13e4b1b16040dc5d3d55896fa5f 100644 (file)
@@ -798,6 +798,14 @@ fix_register (const char *name, int fixed, int call_used)
 void
 globalize_reg (int i)
 {
+#ifdef STACK_REGS
+  if (IN_RANGE (i, FIRST_STACK_REG, LAST_STACK_REG))
+    {
+      error ("stack register used for global register variable");
+      return;
+    }
+#endif
+
   if (fixed_regs[i] == 0 && no_global_reg_vars)
     error ("global register variable follows a function definition");
 
index e36e5bf729fb5a526791b1306bff417802cb2c96..a4c99b89d5b1e158574bfd29e5f273aafd53cc04 100644 (file)
@@ -1,3 +1,8 @@
+2010-08-17  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/45296
+       * gcc.target/i386/pr45296.c: New test.
+
 2010-08-17  Kai Tietz  <kai.tietz@onevision.com>
 
        * g++.dg/ext/uow-1.C: New.
diff --git a/gcc/testsuite/gcc.target/i386/pr45296.c b/gcc/testsuite/gcc.target/i386/pr45296.c
new file mode 100644 (file)
index 0000000..307ee01
--- /dev/null
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+register long double F80 asm("st"); /* { dg-error "stack register" } */