[Bug c++/78004] New: g++ 6.2.1 segfaults when compiling qt 4.8.7 on arm

2016-10-17 Thread ncopa at alpinelinux dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78004

Bug ID: 78004
   Summary: g++ 6.2.1 segfaults when compiling qt 4.8.7 on arm
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ncopa at alpinelinux dot org
  Target Milestone: ---

make[1]: Entering directory
'/home/buildozer/aports/main/qt/src/qt-everywhere-opensource-src-4.8.7/src/declarative'
g++ -fno-aggressive-loop-optimizations -c -Os -fomit-frame-pointer -pipe -fPIC
-std=gnu++98 -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W
-D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_DECLARATIVE_LIB
-DQT_NO_URL_CAST_FROM_STRING -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS
-DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_NO_OPENTYPE
-DQT_NO_DEBUG -DQT_SCRIPT_LIB -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XMLPATTERNS_LIB
-DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE
-D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++ -I. -I../../include/QtCore
-I../../include/QtNetwork -I../../include/QtGui -I../../include/QtXmlPatterns
-I../../include/QtSql -I../../include/QtSvg -I../../include/QtScript
-I../../include -I../../include/QtDeclarative -I.rcc/release-shared -Iutil
-Igraphicsitems -Iqml -Iqml/parser -Iqml/rewriter -Idebugger
-I../3rdparty/harfbuzz/src -I.moc/release-shared -o
.obj/release-shared/qdeclarativeanimation.o util/qdeclarativeanimation.cpp
util/qdeclarativeanimation.cpp: In member function 'virtual void
QDeclarativeParentAnimation::transition(QDeclarativeStateActions&,
QDeclarativeProperties&, QDeclarativeAbstractAnimation::TransitionDirection)':
util/qdeclarativeanimation.cpp:2598:6: internal compiler error: Segmentation
fault
 void QDeclarativeParentAnimation::transition(QDeclarativeStateActions
&actions,
  ^~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[1]: *** [Makefile:24007: .obj/release-shared/qdeclarativeanimation.o]
Error 1
make[1]: Leaving directory
'/home/buildozer/aports/main/qt/src/qt-everywhere-opensource-src-4.8.7/src/declarative'
make: *** [Makefile:711: sub-declarative-make_default-ordered] Error 2

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/armv6-alpine-linux-muslgnueabihf/6.2.1/lto-wrapper
Target: armv6-alpine-linux-muslgnueabihf
Configured with: /home/buildozer/aports/main/gcc/src/gcc-6.2.0/configure
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--build=armv6-alpine-linux-muslgnueabihf
--host=armv6-alpine-linux-muslgnueabihf
--target=armv6-alpine-linux-muslgnueabihf --with-pkgversion='Alpine 6.2.1'
--enable-checking=release --disable-fixed-point --disable-libstdcxx-pch
--disable-multilib --disable-nls --disable-werror --disable-symvers
--enable-__cxa_atexit --enable-default-pie --enable-cloog-backend
--enable-languages=c,c++,objc,java,fortran,ada --with-arch=armv6zk
--with-tune=arm1176jzf-s --with-fpu=vfp --with-float=hard
--with-abi=aapcs-linux --disable-libquadmath --disable-libssp --disable-libmpx
--disable-libmudflap --disable-libsanitizer --enable-shared --enable-threads
--enable-tls --disable-libitm --with-system-zlib --with-linker-hash-style=gnu
Thread model: posix
gcc version 6.2.1 20160822 (Alpine 6.2.1) 


This is with musl libc on a armv8l compile server.

[Bug c++/78004] g++ 6.2.1 segfaults when compiling qt 4.8.7 on arm

2016-10-17 Thread ncopa at alpinelinux dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78004

--- Comment #1 from Natanael Copa  ---
Qt is built without precompiled headers. (with -no-pch)

[Bug c++/78004] g++ 6.2.1 segfaults when compiling qt 4.8.7 on arm

2016-10-17 Thread ncopa at alpinelinux dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78004

--- Comment #3 from Natanael Copa  ---
Created attachment 39822
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39822&action=edit
qdeclarativeanimation.ii.gz

It segfaults with -O1 and -O2 but not with -Os or -O0.

[Bug c++/78004] g++ 6.2.1 segfaults when compiling qt 4.8.7 on arm

2016-10-17 Thread ncopa at alpinelinux dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78004

--- Comment #4 from Natanael Copa  ---
It seems to be reproducible on 32 bit x86 too with:

$ g++  -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i586-alpine-linux-musl/6.2.1/lto-wrapper
Target: i586-alpine-linux-musl
Configured with: /home/ncopa/aports/main/gcc/src/gcc-6.2.0/configure
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--build=i586-alpine-linux-musl --host=i586-alpine-linux-musl
--target=i586-alpine-linux-musl --with-pkgversion='Alpine 6.2.1'
--enable-checking=release --disable-fixed-point --disable-libstdcxx-pch
--disable-multilib --disable-nls --disable-werror --disable-symvers
--enable-__cxa_atexit --enable-default-pie --enable-cloog-backend
--enable-languages=c,c++,objc,java,fortran,ada --with-arch=i586
--with-tune=generic --enable-cld --disable-libssp --disable-libmpx
--disable-libmudflap --disable-libsanitizer --enable-shared --enable-threads
--enable-tls --with-system-zlib --with-linker-hash-style=gnu
Thread model: posix
gcc version 6.2.1 20160822 (Alpine 6.2.1)

[Bug target/32219] optimizer causes wrong code in pic/hidden/weak symbol checking.

2010-06-30 Thread ncopa at alpinelinux dot org


--- Comment #12 from ncopa at alpinelinux dot org  2010-06-30 11:52 ---
whats the status on this bug? It still happens on gcc-4.4.4.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32219



[Bug ipa/96734] gcc 10.2.0 fails to compile on mips64 due to crash in IPA SRA pass

2020-11-13 Thread ncopa at alpinelinux dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96734

Natanael Copa  changed:

   What|Removed |Added

 CC||ncopa at alpinelinux dot org

--- Comment #7 from Natanael Copa  ---
I was able to reproduce using latest commit from gcc 10 branch:

/home/ncopa/aports/main/gcc/src/build/./prev-gcc/xg++
-B/home/ncopa/aports/main/gcc/src/build/./prev-gcc/
-B/usr/mips64-alpine-linux-musl/bin/ -nostdinc++
-B/home/ncopa/aports/main/gcc/src/build/prev-mips64-alpine-linux-musl/libstdc++-v3/src/.libs
-B/home/ncopa/aports/main/gcc/src/build/prev-mips64-alpine-linux-musl/libstdc++-v3/libsupc++/.libs

-I/home/ncopa/aports/main/gcc/src/build/prev-mips64-alpine-linux-musl/libstdc++-v3/include/mips64-alpine-linux-musl

-I/home/ncopa/aports/main/gcc/src/build/prev-mips64-alpine-linux-musl/libstdc++-v3/include
 -I/home/ncopa/aports/main/gcc/src/gcc-10.2.1/libstdc++-v3/libsupc++
-L/home/ncopa/aports/main/gcc/src/build/prev-mips64-alpine-linux-musl/libstdc++-v3/src/.libs
-L/home/ncopa/aports/main/gcc/src/build/prev-mips64-alpine-linux-musl/libstdc++-v3/libsupc++/.libs
-fno-PIE -c  -DIN_GCC_FRONTEND -g -O2 -fno-checking -gtoggle  -DIN_GCC
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Icp
-I/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc
-I/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/cp
-I/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/../include
-I/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/../libcpp/include 
-I/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/../libdecnumber
-I/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/../libdecnumber/dpd
-I../libdecnumber
-I/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/../libbacktrace  -Os
-fomit-frame-pointer -o cp/method.o -MT cp/method.o -MMD -MP -MF
cp/.deps/method.TPo /home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/cp/method.c
during IPA pass: sra
In file included from
/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/cp/method.c:3199:
./gt-cp-method.h:36:2: internal compiler error: Segmentation fault
   36 | };
  |  ^
