internal compiler error: in is_base_type, at dwarf2out.c:12987

Bug #1860254 reported by Mike Redd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
Confirmed
Undecided
Przemyslaw Wirkus

Bug Description

$ arm-none-eabi-g++ -v -save-temps -g3 -O0 -c -mthumb -mcpu=cortex-m4 -D__SAME54N19A__ -std=c++17 -fno-rtti -MMD -Wall -Wextra -ffunction-sections -fdata-sections -exceptions -I config -I common -I bsp/interfaces -I bsp/drivers/same54 -I subrepos/CMSIS_5/CMSIS/Core/Include -I subrepos/FreeRTOS-Kernel/include -I subrepos/FreeRTOS-Kernel/portable/GCC/ARM_CM3 -I subrepos/embcpp/include -I subrepos/cppip/include -I subrepos/tcpip -I subrepos/thingi/include -I subrepos/crypto/include -D PLATFORM_thingios -D PLATFORM_freertos -D OPTION_exceptions -D OPTION_firmware_version="0.0.1" -D OPTION_embedded -c -o /home/mike/work/dio/build/same54n19a/obj/dio.elf/DioBoard.o dio/DioBoard.cpp
Using built-in specs.
COLLECT_GCC=arm-none-eabi-g++
Target: arm-none-eabi
Configured with: /mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/src/gcc/configure --target=arm-none-eabi --prefix=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native --libexecdir=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native/lib --infodir=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native/arm-none-eabi --build=x86_64-linux-gnu --host=x86_64-linux-gnu --with-gmp=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/build-native/host-libs/usr --with-mpfr=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/build-native/host-libs/usr --with-mpc=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/build-native/host-libs/usr --with-isl=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/build-native/host-libs/usr --with-libelf=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/build-native/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for Arm Embedded Processors 9-2019-q4-major' --with-multilib-list=rmprofile
Thread model: single
gcc version 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] (GNU Tools for Arm Embedded Processors 9-2019-q4-major)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g3' '-O0' '-c' '-mthumb' '-mcpu=cortex-m4' '-D' '__SAME54N19A__' '-std=c++17' '-fno-rtti' '-MMD' '-Wall' '-Wextra' '-ffunction-sections' '-fdata-sections' '-e' 'xceptions' '-I' 'config' '-I' 'common' '-I' 'bsp/interfaces' '-I' 'bsp/drivers/same54' '-I' 'subrepos/CMSIS_5/CMSIS/Core/Include' '-I' 'subrepos/FreeRTOS-Kernel/include' '-I' 'subrepos/FreeRTOS-Kernel/portable/GCC/ARM_CM3' '-I' 'subrepos/embcpp/include' '-I' 'subrepos/cppip/include' '-I' 'subrepos/tcpip' '-I' 'subrepos/thingi/include' '-I' 'subrepos/crypto/include' '-D' 'PLATFORM_thingios' '-D' 'PLATFORM_freertos' '-D' 'OPTION_exceptions' '-D' 'OPTION_firmware_version=0.0.1' '-D' 'OPTION_embedded' '-c' '-o' '/home/mike/work/dio/build/same54n19a/obj/dio.elf/DioBoard.o' '-mfloat-abi=soft' '-march=armv7e-m'
 /home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/cc1plus -E -quiet -v -I config -I common -I bsp/interfaces -I bsp/drivers/same54 -I subrepos/CMSIS_5/CMSIS/Core/Include -I subrepos/FreeRTOS-Kernel/include -I subrepos/FreeRTOS-Kernel/portable/GCC/ARM_CM3 -I subrepos/embcpp/include -I subrepos/cppip/include -I subrepos/tcpip -I subrepos/thingi/include -I subrepos/crypto/include -imultilib thumb/v7e-m/nofp -iprefix /home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/ -isysroot /home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../arm-none-eabi -MMD /home/mike/work/dio/build/same54n19a/obj/dio.elf/DioBoard.d -MQ /home/mike/work/dio/build/same54n19a/obj/dio.elf/DioBoard.o -dD -D__USES_INITFINI__ -D __SAME54N19A__ -D PLATFORM_thingios -D PLATFORM_freertos -D OPTION_exceptions -D OPTION_firmware_version=0.0.1 -D OPTION_embedded dio/DioBoard.cpp -mthumb -mcpu=cortex-m4 -mfloat-abi=soft -march=armv7e-m -std=c++17 -Wall -Wextra -fno-rtti -ffunction-sections -fdata-sections -g3 -fworking-directory -O0 -fpch-preprocess -o DioBoard.ii
