http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52314
Bug #: 52314
Summary: gimplifier produces volatile
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: [email protected]
ReportedBy: [email protected]
Noticed when improving tree-ssa-forwprop and other passes but is reproducible
on the trunk also.
Take:
volatile double bar;
int foo()
{
double baz = -__builtin_huge_val();
return baz <= -bar;
}
--- CUT ---
The gimple output is:
foo ()
{
int D.1591;
volatile double bar.0;
volatile double D.1593;
double baz;
baz = -Inf;
bar.0 = bar;
D.1593 = -bar.0;
D.1591 = D.1593 >= baz;
return D.1591;
}
--- CUT ---
The variables marked with volatile are wrongly marked as volatile. Even though
those two decls are not marked with volatile, their types are. When fold
happens, it sometimes wraps SAVE_EXPR around them because the whole volatile on
the type issue.