[Bug c/88701] [9 Regression] Internal compiler error for valid program using compound literal with variably modified type.

2019-01-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88701

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Jakub Jelinek  ---
Fixed.

[Bug c/88701] [9 Regression] Internal compiler error for valid program using compound literal with variably modified type.

2019-01-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88701

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Mon Jan  7 22:55:48 2019
New Revision: 267667

URL: https://gcc.gnu.org/viewcvs?rev=267667=gcc=rev
Log:
PR c/88701
* c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
if current_function_decl is non-NULL.

* gcc.dg/pr88701.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr88701.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-decl.c
trunk/gcc/testsuite/ChangeLog

[Bug c/88701] [9 Regression] Internal compiler error for valid program using compound literal with variably modified type.

2019-01-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88701

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  ---
Created attachment 45366
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45366=edit
gcc9-pr88701.patch

For what I wanted to achieve with that change (i.e. put the compound literal
decls in the block scope they belong to), the following works too; it is fine
if the compound literals in the function parameters are handled as before - in
the scope of the function.

[Bug c/88701] [9 Regression] Internal compiler error for valid program using compound literal with variably modified type.

2019-01-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88701

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1

[Bug c/88701] [9 Regression] Internal compiler error for valid program using compound literal with variably modified type.

2019-01-04 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88701

--- Comment #4 from Anders Granlund  ---
Thanks for the bisect.

[Bug c/88701] [9 Regression] Internal compiler error for valid program using compound literal with variably modified type.

2019-01-04 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88701

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #3 from Marek Polacek  ---
Started with r259641.

[Bug c/88701] [9 Regression] Internal compiler error for valid program using compound literal with variably modified type.

2019-01-04 Thread jsm28 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88701

Joseph S. Myers  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-01-04
   Target Milestone|--- |9.0
Summary|Internal compiler error for |[9 Regression] Internal
   |valid program using |compiler error for valid
   |compound literal with   |program using compound
   |variably modified type. |literal with variably
   ||modified type.
 Ever confirmed|0   |1

--- Comment #2 from Joseph S. Myers  ---
Does not appear with GCC 8 branch, so a regression, can someone bisect to find
what commit introduced this ICE?

internal compiler error: in get_parm_info, at c/c-decl.c:7517
0x5992b3 get_parm_info(bool, tree_node*)
/scratch/jmyers/fsf/gcc-mainline/gcc/c/c-decl.c:7517
0x7e92e7 c_parser_parms_list_declarator
/scratch/jmyers/fsf/gcc-mainline/gcc/c/c-parser.c:4024
0x7e9403 c_parser_parms_declarator
/scratch/jmyers/fsf/gcc-mainline/gcc/c/c-parser.c:3939
0x7e2ae9 c_parser_direct_declarator_inner
/scratch/jmyers/fsf/gcc-mainline/gcc/c/c-parser.c:3868
0x7f8ead c_parser_declaration_or_fndef
/scratch/jmyers/fsf/gcc-mainline/gcc/c/c-parser.c:1999
0x800bef c_parser_external_declaration
/scratch/jmyers/fsf/gcc-mainline/gcc/c/c-parser.c:1653
0x801611 c_parser_translation_unit
/scratch/jmyers/fsf/gcc-mainline/gcc/c/c-parser.c:1534
0x801611 c_parse_file()
/scratch/jmyers/fsf/gcc-mainline/gcc/c/c-parser.c:19807
0x853afb c_common_parse_file()
/scratch/jmyers/fsf/gcc-mainline/gcc/c-family/c-opts.c:1151
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.