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

            Bug ID: 123982
           Summary: -Wlto-type-mismatch warnings with preludes in Algol 68
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: lto
          Severity: normal
          Priority: P3
         Component: algol68
          Assignee: algol68 at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

```
$ wget https://jemarch.net/godcc-1.0.tar.gz
$ mkdir g
$ tar xvf godcc-1.0.tar.xz -C g
$ cd g
$ ./configure ; make A68FLAGS="-flto -Werror=lto-type-mismatch" -Onone -j1
[...]
make[1]: Entering directory '/tmp/g/godcc-1.0/src'
ga68 -fcheck=nil -Whidden-declarations=prelude -flto -Werror=lto-type-mismatch 
 -o godcc utils.o argp.o http.o json.o ce.o list.o compile.o format.o globals.o
godcc.o
lto1: error: type of ‘FORMAT__prelude’ does not match original declaration
[-Werror=lto-type-mismatch]
format.a68:21:1: note: types have different parameter counts
   21 | def
      | ^
lto1: error: type of ‘FORMAT__prelude’ does not match original declaration
[-Werror=lto-type-mismatch]
format.a68:21:1: note: types have different parameter counts
   21 | def
      | ^
format.a68:21:1: note: ‘FORMAT__prelude’ was previously declared here
lto1: error: type of ‘COMPILE__prelude’ does not match original declaration
[-Werror=lto-type-mismatch]
compile.a68:21:1: note: types have different parameter counts
   21 | def
      | ^
lto1: error: type of ‘COMPILE__prelude’ does not match original declaration
[-Werror=lto-type-mismatch]
compile.a68:21:1: note: types have different parameter counts
   21 | def
      | ^
[...]
```

```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/16/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage.notmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/16
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/16/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/16/include/g++-v16
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/16/python
--enable-libphobos --enable-objc-gc
--enable-languages=c,c++,d,go,objc,obj-c++,fortran,ada,cobol,algol68,m2,rust,jit
--enable-obsolete --enable-secureplt --disable-werror --with-system-zlib
--enable-nls --without-included-gettext --disable-libunwind-exceptions
--enable-checking=yes,extra,rtl --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo Hardened 16.0.9999 p, commit
07182f68b49535a32827fb8ac0b133c239f4a7ac' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--with-tls=gnu2 --enable-multilib --with-multilib-list=m32,mx32,m64
--disable-fixed-point --with-abi=m64 --enable-targets=all
--enable-offload-defaulted --enable-offload-targets=nvptx-none --enable-libgomp
--disable-libssp --enable-libada --disable-cet --enable-systemtap
--enable-valgrind-annotations --enable-valgrind-interop --disable-vtable-verify
--disable-libvtv --with-zstd --with-isl --disable-isl-version-check
--enable-default-pie --enable-host-pie --enable-host-bind-now
--enable-default-ssp --disable-fixincludes
--with-gxx-libcxx-include-dir=/usr/include/c++/v1 --enable-host-shared
--enable-libgdiagnostics --enable-linker-build-id --enable-linker-build-id
--enable-linker-build-id --enable-linker-build-id
--with-build-config='bootstrap-O3 bootstrap-lto'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.1 20260204 (experimental)
d77d64766af4aa84afdf50e35917c6f124c74c86 (Gentoo Hardened 16.0.9999 p, commit
07182f68b49535a32827fb8ac0b133c239f4a7ac)
```

Reply via email to