ignoring duplicate directory "/home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/../../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/include/c++/9.2.1"
ignoring duplicate directory "/home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/../../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/include/c++/9.2.1/arm-none-eabi/thumb/v7e-m/nofp"
ignoring duplicate directory "/home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/../../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/include/c++/9.2.1/backward"
ignoring duplicate directory "/home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/../../lib/gcc/arm-none-eabi/9.2.1/include"
ignoring nonexistent directory "/home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../arm-none-eabi/usr/local/include"
ignoring duplicate directory "/home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/../../lib/gcc/arm-none-eabi/9.2.1/include-fixed"
ignoring duplicate directory "/home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/../../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/include"
ignoring nonexistent directory "/home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../arm-none-eabi/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 config
 common
 bsp/interfaces
 bsp/drivers/same54
 subrepos/CMSIS_5/CMSIS/Core/Include
 subrepos/FreeRTOS-Kernel/include
 subrepos/FreeRTOS-Kernel/portable/GCC/ARM_CM3
 subrepos/embcpp/include
 subrepos/cppip/include
 subrepos/tcpip
 subrepos/thingi/include
 subrepos/crypto/include
 /home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/include/c++/9.2.1
 /home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/include/c++/9.2.1/arm-none-eabi/thumb/v7e-m/nofp
 /home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/include/c++/9.2.1/backward
 /home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/include
 /home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/include-fixed
 /home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g3' '-O0' '-c' '-mthumb' '-mcpu=cortex-m4' '-D' '__SAME54N19A__' '-std=c++17' '-fno-rtti' '-MMD' '-Wall' '-Wextra' '-ffunction-sections' '-fdata-sections' '-e' 'xceptions' '-I' 'config' '-I' 'common' '-I' 'bsp/interfaces' '-I' 'bsp/drivers/same54' '-I' 'subrepos/CMSIS_5/CMSIS/Core/Include' '-I' 'subrepos/FreeRTOS-Kernel/include' '-I' 'subrepos/FreeRTOS-Kernel/portable/GCC/ARM_CM3' '-I' 'subrepos/embcpp/include' '-I' 'subrepos/cppip/include' '-I' 'subrepos/tcpip' '-I' 'subrepos/thingi/include' '-I' 'subrepos/crypto/include' '-D' 'PLATFORM_thingios' '-D' 'PLATFORM_freertos' '-D' 'OPTION_exceptions' '-D' 'OPTION_firmware_version=0.0.1' '-D' 'OPTION_embedded' '-c' '-o' '/home/mike/work/dio/build/same54n19a/obj/dio.elf/DioBoard.o' '-mfloat-abi=soft' '-march=armv7e-m'
 /home/mike/toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/cc1plus -fpreprocessed DioBoard.ii -quiet -dumpbase DioBoard.cpp -mthumb -mcpu=cortex-m4 -mfloat-abi=soft -march=armv7e-m -auxbase-strip /home/mike/work/dio/build/same54n19a/obj/dio.elf/DioBoard.o -g3 -O0 -Wall -Wextra -std=c++17 -version -fno-rtti -ffunction-sections -fdata-sections -o DioBoard.s
GNU C++17 (GNU Tools for Arm Embedded Processors 9-2019-q4-major) version 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] (arm-none-eabi)
 compiled by GNU C version 4.8.4, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++17 (GNU Tools for Arm Embedded Processors 9-2019-q4-major) version 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] (arm-none-eabi)
 compiled by GNU C version 4.8.4, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: f480ec8acc882d1f6d9f2efa85949468
In file included from subrepos/thingi/include/thingi/PropertyI.h:6,
                 from subrepos/thingi/include/thingi/Property.h:5,
                 from common/BoardInterface.h:6,
                 from dio/DioBoard.h:5,
                 from dio/DioBoard.cpp:2:
subrepos/thingi/include/thingi/Interface.h:241:19: internal compiler error: in is_base_type, at dwarf2out.c:12987
  241 | virtual void* thisAsType(TypeId typeId) const override
      | ^~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.

-----

Please see attached for preprocessed file.

