Bug 109459 - static_assert with operator""s causes internal compiler error
Summary: static_assert with operator""s causes internal compiler error
Status: RESOLVED DUPLICATE of bug 105300
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 12.2.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-10 02:25 UTC by Steven Xia
Modified: 2023-04-10 17:32 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Xia 2023-04-10 02:25:17 UTC
The following program reports an internal compiler error: Segmentation fault

To quickly reproduce: https://gcc.godbolt.org/z/T6E8Tb7ff
```
#include <string_view>
#include <iostream>
int main()
{
    using namespace std::literals;
    int x = 0;
    static_assert(std::is_void_v<std::decay_t<decltype(x)>>, "Cannot process pair."s);

    return 0;
}
```

Removing the operator""s removes the internal compiler error.
Comment 1 Jiang An 2023-04-10 02:56:02 UTC
Seems fixed recently:
https://gcc.godbolt.org/z/zTWoT4rsY
Comment 2 Jakub Jelinek 2023-04-10 07:24:21 UTC
Indeed.

*** This bug has been marked as a duplicate of bug 105300 ***
Comment 3 Steven Xia 2023-04-10 17:32:25 UTC
(In reply to Jakub Jelinek from comment #2)
> Indeed.
> 
> *** This bug has been marked as a duplicate of bug 105300 ***

Thanks for the pointers and sorry for the confusion, will check against trunk next time for any bug reports.