[Bug c/23155] [4.0/4.1 Regression] Gimplification failed for union cast
--- Comment #9 from pinskia at gcc dot gnu dot org 2005-10-27 21:15 --- This is a combination of a GCC extension (of cast to union) and a C99 feature (subscripting a non-lvalue array) so this is valid code (but undefined code) even though it looks so weird. Anyways I have a patch which I am testing. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Keywords|accepts-invalid | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23155
[Bug c/23155] [4.0/4.1 Regression] Gimplification failed for union cast
--- Comment #8 from pinskia at gcc dot gnu dot org 2005-10-27 20:01 --- I might look into this soon. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||pinskia at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23155
[Bug c/23155] [4.0/4.1 Regression] Gimplification failed for union cast
-- What|Removed |Added Target Milestone|4.0.2 |4.0.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23155
[Bug c/23155] [4.0/4.1 Regression] Gimplification failed for union cast
--- Additional Comments From janis at gcc dot gnu dot org 2005-09-16 20:22 --- The testcase from comment #5 ICEs starting with this patch from kenner: http://gcc.gnu.org/ml/gcc-cvs/2004-06/msg00881.html -- What|Removed |Added CC||kenner at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23155
[Bug c/23155] [4.0/4.1 Regression] Gimplification failed for union cast
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-08 18:26 --- : Search converges between 2004-06-20-trunk (#469) and 2004-06-22-trunk (#470). Hmm, this was not introduced by the tree-ssa merge weird. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23155
[Bug c/23155] [4.0/4.1 Regression] Gimplification failed for union cast
--- Additional Comments From rguenth at gcc dot gnu dot org 2005-08-04 09:20 --- It's an lvalue-cast, which we no longer support as an extension. So it's ICE on invalid and a frontend bug. The C++ frontend spits out the interesting error pr23155.c: In function void foo5(int): pr23155.c:7: error: no matching function for call to vx::vx(int&) pr23155.c:1: note: candidates are: vx::vx() pr23155.c:1: note: vx::vx(const vx&) The following get's rejected with what should be done with the original testcase, too: union vx {short f[8]; int v;}; int vec; void bar(short *); void foo5 (int vec) { bar(((union vx) vec).f); } pr23155.c: In function foo5: pr23155.c:10: error: invalid use of non-lvalue array -- What|Removed |Added Component|middle-end |c Keywords|ice-on-valid-code |accepts-invalid http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23155