public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/44997]  New: [4.6 regression]  tree-chrec introduces broken asm code
@ 2010-07-20  7:02 jojelino at gmail dot com
  2010-07-20  7:03 ` [Bug tree-optimization/44997] " jojelino at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jojelino at gmail dot com @ 2010-07-20  7:02 UTC (permalink / raw)
  To: gcc-bugs

$ /tmp/winsup/winsup/utils/mingw gcc -c -O1  -march=core2 -g -mfpmath=sse -I../
../.././winsup/mingw/include -I../../.././winsup/mingw/../include -nostdinc -iw
ithprefixbefore include -I ../../.././winsup/mingw/../w32api/include ../../../.
/winsup/mingw/tlssup.c -fdump-tree-all -v -o tlssup.o 

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-pc-cygwin/4.6.0/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: ./configure --prefix=/usr --disable-win32-registry
--enable-threads=posix --enable-languages=c,c++ --with-win32-nlsapi=unicode
--enable-tls --disable-bootstrap --enable-shared --disable-sjlj-exceptions
Thread model: posix
gcc version 4.6.0 20100720 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-D__MINGW32__' '-D__MSVCRT__' '-DWIN32' '-D_WIN32'
'-D__WIN32' '-D__WIN32__' '-U__CYGWIN__' '-Uunix' '-U__unix__' '-U__unix' '-U'
'__CYGWIN32__' '-B/usr/i686-pc-mingw32/lib/' '-c' '-O1' '-march=core2' '-g'
'-mfpmath=sse' '-I../../.././winsup/mingw/include'
'-I../../.././winsup/mingw/../include' '-nostdinc' '-iwithprefixbefore'
'include' '-I' '../../.././winsup/mingw/../w32api/include' '-fdump-tree-all'
'-v' '-o' 'tlssup.o'
 /usr/libexec/gcc/i686-pc-cygwin/4.6.0/cc1.exe -quiet -nostdinc -v
-I../../.././winsup/mingw/include -I../../.././winsup/mingw/../include -I
../../.././winsup/mingw/../w32api/include -D__CYGWIN32__ -D__CYGWIN__ -Dunix
-D__unix__ -D__unix -D__MINGW32__ -D__MSVCRT__ -DWIN32 -D_WIN32 -D__WIN32
-D__WIN32__ -U__CYGWIN__ -Uunix -U__unix__ -U__unix -U __CYGWIN32__
-iwithprefixbefore include ../../.././winsup/mingw/tlssup.c -quiet -dumpbase
tlssup.c -march=core2 -mfpmath=sse -auxbase-strip tlssup.o -g -O1 -version
-fdump-tree-all -o /cygdrive/d/temp/cache/cc5gTTLK.s
GNU C (GCC) version 4.6.0 20100720 (experimental) (i686-pc-cygwin)
        compiled by GNU C version 4.6.0 20100714 (experimental), GMP version
5.0.0, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory "../../.././winsup/mingw/../include"
#include "..." search starts here:
#include <...> search starts here:
 ../../.././winsup/mingw/include
 ../../.././winsup/mingw/../w32api/include
 /usr/lib/gcc/i686-pc-cygwin/4.6.0/include
End of search list.
GNU C (GCC) version 4.6.0 20100720 (experimental) (i686-pc-cygwin)
        compiled by GNU C version 4.6.0 20100714 (experimental), GMP version
5.0.0, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: dd858d16e3b9efdb2261b9ced20762e0
COLLECT_GCC_OPTIONS='-D__MINGW32__' '-D__MSVCRT__' '-DWIN32' '-D_WIN32'
'-D__WIN32' '-D__WIN32__' '-U__CYGWIN__' '-Uunix' '-U__unix__' '-U__unix' '-U'
'__CYGWIN32__' '-B/usr/i686-pc-mingw32/lib/' '-c' '-O1' '-march=core2' '-g'
'-mfpmath=sse' '-I../../.././winsup/mingw/include'
'-I../../.././winsup/mingw/../include' '-nostdinc' '-iwithprefixbefore'
'include' '-I' '../../.././winsup/mingw/../w32api/include' '-fdump-tree-all'
'-v' '-o' 'tlssup.o'
 /usr/lib/gcc/i686-pc-cygwin/4.6.0/../../../../i686-pc-cygwin/bin/as.exe -o
tlssup.o /cygdrive/d/temp/cache/cc5gTTLK.s
COMPILER_PATH=/usr/i686-pc-mingw32/lib/:/usr/libexec/gcc/i686-pc-cygwin/4.6.0/:/usr/libexec/gcc/i686-pc-cygwin/4.6.0/:/usr/libexec/gcc/i686-pc-cygwin/:/usr/lib/gcc/i686-pc-cygwin/4.6.0/:/usr/lib/gcc/i686-pc-cygwin/:/usr/lib/gcc/i686-pc-cygwin/4.6.0/../../../../i686-pc-cygwin/bin/
LIBRARY_PATH=/usr/i686-pc-mingw32/lib/:/usr/lib/gcc/i686-pc-cygwin/4.6.0/:/usr/lib/gcc/i686-pc-cygwin/4.6.0/../../../../i686-pc-cygwin/lib/:/usr/lib/gcc/i686-pc-cygwin/4.6.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-D__MINGW32__' '-D__MSVCRT__' '-DWIN32' '-D_WIN32'
'-D__WIN32' '-D__WIN32__' '-U__CYGWIN__' '-Uunix' '-U__unix__' '-U__unix' '-U'
'__CYGWIN32__' '-B/usr/i686-pc-mingw32/lib/' '-c' '-O1' '-march=core2' '-g'
'-mfpmath=sse' '-I../../.././winsup/mingw/include'
'-I../../.././winsup/mingw/../include' '-nostdinc' '-iwithprefixbefore'
'include' '-I' '../../.././winsup/mingw/../w32api/include' '-fdump-tree-all'
'-v' '-o' 'tlssup.o'

before tree-chrec we have

<bb 14>:
  if (dwReason_20(D) != 2)
    goto <bb 15>;
  else
    goto <bb 20>;
<bb 20>:
  # pfunc_1 = PHI <&MEM[(void *)&__xd_a + 4B](14), pfunc_27(19)>
  # DEBUG pfunc => pfunc_1
  if (pfunc_1 != &__xd_z)
    goto <bb 17>;
  else
    goto <bb 21>;
<bb 17>:
  D.36698_25 = *pfunc_1;
  if (D.36698_25 != 0B)
    goto <bb 18>;
  else
    goto <bb 19>;
<bb 18>:
  D.36698_25 ();

<bb 19>:
  pfunc_27 = pfunc_1 + 4;
  # DEBUG pfunc => pfunc_27
this is equivalant from code. OK. 
but after applying chrec, i got

<bb 14>:
  if (dwReason_20(D) != 2)
    goto <bb 16>;
  else
    goto <bb 15>;

<bb 15>:
  # pfunc_26 = PHI <&MEM[(void *)&__xd_a + 4B](14)>
  # DEBUG pfunc => pfunc_26
  goto <bb 18>;
<bb 18>:
  # pfunc_62 = PHI <pfunc_27(20), pfunc_26(15)>
  D.36698_25 = *pfunc_62;
  if (D.36698_25 != 0B)
    goto <bb 19>;
  else
    goto <bb 20>;
<bb 20>:
  pfunc_27 = pfunc_62 + 4;
  # DEBUG pfunc => pfunc_27
  # DEBUG pfunc => pfunc_27
  if (pfunc_27 != &__xd_z)
    goto <bb 18>;
  else
    goto <bb 21>;

we all know there is something wrong. it resulted segmetation fault because
pretest statement moved latter block so there is no way to prevent it...
it introduced from -O1. is it a bug or a intended one??


-- 
           Summary: [4.6 regression]  tree-chrec introduces broken asm code
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jojelino at gmail dot com
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44997


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

end of thread, other threads:[~2010-08-20 12:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-20  7:02 [Bug tree-optimization/44997] New: [4.6 regression] tree-chrec introduces broken asm code jojelino at gmail dot com
2010-07-20  7:03 ` [Bug tree-optimization/44997] " jojelino at gmail dot com
2010-07-20  7:05 ` jojelino at gmail dot com
2010-07-20  7:05 ` jojelino at gmail dot com
2010-07-20 10:05 ` rguenth at gcc dot gnu dot org
2010-07-20 11:05 ` jojelino at gmail dot com
2010-07-20 11:05 ` jojelino at gmail dot com
2010-07-20 11:28 ` jojelino at gmail dot com
2010-07-26 11:52 ` jakub at gcc dot gnu dot org
2010-08-20 12:38 ` jakub at gcc dot gnu dot 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).