public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/101667] New: GNAT bug detected in op1_range in range-op.cc during GIMPLE pass evrp
@ 2021-07-29  0:05 denkpadje at gmail dot com
  2021-07-29  6:35 ` [Bug tree-optimization/101667] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: denkpadje at gmail dot com @ 2021-07-29  0:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101667
           Summary: GNAT bug detected in op1_range in range-op.cc during
                    GIMPLE pass evrp
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: denkpadje at gmail dot com
  Target Milestone: ---

Created attachment 51220
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51220&action=edit
src/ folder and Makefile

GNAT bug detected in provided code (see zip file) when tree-vrp is enabled.

Following options are needed to reproduce it: -gnatVa -gnata -O1 -ftree-vrp.

The error can be avoided by using -fno-tree-vrp or -O0 or by removing -gnatVa
or -gnata.

Reproducable in 11.1.0 on Arch Linux

Not reproducable in 10.3.0 and 9.3.0 on Ubuntu 20.04.2 LTS

```
gnatmake -gnatVa -gnata -O1 -ftree-vrp src/egl-objects-displays.adb
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl-objects-displays.adb
during GIMPLE pass: evrp
+===========================GNAT BUG DETECTED==============================+
| 11.1.0 (x86_64-pc-linux-gnu) in op1_range, at range-op.cc:2646           |
| Error detected around
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/adainclude/s-stoele.adb:70:31|
| Please submit a bug report; see https://gcc.gnu.org/bugs/ .              |
| Use a subject line meaningful to you and us to track the bug.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact command that you entered.                              |
| Also include sources listed below.                                       |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
Consider also -gnatd.n switch (see debug.adb).

src/egl-objects-displays.adb
src/egl-objects-displays.ads
src/egl-objects.ads
src/egl.ads
src/egl-objects-devices.ads
src/egl-api.ads
src/egl-errors.ads
src/egl-loading.ads


raised TYPES.UNRECOVERABLE_ERROR : comperr.adb:407
```

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

* [Bug tree-optimization/101667] GNAT bug detected in op1_range in range-op.cc during GIMPLE pass evrp
  2021-07-29  0:05 [Bug ada/101667] New: GNAT bug detected in op1_range in range-op.cc during GIMPLE pass evrp denkpadje at gmail dot com
@ 2021-07-29  6:35 ` rguenth at gcc dot gnu.org
  2021-07-29 11:18 ` aldyh at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-29  6:35 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|ada                         |tree-optimization
                 CC|                            |amacleod at redhat dot com
           Keywords|                            |ice-on-valid-code

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Can you try GCC 11.2 or a recent trunk snapshot?

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

* [Bug tree-optimization/101667] GNAT bug detected in op1_range in range-op.cc during GIMPLE pass evrp
  2021-07-29  0:05 [Bug ada/101667] New: GNAT bug detected in op1_range in range-op.cc during GIMPLE pass evrp denkpadje at gmail dot com
  2021-07-29  6:35 ` [Bug tree-optimization/101667] " rguenth at gcc dot gnu.org
@ 2021-07-29 11:18 ` aldyh at gcc dot gnu.org
  2021-07-29 11:28 ` aldyh at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: aldyh at gcc dot gnu.org @ 2021-07-29 11:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
I was able to reproduce on my Fedora 11.1.1 system compiler, but it seems to
work on trunk:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/notnfs/aldyh/bld/threader/ada/install/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/aldyh/src/gcc/configure --enable-languages=c,c++,ada
--disable-bootstrap --disable-multilib --prefix
=/home/aldyh/bld/threader/ada/install --disable-libgomp
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20210729 (experimental) (GCC) 

$ make
gnatmake -gnatVa -gnata -O1 -ftree-vrp src/egl-objects-displays.adb
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl-objects-displays.adb
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl.adb
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl-api.ads
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl-errors.adb
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl-objects.adb
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl-objects-devices.adb
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl-loading.adb

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

