diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2006-02-09 13:53:40 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2006-02-09 05:53:40 -0800 |
commit | 1651647cb7f3ccc1345155ce478a96ab3b9d99b3 (patch) | |
tree | d06e75116e7af760ba7a84105b042fd4ad256903 /gcc | |
parent | 7dc32197a8f098c05d589d80ccbcc7ea51a62bea (diff) | |
download | gcc-1651647cb7f3ccc1345155ce478a96ab3b9d99b3.zip gcc-1651647cb7f3ccc1345155ce478a96ab3b9d99b3.tar.gz gcc-1651647cb7f3ccc1345155ce478a96ab3b9d99b3.tar.bz2 |
+2006-02-09 Andrew Pinski <pinskia@physics.uc.edu> + + * tree-flow-inline.h...
+2006-02-09 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * tree-flow-inline.h (var_can_have_subvars):
+ Volatile variables should not have subvariables.
+
+2006-02-09 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * gcc.c-torture/compile/volatile-1.c: New test.
+
From-SVN: r110796
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/volatile-1.c | 18 | ||||
-rw-r--r-- | gcc/tree-flow-inline.h | 4 |
4 files changed, 31 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ee54252..478de23 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-02-09 Andrew Pinski <pinskia@physics.uc.edu> + + * tree-flow-inline.h (var_can_have_subvars): + Volatile variables should not have subvariables. + 2006-02-09 Diego Novillo <dnovillo@redhat.com> PR 26180 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e130683..a73cf09 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2006-02-09 Andrew Pinski <pinskia@physics.uc.edu> + + * gcc.c-torture/compile/volatile-1.c: New test. + 2006-02-09 Diego Novillo <dnovillo@redhat.com> PR 26180 diff --git a/gcc/testsuite/gcc.c-torture/compile/volatile-1.c b/gcc/testsuite/gcc.c-torture/compile/volatile-1.c new file mode 100644 index 0000000..cb81274 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/volatile-1.c @@ -0,0 +1,18 @@ +/* The problem here was that the statements that + loaded from exception.reason where not being + marked as having volatile behaviour which + caused load PRE on the tree level to go + into an infinite loop. */ + +struct gdb_exception +{ + int reason; +}; +int catch_exceptions_with_msg (int *gdberrmsg) +{ + volatile struct gdb_exception exception; + exceptions_state_mc_init (&(exception)); + if (exception.reason != 0) + foo (); + return exception.reason; +} diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index 0ae99b9..1abf556 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -1463,6 +1463,10 @@ get_subvar_at (tree var, unsigned HOST_WIDE_INT offset) static inline bool var_can_have_subvars (tree v) { + /* Volatile variables should never have subvars. */ + if (TREE_THIS_VOLATILE (v)) + return false; + /* Non decls or memory tags can never have subvars. */ if (!DECL_P (v) || MTAG_P (v)) return false; |