[Bug c++/83588] [6/7/8 Regression] struct with two flexible arrays causes an internal compiler error
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jan 14 00:22:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83588
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|accepts-invalid |
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-01-14
CC| |msebor at gcc dot gnu.org
Summary|Struct with two flexible |[6/7/8 Regression] struct
|arrays causes an internal |with two flexible arrays
|compiler error |causes an internal compiler
| |error
Ever confirmed|0 |1
Known to fail| |6.4.0, 7.2.0, 8.0
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed with GCC 6, 7, and 8. Bisection points to r231665. Initialization
of objects with flexible array members is accepted for compatibility with GCC.
$ cat pr83588.C && gcc -S -Wall pr83588.C.
struct Foo
{
int i, a[], b[];
};
struct Foo t = {1, {0, 0, 0}, {0, 0, 0}};
pr83588.C:6:41: internal compiler error: in output_constructor_regular_field,
at varasm.c:5155
struct Foo t = {1, {0, 0, 0}, {0, 0, 0}};
^
0x16c5a99 output_constructor_regular_field
/ssd/src/gcc/git/gcc/varasm.c:5155
0x16c6729 output_constructor
/ssd/src/gcc/git/gcc/varasm.c:5438
0x16c5090 output_constant
/ssd/src/gcc/git/gcc/varasm.c:4965
0x16baa3d assemble_variable_contents
/ssd/src/gcc/git/gcc/varasm.c:2134
0x16bb549 assemble_variable(tree_node*, int, int, int)
/ssd/src/gcc/git/gcc/varasm.c:2310
0x16d555e varpool_node::assemble_decl()
/ssd/src/gcc/git/gcc/varpool.c:590
0xcad84b output_in_order
/ssd/src/gcc/git/gcc/cgraphunit.c:2385
0xcae001 symbol_table::compile()
/ssd/src/gcc/git/gcc/cgraphunit.c:2623
0xcae2c1 symbol_table::finalize_compilation_unit()
/ssd/src/gcc/git/gcc/cgraphunit.c:2717
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
More information about the Gcc-bugs
mailing list