public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/67221] New: ICE at -Os and above on x86_64-linux-gnu: Segmentation fault (program cc1)
@ 2015-08-14 18:09 su at cs dot ucdavis.edu
  2015-08-14 18:10 ` [Bug rtl-optimization/67221] " mpolacek at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: su at cs dot ucdavis.edu @ 2015-08-14 18:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67221
           Summary: ICE at -Os and above on x86_64-linux-gnu: Segmentation
                    fault (program cc1)
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following (valid) code causes an ICE when compiled with the current gcc
trunk at -Os and above on x86_64-linux-gnu in both 32-bit and 64-bit modes.

It is a regression from 5.1.x. 

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20150813 (experimental) [trunk revision 226872] (GCC) 
$ 
$ gcc-trunk -O1 -c small.c
$ gcc-5.1 -Os -c small.c
$ 
$ gcc-trunk -Os -c small.c
gcc-trunk: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
$ 


----------------------------------


int a, b;

int
fn1 (int p)
{
  return 0 == 0 ? p : 0;
}

void
fn2 ()
{
  int c = 1, d[1] = { 1 };
lbl:
  for (;;)
    {
      int e;
      c ? 0 : 0 / c;
      c = 0;
      if (fn1 (d[0]))
        break;
      for (e = 0; e < 1; e++)
        for (c = 1; b;)
          {
            if (a)
              break;
            goto lbl;
          }
    }
}


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

end of thread, other threads:[~2015-08-17 14:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-14 18:09 [Bug rtl-optimization/67221] New: ICE at -Os and above on x86_64-linux-gnu: Segmentation fault (program cc1) su at cs dot ucdavis.edu
2015-08-14 18:10 ` [Bug rtl-optimization/67221] " mpolacek at gcc dot gnu.org
2015-08-14 18:17 ` trippels at gcc dot gnu.org
2015-08-14 20:09 ` mpolacek at gcc dot gnu.org
2015-08-17  7:31 ` [Bug tree-optimization/67221] [6 Regression] " rguenth at gcc dot gnu.org
2015-08-17  8:25 ` rguenth at gcc dot gnu.org
2015-08-17 14:18 ` rguenth at gcc dot gnu.org
2015-08-17 14:18 ` rguenth at gcc dot gnu.org

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