Tags: c++17 c17 ice
Revision history for this message
Mike Redd (mredd) wrote :
Changed in gcc-arm-embedded:
status: New → Confirmed
assignee: nobody → Przemyslaw Wirkus (wirkus)
Revision history for this message
Przemyslaw Wirkus (wirkus) wrote :

Hi Mike,

I was able to reduce your testcase to this code:

$ cat DioBoard.ii
template <typename> class a;
class {
  void b(a... c);
}

It is failing (Throwing ICE with -g2 and -g3):

$ $HOME/toolchains/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-g++ -g2 -O0 -c -mthumb -mcpu=cortex-m4 -D__SAME54N19A__ -std=c++17 -fno-rtti -MMD -Wall -Wextra -ffunction-sections -fdata-sections -exceptions -D PLATFORM_thingios -D PLATFORM_freertos -D OPTION_exceptions -D OPTION_firmware_version="0.0.1" -D OPTION_embedded -c DioBoard.ii
DioBoard.ii:2:7: internal compiler error: in is_base_type, at dwarf2out.c:12987
    2 | class {
      | ^

I think it would be best if you report it upstream: https://gcc.gnu.org/bugs

If you wish I can report it in your name. Please let me know.

kind regards
Przemek

tags: added: ice
tags: added: c++17 c17
Revision history for this message
Przemyslaw Wirkus (wirkus) wrote :

Mike, I can see you've already reported it upstream: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93320

kind regards
Przemek

Revision history for this message
Mike Redd (mredd) wrote : Re: [Bug 1860254] Re: internal compiler error: in is_base_type, at dwarf2out.c:12987
Download full text (11.1 KiB)

*Thank you!!*

On Wed, Feb 26, 2020 at 9:06 AM Przemyslaw Wirkus <
<email address hidden>> wrote:

> Mike, I can see you've already reported it upstream:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93320
>
> kind regards
> Przemek
>
> ** Bug watch added: GCC Bugzilla #93320
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93320
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1860254
>
> Title:
> internal compiler error: in is_base_type, at dwarf2out.c:12987
>
> Status in GNU Arm Embedded Toolchain:
> Confirmed
>
> Bug description:
> $ arm-none-eabi-g++ -v -save-temps -g3 -O0 -c -mthumb -mcpu=cortex-m4
> -D__SAME54N19A__ -std=c++17 -fno-rtti -MMD -Wall -Wextra
> -ffunction-sections -fdata-sections -exceptions -I config -I common -I
> bsp/interfaces -I bsp/drivers/same54 -I subrepos/CMSIS_5/CMSIS/Core/Include
> -I subrepos/FreeRTOS-Kernel/include -I
> subrepos/FreeRTOS-Kernel/portable/GCC/ARM_CM3 -I subrepos/embcpp/include -I
> subrepos/cppip/include -I subrepos/tcpip -I subrepos/thingi/include -I
> subrepos/crypto/include -D PLATFORM_thingios -D PLATFORM_freertos -D
> OPTION_exceptions -D OPTION_firmware_version="0.0.1" -D OPTION_embedded -c
> -o /home/mike/work/dio/build/same54n19a/obj/dio.elf/DioBoard.o
> dio/DioBoard.cpp
> Using built-in specs.
> COLLECT_GCC=arm-none-eabi-g++
> Target: arm-none-eabi
> Configured with:
> /mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/src/gcc/configure
> --target=arm-none-eabi
> --prefix=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native
> --libexecdir=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native/lib
> --infodir=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native/share/doc/gcc-arm-none-eabi/info
> --mandir=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native/share/doc/gcc-arm-none-eabi/man
> --htmldir=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native/share/doc/gcc-arm-none-eabi/html
> --pdfdir=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native/share/doc/gcc-arm-none-eabi/pdf
> --enable-languages=c,c++ --enable-plugins --disable-decimal-float
> --disable-libffi --disable-libgomp --disable-libmudflap
> --disable-libquadmath --disable-libssp --disable-libstdcxx-pch
> --disable-nls --disable-shared --disable-threads --disable-tls
> --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes
> --with-python-dir=share/gcc-arm-none-eabi
> --with-sysroot=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native/arm-none-eabi
> --build=x86_64-linux-gnu --host=x86_64-linux-gnu
> --with-gmp=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/build-native/host-libs/usr
> --with-mpfr=/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/build-native/host-libs/usr
> --w...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.