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

            Bug ID: 92489
           Summary: GNAT Bug for Invalid_Value Attribute
           Product: gcc
           Version: 9.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kunalsareen at posteo dot org
  Target Milestone: ---

Created attachment 47228
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47228&action=edit
Minimal example to showcase bug (including all relevant packages in a single
file)

# System Setup:
## gcc -v:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --enable-shared
--enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-lto --enable-plugin --enable-install-libiberty
--with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib
--disable-werror --enable-checking=release --enable-default-pie
--enable-default-ssp --enable-cet=auto gdc_include_dir=/usr/include/dlang/gdc
Thread model: posix
gcc version 9.2.0 (GCC)

## gcc/gnatmake switches used:
No explicit switches or flags were used in gnatmake, and hence all compilation
is done as gcc -c <source_file>.

# Expected Behaviour:
The program should compile and run. I have confirmed the above works for gcc
version 8.3.0.

# Actual Behaviour:
A GNAT bug is encountered as such:
+===========================GNAT BUG DETECTED==============================+
| 9.2.0 (x86_64-pc-linux-gnu) GCC error:                                   |
| in gnat_to_gnu_entity, at ada/gcc-interface/decl.c:449                   |
| Error detected at id_dispenser.adb:28:37 [minimal_example.adb:6:5]       |
| 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.                                       |
+==========================================================================+
I believe it is complaining about the Invalid_Value attribute. This bug is
present in gcc version 9.1.0 as well.

# Other Remarks:
As mentioned earlier, the above can be compiled in gcc version 8.3.0 and below
(have tested till 7.4.0). I have also attached a log file which is generated by
using the -gnatd.n switch in gcc 9.2.0.

Reply via email to