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

            Bug ID: 81317
           Summary: builtin_vec_ld fails for powerpc with altivec
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: randy.macleod at windriver dot com
  Target Milestone: ---

When building libjpeg-turbo using oe-core's build system with:
   master with HEAD at:
   325f087 image.bbclass: create root symlinks in nativesdk target sysroot
   on an Ubuntu-16.04.1 LTS host, 
I encountered a toolchain ICE. 

I used creduce to produce a minimal test case:
$ cat testcase.i                                                                
jsimd_ycc_extbgrx_convert_altivec_outptr;
__attribute__ ( ( altivec
                  ( __builtin_vec_ld
                    ( 1, jsimd_ycc_extbgrx_convert_altivec_outptr )
------
The compile line and error are:

$ powerpc-oe-linux-gcc  -m32 -mhard-float -mcpu=7400 -mno-spe -Wall -Wextra
--sysroot=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/ppc7400-oe-linux/libjpeg-turbo/1_1.5.2-r0/recipe-sysroot
-DHAVE_CONFIG_H -I. -I../../libjpeg-turbo-1.5.2/simd -I..
-I../../libjpeg-turbo-1.5.2 -Wall -maltivec -O2 -pipe -g
-feliminate-unused-debug-types
-fdebug-prefix-map=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/ppc7400-oe-linux/libjpeg-turbo/1_1.5.2-r0=/usr/src/debug/libjpeg-turbo/1_1.5.2-r0
-fdebug-prefix-map=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/ppc7400-oe-linux/libjpeg-turbo/1_1.5.2-r0/recipe-sysroot-native=
-fdebug-prefix-map=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/ppc7400-oe-linux/libjpeg-turbo/1_1.5.2-r0/recipe-sysroot=
-c testcase.i  -fPIC -DPIC -o .libs/libsimd_altivec_la-jdcolor-altivec.o
testcase.i:1:1: warning: data definition has no type or storage class
 jsimd_ycc_extbgrx_convert_altivec_outptr;
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
testcase.i:1:1: warning: type defaults to 'int' in declaration of
'jsimd_ycc_extbgrx_convert_altivec_outptr' [-Wimplicit-int]
testcase.i:4:21: internal compiler error: Segmentation fault
                     ( 1, jsimd_ycc_extbgrx_convert_altivec_outptr )
                     ^ 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <https://gcc.gnu.org/bugs/> for instructions. 



I have also confirmed that using 7.1.1-beta aka 7-20170629 does not fix the
ICE.

I can't easily test the gcc master branch so I await your suggestion.

oe-core builds it's own toolchain but we're close to this version:
$ powerpc-oe-linux-gcc -v 
Using built-in specs.
COLLECT_GCC=powerpc-oe-linux-gcc
COLLECT_LTO_WRAPPER=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/ppc7400-oe-linux/libjpeg-turbo/1_1.5.2-r0/recipe-sysroot-native/usr/bin/powerpc-oe-linux/../../libexec/powerpc-oe-linux/gcc/powerpc-oe-linux/7.1.0/lto-wrapper
Target: powerpc-oe-linux
Configured with: ../../../../../../work-shared/gcc-7.1.0-r0/gcc-7.1.0/configure
--build=x86_64-linux --host=x86_64-linux --target=powerpc-oe-linux
--prefix=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/usr
--exec_prefix=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/usr
--bindir=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/usr/bin/powerpc-oe-linux
--sbindir=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/usr/bin/powerpc-oe-linux
--libexecdir=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/usr/libexec/powerpc-oe-linux
--datadir=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/usr/share
--sysconfdir=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/etc
--sharedstatedir=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/com
--localstatedir=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/var
--libdir=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/usr/lib/powerpc-oe-linux
--includedir=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/usr/include
--oldincludedir=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/usr/include
--infodir=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/usr/share/info
--mandir=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/usr/share/man
--disable-silent-rules --disable-dependency-tracking
--with-libtool-sysroot=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native
--enable-clocale=generic --with-gnu-ld --enable-shared --enable-languages=c,c++
--enable-threads=posix --disable-multilib --enable-c99 --enable-long-long
--enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=powerpc-oe-linux-
--without-local-prefix --enable-lto --enable-libssp --enable-libitm
--disable-bootstrap --disable-libmudflap --with-system-zlib
--with-linker-hash-style=sysv --enable-linker-build-id --with-ppl=no
--with-cloog=no --enable-checking=release --enable-cheaders=c_global
--without-isl --with-gxx-include-dir=/not/exist/usr/include/c++/7.1.0
--with-sysroot=/not/exist
--with-build-sysroot=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot
--enable-secureplt --with-long-double-128 --enable-poison-system-directories
--with-mpfr=/buildarea/rmacleod/src/distro/yocto/b/sd-ppc/tmp-glibc/work/x86_64-linux/gcc-cross-powerpc/7.1.0-r0/recipe-sysroot-native/usr
--with-system-zlib --disable-nls --enable-initfini-array --enable-__cxa_atexit
Thread model: posix
gcc version 7.1.0 (GCC)

Reply via email to