Wind River Support Network

HomeDefectsLIN1019-9852
Fixed

LIN1019-9852 : Internal compiler error: in subspan, at input.h:68 on gcc-9.2

Created: May 21, 2023    Updated: Aug 31, 2023
Resolved Date: May 26, 2023
Found In Version: 10.19.45.26
Fix Version: 10.19.45.29
Severity: Standard
Applicable for: Wind River Linux LTS 19
Component/s: Target Installer

Description

The customer's compiler-tools team has found a bug in lts19 gcc-9.2.

[https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96935#c7]

Workaround

https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=gcc/input.c;h=4a5e514b1f3c271542a1c35842b15d18c07761d3;hp=dd1d23df2f75d07edf396e21fe99705a86dba63d;hb=d01c3def63caf59d1d156aec8d52a1540e5ffe27;hpb=a99116a2cab3f1265a79ffe10ad63fe4ee26f10a

Steps to Reproduce

Build LTS19 wrlinux-image-ovp-kvm image for intel-x86-64,
LTS22 RCPL0026
STEP-1:
Setup Project:

$ git clone --branch WRLINUX_10_19_LTS_RCPL0021 https://gateway.delivers.windriver.com/git/linux-lts/release/wrlinux-lts.19/wrlinux-lts-19-core/wrlinux-x
$ ./wrlinux-x/setup.sh --dl-layers --distros wrlinux-ovp  --machines intel-x86-64 --templates feature/initramfs,feature/kdump,feature/kexec,feature/sysklogd,feature/dpdk,feature/package-management

Bitbake source build environment:

$ . ./environment-setup-x86_64-wrlinuxsdk-linux
$ . ./oe-init-build-env

Set up as follows:

PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"
BB_NO_NETWORK ?= '0'
TOOLCHAIN_TARGET_TASK_append = " python-dev kernel-dev kernel-devsrc"
TOOLCHAIN_HOST_TASK_append = " nativesdk-openssl-dev"
WRTEMPLATE ?= "feature/kernel-dev"
ENABLE_KERNEL_DEV = '1'
SDKMACHINE = "x86_64"
IMAGE_INSTALL_append = " rpm"
IMAGE_INSTALL_append =" pciutils gcc"
PREFERRED_VERSION_gcc = "9.2.0"

Build the WRLinux OVP and LTS19 SDK image:

$ bitbake wrlinux-image-ovp-kvm
$ bitbake -c populate_sdk wrlinux-image-ovp-kvm

create a new directory Extract and install the SDK:

$ mkdir gcc
$ ./tmp-glibc/deploy/sdk/wrlinux-ovp-10.19.45.21-glibc-x86_64-intel_x86_64-wrlinux-image-ovp-kvm-sdk.sh
Wind River Linux OVP SDK installer version 19.45
================================================
Enter target directory for SDK (default: /opt/windriver/wrlinux-ovp/19.45): /home/arath/builds/juniper/wrlinux19/build/gcc
You are about to install the SDK to
"/home/arath/builds/juniper/wrlinux19/build/gcc$". Proceed [Y/n]? Y
Extracting SDK.........


download and compile pr96935.c file 

arath@blr-cso-build2:~/builds/juniper/wrlinux19/build/gcc$ wget -Opr96935.c 'https://gcc.gnu.org/git/?p=gcc.git;a=blob_plain;f=gcc/testsuite/gcc.dg/format/pr96935.c;h=c31109704be67ff539493acf73a6f4ca89ffff9f;hb=d01c3def63caf59d1d156aec8d52a1540e5ffe27'

arath@blr-cso-build2:~/builds/juniper/wrlinux19/build/gcc$ gcc -c -O pr96935.c
during GIMPLE pass: printf-return-value
pr96935.c: In function ‘foo’:
pr96935.c:6:1: *internal compiler error* : in subspan, at input.h:68
    6 | *foo* (char const *name)
      | ^~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
arath@blr-cso-build2:~/builds/juniper/wrlinux19/build/gcc$

Actual results: Compile fails with the following error message:

---
during GIMPLE pass: printf-return-value
pr96935.c: In function ‘foo’:
pr96935.c:6:1: internal compiler error: in subspan, at input.h:68
---

if the same code is complied with :  -O2 -Wformat  not getting any error or warning:
arath@blr-cso-build2:~/builds/juniper/wrlinux19/build/gcc$ gcc -c  -O2 -Wformat pr96935.c
arath@blr-cso-build2:~/builds/juniper/wrlinux19/build/gcc$

Expected results: successful compilation.
Live chat
Online