summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2010-08-17 12:25:24 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2010-08-17 12:25:24 +0000
commit6e29e9fac01f267bc8a93c57def05f27000d1c61 (patch)
tree96abe492a5c663c3d4d71b55c14ef2b3b23e4498
parent7aab1427bfadb3b82927fdba6509e75afad55eec (diff)
downloadgcc-6e29e9fac01f267bc8a93c57def05f27000d1c61.tar.gz
PR target/45296
* reginfo.c (globalize_reg): Reject stack registers. testsuite/ChangeLog: PR target/45296 * gcc.target/i386/pr45296.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163303 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/reginfo.c8
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr45296.c4
4 files changed, 24 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 73462ffc54a..29e5007c162 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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>
@@ -112,8 +117,7 @@
(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.
diff --git a/gcc/reginfo.c b/gcc/reginfo.c
index 55d2b5b6f9d..1510ce84ec5 100644
--- a/gcc/reginfo.c
+++ b/gcc/reginfo.c
@@ -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");
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e36e5bf729f..a4c99b89d5b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 00000000000..307ee012aeb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr45296.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+register long double F80 asm("st"); /* { dg-error "stack register" } */