[Bug target/105522] New: gcc11: internal compiler error: in decode_addr_const, at varasm.c:3059

vital.had at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun May 8 06:10:07 GMT 2022


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

            Bug ID: 105522
           Summary: gcc11: internal compiler error: in decode_addr_const,
                    at varasm.c:3059
           Product: gcc
           Version: 11.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vital.had at gmail dot com
                CC: iains at gcc dot gnu.org
  Target Milestone: ---
            Target: powerpc-apple-darwin

Created attachment 52938
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52938&action=edit
Build log in a case needed

```
36-111% /opt/local/bin/gcc-mp-11 -DSDL2_EXPORTS -DUSING_GENERATED_CONFIG_H
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/build/include
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/include
-pipe -Os -DNDEBUG -I/opt/local/include -idirafter
"/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/video/khronos"
-I/opt/local/include/libusb-1.0 -D_THREAD_SAFE -Wshadow -fvisibility=hidden
-Wdeclaration-after-statement -fno-strict-aliasing -Wall  -arch ppc
-mmacosx-version-min=10.6 -fPIC -MD -MT
CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o -MF
CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o.d -o
CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o -c
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/SDL_hidapi.c
In file included from
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/SDL_hidapi.c:578:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:
In function 'PLATFORM_free_hid_device':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:163:9:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  163 |         struct input_report *rpt = dev->input_reports;
      |         ^~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:
In function 'get_string_property':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:265:17:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  265 |                 CFIndex str_len = CFStringGetLength(str);
      |                 ^~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:269:17:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  269 |                 CFIndex used_buf_len;
      |                 ^~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:
In function 'get_string_property_utf8':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:304:17:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  304 |                 CFIndex str_len = CFStringGetLength(str);
      |                 ^~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:308:17:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  308 |                 CFIndex used_buf_len;
      |                 ^~~~~~~
In file included from
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/SDL_hidapi.c:578:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:
In function 'PLATFORM_hid_enumerate':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:530:9:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  530 |         CFSetRef device_set = IOHIDManagerCopyDevices(hid_mgr);
      |         ^~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:540:9:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  540 |         IOHIDDeviceRef *device_array =
(IOHIDDeviceRef*)calloc(num_devices, sizeof(IOHIDDeviceRef));
      |         ^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:
In function 'PLATFORM_read_thread':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:742:9:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  742 |         CFRunLoopSourceContext ctx;
      |         ^~~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:759:9:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  759 |         SInt32 code;
      |         ^~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:
In function 'PLATFORM_hid_open_path':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:812:9:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  812 |         CFSetRef device_set = IOHIDManagerCopyDevices(hid_mgr);
      |         ^~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:815:9:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  815 |         IOHIDDeviceRef *device_array = (IOHIDDeviceRef
*)calloc(num_devices, sizeof(IOHIDDeviceRef));
      |         ^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:848:33:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  848 |                                 struct hid_device_list_node *node =
(struct hid_device_list_node *)calloc(1, sizeof(struct hid_device_list_node));
      |                                 ^~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:
In function 'PLATFORM_hid_get_feature_report':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:1091:9:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
 1091 |         int skipped_report_id = 0;
      |         ^~~
In file included from
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/SDL_hidapi.c:578:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:
In function 'create_usage_match':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:407:21:
internal compiler error: in decode_addr_const, at varasm.c:3059
  407 |         const void *keys[2] = { (void *)
CFSTR(kIOHIDDeviceUsagePageKey), (void *) CFSTR(kIOHIDDeviceUsageKey) };
      |                     ^~~~
```

