[Bug c/54552] New: Cast to pointer to VLA crash the compiler

jens.gustedt at loria dot fr gcc-bugzilla@gcc.gnu.org
Tue Sep 11 16:09:00 GMT 2012


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

             Bug #: 54552
           Summary: Cast to pointer to VLA crash the compiler
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jens.gustedt@loria.fr


Created attachment 28172
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28172
code to reproduce the problem

I stumbled int to a case where a cast (double(*)[n]) crashes the compiler,
whereas first having a typedef for the VLA works ok.

I attach code that reproduces the problem for me. The bug is present as well in
gcc 4.6.3 as in 4.7.0. This is on an ubuntu x86_64, but I don't think that this
should matter.

Jens



More information about the Gcc-bugs mailing list