[Bug c++/88390] New: [9 regression] g++.dg/tree-prof/pr57451.C FAILs

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug c++/88390] New: [9 regression] g++.dg/tree-prof/pr57451.C FAILs

kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88390

            Bug ID: 88390
           Summary: [9 regression] g++.dg/tree-prof/pr57451.C FAILs
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: ebotcazou at gcc dot gnu.org, hubicka at gcc dot gnu.org
  Target Milestone: ---
            Target: sparc*-sun-solaris2.*

Created attachment 45170
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45170&action=edit
pr57451.s @ r266583, ok

Between 20181203 (r266766) and 20181204 (r266798), the
g++.dg/tree-prof/pr57451.C
test started to FAIL on Solaris/SPARC (32 and 64-bit):

+UNRESOLVED: g++.dg/tree-prof/pr57451.C compilation,  -fprofile-use
-D_PROFILE_USE
+FAIL: g++.dg/tree-prof/pr57451.C execution,    -fprofile-generate
-D_PROFILE_GENERATE
+UNRESOLVED: g++.dg/tree-prof/pr57451.C execution,    -fprofile-use
-D_PROFILE_USE

Thread 2 received signal SIGILL, Illegal instruction.
[Switching to Thread 1 (LWP 1)]
0x00012014 in main ()
    at /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/tree-prof/pr57451.C:21
21            data = getData(1);
1: x/i $pc
=> 0x12014 <main(int, char**)+164>:     illtrap  0x4

This happens only at -O1 and above.

   0x12000 <main(int, char**)+144>:     add  %fp, -4, %g1
   0x12004 <main(int, char**)+148>:     mov  1, %o0
   0x12008 <main(int, char**)+152>:     st  %g1, [ %sp + 0x40 ]
   0x1200c <main(int, char**)+156>:     call  0x11e14 <getData(int)>
   0x12010 <main(int, char**)+160>:     nop
=> 0x12014 <main(int, char**)+164>:     illtrap  0x4

This was previously hidden and only recently uncovered by

2018-12-04  Iain Sandoe  <[hidden email]>

        PR testsuite/88310
        * lib/target-supports.exp (check_effective_target_freorder):
        Suppress warnings for missing profile.

A reghunt reveals that the regression was caused by

2018-11-28  Jan Hubicka  <[hidden email]>

        * except.c (do_allocate_exception): Annotate __cxa_allocate_exception
        as COLD.

I'm attaching the assembler output before and after that patch.
Reply | Threaded
Open this post in threaded view
|

[Bug c++/88390] [9 regression] g++.dg/tree-prof/pr57451.C FAILs

kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88390

--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 45171
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45171&action=edit
pr57451.s @ r266584, SIGILL
Reply | Threaded
Open this post in threaded view
|

[Bug c++/88390] [9 regression] g++.dg/tree-prof/pr57451.C FAILs

kargl at gcc dot gnu.org
In reply to this post by kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88390

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |9.0
Reply | Threaded
Open this post in threaded view
|

[Bug c++/88390] [9 regression] g++.dg/tree-prof/pr57451.C FAILs

kargl at gcc dot gnu.org
In reply to this post by kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88390

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-12-07
     Ever confirmed|0                           |1

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
It's a missing cfi_window_save directive for the cold part of getData.
Reply | Threaded
Open this post in threaded view
|

[Bug c++/88390] [9 regression] g++.dg/tree-prof/pr57451.C FAILs

kargl at gcc dot gnu.org
In reply to this post by kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88390

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |ebotcazou at gcc dot gnu.org

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Investigating.
Reply | Threaded
Open this post in threaded view
|

[Bug rtl-optimization/88390] [9 regression] g++.dg/tree-prof/pr57451.C FAILs

kargl at gcc dot gnu.org
In reply to this post by kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88390

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |rtl-optimization

--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Recategorizing.
Reply | Threaded
Open this post in threaded view
|

[Bug rtl-optimization/88390] [9 regression] g++.dg/tree-prof/pr57451.C FAILs

kargl at gcc dot gnu.org
In reply to this post by kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88390

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Author: ebotcazou
Date: Sat Dec  8 11:07:53 2018
New Revision: 266906

URL: https://gcc.gnu.org/viewcvs?rev=266906&root=gcc&view=rev
Log:
        PR rtl-optimization/88390
        * dwarf2cfi.c (struct dw_cfi_row): Add window_save field.
        (cfi_row_equal_p): Compare it.
        (dwarf2out_frame_debug_cfa_window_save): Add FAKE parameter.
        If FAKE is false, set window_save of the current row.
        (dwarf2out_frame_debug) <REG_CFA_TOGGLE_RA_MANGLE>: Call above
        function with FAKE parameter set to true.
        <REG_CFA_WINDOW_SAVE>: Likewise but with FAKE parameter set to false.
        (change_cfi_row): Emit a DW_CFA_GNU_window_save if necessary.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2cfi.c
Reply | Threaded
Open this post in threaded view
|

[Bug rtl-optimization/88390] [9 regression] g++.dg/tree-prof/pr57451.C FAILs

kargl at gcc dot gnu.org
In reply to this post by kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88390

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Thanks for reporting the problem.