This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/50628] [4.7 Regression] gfortran.fortran-torture/execute/entry_4.f fails


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50628

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-06 14:08:08 UTC ---
Basically SRA transforms

union u { char c; bool b; };

u.c = ...;
if (u.c ...)

to

u.c = ...;
bool reg = u.b;
u.b = reg;
if (u.c ...)

which is at least suspicious. If a user would write this I'd say it
is simply undefined (because u.b cannot represent all values that
are in the memory location of u.c).

FRE exposes this via native_interpret_int which at the end does

  return double_int_to_tree (type, result);
}

which truncates the value to 1-bit precision.  We probably don't want
out-of-precision INTEGER_CSTs here, so we could at most fail here.
But clearly SRA should avoid doing what it does.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]