Commit 964a9831 by Richard Henderson Committed by Richard Henderson

re PR tree-optimization/20127 (wrong code for volatile struct members)

        PR tree-opt/20127
        * tree-sra.c (instantiate_element): Copy TREE_THIS_VOLATILE from
        the type.

From-SVN: r95530
parent 78796ad5
2005-02-24 Richard Henderson <rth@redhat.com>
PR tree-opt/20127
* tree-sra.c (instantiate_element): Copy TREE_THIS_VOLATILE from
the type.
2005-02-24 Fariborz Jahanian <fjahanian@apple.com>
* config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Check for
......
......@@ -1116,6 +1116,12 @@ instantiate_element (struct sra_elt *elt)
DECL_SOURCE_LOCATION (var) = DECL_SOURCE_LOCATION (base);
DECL_ARTIFICIAL (var) = 1;
if (TREE_THIS_VOLATILE (elt->type))
{
TREE_THIS_VOLATILE (var) = 1;
TREE_SIDE_EFFECTS (var) = 1;
}
if (DECL_NAME (base) && !DECL_IGNORED_P (base))
{
char *pretty_name = build_element_name (elt);
......
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