0x120807513 crash_signal
/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/toplev.c:328
0x1204210f5 cgraph_edge::redirect_callee(cgraph_node*)
/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/cgraph.c:1374
0x1204340c3 cgraph_edge::redirect_callee_duplicating_thunks(cgraph_node*)
/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/cgraphclones.c:262
0x120434557 cgraph_node::create_clone(tree_node*, profile_count, bool,
vec, bool, cgraph_node*, ipa_param_adjustments*,
char const*)
/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/cgraphclones.c:427
0x12043497b cgraph_node::create_virtual_clone(vec, vec*, ipa_param_adjustments*, char
const*, unsigned int)
/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/cgraphclones.c:613
0x1205ee357 process_isra_node_results
/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/ipa-sra.c:3811
0x1205ee357 ipa_sra_analysis
/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/ipa-sra.c:4047
0x1205ee357 execute
/home/ncopa/aports/main/gcc/src/gcc-10.2.1/gcc/ipa-sra.c:4099
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
make: *** [Makefile:1117: cp/method.o] Error 1

Withs some help from Ariadne we figured out that

 it passes with -O1
 it fails with -O2 (or -Os)
 it fails with -O1 -fipa-sra -fpartial-inlining
 it fails with -Og -fipa-sra -fpartial-inlining
 it passes with -Og -fipa-sra
 it passes with -Og -fpartial-inlining
 it passes with -O2  and either -fnoipa-sra or -fnopartial-inlining
 it passes with -fipa-sra -fpartial-inlining


