public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/61391] New: [4.10 Regression] ICE in execute_one_pass at -O3 and above
@ 2014-06-02 18:44 asolokha at gmx dot com
  2014-06-03  1:16 ` [Bug other/61391] " asolokha at gmx dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: asolokha at gmx dot com @ 2014-06-02 18:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61391
           Summary: [4.10 Regression] ICE in execute_one_pass at -O3 and
                    above
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com

At least 4.10.0-alpha20140525 and newer ICEs when compiling the following code
at -O3 or -Ofast:

short int u;
int h;
int i;

void
p(void)
{
  int c[2] = { 0 };
  for (h = 0; h < 2; ++h) {
    static int *l = &h;
    int t;
    int n;
    for (t = 0; t < 7; ++t)
      c[0] = (i & -(short int)(c[h+1] || (u = -(n != *l))) || c[h+1]);
  }
}

f55ba4cd.c: In function 'p':
f55ba4cd.c:6:1: internal compiler error: Segmentation fault
 p(void)
 ^

Unfortunately I cannot provide a meaningful stack trace because stack seems to
be corrupted. The last active frame seems to be of execute_one_pass(opt_pass*),
and "gdb disassemble" gives the following on x86_64:

<snipped>
   0x00000000008047b7 <+677>:    xor    %eax,%eax
   0x00000000008047b9 <+679>:    jmpq   0x804630
<_Z16execute_one_passP8opt_pass+286>
   0x00000000008047be <+684>:    mov    0x0(%rbp),%rax
   0x00000000008047c2 <+688>:    mov    0xb12b4f(%rip),%rsi        # 0x1317318
<cfun>
   0x00000000008047c9 <+695>:    mov    %rbp,%rdi
   0x00000000008047cc <+698>:    callq  *0x20(%rax)
=> 0x00000000008047cf <+701>:    mov    %eax,%r13d
   0x00000000008047d2 <+704>:    xor    %esi,%esi
   0x00000000008047d4 <+706>:    mov    $0x8023f0,%edi
   0x00000000008047d9 <+711>:    callq  0x802af2
   0x00000000008047de <+716>:    jmp    0x804795
<_Z16execute_one_passP8opt_pass+643>
   0x00000000008047e0 <+718>:    test   %rsi,%rsi
   0x00000000008047e3 <+721>:    jne    0x8047f3
<_Z16execute_one_passP8opt_pass+737>
   0x00000000008047e5 <+723>:    cmpq   $0x0,0xbc1bbb(%rip)        # 0x13c63a8
<current_function_decl>
</snipped>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-11-08  9:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-02 18:44 [Bug other/61391] New: [4.10 Regression] ICE in execute_one_pass at -O3 and above asolokha at gmx dot com
2014-06-03  1:16 ` [Bug other/61391] " asolokha at gmx dot com
2014-06-03 11:35 ` rguenth at gcc dot gnu.org
2014-06-04  8:57 ` ysrumyan at gmail dot com
2014-06-26  7:55 ` ysrumyan at gmail dot com
2014-10-28  7:41 ` [Bug other/61391] [5 " asolokha at gmx dot com
2014-11-07 14:06 ` ysrumyan at gmail dot com
2014-11-07 16:13 ` manu at gcc dot gnu.org
2014-11-07 16:26 ` manu at gcc dot gnu.org
2014-11-08  9:09 ` asolokha at gmx dot com

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).