Bug 87766 - [9 Regression] ICE using __PRETTY_FUNCTION__ in dependent context
Summary: [9 Regression] ICE using __PRETTY_FUNCTION__ in dependent context
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 9.0
: P3 normal
Target Milestone: 9.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2018-10-26 20:17 UTC by Eric Fiselier
Modified: 2018-11-02 07:56 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2018-10-28 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Fiselier 2018-10-26 20:17:37 UTC
// g++ -std=c++1z test.cpp

template <class Tp = void>
void test() {
    [](auto rhs) { auto ptr = __PRETTY_FUNCTION__; }(42);
}
template void test<>();


The above code ICE's with the error:

internal compiler error: in output_constant, at varasm.c:4971
Comment 1 Eric Fiselier 2018-10-26 20:19:46 UTC
This doesn't appear to be fixed by gcc.gnu.org/PR84925.

It only seems to occur in GCC trunk and not GCC 8.1/8.2.
Comment 2 Marek Polacek 2018-10-28 23:03:02 UTC
Started with r264292.
Comment 3 Martin Liška 2018-11-02 07:56:49 UTC
Fixed on trunk with r265711.