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
This commit is contained in:
parent
78796ad54b
commit
964a98317c
|
@ -1,3 +1,9 @@
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue