Bug 84541 - ICE with auto in function parameter
Summary: ICE with auto in function parameter
Status: RESOLVED DUPLICATE of bug 84798
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Keywords: ice-on-invalid-code
Depends on:
Reported: 2018-02-24 15:19 UTC by Volker Reichelt
Modified: 2018-03-13 20:12 UTC (History)
1 user (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2018-02-26 00:00:00


Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2018-02-24 15:19:59 UTC
The following invalid code snippet (compiled with "-fconcepts") triggers
an ICE since GCC 6.1.0:

template<typename> struct A
  static const bool b = true;

static_assert(A<void(auto)>::b, "");

bug.cc:6:36: internal compiler error: Segmentation fault
 static_assert(A<void(auto)>::b, "");
0xeb1cef crash_signal
0x99e667 add_stmt(tree_node*)
0x9129e1 cp_parser_static_assert
0x93d35e cp_parser_block_declaration
0x940f32 cp_parser_declaration
0x941341 cp_parser_declaration_seq_opt
0x941634 cp_parser_translation_unit
0x941634 c_parse_file()
0xa3f966 c_common_parse_file()
Please submit a full bug report, [etc.]
Comment 1 Paolo Carlini 2018-02-26 15:10:42 UTC
I don't think -fconcepts has anything to do with this and it doesn't look like an [8 regression], in fact I can reproduce it with -std=c++14 even in gcc-5-branch.
Comment 2 Volker Reichelt 2018-02-26 19:51:11 UTC
Paolo, you're right. Sorry for the noise.

The "-fconcept" parameter is a left-over from the larger testcase where this snippet was derived from.

The ICE can be reproduced with GCC 4.9.0 and only needs "-std=c++14" or "-std=c++1y" to be triggered.
Comment 3 Volker Reichelt 2018-03-13 20:12:19 UTC
Duplicate of PR84798.

*** This bug has been marked as a duplicate of bug 84798 ***