* [Bug tree-optimization/101667] GNAT bug detected in op1_range in range-op.cc during GIMPLE pass evrp
  2021-07-29  0:05 [Bug ada/101667] New: GNAT bug detected in op1_range in range-op.cc during GIMPLE pass evrp denkpadje at gmail dot com
  2021-07-29  6:35 ` [Bug tree-optimization/101667] " rguenth at gcc dot gnu.org
  2021-07-29 11:18 ` aldyh at gcc dot gnu.org
@ 2021-07-29 11:28 ` aldyh at gcc dot gnu.org
  2021-07-31 12:11 ` denkpadje at gmail dot com
  2021-09-10 11:12 ` ebotcazou at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: aldyh at gcc dot gnu.org @ 2021-07-29 11:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Works on 11.2.1 as well:

tor:~/tmp/tree-vrp-test$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/notnfs/aldyh/bld/threader/ada/install/bin/../libexec/gcc/x86_64-pc-linux-gnu/11.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/aldyh/src/gcc/configure --enable-languages=c,c++,ada
--disable-bootstrap --disable-multilib --prefix
=/home/aldyh/bld/threader/ada/install --disable-libgomp
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.1 20210728 (GCC) 
tor:~/tmp/tree-vrp-test$ ls
Makefile  src
tor:~/tmp/tree-vrp-test$ make
gnatmake -gnatVa -gnata -O1 -ftree-vrp src/egl-objects-displays.adb
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl-objects-displays.adb
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl.adb
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl-api.ads
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl-errors.adb
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl-objects.adb
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl-objects-devices.adb
gcc -c -Isrc/ -gnatVa -gnata -O1 -ftree-vrp -I- src/egl-loading.adb

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

* [Bug tree-optimization/101667] GNAT bug detected in op1_range in range-op.cc during GIMPLE pass evrp
  2021-07-29  0:05 [Bug ada/101667] New: GNAT bug detected in op1_range in range-op.cc during GIMPLE pass evrp denkpadje at gmail dot com
                   ` (2 preceding siblings ...)
  2021-07-29 11:28 ` aldyh at gcc dot gnu.org
@ 2021-07-31 12:11 ` denkpadje at gmail dot com
  2021-09-10 11:12 ` ebotcazou at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: denkpadje at gmail dot com @ 2021-07-31 12:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from denkpadje at gmail dot com ---
It seems to work on 11.2 so bug can be closed.

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

* [Bug tree-optimization/101667] GNAT bug detected in op1_range in range-op.cc during GIMPLE pass evrp
  2021-07-29  0:05 [Bug ada/101667] New: GNAT bug detected in op1_range in range-op.cc during GIMPLE pass evrp denkpadje at gmail dot com
                   ` (3 preceding siblings ...)
  2021-07-31 12:11 ` denkpadje at gmail dot com
@ 2021-09-10 11:12 ` ebotcazou at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2021-09-10 11:12 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |11.2
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |ebotcazou at gcc dot gnu.org

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
2021-06-03  Eric Botcazou  <ebotcazou@adacore.com>

        * range-op.cc (get_bool_state): Adjust head comment.
        (operator_not_equal::op1_range): Fix comment.
        (operator_bitwise_xor::op1_range): Remove call to gcc_unreachable.

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

end of thread, other threads:[~2021-09-10 11:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-29  0:05 [Bug ada/101667] New: GNAT bug detected in op1_range in range-op.cc during GIMPLE pass evrp denkpadje at gmail dot com
2021-07-29  6:35 ` [Bug tree-optimization/101667] " rguenth at gcc dot gnu.org
2021-07-29 11:18 ` aldyh at gcc dot gnu.org
2021-07-29 11:28 ` aldyh at gcc dot gnu.org
2021-07-31 12:11 ` denkpadje at gmail dot com
2021-09-10 11:12 ` ebotcazou 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).