public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/113454] New: [14 regression] "assignment of read-only member" error with 483.xalancbmk from SPEC CPU 2006
@ 2024-01-17 17:14 macro at orcam dot me.uk
2024-01-17 17:53 ` [Bug c++/113454] " sjames at gcc dot gnu.org
2024-01-17 18:25 ` macro at orcam dot me.uk
0 siblings, 2 replies; 3+ messages in thread
From: macro at orcam dot me.uk @ 2024-01-17 17:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113454
Bug ID: 113454
Summary: [14 regression] "assignment of read-only member" error
with 483.xalancbmk from SPEC CPU 2006
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: macro at orcam dot me.uk
CC: ppalka at gcc dot gnu.org
Target Milestone: ---
Created attachment 57116
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57116&action=edit
Reduced reproducer
As from commit 6e92a6a2a72d ("c++: non-dependent assignment checking
[PR63198, PR18474]") I get a compilation error when building 483.xalancbmk
from the SPEC CPU 2006 benchmarks suite:
./xercesc/util/NameIdPool.c: In member function
'xercesc_2_5::NameIdPoolEnumerator<TElem>&
xercesc_2_5::NameIdPoolEnumerator<TElem>::operator=(const
xercesc_2_5::NameIdPoolEnumerator<TElem>&)':
./xercesc/util/NameIdPool.c:416:20: error: assignment of read-only member
'xercesc_2_5::NameIdPoolEnumerator<TElem>::fMemoryManager'
416 | fMemoryManager = toAssign.fMemoryManager;
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
For reference I have attached a reduced reproducer. By reverting the
gcc/cp/typeck.cc part of said commit I can make this piece compile.
Now this is somewhat old code, which however used to build for at least 17
years. Intuitively, given the `const' member annotation an assignment to
it outside a constructor is rightfully rejected, however my C++-fu is not
strong enough to back up such a claim and I can't find the relevant C++
language standard clause either way. For several error situations we used
to accept we now provide respective `-Wno-error=' options, however this
case is not one of them.
Filing this bug then for the C++ experts to decide, and if nothing else for
posterity, so that the next person who comes across this build failure can
find it and save themselves from repeating my investigation.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/113454] [14 regression] "assignment of read-only member" error with 483.xalancbmk from SPEC CPU 2006
2024-01-17 17:14 [Bug c++/113454] New: [14 regression] "assignment of read-only member" error with 483.xalancbmk from SPEC CPU 2006 macro at orcam dot me.uk
@ 2024-01-17 17:53 ` sjames at gcc dot gnu.org
2024-01-17 18:25 ` macro at orcam dot me.uk
1 sibling, 0 replies; 3+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-01-17 17:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113454
Sam James <sjames at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sjames at gcc dot gnu.org
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Maciej W. Rozycki from comment #0)
> Filing this bug then for the C++ experts to decide, and if nothing else for
> posterity, so that the next person who comes across this build failure can
> find it and save themselves from repeating my investigation.
Didn't help this time ;)
*** This bug has been marked as a duplicate of bug 111544 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/113454] [14 regression] "assignment of read-only member" error with 483.xalancbmk from SPEC CPU 2006
2024-01-17 17:14 [Bug c++/113454] New: [14 regression] "assignment of read-only member" error with 483.xalancbmk from SPEC CPU 2006 macro at orcam dot me.uk
2024-01-17 17:53 ` [Bug c++/113454] " sjames at gcc dot gnu.org
@ 2024-01-17 18:25 ` macro at orcam dot me.uk
1 sibling, 0 replies; 3+ messages in thread
From: macro at orcam dot me.uk @ 2024-01-17 18:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113454
--- Comment #2 from Maciej W. Rozycki <macro at orcam dot me.uk> ---
(In reply to Sam James from comment #1)
> Didn't help this time ;)
Well, now it mentions 483.xalancbmk, which the other bug does not
(and which I searched for specifically, finding only a bunch of old
reports).
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-17 18:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-17 17:14 [Bug c++/113454] New: [14 regression] "assignment of read-only member" error with 483.xalancbmk from SPEC CPU 2006 macro at orcam dot me.uk
2024-01-17 17:53 ` [Bug c++/113454] " sjames at gcc dot gnu.org
2024-01-17 18:25 ` macro at orcam dot me.uk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).