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

            Bug ID: 77921
           Summary: [7 Regression] tree-ssanames.c miscompiled during PGO
                    bootstrap
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

Created attachment 39783
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39783&action=edit
unreduced testcase

% g++ -S -Wno-coverage-mismatch -c -O2 -fprofile-use tree-ssanames.ii

        .section        .text.unlikely                                          
        .cfi_startproc                                                          
        .type   _Z12release_defsP6gimple.cold.41, @function                     
_Z12release_defsP6gimple.cold.41:                                               
.L138:                                                                          
        .cfi_def_cfa_offset 80                                                  
        .cfi_offset 3, -56                                                      
        .cfi_offset 6, -48                                                      
        .cfi_offset 12, -40                                                     
        .cfi_offset 13, -32                                                     
        .cfi_offset 14, -24                                                     
        .cfi_offset 15, -16                                                     
        movl    %r14d, %r12d                                                    
.L123:                                                                          
        movq    32(%rbx), %rbx                                                  
        movzwl  (%rbx), %ecx                                                    
        jmp     .L128                                                           
.L105:                                                                          
        movq    stderr(%rip), %rdi                                              
        movq    %rbx, %rsi                                                      
        call    _Z16verify_imm_linksP8_IO_FILEP9tree_node                       
        jmp     .L106                                                           
.L85:                                                                           
        movq    48(%rdi), %rbx                                                  
        testq   %rbx, %rbx                                                      
        je      .L80                                                            
        movl    $0, 4(%rsp)                                                     
        movl    $0, 8(%rsp)                                                     
        movl    $0, 12(%rsp)                                                    
        jmp     .L98                                                            
.L82:                                                                           
        movzbl  73(%rdi), %edx                                                  
        movq    48(%rdi), %rbx                                                  
        testq   %rbx, %rbx                                                      
        movl    %edx, 4(%rsp)                                                   
        je      .L87                                                            
        movl    $0, 8(%rsp)                                                     
        movl    $2, 12(%rsp)                                                    
        jmp     .L98                                                            
.L133:                                                                          
        movl    8(%rsp), %edx                                                   
        jmp     .L89                                                            
.L137:                                                                          
        movl    %r14d, 8(%rsp)                                                  
        jmp     .L121                                                           
.L180:                                                                          
.L115:                                                                          
        jmp     .L115  

Also happens on ppc64le (although in a different function):

00000000108b5450 <_Z19release_ssa_name_fnP8functionP9tree_node>:
...
108b5690:   00 00 00 48     b       108b5690
<_Z19release_ssa_name_fnP8functionP9tree_node+0x240>

Reply via email to