This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/69400] New: [5/6 Regression] wrong code with -O and int128


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

            Bug ID: 69400
           Summary: [5/6 Regression] wrong code with -O and int128
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-*, aarch64-*, powerpc64-*, sparc64-*

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

This PR shows the problem might be more common than just ccp (PR69399).

Output:
$ x86_64-pc-linux-gnu-gcc -O testcase.c
$ ./a.out 
Aborted

First broken dump is .ccp1:
...
Folding statement: return _3;
Folded into: return 0xfffffffffffffffffffffffffffffffe;
...
Thus:
$ x86_64-pc-linux-gnu-gcc -O testcase.c -fno-tree-ccp
$ ./a.out 
Aborted

First broken dump is .forwprop1:
...
gimple_simplified to u_2 = 0xfffffffffffffffffffffffffffffffe;
gimple_simplified to _3 = 0xfffffffffffffffffffffffffffffffe;
...
Thus:
$ x86_64-pc-linux-gnu-gcc -O testcase.c -fno-tree-ccp -fno-tree-forwprop
$ ./a.out 
Aborted

First broken dump is .fre1:
...
Replaced u_1 % 18446744073709551615 with 0xfffffffffffffffffffffffffffffffe in
all uses of u_2 = u_1 % 18446744073709551615;
...
Thus:
$ x86_64-pc-linux-gnu-gcc -O testcase.c -fno-tree-ccp -fno-tree-forwprop
-fno-tree-fre
$ ./a.out 
Aborted

I stopped there.


$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-232548-checking-yes-rtl-df-nographite/bin/../libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-checking=yes,rtl,df --without-cloog --without-ppl --without-isl
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-232548-checking-yes-rtl-df-nographite
Thread model: posix
gcc version 6.0.0 20160119 (experimental) (GCC) 



Tested revisions:
trunk r232548 - FAIL
5-branch r232545 - FAIL
4_[6789]-branch - OK

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]