https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79435
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |error-recovery,
| |ice-on-invalid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-02-09
CC| |msebor at gcc dot gnu.org
Summary|ICE on invalid C++ code |[7 Regression] ICE on
|(with member access into an |invalid C++ code (with
|incomplete type) on |member access into an
|x86_64-linux-gnu: |incomplete type) on
|Segmentation fault |x86_64-linux-gnu:
| |Segmentation fault
Ever confirmed|0 |1
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed. I get the following output without -w:
t.C:4:10: warning: ‘a’ has incomplete type
extern A a;
^
t.C:3:8: note: forward declaration of ‘struct A’
struct A;
^
t.C:5:28: internal compiler error: Segmentation fault
template < int > int f = a.x;
^
Bisection points to r245223 (gcc 7.0.1):
r245223 | jason | 2017-02-06 16:12:13 -0500 (Mon, 06 Feb 2017) | 4 lines
PR c++/71193 - incomplete types in templates
* parser.c (cp_parser_postfix_dot_deref_expression): In a template
handle incomplete type by pedwarning and then treating as dependent.