[Bug c++/110185] [14 Regression]: Tens of c++ testsuite crashes for cris-elf with r14-1624-g28db36e2cfca1b

2023-06-09 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110185

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Jason Merrill  ---
Fixed.

[Bug c++/110185] [14 Regression]: Tens of c++ testsuite crashes for cris-elf with r14-1624-g28db36e2cfca1b

2023-06-09 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110185

--- Comment #3 from CVS Commits  ---
The trunk branch has been updated by Jason Merrill :

https://gcc.gnu.org/g:953bbeaeff050f4d0b670568a587aa1ce82ed711

commit r14-1660-g953bbeaeff050f4d0b670568a587aa1ce82ed711
Author: Jason Merrill 
Date:   Fri Jun 9 10:37:35 2023 -0400

c++: fix 32-bit spaceship failures [PR110185]

Various spaceship tests failed after r14-1624.  This turned out to be
because the comparison category classes return in memory on 32-bit targets,
and the synthesized operator<=> looks something like

if (auto v = a.x <=> b.x, v == 0); else return v;
if (auto v = a.y <=> b.y, v == 0); else return v;
etc.

so check_return_expr was trying to do NRVO for all the 'v' variables, and
now on subsequent returns we check to see if the previous NRV is still in
scope.  But the NRVs didn't have names, so looking up name bindings
crashed.
Fixed both by giving 'v' a name so we can NRVO the first one, and fixing
the
test to give up if the old NRV has no name.

PR c++/110185
PR c++/58487

gcc/cp/ChangeLog:

* method.cc (build_comparison_op): Give retval a name.
* typeck.cc (check_return_expr): Fix for nameless variables.

[Bug c++/110185] [14 Regression]: Tens of c++ testsuite crashes for cris-elf with r14-1624-g28db36e2cfca1b

2023-06-09 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110185

Jason Merrill  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 CC||jason at gcc dot gnu.org
   Last reconfirmed||2023-06-09
 Status|UNCONFIRMED |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug c++/110185] [14 Regression]: Tens of c++ testsuite crashes for cris-elf with r14-1624-g28db36e2cfca1b

2023-06-09 Thread ro at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110185

Rainer Orth  changed:

   What|Removed |Added

 CC||ro at gcc dot gnu.org
 Target|cris-elf|cris-elf,
   ||i386-pc-solaris2.11,
   ||sparc-sun-solaris2.11

--- Comment #2 from Rainer Orth  ---
I'm seeing exactly the same natively on both Solaris/x86 and Solaris/sparc
(for the 32-bit multilibs only; 64-bit tests are fine).

[Bug c++/110185] [14 Regression]: Tens of c++ testsuite crashes for cris-elf with r14-1624-g28db36e2cfca1b

2023-06-09 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110185

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug c++/110185] [14 Regression]: Tens of c++ testsuite crashes for cris-elf with r14-1624-g28db36e2cfca1b

2023-06-08 Thread hp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110185

--- Comment #1 from Hans-Peter Nilsson  ---
Created attachment 55290
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55290&action=edit
spaceship-synth13.ii

Hm, that attachment was for a test that checked for errors.  Here's one for a
tests that should compile without errors,
/testsuite/g++.dg/cpp2a/spaceship-synth13.C.

Repeat with cc1plus -fpreprocessed spaceship-synth13.ii -melf -quiet -dumpbase
spaceship-synth13.C -dumpbase-ext .C -pedantic-errors -Wno-long-long -std=c++20
-version -fdiagnostics-color=never -fno-diagnostics-show-caret
-fno-diagnostics-show-line-numbers -fdiagnostics-urls=never
-fdiagnostics-path-format=separate-events -fmessage-length=0 -o
spaceship-synth13.s