public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/111574] New: Illegal instruction with
@ 2023-09-24 17:29 19373742 at buaa dot edu.cn
  2023-09-24 17:34 ` [Bug c/111574] " 19373742 at buaa dot edu.cn
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: 19373742 at buaa dot edu.cn @ 2023-09-24 17:29 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111574
           Summary: Illegal instruction with
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 19373742 at buaa dot edu.cn
  Target Milestone: ---

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

* [Bug c/111574] Illegal instruction with
  2023-09-24 17:29 [Bug c/111574] New: Illegal instruction with 19373742 at buaa dot edu.cn
@ 2023-09-24 17:34 ` 19373742 at buaa dot edu.cn
  2023-09-24 17:34 ` [Bug c/111574] Illegal instruction with "-O3 -fno-toplevel-reorder -fno-tree-bit-ccp -fno-tree-dce" 19373742 at buaa dot edu.cn
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: 19373742 at buaa dot edu.cn @ 2023-09-24 17:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from CTC <19373742 at buaa dot edu.cn> ---
*******************************************************************************
OS and Platform:
Ubuntu 20.04.4 LTS
*******************************************************************************
gcc version:
$ gcc -v
Using built-in specs.
COLLECT_GCC=/home/cuisk/ctc/gcc-releases/gcc-14/bin/gcc
COLLECT_LTO_WRAPPER=/home/cuisk/ctc/gcc-releases/gcc-14/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --prefix=/home/cuisk/ctc/gcc-releases/gcc-14
--disable-multilib --enable-language=c,c++
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20230917 (experimental) (GCC)
*******************************************************************************
Command Lines:
$ gcc -I /home/cuisk/ctc/csmith/include/csmith-2.3.0 -O3 -fno-toplevel-reorder
-fno-tree-bit-ccp -fno-tree-dce /home/cuisk/gcc/tmp/a.c -o w 2>ii.out
$ ./w
Illegal instruction (core dumped)

$ gcc -I /home/cuisk/ctc/csmith/include/csmith-2.3.0 /home/cuisk/gcc/tmp/a.c -o
w
$ ./w
checksum = 0

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

* [Bug c/111574] Illegal instruction with "-O3 -fno-toplevel-reorder -fno-tree-bit-ccp -fno-tree-dce"
  2023-09-24 17:29 [Bug c/111574] New: Illegal instruction with 19373742 at buaa dot edu.cn
  2023-09-24 17:34 ` [Bug c/111574] " 19373742 at buaa dot edu.cn
@ 2023-09-24 17:34 ` 19373742 at buaa dot edu.cn
  2023-09-24 17:35 ` 19373742 at buaa dot edu.cn
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: 19373742 at buaa dot edu.cn @ 2023-09-24 17:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CTC <19373742 at buaa dot edu.cn> ---
Created attachment 55981
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55981&action=edit
The preprocessed file

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

* [Bug c/111574] Illegal instruction with "-O3 -fno-toplevel-reorder -fno-tree-bit-ccp -fno-tree-dce"
  2023-09-24 17:29 [Bug c/111574] New: Illegal instruction with 19373742 at buaa dot edu.cn
  2023-09-24 17:34 ` [Bug c/111574] " 19373742 at buaa dot edu.cn
  2023-09-24 17:34 ` [Bug c/111574] Illegal instruction with "-O3 -fno-toplevel-reorder -fno-tree-bit-ccp -fno-tree-dce" 19373742 at buaa dot edu.cn
@ 2023-09-24 17:35 ` 19373742 at buaa dot edu.cn
  2023-09-24 19:13 ` [Bug middle-end/111574] [14 Regression] " pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: 19373742 at buaa dot edu.cn @ 2023-09-24 17:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CTC <19373742 at buaa dot edu.cn> ---
Created attachment 55982
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55982&action=edit
The compiler output

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

* [Bug middle-end/111574] [14 Regression] Illegal instruction with "-O3 -fno-toplevel-reorder -fno-tree-bit-ccp -fno-tree-dce"
  2023-09-24 17:29 [Bug c/111574] New: Illegal instruction with 19373742 at buaa dot edu.cn
                   ` (2 preceding siblings ...)
  2023-09-24 17:35 ` 19373742 at buaa dot edu.cn
@ 2023-09-24 19:13 ` pinskia at gcc dot gnu.org
  2023-09-24 19:17 ` pinskia at gcc dot gnu.org
  2023-09-24 19:21 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-24 19:13 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu.org

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is another phiopt issue ...

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

* [Bug middle-end/111574] [14 Regression] Illegal instruction with "-O3 -fno-toplevel-reorder -fno-tree-bit-ccp -fno-tree-dce"
  2023-09-24 17:29 [Bug c/111574] New: Illegal instruction with 19373742 at buaa dot edu.cn
                   ` (3 preceding siblings ...)
  2023-09-24 19:13 ` [Bug middle-end/111574] [14 Regression] " pinskia at gcc dot gnu.org
@ 2023-09-24 19:17 ` pinskia at gcc dot gnu.org
  2023-09-24 19:21 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-24 19:17 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 111469. That is the patch which fixes PR 111469 will fix this one
too.

*** This bug has been marked as a duplicate of bug 111469 ***

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

* [Bug middle-end/111574] [14 Regression] Illegal instruction with "-O3 -fno-toplevel-reorder -fno-tree-bit-ccp -fno-tree-dce"
  2023-09-24 17:29 [Bug c/111574] New: Illegal instruction with 19373742 at buaa dot edu.cn
                   ` (4 preceding siblings ...)
  2023-09-24 19:17 ` pinskia at gcc dot gnu.org
@ 2023-09-24 19:21 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-24 19:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
What is happening is:
```
  if (_1 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  _28 = (uint8_t) _1;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 8>; [INV]

  <bb 7> :
  _7 = func_34 (0);

  <bb 8> :
  # _17 = PHI <_28(6), 0(7)>
```

Is being converted into:
```
  if (_1 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 8>; [INV]

  <bb 7> :
  _7 = func_34 (0);

  <bb 8> :
  # _new = PHI <_1(6), 0(7)>
  _17 = (uint8_t) _new;
```

And then incorrectly into:
```
  _7 = func_34 (0);
  _17 = (uint8_t) _1;
```
Removing the if statement.
The same way as the other bug is being incorrectly handled too.

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

end of thread, other threads:[~2023-09-24 19:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-24 17:29 [Bug c/111574] New: Illegal instruction with 19373742 at buaa dot edu.cn
2023-09-24 17:34 ` [Bug c/111574] " 19373742 at buaa dot edu.cn
2023-09-24 17:34 ` [Bug c/111574] Illegal instruction with "-O3 -fno-toplevel-reorder -fno-tree-bit-ccp -fno-tree-dce" 19373742 at buaa dot edu.cn
2023-09-24 17:35 ` 19373742 at buaa dot edu.cn
2023-09-24 19:13 ` [Bug middle-end/111574] [14 Regression] " pinskia at gcc dot gnu.org
2023-09-24 19:17 ` pinskia at gcc dot gnu.org
2023-09-24 19:21 ` pinskia 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).