Bug 100448 - internal compiler error: Segmentation fault
Summary: internal compiler error: Segmentation fault
Status: RESOLVED DUPLICATE of bug 100102
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 10.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-06 11:48 UTC by Alexander Grund
Modified: 2021-06-03 16:52 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 10.3.1, 11.1.1, 12.0, 9.3.1
Last reconfirmed: 2021-05-06 00:00:00


Attachments
compressed preprocessed source (432.28 KB, application/gzip)
2021-05-06 11:48 UTC, Alexander Grund
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Grund 2021-05-06 11:48:09 UTC
Created attachment 50764 [details]
compressed preprocessed source

The attached file triggers a segfault.
It might be possible that the way it was created was erroneous but the compiler should segfault for any input hence the report

Reproduced with 10.2.0, 10.3.0, 9.3.0 on 2 systems.
Comment 1 Richard Biener 2021-05-06 12:00:26 UTC
Confirmed.  GCC 8 crashes as well but doesn't recognize some builtins used in the preprocessed source.  Maybe a duplicate.  Not sure if valid.
Comment 2 Martin Liška 2021-05-11 12:25:53 UTC
Reduced to almost valid c++ code:

template <bool> using __bool_constant struct intmax_t;
template <int, int> struct ratio {
  template <class _Period> struct duration {
    static intmax_t _S_gcd();
    template <class>
    using __is_harmonic =
        __bool_constant<ratio<0, _Period(duration ::_S_gcd)>::den>;
    class _Period2 __is_harmonic<_Period2>

Started likely with r8-2724-g88b811bd29063036.
Comment 3 Jonathan Wakely 2021-06-03 16:52:16 UTC
dup of PR 100102 then

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