So it seems that it is some -Og optimization in combination with -fipa-sra
-fpartial-inlining triggers it. I have not been able to pinpoint any of the
documented -O1 or -Og optimization flags.

It fails with:
-Og -fipa-sra -fpartial-inlining  -fno-combine-stack-adjustments
-fno-compare-elim -fno-cprop-registers -fno-defer-pop -fno-ipa-profile
-fno-ipa-pure-const -fno-ipa-reference -fno-ipa-reference-addressable
-fno-merge-constants -fno-omit-frame-pointer -fno-reorder-blocks
-fno-shrink-wrap -fno-split-wide-types -fno-tree-builtin-call-dce -fno-tree-ccp
-fno-tree-ch -fno-tree-coalesce-vars -fno-tree-copy-prop -fno-tree-dce
-fno-tree-dominator-opts -fno-tree-fre -fno-tree-sink -fno-tree-slsr
-fno-tree-ter

[Bug go/105225] New: build failure with musl libc 1.2.3 due to sysinfo.go error: redefinition of 'SYS_SECCOMP'

2022-04-11 Thread ncopa at alpinelinux dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105225

Bug ID: 105225
   Summary: build failure with musl libc 1.2.3 due to sysinfo.go
error: redefinition of 'SYS_SECCOMP'
   Product: gcc
   Version: 11.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: go
  Assignee: ian at airs dot com
  Reporter: ncopa at alpinelinux dot org
CC: cmang at google dot com
  Target Milestone: ---

Building gcc 11.2.1 with musl libc 1.2.3 fails with:

11.2.1_git20220219/libgo/go/syscall/time_nofake.go
/home/ncopa/aports/main/gcc/src/gcc-11.2.1_git20220219/libgo/go/syscall/timestruct.go
libcalls.go sysinfo.go syscall_arch.go syscall_linknames.go epoll.go  -fPIC -o
.libs/syscall.o
sysinfo.go:6606:7: error: redefinition of 'SYS_SECCOMP'
 6606 | const SYS_SECCOMP = _SYS_SECCOMP
  |   ^
sysinfo.go:6600:7: note: previous definition of 'SYS_SECCOMP' was here
 6600 | const SYS_SECCOMP = _SYS_seccomp
  |   ^
make[2]: *** [Makefile:3001: syscall.lo] Error 1

The generation of sysinfo.go will try extract syscalls and convert them to
uppercase. It gets duplicated by the uppercase SYS_SECCOMP introduced in with
musl commit:
https://git.musl-libc.org/cgit/musl/commit/?id=3dcbd896907d9d474da811b7c6b769342abaf651

A possible fix is to only grep for syscalls with lowercase letters:
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
index 6fef104..06289a4 100755
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -126,7 +126,7 @@ if ! grep '^const SIGCLD ' ${OUT} >/dev/null 2>&1; then
 fi

 # The syscall numbers.  We force the names to upper case.
-grep '^const _SYS_' gen-sysinfo.go | \
+grep '^const _SYS_[a-z]' gen-sysinfo.go | \
   sed -e 's/const _\(SYS_[^= ]*\).*$/\1/' | \
   while read sys; do
 sup=`echo $sys | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`

[Bug target/115464] [14 Backport] ICE when building libaom on arm64 (neon sve bridge usage with tbl/perm)

2024-08-09 Thread ncopa at alpinelinux dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115464

Natanael Copa  changed:

   What|Removed |Added

 CC||ncopa at alpinelinux dot org

--- Comment #14 from Natanael Copa  ---
I have backported the following commits to Alpine Linux:

- 0970ff46ba63 aarch64: Fix invalid nested subregs [PR115464]
- 1474a8eead4a aarch64: Use force_subreg in more places
- 6bd4fbae45d1 aarch64: Add some uses of force_lowpart_subreg
- 5f40d1c0cc6c Add force_lowpart_subreg