Commit ee9f69b4 by Andrew Pinski Committed by Andrew Pinski

re PR c/31072 ([4.2 Rgression] Wrong code for volatile var with initalization and optimization)

2007-03-08  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C/31072
        * c-decl.c (merge_decls): Don't call make_var_volatile.
        * varasm.c (make_var_volatile): Remove.
        * output.h (make_var_volatile): Remove.

2007-03-08  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C/31072
        * gcc.c-torture/execute/pr31072.c: New test.

From-SVN: r122736
parent 99681c8b
2007-03-08 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C/31072
* c-decl.c (merge_decls): Don't call make_var_volatile.
* varasm.c (make_var_volatile): Remove.
* output.h (make_var_volatile): Remove.
2007-03-08 Zdenek Dvorak <dvorakz@suse.cz> 2007-03-08 Zdenek Dvorak <dvorakz@suse.cz>
PR tree-optimization/31085 PR tree-optimization/31085
......
...@@ -1690,11 +1690,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype) ...@@ -1690,11 +1690,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
TREE_READONLY (olddecl) = 1; TREE_READONLY (olddecl) = 1;
if (TREE_THIS_VOLATILE (newdecl)) if (TREE_THIS_VOLATILE (newdecl))
{ TREE_THIS_VOLATILE (olddecl) = 1;
TREE_THIS_VOLATILE (olddecl) = 1;
if (TREE_CODE (newdecl) == VAR_DECL)
make_var_volatile (newdecl);
}
/* Merge deprecatedness. */ /* Merge deprecatedness. */
if (TREE_DEPRECATED (newdecl)) if (TREE_DEPRECATED (newdecl))
......
...@@ -170,10 +170,6 @@ extern void emutls_finish (void); ...@@ -170,10 +170,6 @@ extern void emutls_finish (void);
Prefixes such as % are optional. */ Prefixes such as % are optional. */
extern int decode_reg_name (const char *); extern int decode_reg_name (const char *);
/* Make the rtl for variable VAR be volatile.
Use this only for static variables. */
extern void make_var_volatile (tree);
extern void assemble_alias (tree, tree); extern void assemble_alias (tree, tree);
extern void default_assemble_visibility (tree, int); extern void default_assemble_visibility (tree, int);
......
2007-03-08 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C/31072
* gcc.c-torture/execute/pr31072.c: New test.
2007-03-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2007-03-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/builtins-55.c: Test *lceil* and *lfloor*. * gcc.dg/builtins-55.c: Test *lceil* and *lfloor*.
extern volatile int ReadyFlag_NotProperlyInitialized;
volatile int ReadyFlag_NotProperlyInitialized=1;
int main(void)
{
if (ReadyFlag_NotProperlyInitialized != 1)
__builtin_abort ();
return 0;
}
...@@ -1403,17 +1403,6 @@ make_decl_rtl (tree decl) ...@@ -1403,17 +1403,6 @@ make_decl_rtl (tree decl)
if (flag_mudflap && TREE_CODE (decl) == VAR_DECL) if (flag_mudflap && TREE_CODE (decl) == VAR_DECL)
mudflap_enqueue_decl (decl); mudflap_enqueue_decl (decl);
} }
/* Make the rtl for variable VAR be volatile.
Use this only for static variables. */
void
make_var_volatile (tree var)
{
gcc_assert (MEM_P (DECL_RTL (var)));
MEM_VOLATILE_P (DECL_RTL (var)) = 1;
}
/* Output a string of literal assembler code /* Output a string of literal assembler code
for an `asm' keyword used between functions. */ for an `asm' keyword used between functions. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment