https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83588

            Bug ID: 83588
           Summary: Structs with two flexible arrays causes an internal
                    compiler error
           Product: gcc
           Version: 6.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: patricioravi at gmail dot com
  Target Milestone: ---

Instead of reporting that it is not possible to create such a struct, the GCC
fails.

CODE:

struct Foo                                                                      
{                                                                               
    int val;                                                                    
    int arr1[];                                                                 
    int arr2[];                                                                 
};                                                                             
                                                                              
Foo t = {1, {0, 0, 0}, {0, 0, 0}}; 

ERROR:

bugreport.cpp:7:34: internal compiler error: in
output_constructor_regular_field, at varasm.c:4997

Reply via email to