[Bug c/69187] New: ICE: Aborted when native compiling neon code with __builtin_neon_vmlals_lanev4hi

2016-01-07 Thread civil.over at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69187

Bug ID: 69187
   Summary: ICE: Aborted when native compiling neon code with
__builtin_neon_vmlals_lanev4hi
   Product: gcc
   Version: 5.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: civil.over at gmail dot com
  Target Milestone: ---

Created attachment 37256
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37256&action=edit
bug.c - minimal test case for the bug.

katje ~ # gcc -c -mfpu=neon ./bug.c 
*** stack smashing detected ***:
/usr/libexec/gcc/armv7a-hardfloat-linux-gnueabi/5.3.0/cc1 terminated
./bug.c: In function ‘bug’:
./bug.c:3:9: internal compiler error: Aborted
 __builtin_neon_vmlals_lanev4hi(a, b, c, 0);
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.



The most minimal test case I was able to find is in attachments.

This doesn't happen when crosscompiling:
civil@felix 0:  0 ~ $ armv7a-hardfloat-linux-gnueabi-c++-5.3.0 -c -mfpu=neon
~/bug.c 
civil@felix 0:  0 ~ $

[Bug target/69187] ICE: Aborted when native compiling neon code with __builtin_neon_vmlals_lanev4hi

2016-01-08 Thread civil.over at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69187

--- Comment #1 from Vladimir Smirnov  ---
I've also tried to test gcc 6.0, snapshot 20160103 but still getting this:
root@katje ~ # gcc-6.0.0-alpha20160103 -mfpu=neon ./bug.c
./bug.c: In function 'bug':
./bug.c:3:9: internal compiler error: Segmentation fault
 __builtin_neon_vmlals_lanev4hi(a, b, c, 0);
 ^~

Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

[Bug target/69187] ICE: Aborted when native compiling neon code with __builtin_neon_vmlals_lanev4hi

2016-01-08 Thread civil.over at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69187

--- Comment #3 from Vladimir Smirnov  ---
GCC 5.3:
katje ~ # gcc -v
Using built-in specs.
COLLECT_GCC=/usr/armv7a-hardfloat-linux-gnueabi/gcc-bin/5.3.0/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/armv7a-hardfloat-linux-gnueabi/5.3.0/lto-wrapper
Target: armv7a-hardfloat-linux-gnueabi
Configured with: /var/tmp/portage/sys-devel/gcc-5.3.0/work/gcc-5.3.0/configure
--host=armv7a-hardfloat-linux-gnueabi --build=armv7a-hardfloat-linux-gnueabi
--prefix=/usr --bindir=/usr/armv7a-hardfloat-linux-gnueabi/gcc-bin/5.3.0
--includedir=/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/5.3.0/include
--datadir=/usr/share/gcc-data/armv7a-hardfloat-linux-gnueabi/5.3.0
--mandir=/usr/share/gcc-data/armv7a-hardfloat-linux-gnueabi/5.3.0/man
--infodir=/usr/share/gcc-data/armv7a-hardfloat-linux-gnueabi/5.3.0/info
--with-gxx-include-dir=/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/5.3.0/include/g++-v5
--with-python-dir=/share/gcc-data/armv7a-hardfloat-linux-gnueabi/5.3.0/python
--enable-languages=c,c++,go,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--enable-checking=release --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 5.3.0 p1.0, pie-0.6.5' --enable-libstdcxx-time
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --disable-multilib --disable-altivec --disable-fixed-point
--with-float=hard --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16
--disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp
--disable-libcilkrts --enable-lto --with-isl --disable-isl-version-check
--enable-libsanitizer
Thread model: posix
gcc version 5.3.0 (Gentoo 5.3.0 p1.0, pie-0.6.5)


