declaration of included invalid class template cause crash

Bug #1900145 reported by Amir Maimon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-10 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

*** system details ***

Ubuntu 20.04.1 LTS
g++-10 (Ubuntu 10.2.0-5ubuntu1~20.04) 10.2.0

*** compilation line ***
g++-10 -std=c++20 internal_repro.cpp

*** output ***

internal_repro.cpp:4:4: internal compiler error: in coerce_template_parms, at cp/pt.c:8971
    4 | A<T> a;
      | ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.

*** code ***

internal_repro.h:

template <undeclared_concept T>
class A{};

internal_repro.cpp:

#include "internal_repro.h"
template <typename T>
A<T> a;

Revision history for this message
Amir Maimon (amirmaimoncs) wrote :
Revision history for this message
Amir Maimon (amirmaimoncs) wrote :
Revision history for this message
Amir Maimon (amirmaimoncs) wrote :
Revision history for this message
Amir Maimon (amirmaimoncs) wrote :

compilation line that created the attached files include "-save-temps"

g++-10 -std=c++20 internal_repro.cpp -save-temps

Revision history for this message
Matthias Klose (doko) wrote :

can't reproduce, I get:

$ g++-10 -std=c++20 internal_repro.cpp
In file included from internal_repro.cpp:1:
internal_repro.h:1:11: error: ‘undeclared_concept’ has not been declared
    1 | template <undeclared_concept T>
      | ^~~~~~~~~~~~~~~~~~

$ g++-10 --version
g++-10 (Ubuntu 10.2.0-5ubuntu1~20.04) 10.2.0

Changed in gcc-10 (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gcc-10 (Ubuntu) because there has been no activity for 60 days.]

Changed in gcc-10 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.