public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/94873] New: [8/9/10 Regression] wrong code with -O -fno-merge-constants -fno-split-wide-types -fno-tree-fre
@ 2020-04-30 10:44 zsojka at seznam dot cz
  2020-04-30 12:36 ` [Bug rtl-optimization/94873] " jakub at gcc dot gnu.org
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: zsojka at seznam dot cz @ 2020-04-30 10:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94873
           Summary: [8/9/10 Regression] wrong code with -O
                    -fno-merge-constants -fno-split-wide-types
                    -fno-tree-fre
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: aarch64-unknown-linux-gnu

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

Output:
$ aarch64-unknown-linux-gnu-gcc -O -fno-merge-constants -fno-split-wide-types
-fno-tree-fre testcase.c -static
$ ./a.out 
`�+%��@�

The generated code passes wrong data as the "format" argument; I wasn't able to
reproduce this without using __builtin_printf() quickly.

...
        and     w1, w1, 255     //, MEM[(volatile unsigned char *)&x]
        adrp    x0, .LANCHOR0   // tmp98,
        add     x0, x0, :lo12:.LANCHOR0 //, tmp98,
        bl      printf          //
...
        .set    .LANCHOR0,. + 0
.LC0:
        .xword  -846514461162629792
        .xword  0
.LC1:
        .string "%02x"
...

$ aarch64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-aarch64/bin/aarch64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r10-8064-20200430095601-g31e6f829336-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/10.0.1/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl
--with-sysroot=/usr/aarch64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=aarch64-unknown-linux-gnu
--with-ld=/usr/bin/aarch64-unknown-linux-gnu-ld
--with-as=/usr/bin/aarch64-unknown-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r10-8064-20200430095601-g31e6f829336-checking-yes-rtl-df-extra-aarch64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.0.1 20200430 (experimental) (GCC)

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

end of thread, other threads:[~2020-09-17 17:49 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30 10:44 [Bug rtl-optimization/94873] New: [8/9/10 Regression] wrong code with -O -fno-merge-constants -fno-split-wide-types -fno-tree-fre zsojka at seznam dot cz
2020-04-30 12:36 ` [Bug rtl-optimization/94873] " jakub at gcc dot gnu.org
2020-04-30 12:42 ` jakub at gcc dot gnu.org
2020-04-30 12:46 ` jakub at gcc dot gnu.org
2020-04-30 15:00 ` jakub at gcc dot gnu.org
2020-05-01 15:11 ` [Bug rtl-optimization/94873] [8/9/10/11 " jakub at gcc dot gnu.org
2020-05-01 15:21 ` law at redhat dot com
2020-05-01 17:17 ` rsandifo at gcc dot gnu.org
2020-05-01 18:31 ` segher at gcc dot gnu.org
2020-05-01 18:52 ` rsandifo at gcc dot gnu.org
2020-05-04 19:09 ` segher at gcc dot gnu.org
2020-05-04 19:26 ` segher at gcc dot gnu.org
2020-05-04 19:58 ` rsandifo at gcc dot gnu.org
2020-05-04 20:47 ` rsandifo at gcc dot gnu.org
2020-05-04 22:12 ` ebotcazou at gcc dot gnu.org
2020-05-04 23:16 ` segher at gcc dot gnu.org
2020-05-05  7:24 ` ebotcazou at gcc dot gnu.org
2020-05-05  7:34 ` jakub at gcc dot gnu.org
2020-05-05  8:04 ` ebotcazou at gcc dot gnu.org
2020-05-05 10:22 ` jakub at gcc dot gnu.org
2020-05-05 15:02 ` segher at gcc dot gnu.org
2020-05-06  7:34 ` cvs-commit at gcc dot gnu.org
2020-05-06 11:50 ` [Bug rtl-optimization/94873] [8/9/10 " jakub at gcc dot gnu.org
2020-05-07 13:28 ` cvs-commit at gcc dot gnu.org
2020-05-07 13:33 ` [Bug rtl-optimization/94873] [8/9 " jakub at gcc dot gnu.org
2020-09-16 19:21 ` cvs-commit at gcc dot gnu.org
2020-09-17 17:49 ` jakub 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).