Bug 2054289 - libstdc++ std::reference_wrapper doesn't compile with clang in some circumtances
Summary: libstdc++ std::reference_wrapper doesn't compile with clang in some circumtances
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 39
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-14 15:35 UTC by Avi Kivity
Modified: 2023-08-16 07:05 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
reproducer (292 bytes, text/x-csrc)
2022-02-14 15:35 UTC, Avi Kivity
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 104546 0 P3 NEW std::reference_wrapper doesn't compile with clang in some circumstances 2023-04-25 16:58:47 UTC
Github llvm llvm-project issues 53049 0 None open clang: std::sort with std::ref(comparator) using recent libstdc++ fails compilation with "exception specification uses i... 2023-04-25 16:58:50 UTC

Description Avi Kivity 2022-02-14 15:35:54 UTC
Created attachment 1860999 [details]
reproducer

Description of problem:

Because gcc coroutines don't support ASAN, we compile with clang. With libstdc++-11.2.1-9.fc34.x86_64, our program no longer compiles with clang. This is due to a clang bug [1], but it was exposed by the libstdc++ update.


[1] https://github.com/llvm/llvm-project/issues/53049

Version-Release number of selected component (if applicable):

libstdc++-11.2.1-9.fc34.x86_64

How reproducible:

Always

Steps to Reproduce:
1. gcc -o repro.o -c -std=li
2. clang++ -c -o repro.o -std=gnu++20 repro.cc
3. cry at errors

Actual results:

Compilation errors.


Expected results:


Good .o

Additional info:


I'll understand a WONFIX here, though it will leave me in a bind. It's totally a clang bug. I'd move to gcc if I could.

Comment 1 Avi Kivity 2022-02-15 09:01:47 UTC
Turns out it was simple for us to work around, so urgency is nil for us. It might still impact others.

Comment 2 Jonathan Wakely 2022-02-15 10:06:10 UTC
OK, thanks. I'll report it upstream and deal with it when I can.

Comment 3 Ben Cotton 2022-05-12 15:32:08 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 4 Jonathan Wakely 2022-05-12 18:21:13 UTC
Still an issue with F35 (and newer)

Comment 5 Ben Cotton 2022-11-29 17:53:14 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 6 Ben Cotton 2023-04-25 16:53:57 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 7 Jonathan Wakely 2023-04-25 16:59:22 UTC
Still an issue in rawhide (although it's really a clang bug not a gcc one - the libstdc++ headers are correct).

Comment 8 Fedora Release Engineering 2023-08-16 07:05:15 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.


Note You need to log in before you can comment on or make changes to this bug.