`-save-temps` fails to produce i file, but gives the following output:
```
36-111% sudo /opt/local/bin/gcc-mp-11 -save-temps -v -DSDL2_EXPORTS
-DUSING_GENERATED_CONFIG_H
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/build/include
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/include
-pipe -Os -DNDEBUG -I/opt/local/include -idirafter
"/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/video/khronos"
-I/opt/local/include/libusb-1.0 -D_THREAD_SAFE -Wshadow -fvisibility=hidden
-Wdeclaration-after-statement -fno-strict-aliasing -Wall  -arch ppc
-mmacosx-version-min=10.6 -fPIC -MD -MT
CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o -MF
CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o.d -o
CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o -c
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/SDL_hidapi.c
gcc-mp-11: warning: '-pipe' ignored because '-save-temps' specified
Using built-in specs.
COLLECT_GCC=/opt/local/bin/gcc-mp-11
Target: ppc-apple-darwin10
Configured with:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_gcc11/gcc11/work/gcc-11.3.0/configure
--prefix=/opt/local --build=ppc-apple-darwin10
--enable-languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc11
--includedir=/opt/local/include/gcc11 --infodir=/opt/local/share/info
--mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-11
--with-local-prefix=/opt/local --with-system-zlib --disable-nls
--program-suffix=-mp-11 --with-gxx-include-dir=/opt/local/include/gcc11/c++/
--with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local
--with-isl=/opt/local --with-zstd=/opt/local --enable-stage1-checking
--disable-multilib --enable-lto --enable-libstdcxx-time
--with-build-config=bootstrap-debug
--with-bugurl=https://trac.macports.org/newticket --enable-host-shared
--with-tune-cpu=G5 --disable-tls --with-as=/opt/local/bin/as
--with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar
--with-pkgversion='MacPorts gcc11 11.3.0_0'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.0 (MacPorts gcc11 11.3.0_0) 
COLLECT_GCC_OPTIONS='-save-temps' '-v' '-D' 'SDL2_EXPORTS' '-D'
'USING_GENERATED_CONFIG_H' '-I'
'/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/build/include'
'-I'
'/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/include'
'-pipe' '-Os' '-D' 'NDEBUG' '-I' '/opt/local/include' '-idirafter'
'/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/video/khronos'
'-I' '/opt/local/include/libusb-1.0' '-D' '_THREAD_SAFE' '-Wshadow'
'-fvisibility=hidden' '-Wdeclaration-after-statement' '-fno-strict-aliasing'
'-Wall' '-fPIC' '-MD' '-MT' 'CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o'
'-MF' 'CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o.d' '-o'
'CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o' '-c' '-m32'
'-mmacosx-version-min=10.6' '-asm_macosx_version_min=10.6' '-nodefaultexport'
'-dumpdir' 'CMakeFiles/SDL2.dir/src/hidapi/'
 /opt/local/libexec/gcc/ppc-apple-darwin10/11.3.0/cc1 -E -quiet -v -I
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/build/include
-I
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/include
-I /opt/local/include -I /opt/local/include/libusb-1.0 -MD
CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.d -MF
CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o.d -MT
CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o -D__DYNAMIC__ -D SDL2_EXPORTS -D
USING_GENERATED_CONFIG_H -D NDEBUG -D _THREAD_SAFE -idirafter
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/video/khronos
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/SDL_hidapi.c
-fPIC -m32 -mmacosx-version-min=10.6 -Wshadow -Wdeclaration-after-statement
-Wall -fvisibility=hidden -fno-strict-aliasing -fPIC -Os -fpch-preprocess -o
CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.i
ignoring nonexistent directory
"/opt/local/lib/gcc11/gcc/ppc-apple-darwin10/11.3.0/../../../../../ppc-apple-darwin10/include"
ignoring duplicate directory "/opt/local/include"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/build/include

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/include
 /opt/local/include/libusb-1.0
 /opt/local/lib/gcc11/gcc/ppc-apple-darwin10/11.3.0/include
 /opt/local/include
 /opt/local/lib/gcc11/gcc/ppc-apple-darwin10/11.3.0/include-fixed
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/video/khronos
End of search list.
cc1: fatal error: opening output file
CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.i: No such file or directory
compilation terminated.
```


More information about the Gcc-bugs mailing list