https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85107

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |msebor at gcc dot gnu.org
         Resolution|---                         |DUPLICATE

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
With the top of trunk (258935) I get:

$ cat pr85107.C && gcc -S pr85107.C
double dbDivisor{ 1.0 };
double dbQuotient{ static_cast<int>(1.0 / dbDivisor) };
pr85107.C:2:20: warning: narrowing conversion of ‘(int)(1.0e+0 / dbDivisor)’
from ‘int’ to ‘double’ inside { } [-Wnarrowing]
 double dbQuotient{ static_cast<int>(1.0 / dbDivisor) };
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

With r258676 I see the SEGV below.  The stack trace suggests infinite recursion
in the pretty-printer.

Program received signal SIGSEGV, Segmentation fault.
0x000000000089d204 in cxx_pretty_printer::unary_expression (
    this=<error reading variable: Cannot access memory at address
0x7ffffbffefd8>, t=<error reading variable: Cannot access memory at address
0x7ffffbffefd0>)
    at ../../gcc/cp/cxx-pretty-print.c:754
754     {


I'm pretty sure this is a duplicate of bug 85045 (backing out the patch brings
the SEGV back).  If not, please reopen.

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

Reply via email to