GCC 6.0-snapshot:
katje ~ # gcc-6.0.0-alpha20160103 -v
Using built-in specs.
COLLECT_GCC=gcc-6.0.0-alpha20160103
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/armv7a-hardfloat-linux-gnueabi/6.0.0-alpha20160103/lto-wrapper
Target: armv7a-hardfloat-linux-gnueabi
Configured with:
/var/tmp/portage/sys-devel/gcc-6.0.0_alpha20160103/work/gcc-6-20160103/configure
--host=armv7a-hardfloat-linux-gnueabi --build=armv7a-hardfloat-linux-gnueabi
--prefix=/usr
--bindir=/usr/armv7a-hardfloat-linux-gnueabi/gcc-bin/6.0.0-alpha20160103
--includedir=/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/6.0.0-alpha20160103/include
--datadir=/usr/share/gcc-data/armv7a-hardfloat-linux-gnueabi/6.0.0-alpha20160103
--mandir=/usr/share/gcc-data/armv7a-hardfloat-linux-gnueabi/6.0.0-alpha20160103/man
--infodir=/usr/share/gcc-data/armv7a-hardfloat-linux-gnueabi/6.0.0-alpha20160103/info
--with-gxx-include-dir=/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/6.0.0-alpha20160103/include/g++-v6
--with-python-dir=/share/gcc-data/armv7a-hardfloat-linux-gnueabi/6.0.0-alpha20160103/python
--enable-languages=c,c++,go,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--enable-checking=release --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 6.0.0_alpha20160103' --enable-libstdcxx-time
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --disable-multilib --disable-altivec --disable-fixed-point
--with-float=hard --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16
--disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp
--disable-libcilkrts --enable-lto --with-isl --disable-isl-version-check
--enable-libsanitizer --disable-default-pie --enable-default-ssp
Thread model: posix
gcc version 6.0.0-alpha20160103 20160103 (experimental) (Gentoo
6.0.0_alpha20160103)

[Bug target/69187] ICE: Aborted when native compiling neon code with __builtin_neon_vmlals_lanev4hi

2016-01-08 Thread civil.over at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69187

--- Comment #5 from Vladimir Smirnov  ---
If that'll help:
katje ~ # gcc-6.0.0-alpha20160103 -c -mfpu=neon ./bug.c -wrapper valgrind
==25016== Memcheck, a memory error detector
==25016== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==25016== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==25016== Command:
/usr/libexec/gcc/armv7a-hardfloat-linux-gnueabi/6.0.0-alpha20160103/cc1 -quiet
./bug.c -quiet -dumpbase bug.c -mfpu=neon -march=armv7-a -mfloat-abi=hard
-mtls-dialect=gnu -auxbase bug -o /tmp/ccp9iBkm.s
==25016== 
==25016== Invalid write of size 4
==25016==at 0x4004CF8: _dl_start (rtld.c:337)
==25016==by 0x4000A8F: ??? (in /lib/ld-2.22.so)
==25016==  Address 0xbd90412c is on thread 1's stack
==25016==  36 bytes below stack pointer
==25016== 
==25016== 
==25016== Process terminating with default action of signal 11 (SIGSEGV)
==25016==  Access not within mapped region at address 0xBD903FFC
==25016==at 0x401B234: bcmp (memcmp.c:315)
==25016==by 0x40025C7: process_envvars (rtld.c:2387)
==25016==by 0x40025C7: dl_main (rtld.c:773)
==25016==by 0x4018363: _dl_sysdep_start (dl-sysdep.c:249)
==25016==by 0x400502B: _dl_start_final (rtld.c:307)
==25016==by 0x400502B: _dl_start (rtld.c:413)
==25016==by 0x4000A8F: ??? (in /lib/ld-2.22.so)
==25016==  If you believe this happened as a result of a stack
==25016==  overflow in your program's main thread (unlikely but
==25016==  possible), you can try to increase the size of the
==25016==  main thread stack using the --main-stacksize= flag.
==25016==  The main thread stack size used in this run was 16777216.
==25016== 
==25016== HEAP SUMMARY:
==25016== in use at exit: 0 bytes in 0 blocks
==25016==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==25016== 
==25016== All heap blocks were freed -- no leaks are possible
==25016== 
==25016== For counts of detected and suppressed errors, rerun with: -v
==25016== ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 7 from 4)
gcc-6.0.0-alpha20160103: internal compiler error: Segmentation fault (program
valgrind)