[Bug c++/115398] New: [15 regression] RTL flag check: CONSTANT_POOL_ADDRESS_P used with unexpected rtx code 'plus' in get_pool_constant, at varasm.cc:4046

2024-06-08 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115398

Bug ID: 115398
   Summary: [15 regression] RTL flag check:
CONSTANT_POOL_ADDRESS_P used with unexpected rtx code
'plus' in get_pool_constant, at varasm.cc:4046
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 58384
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58384=edit
compressed unreduced testcase

The attached unreduced testfile (from llvm-18.1.7) ICEs:

# g++ -m32 -O3 -mavx512f -c dep.ii 
during RTL pass: split1
llvm/lib/Analysis/DependenceAnalysis.cpp: In constructor
'llvm::FullDependence::FullDependence(llvm::Instruction*, llvm::Instruction*,
bool, unsigned int)':
llvm/lib/Analysis/DependenceAnalysis.cpp:273:1: internal compiler error: RTL
flag check: CONSTANT_POOL_ADDRESS_P used with unexpected rtx code 'plus' in
get_pool_constant, at varasm.cc:4046
  273 | }
  | ^

"-O3 -mavx512f" are necessary to trigger it.

gcc version 15.0.0 20240608 (experimental)
e91cf26a954a5c1bf431e36f3a1e69f94e9fa4fe 

Thanks!
  Manuel

[Bug c/115009] New: [15 regression] AVR: ICE in alloc, at value-range-storage.cc:598

2024-05-09 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115009

Bug ID: 115009
   Summary: [15 regression] AVR: ICE in alloc, at
value-range-storage.cc:598
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 58146
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58146=edit
unreduced testcase

Building avr-libc-2.1.0/avr/lib/avr2/strftime.c with latest gcc-15 snapshot:

avr-gcc -c strftime-avr.i -Os
during GIMPLE pass: evrp
../../../libc/time/strftime.c: In function ‘pgm_copystring’:
../../../libc/time/strftime.c:322:1: internal compiler error: in alloc, at
value-range-storage.cc:598
  322 | }
  | ^

-Os is essential to trigger it.

# gcc -v
Reading specs from /usr/lib/gcc/avr/15/device-specs/specs-avr2
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/avr/15/lto-wrapper
Target: avr
Configured with:
/tmp-ram/portage/cross-avr/gcc-15.0./work/gcc-15.0./configure
--host=x86_64-pc-linux-gnu --target=avr --build=x86_64-pc-linux-gnu
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/avr/gcc-bin/15
--includedir=/usr/lib/gcc/avr/15/include --datadir=/usr/share/gcc-data/avr/15
--mandir=/usr/share/gcc-data/avr/15/man
--infodir=/usr/share/gcc-data/avr/15/info
--with-gxx-include-dir=/usr/lib/gcc/avr/15/include/g++-v15
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/avr/15/python --enable-languages=c
--enable-obsolete --enable-secureplt --disable-werror --with-system-zlib
--enable-nls --without-included-gettext --disable-libunwind-exceptions
--enable-checking=yes,extra --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 15.0. p, commit
f525de00d17a460aebb382c0d34529ddc383fb9d' --with-gcc-major-version-only
--enable-lto --disable-libstdcxx-pch --enable-poison-system-directories
--enable-shared --disable-threads --disable-gcov --disable-bootstrap
--enable-multilib --disable-fixed-point --disable-libgomp --disable-libssp
--disable-libada --disable-systemtap --disable-valgrind-annotations
--disable-vtable-verify --disable-libvtv --with-zstd --without-isl
--disable-libsanitizer --disable-default-pie --enable-host-pie
--disable-host-bind-now --disable-default-ssp --disable-fixincludes
Thread model: single
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.0 20240509 (experimental)
2790195500ec523cad9c7292816540e2fc19f456

[Bug rtl-optimization/113048] [13/14 Regression] ICE: in lra_split_hard_reg_for, at lra-assigns.cc:1862 (unable to find a register to spill) {*andndi3_doubleword_bmi} with -march=cascadelake since r13

2024-01-05 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113048

--- Comment #6 from Manuel Lauss  ---
After be977db17c91ad6627dee70a1904a95d229aa1be I don't see this ICE any longer
on either x64 or mips bootstrap.

[Bug target/113048] [13/14 Regression] ICE: in lra_split_hard_reg_for, at lra-assigns.cc:1862 (unable to find a register to spill) {*andndi3_doubleword_bmi} with -march=cascadelake

2023-12-20 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113048

Manuel Lauss  changed:

   What|Removed |Added

 CC||manuel.lauss at googlemail dot 
com

--- Comment #2 from Manuel Lauss  ---
I'm seeing similar ICE in xgcc when trying to build GCC-14 for MIPS32;
it goes away when I drop "-fPIC" or "-march=mips32":

/build/./gcc/xgcc -B/build/./gcc -march=mips32 -O2 -c wlocale-inst.ii  -fPIC

/build/mipsel-softfloat-linux-gnu/libstdc++-v3/include/bits/locale_facets.tcc:588:7:
error: unable to find a register to spill
  588 |   }
  |   ^
/build/mipsel-softfloat-linux-gnu/libstdc++-v3/include/bits/locale_facets.tcc:588:7:
error: this is the insn:
(insn 470 2008 2009 82 (parallel [
(set (reg:SI 908)
(plus:SI (mult:SI (reg:SI 567 [ __result+4 ])
(reg/v:SI 220 [ __base ]))
(reg:SI 909)))
(clobber (reg:SI 796 [762]))
(clobber (reg:SI 763))
])
"/build/mipsel-softfloat-linux-gnu/libstdc++-v3/include/bits/locale_facets.tcc":493:14
42 {*mul_acc_si}
 (expr_list:REG_UNUSED (reg:SI 763)
(expr_list:REG_UNUSED (reg:SI 796 [762])
(expr_list:REG_DEAD (reg:SI 909)
(expr_list:REG_DEAD (reg:SI 567 [ __result+4 ])
(nil))
during RTL pass: reload
/build/mipsel-softfloat-linux-gnu/libstdc++-v3/include/bits/locale_facets.tcc:588:7:
internal compiler error: in lra_split_hard_reg_for, at lra-assigns.cc:1862

[Bug target/112681] [14 Regression] ICE: in extract_insn, at recog.cc:2804 (unrecognizable insn) with -O2 -mfma -mno-sse4.2 and memcmp() since r14-5747

2023-11-23 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112681

--- Comment #7 from Manuel Lauss  ---
(In reply to Jakub Jelinek from comment #6)
> Created attachment 56676 [details]
> gcc14-pr112681.patch
> 
> Full untested patch.

Fixes all ICEs I've seen today.
Thank you!

[Bug target/112676] [14 regression] ICE in extract_insn, at recog.cc:2804

2023-11-23 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112676

--- Comment #2 from Manuel Lauss  ---
I think PR112681 is the same issue.

[Bug target/112676] [14 regression] ICE in extract_insn, at recog.cc:2804

2023-11-23 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112676

--- Comment #1 from Manuel Lauss  ---
Created attachment 56671
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56671=edit
another testcase

Another testcase, one of a few from virtualbox:

g++ -O2 -march=znver4 -mtune=znver4 -mno-avx -c alt-sha1.i 
/tmp-ram/portage/app-emulation/virtualbox-7.0.12/work/VirtualBox-7.0.12/src/VBox/Runtime/common/checksum/alt-sha1.cpp:
In function 'bool RTSha1Check(const void*, size_t, const uint8_t*)':
/tmp-ram/portage/app-emulation/virtualbox-7.0.12/work/VirtualBox-7.0.12/src/VBox/Runtime/common/checksum/alt-sha1.cpp:533:1:
error: unrecognizable insn:
(insn 23 22 24 2 (set (reg:V16QI 109)
(xor:V16QI (reg:V16QI 108)
(mem/c:V16QI (reg:DI 107) [0 MEM  [(void *) +
328B]+0 S16 A64])))
"/tmp-ram/portage/app-emulation/virtualbox-7.0.12/work/VirtualBox-7.0.12/src/VBox/Runtime/common/checksum/alt-sha1.cpp":529:23
-1
 (nil))
during RTL pass: vregs
/tmp-ram/portage/app-emulation/virtualbox-7.0.12/work/VirtualBox-7.0.12/src/VBox/Runtime/common/checksum/alt-sha1.cpp:533:1:
internal compiler error: in extract_insn, at recog.cc:2804

[Bug c/112676] New: [14 regression] ICE in extract_insn, at recog.cc:2804

2023-11-22 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112676

Bug ID: 112676
   Summary: [14 regression] ICE in extract_insn, at recog.cc:2804
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 56669
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56669=edit
compressed unreduced testcase

gcc version 14.0.0 20231123 (experimental)
9d912820d02c7396676e04c4c05f6a0fdd92ed85

This is very recent, on linux g9b6de136:

$ gcc -mno-avx -march=znver4 -O2 -c dcn32_fpu.i
/usr/src/linux.git/drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/dcn32_fpu.c:
In function 'dcn32_internal_validate_bw':
/usr/src/linux.git/drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/dcn32_fpu.c:2223:1:
error: unrecognizable insn:
 2223 | }
  | ^
(insn 1628 1627 1629 277 (set (reg:V16QI 1102)
(xor:V16QI (reg:V16QI 1101)
(mem:V16QI (reg:DI 1100) [0 MEM  [(void *)stream_817 +
608B]+0 S16 A8])))
"/usr/src/linux.git/drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/dcn32_fpu.c":1350:7
-1
 (nil))
during RTL pass: vregs
/usr/src/linux.git/drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/dcn32_fpu.c:2223:1:
internal compiler error: in extract_insn, at recog.cc:2804


Omitting either "-march=znver4" or "-mno-avx" gets rid of it.

Thanks!
 Manuel

[Bug tree-optimization/112536] [14 regression] ICE when building xorg-server on arm64 (internal compiler error: in vect_slp_analyze_node_operations, at tree-vect-slp.cc:6378) since r14-5435-g7383cb56e

2023-11-15 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112536

--- Comment #10 from Manuel Lauss  ---
(In reply to Jakub Jelinek from comment #9)
> Created attachment 56591 [details]
> gcc14-pr112536.patch
> 
> Untested fix.


It does fix the ICE I saw with mesa (avx512)

Thanks!

[Bug c/111902] New: internal compiler error: verify_ssa failed

2023-10-20 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111902

Bug ID: 111902
   Summary: internal compiler error: verify_ssa failed
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 56159
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56159=edit
unreduced testcase

# gcc -v
gcc version 14.0.0 20231020 (experimental)
5ac53c025e08b4c464b02cfc595e422813023c81

# gcc -c strtod_l.i -O1 -fgnu89-inline -m32 -ftree-vectorize
strtod_l.c: In function 'strtod_l_internal':
strtod_l.c:506:1: error: stmt with wrong VUSE
# VUSE <.MEM_875>
_1066 = *tp_1065;
expected .MEM_1453
strtod_l.c:506:1: error: PHI node with wrong VUSE on edge from BB 563
.MEM_1490 = PHI <.MEM_875(563), .MEM_875(560)>
expected .MEM_1453
strtod_l.c:506:1: error: PHI node with wrong VUSE on edge from BB 560
.MEM_1490 = PHI <.MEM_875(563), .MEM_875(560)>
expected .MEM_1453
during GIMPLE pass: vect
strtod_l.c:506:1: internal compiler error: verify_ssa failed


This is extracted from glibc, just one of many files which fail with the same
error.  AFAICT this failure appeared within the last 8 days.

[Bug rtl-optimization/111142] [14 regression] ICE in get_group_load_store_type, at tree-vect-stmts.cc:2121 (AVX512)

2023-08-24 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42

--- Comment #1 from Manuel Lauss  ---
This is fairly new, something after 4aa14ec7d5b25722e4d02c29c8c1e22dcc5a4915
("MATCH: [PR09] Fix bit_ior(cond,cond) when comparisons are fp") may have
caused this, since I was able to build mesa just 12 hours ago.

[Bug rtl-optimization/111142] New: [14 regression] ICE in get_group_load_store_type, at tree-vect-stmts.cc:2121 (AVX512)

2023-08-24 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42

Bug ID: 42
   Summary: [14 regression] ICE in get_group_load_store_type, at
tree-vect-stmts.cc:2121 (AVX512)
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 55787
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55787=edit
compressed unreduced testcase

gcc version 14.0.0 20230824 (experimental)
721f7e2c4e5eed645593258624dd91e6c39f3bd2


g++ -m32 -O2 -march=znver4 -c gcc-14-mesa-aco-ice.ii 
during GIMPLE pass: vect
../mesa-/src/amd/compiler/aco_insert_waitcnt.cpp: In function 'void
aco::insert_wait_states(Program*)':
../mesa-/src/amd/compiler/aco_insert_waitcnt.cpp:1042:1: internal compiler
error: in get_group_load_store_type, at tree-vect-stmts.cc:2121


can only trigger with "-march=znver4", does not trigger with avx2 only or -O1
or lower.

Fails with the same error for x64-64, but the testcase is preprocessed for
32bit targets.

Thank you!
  Manuel

[Bug middle-end/111082] ICE in expand_fn_using_insn, at internal-fn.cc:214 (AVX512 related)

2023-08-20 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111082

--- Comment #1 from Manuel Lauss  ---
Created attachment 55767
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55767=edit
another compressed unreduced testcase

Another testcase.  it triggers with "-march=zvner1" but not e.g. "core2" but
that is probably due to the source being preprocessed for znver4.

# g++ -march=znver1 -mtune=znver1 -O2 -c qxmlstream.ii 
during RTL pass: expand
In file included from
/tmp-ram/portage/dev-qt/qtcore-5.15.10-r1/work/qtbase-everywhere-src-5.15.10/src/corelib/serialization/qxmlstream.cpp:76:
/tmp-ram/portage/dev-qt/qtcore-5.15.10-r1/work/qtbase-everywhere-src-5.15.10/src/corelib/serialization/qxmlstream_p.h:
In member function 'QStringView QXmlStreamReaderPrivate::symView(int) const':
/tmp-ram/portage/dev-qt/qtcore-5.15.10-r1/work/qtbase-everywhere-src-5.15.10/src/corelib/serialization/qxmlstream_p.h:949:17:
internal compiler error: in expand_fn_using_insn, at internal-fn.cc:214
  949 | QStringView symView(int index) const
  | ^~~
0x555774d492af internal_error(char const*, ...)
???:0
0x5557732b9ed6 fancy_abort(char const*, int, char const*)

[Bug middle-end/111082] New: ICE in expand_fn_using_insn, at internal-fn.cc:214 (AVX512 related)

2023-08-20 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111082

Bug ID: 111082
   Summary: ICE in expand_fn_using_insn, at internal-fn.cc:214
(AVX512 related)
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 55766
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55766=edit
compressed unreduced testcase

gcc version 14.0.0 20230820 (experimental)
d77c280454cfba48ef38357145cecdabc8c1b05c

# gcc -O2 -march=znver4 -mtune=znver4 -pipe -std=gnu++11  gcc14-bf.ii
In file included from
/tmp-ram/portage/media-gfx/hugin-2022.0.0/work/hugin-2022.0.0/src/hugin_base/panodata/PanoramaData.h:40,
 from
/tmp-ram/portage/media-gfx/hugin-2022.0.0/work/hugin-2022.0.0/src/hugin_base/nona/Stitcher.h:51,
 from
/tmp-ram/portage/media-gfx/hugin-2022.0.0/work/hugin-2022.0.0/src/hugin_base/nona/Stitcher1.cpp:26:
/tmp-ram/portage/media-gfx/hugin-2022.0.0/work/hugin-2022.0.0/src/hugin_base/panodata/PanoramaVariable.h:160:31:
warning: 'template struct std::unary_function' is
deprecated [-Wdeprecated-declarations]
  160 | struct PrintVar : public std::unary_function
  |   ^~
In file included from
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/string:49,
 from
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/locale_classes.h:40,
 from
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/ios_base.h:41,
 from
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/ios:44,
 from
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/istream:40,
 from
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/sstream:40,
 from
/tmp-ram/portage/media-gfx/hugin-2022.0.0/work/hugin-2022.0.0/src/hugin_base/nona/Stitcher.h:32:
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/stl_function.h:120:12:
note: declared here
  120 | struct unary_function
  |^~
during RTL pass: expand
In file included from
/tmp-ram/portage/media-gfx/hugin-2022.0.0/work/hugin-2022.0.0/src/hugin_base/vigra_ext/StitchWatershed.h:30,
 from
/tmp-ram/portage/media-gfx/hugin-2022.0.0/work/hugin-2022.0.0/src/hugin_base/nona/Stitcher.h:47:
/tmp-ram/portage/media-gfx/hugin-2022.0.0/work/hugin-2022.0.0/src/hugin_base/vigra_ext/BlendPoisson.h:
In function 'void vigra_ext::poisson::BuildSeamPyramid(const Image&,
vigra::ImagePyramid&, int) [with Image =
vigra::BasicImage; PyramidImage = vigra::BasicImage]':
/tmp-ram/portage/media-gfx/hugin-2022.0.0/work/hugin-2022.0.0/src/hugin_base/vigra_ext/BlendPoisson.h:650:6:
internal compiler error: in expand_fn_using_insn, at internal-fn.cc:214
  650 | void BuildSeamPyramid(const Image& input,
vigra::ImagePyramid& seams, const int minLength)
  |  ^~~~
0x5652df7942af internal_error(char const*, ...)
???:0
0x5652ddd04ed6 fancy_abort(char const*, int, char const*)
???:0


ICE goes away with -mno-avx512f appended.

Attached us an unreduced testcase.  This failure is fairly new; it did not
break 1 week ago.

[Bug c/110482] ICE tree check: expected none of vector_type, have vector_type in type_has_mode_precision_p, at tree.h:6644

2023-06-29 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110482

Manuel Lauss  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Manuel Lauss  ---
Looks like a dup PR110460

*** This bug has been marked as a duplicate of bug 110460 ***

[Bug tree-optimization/110460] [14 Regression] ft32 ICE on 931110-1.c with new TYPE_PRECISION checking

2023-06-29 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110460

Manuel Lauss  changed:

   What|Removed |Added

 CC||manuel.lauss at googlemail dot 
com

--- Comment #6 from Manuel Lauss  ---
*** Bug 110482 has been marked as a duplicate of this bug. ***

[Bug c/110482] New: ICE tree check: expected none of vector_type, have vector_type in type_has_mode_precision_p, at tree.h:6644

2023-06-29 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110482

Bug ID: 110482
   Summary: ICE tree check: expected none of vector_type, have
vector_type in type_has_mode_precision_p, at
tree.h:6644
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 55425
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55425=edit
unreduced testcase

gcc version 14.0.0 20230629 (experimental)
6d2eddf456f2d6494cac490c4aa3e7d089926098
i.e. with the fix to PR110454 applied.

$ gcc -mno-sse -mno-mmx -mno-sse2 -O2 -c nf_conntrack_expect.i
during GIMPLE pass: slp
/usr/src/linux.git/net/netfilter/nf_conntrack_expect.c: In function
'nf_ct_expect_related_report':
/usr/src/linux.git/net/netfilter/nf_conntrack_expect.c:489:5: internal compiler
error: tree check: expected none of vector_type, have vector_type in
type_has_mode_precision_p, at tree.h:6644
  489 | int nf_ct_expect_related_report(struct nf_conntrack_expect *expect,
  | ^~~

the 4 parameters are required to trigger it.

Unreduced testcase attached.

Thanks!
Manuel

[Bug c++/110296] New: ICE in gsi_replace, at gimple-iterator.cc:437 during GIMPLE pass: widening_mul

2023-06-17 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110296

Bug ID: 110296
   Summary: ICE in gsi_replace, at gimple-iterator.cc:437 during
GIMPLE pass: widening_mul
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 55355
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55355=edit
unreduced testcase

# g++ -v
gcc version 14.0.0 20230616 (experimental)
ea1cd66f2200839d46a8b4dc140d18c00b849c82

# g++ -O2 fail.i -cduring GIMPLE pass: widening_mul
/tmp-ram/portage/app-crypt/qca-2.3.6-r2/work/qca-2.3.6/src/botantools/botan/mp_comba.cpp:
In function 'void QCA::Botan::bigint_comba_mul4(word*, const word*, const
word*)':
/tmp-ram/portage/app-crypt/qca-2.3.6-r2/work/qca-2.3.6/src/botantools/botan/mp_comba.cpp:47:6:
internal compiler error: in gsi_replace, at gimple-iterator.cc:437
   47 | void bigint_comba_mul4(word z[8], const word x[4], const word y[4])
  |  ^

See attached unreduced source.

Thanks!
 Manuel

[Bug ipa/108110] [13 Regression] ice in modify_call, at ipa-param-manipulation.cc:700 with -std=c++14 -O3 -march=znver3 since r13-4685-g4834e9360f7bf4

2022-12-18 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108110

Manuel Lauss  changed:

   What|Removed |Added

 CC||manuel.lauss at googlemail dot 
com

--- Comment #12 from Manuel Lauss  ---
Created attachment 54122
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54122=edit
unreduced test case

I've attached another testcase:

-O2 and -march with AVX support are essential to trigger it:

moya ~ # g++ -c ipa-param-manipulation.i -O1 -march=core-avx-i
moya ~ # g++ -c ipa-param-manipulation.i -O3 -march=core-avx-i
moya ~ # g++ -c ipa-param-manipulation.i -O2 -march=core-avx-i
during IPA pass: inline
In file included from
/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/tuple:41,
 from
/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/unique_ptr.h:36,
 from
/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/memory:78,
 from src/mongo/util/background.h:32,
 from src/mongo/util/background.cpp:34:
In function 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&&
...) [with _Res = void; _Fn =
mongo::logv2::detail::doLog::FMT_COMPILE_STRING,
14, NamedArg,
std::allocator >&>, NamedArg > >
>(int32_t, const mongo::logv2::LogSeverity&, const mongo::logv2::LogOptions&,
const
mongo::{anonymous}::PeriodicTaskRunner::_runTask(mongo::PeriodicTask*)FMT_COMPILE_STRING&,
const char (&)[14], const NamedArg&>&,
const NamedArg > >&)::; _Args = {const mongo::logv2::detail::NamedArg, allocator >&>&, const
mongo::logv2::detail::NamedArg > >&}]',
inlined from 'constexpr typename std::__invoke_result<_Functor,
_ArgTypes>::type std::__invoke(_Callable&&, _Args&& ...) [with _Callable =
mongo::logv2::detail::doLog::FMT_COMPILE_STRING,
14, NamedArg,
std::allocator >&>, NamedArg > >
>(int32_t, const mongo::logv2::LogSeverity&, const mongo::logv2::LogOptions&,
const
mongo::{anonymous}::PeriodicTaskRunner::_runTask(mongo::PeriodicTask*)FMT_COMPILE_STRING&,
const char (&)[14], const NamedArg&>&,
const NamedArg > >&)::; _Args = {const mongo::logv2::detail::NamedArg, allocator >&>&, const
mongo::logv2::detail::NamedArg > >&}]' at
/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/invoke.h:96:40,
inlined from 'constexpr decltype(auto) std::__apply_impl(_Fn&&, _Tuple&&,
index_sequence<_Idx ...>) [with _Fn =
mongo::logv2::detail::doLog::FMT_COMPILE_STRING,
14, NamedArg,
std::allocator >&>, NamedArg > >
>(int32_t, const mongo::logv2::LogSeverity&, const mongo::logv2::LogOptions&,
const
mongo::{anonymous}::PeriodicTaskRunner::_runTask(mongo::PeriodicTask*)FMT_COMPILE_STRING&,
const char (&)[14], const NamedArg&>&,
const NamedArg > >&)::; _Tuple = tuple, allocator >&>&, const
mongo::logv2::detail::NamedArg > >&>; long
unsigned int ..._Idx = {0, 1}]' at
/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/tuple:2287:27,
inlined from 'constexpr decltype(auto) std::apply(_Fn&&, _Tuple&&) [with
_Fn =
mongo::logv2::detail::doLog::FMT_COMPILE_STRING,
14, NamedArg,
std::allocator >&>, NamedArg > >
>(int32_t, const mongo::logv2::LogSeverity&, const mongo::logv2::LogOptions&,
const
mongo::{anonymous}::PeriodicTaskRunner::_runTask(mongo::PeriodicTask*)FMT_COMPILE_STRING&,
const char (&)[14], const NamedArg&>&,
const NamedArg > >&)::; _Tuple = tuple, allocator >&>&, const
mongo::logv2::detail::NamedArg > >&>]' at
/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/tuple:2298:31,
inlined from 'void mongo::logv2::detail::doLog(int32_t, const
mongo::logv2::LogSeverity&, const mongo::logv2::LogOptions&, const S&, const
char (&)[N], const Args& ...) [with S =
mongo::{anonymous}::PeriodicTaskRunner::_runTask(mongo::PeriodicTask*)FMT_COMPILE_STRING;
long unsigned int N = 14; Args = {NamedArg, std::allocator
>&>, NamedArg > >}]' at
src/mongo/logv2/log_detail.h:121:15,
inlined from 'void
mongo::{anonymous}::PeriodicTaskRunner::_runTask(mongo::PeriodicTask*)' at
src/mongo/util/background.cpp:358:440:
/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/invoke.h:61:36:
internal compiler error: in modify_call, at ipa-param-manipulation.cc:700
   61 | { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); }
  |  ~~^~~~
0x1ced1ad internal_error(char const*, ...)
???:0
0x6be47f fancy_abort(char const*, int, char const*)
???:0
0x9bfc8e cgraph_edge::redirect_call_stmt_to_callee(cgraph_edge*)
???:0
0xe54a9b redirect_all_calls(copy_body_data*, basic_block_def*)
???:0
0xe601bb optimize_inline_calls(tree_node*)
???:0
0xbbd42b inline_transform(cgraph_node*)
???:0
0xd125df execute_all_ipa_transforms(bool)
???:0
0x9c640f cgraph_node::expand()
???:0
0x9c9f77 symbol_table::finalize_compilation_unit()
???:0

[Bug c++/108096] New: [13 regression] libreoffice build failure #2

2022-12-14 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108096

Bug ID: 108096
   Summary: [13 regression] libreoffice build failure #2
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 54088
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54088=edit
comrpessed preprocessed source

This is a followup to PR108071.

With todays gcc-trunk (g:693638252aae9b36b5b928d7195df6d28bf409d7), libreoffice
build fails with another new error:

# g++ -c backupfilehelper.i
backupfilehelper.i: In instantiation of 'constexpr bool
std::__check_constructible() [with _ValueType = rtl::OUString; _Tp = const
char* const&]':
backupfilehelper.i:25254:119:   required from '_ForwardIterator
std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with
_InputIterator = const char* const*; _ForwardIterator = rtl::OUString*]'
backupfilehelper.i:25380:37:   required from '_ForwardIterator
std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator,
allocator<_Tp>&) [with _InputIterator = const char* const*; _ForwardIterator =
rtl::OUString*; _Tp = rtl::OUString]'
backupfilehelper.i:40712:33:   required from 'void std::vector<_Tp,
_Alloc>::_M_range_initialize(_ForwardIterator, _ForwardIterator,
std::forward_iterator_tag) [with _ForwardIterator = const char* const*; _Tp =
rtl::OUString; _Alloc = std::allocator]'
backupfilehelper.i:40361:23:   required from 'std::vector<_Tp,
_Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with
_InputIterator = const char* const*;  = void; _Tp =
rtl::OUString; _Alloc = std::allocator; allocator_type =
std::allocator]'
backupfilehelper.i:62388:9:   required from here
backupfilehelper.i:25201:56: error: static assertion failed: result type must
be constructible from input type
25201 |   static_assert(is_constructible<_ValueType, _Tp>::value,
  |^
backupfilehelper.i:25201:56: note: 'std::integral_constant::value'
evaluates to false


The offending code is:

const std::vector< OUString >& f()
{
static std::vector< OUString > aDirNames =
{
"config",
"registry",
"psprint",
"store",
"temp",
"pack"
};
return aDirNames;
}


Find attached the compressed preprocessed source.

Thank you!
 Manuel

[Bug c++/108071] [13 regression] Build failure in Libreoffice

2022-12-12 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108071

--- Comment #2 from Manuel Lauss  ---
(In reply to Richard Biener from comment #1)
I get the same errors, but the whole file can be compiled without errors with
gcc-12 (it needs to be preprocessed with gcc-12 as well), and with a gcc-13
checkout from 9 days ago.
So in the last 9 days, something was introduced which caused these errors to
appear.

[Bug c++/108071] New: 13 regression: Build failure in Libreoffice

2022-12-12 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108071

Bug ID: 108071
   Summary: 13 regression: Build failure in Libreoffice
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 54069
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54069=edit
compressed preprocessed unreduced source

Hello,

with latest gcc-13 trunk, libreoffice build fails; last time I was able to
build it was 9 days ago with r13-93574914e462e87e4266b0dfbb9627662f33.
gcc-12 works as expected, though the preprocessed source has few differences.

Attached the compressed preprocessed unreduced source file, build with
g++ -c AnyCompareFactory.i

Thanks,
Manuel

[Bug bootstrap/107059] [13 regression] bootstrap failure after r13-2887-gb04208895fed34

2022-09-28 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107059

--- Comment #27 from Manuel Lauss  ---
(In reply to Jakub Jelinek from comment #24)
> (In reply to jos...@codesourcery.com from comment #22)
> > Even with the fixincluded headers properly being used, the powerpc64le 
> > issue still applies because of the issue I noted in 
> > https://sourceware.org/pipermail/libc-alpha/2022-September/142259.html 
> > with certain required changes to the powerpc version of bits/floatn.h not 
> > being covered by the fixincludes fixes added.  You get errors such as:
> > 
> > /scratch/jmyers/glibc-bot/build/compilers/powerpc64le-linux-gnu/gcc/gcc/
> > include-fixed/bits/floatn.h:88:9: error: multiple types in one declaration
> >88 | typedef __float128 _Float128;
> >   | ^~
> > 
> > while building libstdc++.  (Whereas other architectures can build GCC OK 
> > but then run into failures building glibc that my glibc patch is intended 
> > to address.)
> 
> Posted patch for this in
> https://gcc.gnu.org/pipermail/gcc-patches/2022-September/602431.html

for me the x86-64 build remains broken the same way as the ppc64 build.

[Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function since r12-6030-g422f9eb7011b76c1

2022-01-11 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961

--- Comment #17 from Manuel Lauss  ---
(In reply to Siddhesh Poyarekar from comment #16)
> Should be fixed with that patch.  May I close this or wait for confirmation
> from the reporter?

I can no longer reproduce the original issue.

[Bug c/103961] gcc-12 apparently miscompiles libcap's cap_to_text() function

2022-01-10 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961

--- Comment #2 from Manuel Lauss  ---
Created attachment 52154
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52154=edit
gcc-12.0 output

[Bug c/103961] gcc-12 apparently miscompiles libcap's cap_to_text() function

2022-01-10 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961

--- Comment #1 from Manuel Lauss  ---
Created attachment 52153
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52153=edit
gcc-11.3 output

[Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function

2022-01-10 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961

Bug ID: 103961
   Summary: gcc-12 apparently miscompiles libcap's cap_to_text()
function
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 52152
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52152=edit
preprocessed source file

gcc-12 apparently miscompiles the libcap-2.62 function "cap_to_text()".
I've seen it manifest with "ls" segfaulting in certain directories:

$ ls
*** buffer overflow detected ***: terminated
Aborted (core dumped)


#0  __pthread_kill_implementation (threadid=,
signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO
(ret) : 0;
(gdb) bt
#0  __pthread_kill_implementation (threadid=,
signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x7f34f856932f in __pthread_kill_internal (signo=6, threadid=) at pthread_kill.c:78
#2  0x7f34f8518e42 in __GI_raise (sig=sig@entry=6) at
../sysdeps/posix/raise.c:26
#3  0x7f34f8503457 in __GI_abort () at abort.c:79
#4  0x7f34f855d5a8 in __libc_message (action=action@entry=do_abort,
fmt=fmt@entry=0x7f34f8690291 "*** %s ***: terminated\n") at
../sysdeps/posix/libc_fatal.c:155
#5  0x7f34f85fb042 in __GI___fortify_fail (msg=msg@entry=0x7f34f8690237
"buffer overflow detected") at fortify_fail.c:26
#6  0x7f34f85f9b60 in __GI___chk_fail () at chk_fail.c:28
#7  0x7f34f85f96d5 in ___sprintf_chk (s=s@entry=0x7fff9f08c6c2 ",",
flag=flag@entry=1, slen=slen@entry=0, format=format@entry=0x7f34f86dc085
"%c%s%s%s")
at sprintf_chk.c:37
#8  0x7f34f86da882 in sprintf (__fmt=0x7f34f86dc085 "%c%s%s%s",
__s=) at /usr/include/bits/stdio2.h:38
#9  cap_to_text (caps=0x5643cf9b1a38, length_p=0x0) at cap_text.c:431
#10 0x5643cf983285 in ?? ()

If I replace the cap_text.o file from the gcc-12 build with one from a gcc-11.3
build, the error disappears.  It also disappears when ls is run under strace.
-fno-tree-vectorize does NOT help.

Find attached the preprocessed cap_text.i file from libcap-2.62, as well as
.S files of gcc-11.3 and 12.0

gcc version 12.0.0 20220110 (experimental) (Gentoo 12.0.0_pre p2, commit
92e114d66e93d60dcef97c66cddbae38b657d768)

[Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050

2022-01-06 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103928

--- Comment #13 from Manuel Lauss  ---
(In reply to Uroš Bizjak from comment #12)
> (In reply to Manuel Lauss from comment #10)
> > So it was either fixed in trunk in the last 20 hours, or pgo build broke
> > gcc, or "-mno-xop" fixed it.
> 
> The fix for PR103905 was pushed to the master in the last 20 hours, and I am
> curious if it has any effect on your problem.

I believe it fixed it.  GCC itself was corrupted when built with XOP
instructions, as were a few other system packages.  This is all gone now.

[Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050

2022-01-06 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103928

Manuel Lauss  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|WAITING |RESOLVED

--- Comment #10 from Manuel Lauss  ---
I tried the testcase of PR103905, and it works (no error/abort although it has
the XOP vector instructions in it).

Rebuilt current gcc-12 head with "-mno-xop" added to cflags, and disabled PGO
build; the error does no longer reproduce now.
So it was either fixed in trunk in the last 20 hours, or pgo build broke gcc,
or "-mno-xop" fixed it.

I'll try to narrow it down.

Resolving as invalid.

[Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050

2022-01-06 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103928

--- Comment #9 from Manuel Lauss  ---
(In reply to Uroš Bizjak from comment #7)
> (In reply to Martin Liška from comment #6)
> > Then you may be affected by PR103905 which is fixed on the current master.
> > Please pull to tip of master branch.
> 
> No, bdver4 does not include XOP.

Are you sure?  the XOP-version of "bextr" is used quite extensively, i.e.:
$ objdump -d /lib64/libc.so.6 | grep bextr
   35181:   8f ea f8 10 c9 03 1dbextr  $0x1d03,%rcx,%rcx
   3beaa:   8f ea f8 10 f2 20 1fbextr  $0x1f20,%rdx,%rsi
   3c207:   8f ea f8 10 c0 3f 01bextr  $0x13f,%rax,%rax

[Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050

2022-01-06 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103928

--- Comment #5 from Manuel Lauss  ---
(In reply to Martin Liška from comment #4)
> (In reply to Manuel Lauss from comment #3)
> > You're right, I too can only reproduce it on the bdver4 machine itself, not
> > on e.g. a Zen or Haswell host.  I'll rebuild gcc-12 on the bdver4 host 
> > again.
> 
> How do you build the compiler on the bdver4 host? Do you use -march=bdver4?

Yes, -march=bdver4 -mtune=bdver4

[Bug target/103928] [12 Regression] ICE in get_insn_template, at final.c:2050

2022-01-06 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103928

--- Comment #3 from Manuel Lauss  ---
You're right, I too can only reproduce it on the bdver4 machine itself, not on
e.g. a Zen or Haswell host.  I'll rebuild gcc-12 on the bdver4 host again.

[Bug c/103928] New: [12] ICE in get_insn_template, at final.c:2050

2022-01-06 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103928

Bug ID: 103928
   Summary: [12] ICE in get_insn_template, at final.c:2050
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 52132
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52132=edit
compressed unreduced preprocessed testfile

The attached unreduced testcase, extracted from xxHash, ICEs on trunk.
march=bdver4 seems essential to trigger it:

# gcc -O2 -march=bdver4 -E -o xxhash.i xxhash.c
# gcc -O2 -march=bdver4 -c xxhash.i
during RTL pass: final
In file included from xxhash.c:43:
xxhash.h: In function ‘XXH_mult64to128’:
xxhash.h:3360:1: internal compiler error: in get_insn_template, at final.c:2050
 3360 | }
  | ^
0x7f19cd0cd2b6 __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
0x7f19cd0cd374 __libc_start_main_impl
../csu/libc-start.c:392
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.


gcc version 12.0.0 20220105 (experimental) (Gentoo 12.0.0_pre p2, commit
4ce3bd7993bc8413197e07c4f54052e4ecaeccaa)

[Bug tree-optimization/96748] ICE in get_default_value, at tree-ssa-ccp.c:311

2020-08-24 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96748

--- Comment #5 from Manuel Lauss  ---
(In reply to Martin Liška from comment #4)
> I don't see the failure for any of recent GCC releases:
> 
> Releases
>   8.1.0 (406c2abec3f998e9)(02 May 2018 10:13): [took: 4.858s] result: OK
>   8.2.0 (ddeb81e76461fc00)(26 Jul 2018 09:47): [took: 4.871s] result: OK
>   8.3.0 (4c44b708f11eec6f)(22 Feb 2019 14:20): [took: 4.913s] result: OK
>   8.4.0 (8cd3bffead2ed1d1)(04 Mar 2020 08:30): [took: 4.821s] result: OK
>   9.1.0 (c8913260b0756f97)(03 May 2019 07:59): [took: 4.729s] result: OK
>   9.2.0 (a0c06cc27d2146b7)(12 Aug 2019 09:38): [took: 4.731s] result: OK
>   9.3.0 (4212a6a3e44f8704)(12 Mar 2020 11:08): [took: 4.770s] result: OK
>   10.1.0 (6e6e3f144a33ae50)(07 May 2020 10:50): [took: 4.924s] result: OK
>   10.2.0 (ee5c3db6c5b2c333)(23 Jul 2020 06:35): [took: 4.919s] result: OK

As I wrote in comment 3, I can no longer reproduce it either.  It appeared in a
10.2.0 branch build of ~13.08.2020, but has since been resolved.

[Bug tree-optimization/96748] ICE in get_default_value, at tree-ssa-ccp.c:311

2020-08-23 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96748

Manuel Lauss  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Manuel Lauss  ---
I can no longer reproduce it with a fresh checkout of 10.2 branch.
Closing as invalid.

[Bug tree-optimization/96748] ICE in get_default_value, at tree-ssa-ccp.c:311

2020-08-22 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96748

--- Comment #2 from Manuel Lauss  ---
Created attachment 49099
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49099=edit
gzipped testcase

Apologies, find the gzip compressed test source attached.

[Bug c/96748] New: ICE in get_default_value, at tree-ssa-ccp.c:311

2020-08-22 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96748

Bug ID: 96748
   Summary: ICE in get_default_value, at tree-ssa-ccp.c:311
   Product: gcc
   Version: 10.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

The attached unreduced testcase, isolated from wireshark-3.2.6, ICEs in
get_default_value, at tree-ssa-ccp.c:311, with current 10.2.1 branch.

It goes away with -O1 or when dropping -fno-strict-overflow at -O2 or higher.

# gcc -fno-strict-overflow -O2 -c packet-ieee80211.i
during GIMPLE pass: ccp
/tmp-ram/portage/net-analyzer/wireshark-3.2.6/work/wireshark-3.2.6/epan/dissectors/packet-ieee80211.c:
In function 'dissect_quiet_time_period.constprop':
/tmp-ram/portage/net-analyzer/wireshark-3.2.6/work/wireshark-3.2.6/epan/dissectors/packet-ieee80211.c:12484:1:
internal compiler error: in get_default_value, at tree-ssa-ccp.c:311
12484 | dissect_quiet_time_period(tvbuff_t *tvb, packet_info *pinfo _U_,
  | ^
0x7fcac1d5adc9 __libc_start_main
../csu/libc-start.c:314
Please submit a full bug report,
with preprocessed source if appropriate.


# gcc --version
gcc (Gentoo 10.2.1 p1) 10.2.1
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug middle-end/96194] [10/11 Regression] ICE in assign_temp, at function.c:984 during RTL pass: expand

2020-07-14 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96194

--- Comment #6 from Manuel Lauss  ---
(In reply to Jakub Jelinek from comment #5)
> Created attachment 48874 [details]
> gcc11-pr96194.patch
> 
> Untested fix.

It fixes the mesa build, thank you!

[Bug c++/96194] New: 10.1.1: ICE in assign_temp, at function.c:984 during RTL pass: expand

2020-07-14 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96194

Bug ID: 96194
   Summary: 10.1.1: ICE in assign_temp, at function.c:984 during
RTL pass: expand
   Product: gcc
   Version: 10.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 48872
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48872=edit
unreduced testcase

The attached unreduced testcase, extracted from current mesa, generates the
following ICE with -O2 or higher.  Current 10.1.1 as of today (14.07.2020),
with the fix to PR96130 applied.


# g++ -O2 -c p_tesselator.i
during RTL pass: expand
../mesa-/src/gallium/auxiliary/tessellator/p_tessellator.cpp: In function
'pipe_tessellator* p_tess_init(pipe_prim_type, pipe_tess_spacing, bool, bool)':
../mesa-/src/gallium/auxiliary/tessellator/p_tessellator.cpp:130:1:
internal compiler error: in assign_temp, at function.c:984
  130 | p_tess_init(enum pipe_prim_type tes_prim_mode,
  | ^~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.

[Bug c/96130] New: 10.1.1: segfault during IPA pass: fnsummary

2020-07-09 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96130

Bug ID: 96130
   Summary: 10.1.1: segfault during IPA pass: fnsummary
   Product: gcc
   Version: 10.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 48847
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48847=edit
preprocessed unreduced testcase

The testcase, extracted from current mesa, segfaults with -O1 or higher:

# gcc -O1 -c sp_tex_sample.i
during IPA pass: fnsummary
../mesa-/src/gallium/drivers/softpipe/sp_tex_sample.c: In function
'sample_compare':
../mesa-/src/gallium/drivers/softpipe/sp_tex_sample.c:3862:1: internal
compiler error: Segmentation fault
 3862 | }
  | ^
Please submit a full bug report,
with preprocessed source if appropriate.

# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/10.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/tmp-ram/portage/sys-devel/gcc-10.1.0-r1/work/gcc-10.1.0/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/10.1.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.1.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.1.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.1.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/include/g++-v10
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/10.1.0/python
--enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror
--with-system-zlib --disable-nls --enable-checking=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 10.1.0-r1 p2'
--disable-esp --enable-libstdcxx-time --with-build-config=bootstrap-lto
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64
--disable-fixed-point --enable-targets=all --enable-libgomp
--disable-libmudflap --disable-libssp --disable-libada --disable-systemtap
--disable-vtable-verify --disable-libvtv --without-zstd --disable-libquadmath
--enable-lto --with-isl --disable-isl-version-check --disable-libsanitizer
--disable-default-pie --disable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.1.0 (Gentoo 10.1.0-r1 p2)

[Bug c++/89443] New: asm "volatile" keyword no longer supported

2019-02-21 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89443

Bug ID: 89443
   Summary: asm "volatile" keyword no longer supported
   Product: gcc
   Version: 8.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 45791
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45791=edit
compressed preprocessed source

I'm not certain whether this is a gcc bug at all:
The attached preprocessed source, taken from qtscript-5.11.3, throws this error
with current gcc-8.2.1. A gcc-8 snapshot taken on 01-DEC-2018 used to compile
this package just fine.

It seems that the "volatile" in asm volatile (...) is no longer valid:

g++ -c test.i 
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:483:5: error:
expected ‘(’ before ‘volatile’
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:484:1: error:
expected unqualified-id before string constant
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:483:15: error:
expected ‘)’ before string constant
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:518:5: error:
expected ‘(’ before ‘volatile’
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:519:1: error:
expected unqualified-id before string constant
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:518:15: error:
expected ‘)’ before string constant
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:534:5: error:
expected ‘(’ before ‘volatile’
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:535:1: error:
expected unqualified-id before string constant
../3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp:534:15: error:
expected ‘)’ before string constant


E.g line 105753 in test.i file:

asm volatile (
".text\n"
".globl " "ctiTrampoline" "\n"
".hidden " "ctiTrampoline" "\n"
"ctiTrampoline" ":" "\n"
"pushq %rbp" "\n"
"movq %rsp, %rbp" "\n"
"pushq %r12" "\n"
[...]

removing the "volatile" solves this.  gcc-7.4.1 has the same problems.

Thank you!

[Bug lto/85583] New: lto1: internal compiler error: in lto_balanced_map, at lto/lto-partition.c:833

2018-05-01 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85583

Bug ID: 85583
   Summary: lto1: internal compiler error: in lto_balanced_map, at
lto/lto-partition.c:833
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 44044
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44044=edit
preprocessed unreduced source

gcc-9 r259787:

# g++ -O1 -flto Hello.cpp
lto1: internal compiler error: in lto_balanced_map, at lto/lto-partition.c:833

Hello.cpp is taken from LLVM: lib/Transforms/Hello/Hello.cpp
No issues with lto/7.3.1

[Bug c++/85573] gcc 7.3.0 cannot compile recent LLVM for AMD GPU shaders

2018-04-30 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85573

Manuel Lauss  changed:

   What|Removed |Added

 CC||manuel.lauss at googlemail dot 
com

--- Comment #2 from Manuel Lauss  ---
Works with gcc-7.3.1 for me, latest llvm git snapshot.

[Bug c++/85462] [8 Regression] internal compiler error: in inc_refcount_use, at cp/pt.c:8955

2018-04-19 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85462

--- Comment #3 from Manuel Lauss  ---
(In reply to Jakub Jelinek from comment #2)
> Created attachment 43986 [details]
> gcc8-pr85462.patch
> 
> Untested fix, still waiting if reduction comes up with some reasonably sized
> testcase.

It does fix the issue.

[Bug c++/85462] New: internal compiler error: in inc_refcount_use, at cp/pt.c:8955

2018-04-19 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85462

Bug ID: 85462
   Summary: internal compiler error: in inc_refcount_use, at
cp/pt.c:8955
   Product: gcc
   Version: 8.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 43983
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43983=edit
compressed unreduced testcase

gcc-8 r259483:

$ /usr/bin/x86_64-pc-linux-gnu-g++ -c fault.c
fault.c: In instantiation of ‘bool
clang::RecursiveASTVisitor::TraverseAttr(clang::Attr*) [with Derived =
{anonymous}::ParentMapASTVisitor]’:
fault.c:201526:9:   required from ‘bool
clang::RecursiveASTVisitor::TraverseDecl(clang::Decl*) [with Derived =
{anonymous}::ParentMapASTVisitor]’
fault.c:217418:53:   required from here
fault.c:200751:70: internal compiler error: in inc_refcount_use, at
cp/pt.c:8955
   return getDerived().TraverseNoSanitizeAttr(cast(A));
  ^~~

attached testcase is from current clang git head, unreduced.

7.3.1 is unaffected for instance.

[Bug c/85260] New: 8.0: python-2.7.14 miscompiled at -O3

2018-04-06 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85260

Bug ID: 85260
   Summary: 8.0: python-2.7.14 miscompiled at -O3
   Product: gcc
   Version: 8.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

python-2.7.14 seems to be miscompiled at -O3, while -O2 is fine.
gcc-8 as of 20180405. gcc-7.3.1 -O3 is fine as well.

build # LD_LIBRARY_PATH=$PWD ./python 
Segmentation fault (core dumped)

#0  0x7f784416d43a in PyInstance_NewRaw (klass=klass@entry=0x7f78439209a8,
dict=0x7f7843d66910, dict@entry=0x0) at
/tmp-ram/portage/dev-lang/python-2.7.14-r1/work/Python-2.7.14/Objects/classobject.c:544
544 inst->in_dict = dict;

(gdb) list
539 return NULL;
540 }
541 inst->in_weakreflist = NULL;
542 Py_INCREF(klass);
543 inst->in_class = (PyClassObject *)klass;
544 inst->in_dict = dict;
545 _PyObject_GC_TRACK(inst);
546 return (PyObject *)inst;
547 }

Dump of assembler code for function PyInstance_NewRaw:
   0x7f784416d3d0 <+0>: push   %rbp
   0x7f784416d3d1 <+1>: push   %rbx
   0x7f784416d3d2 <+2>: sub$0x18,%rsp
   0x7f784416d3d6 <+6>: mov0x149b9b(%rip),%rax#
0x7f78442b6f78
   0x7f784416d3dd <+13>:cmp%rax,0x8(%rdi)
   0x7f784416d3e1 <+17>:jne0x7f784416d490 <PyInstance_NewRaw+192>
   0x7f784416d3e7 <+23>:mov%rdi,%rbx
   0x7f784416d3ea <+26>:mov%rsi,%rbp
   0x7f784416d3ed <+29>:test   %rsi,%rsi
   0x7f784416d3f0 <+32>:je 0x7f784416d4b0 <PyInstance_NewRaw+224>
   0x7f784416d3f6 <+38>:mov0x8(%rsi),%rax
   0x7f784416d3fa <+42>:testb  $0x20,0xab(%rax)
   0x7f784416d401 <+49>:je 0x7f784416d4d0 <PyInstance_NewRaw+256>
   0x7f784416d407 <+55>:incq   (%rsi)
   0x7f784416d40a <+58>:mov0x1496cf(%rip),%rdi#
0x7f78442b6ae0
   0x7f784416d411 <+65>:callq  0x7f784414a390 <_PyObject_GC_New@plt>
   0x7f784416d416 <+70>:test   %rax,%rax
   0x7f784416d419 <+73>:je 0x7f784416d4e8 <PyInstance_NewRaw+280>
   0x7f784416d41f <+79>:vmovq  %rbx,%xmm1
   0x7f784416d424 <+84>:movq   $0x0,0x20(%rax)
   0x7f784416d42c <+92>:vpinsrq $0x1,%rbp,%xmm1,%xmm0
   0x7f784416d432 <+98>:incq   (%rbx)
   0x7f784416d435 <+101>:   cmpq   $0xfffe,-0x10(%rax)
=> 0x7f784416d43a <+106>:   vmovaps %xmm0,0x10(%rax)
   0x7f784416d43f <+111>:   lea-0x20(%rax),%rbx
   0x7f784416d443 <+115>:   jne0x7f784416d478 <PyInstance_NewRaw+168>
   0x7f784416d445 <+117>:   mov0x149834(%rip),%rdx#
0x7f78442b6c80
   0x7f784416d44c <+124>:   movq   $0xfffd,-0x10(%rax)
   0x7f784416d454 <+132>:   mov(%rdx),%rcx
   0x7f784416d457 <+135>:   mov%rcx,-0x20(%rax)
   0x7f784416d45b <+139>:   mov0x8(%rcx),%rcx
   0x7f784416d45f <+143>:   mov%rcx,-0x18(%rax)
   0x7f784416d463 <+147>:   mov%rbx,(%rcx)
   0x7f784416d466 <+150>:   mov(%rdx),%rdx
   0x7f784416d469 <+153>:   mov%rbx,0x8(%rdx)
   0x7f784416d46d <+157>:   add$0x18,%rsp
   0x7f784416d471 <+161>:   pop%rbx
   0x7f784416d472 <+162>:   pop%rbp
   0x7f784416d473 <+163>:   retq   
   0x7f784416d474 <+164>:   nopl   0x0(%rax)
   0x7f784416d478 <+168>:   lea0xf4d1d(%rip),%rdi#
0x7f784426219c
   0x7f784416d47f <+175>:   mov%rax,0x8(%rsp)
   0x7f784416d484 <+180>:   callq  0x7f784414b980 <Py_FatalError@plt>
   0x7f784416d489 <+185>:   mov0x8(%rsp),%rax
   0x7f784416d48e <+190>:   jmp0x7f784416d445 <PyInstance_NewRaw+117>
   0x7f784416d490 <+192>:   mov$0x209,%esi
   0x7f784416d495 <+197>:   lea0xf6184(%rip),%rdi#
0x7f7844263620
   0x7f784416d49c <+204>:   callq  0x7f784414c090
<_PyErr_BadInternalCall@plt>
   0x7f784416d4a1 <+209>:   add$0x18,%rsp
   0x7f784416d4a5 <+213>:   xor%eax,%eax
   0x7f784416d4a7 <+215>:   pop%rbx
   0x7f784416d4a8 <+216>:   pop%rbp
   0x7f784416d4a9 <+217>:   retq   
   0x7f784416d4aa <+218>:   nopw   0x0(%rax,%rax,1)
   0x7f784416d4b0 <+224>:   callq  0x7f784414be40 <PyDict_New@plt>
   0x7f784416d4b5 <+229>:   mov%rax,%rbp
[...]

configured with
CFLAGS="-O3 -march=haswell -mtune=haswell -pipe"
./

[Bug lto/85132] ffmpeg runtime segfault with lto

2018-03-31 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85132

--- Comment #10 from Manuel Lauss  ---
Built with gcc-7.3.0 and LTO it works fine; is this a bug in 7.3.0 instead
then?

[Bug lto/85132] ffmpeg runtime segfault with lto

2018-03-31 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85132

--- Comment #6 from Manuel Lauss  ---
(In reply to Martin Liška from comment #5)
> (In reply to Manuel Lauss from comment #4)
> > (In reply to Martin Liška from comment #3)
> > > (In reply to Manuel Lauss from comment #2)
> > > > This is the most minimal ffmpeg config that can trigger the segfault. 
> > > > The
> > > > interesting switch is "--enabled-hardcoded-tables".  I use the "mpv" 
> > > > Player
> > > > with a standard mp4 video file to trigger it
> > > > (https://github.com/mpv-player/mpv/archive/v0.27.2.zip)
> > > 
> > > Good. so we have minimal set of options for ffmpeg. Now please explain me
> > > how to build the MPV tool? Is it really needed? Can't one trigger that
> > > directly with ffmepg? Please upload somewhere the mp4 file so that I can
> > > reproduce it.
> > 
> > The segfault happens during initialization of ffmpeg when mpv player starts.
> > I can also trigger it with firefox on e.g. youtube: it crashes the tab.
> 
> Ok, so please download following sample video:
> http://techslides.com/demos/sample-videos/small.mp4
> 
> And try to run ffmpeg to print info:
> ./ffmpeg -i small.mp4
> 
> Does it also segfault?

Yes, same backtrace, same fault location.

[Bug lto/85132] ffmpeg runtime segfault with lto

2018-03-31 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85132

--- Comment #4 from Manuel Lauss  ---
(In reply to Martin Liška from comment #3)
> (In reply to Manuel Lauss from comment #2)
> > This is the most minimal ffmpeg config that can trigger the segfault. The
> > interesting switch is "--enabled-hardcoded-tables".  I use the "mpv" Player
> > with a standard mp4 video file to trigger it
> > (https://github.com/mpv-player/mpv/archive/v0.27.2.zip)
> 
> Good. so we have minimal set of options for ffmpeg. Now please explain me
> how to build the MPV tool? Is it really needed? Can't one trigger that
> directly with ffmepg? Please upload somewhere the mp4 file so that I can
> reproduce it.

The segfault happens during initialization of ffmpeg when mpv player starts.  I
can also trigger it with firefox on e.g. youtube: it crashes the tab.


ad mpv: unpack, configure with the following line (you need python3):
CCFLAGS="-O3 -march=znver1 -mtune=znver1 -flto=16 -fno-fat-lto-objects -pipe"
LINKFLAGS="-O3 -march=znver1 -mtune=znver1 -flto=16 -fno-fat-lto-objects -pipe
-Wl,--no-as-needed" ./waf --prefix=/usr --libdir=/usr/lib64 --confdir=/etc/mpv
--docdir=/usr/share/doc/mpv-0.27.2 --htmldir=/usr/share/doc/mpv-0.27.2/html
--enable-libmpv-shared --disable-libmpv-static --disable-static-build
--disable-optimize --disable-debug-build --enable-html-build
--disable-pdf-build --enable-cplugins --disable-zsh-comp --disable-test
--disable-android --enable-iconv --disable-libsmbclient --enable-lua
--lua=luajit --disable-javascript --enable-x11  --disable-build-date configure

./waf build

[Bug lto/85132] ffmpeg runtime segfault with lto

2018-03-30 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85132

--- Comment #2 from Manuel Lauss  ---
This is the most minimal ffmpeg config that can trigger the segfault. The
interesting switch is "--enabled-hardcoded-tables".  I use the "mpv" Player
with a standard mp4 video file to trigger it
(https://github.com/mpv-player/mpv/archive/v0.27.2.zip)

configure --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--docdir=/usr/share/doc/ffmpeg-3.4.2-r1/html --mandir=/usr/share/man
--enable-share
d --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++
--ar=x86_64-pc-linux-gnu-ar --optflags=-O3 -ggdb -march=znver1 -mtune=znver1
-flto=16 -fno-fat-lto-objects -pipe --disable-static --enable-avfilter
--enable-avresample --disable-stripping --disable-encoders --disable-indev=v4l2
--disable-outdev=v4l2 --disable-indev=alsa --disable-indev=oss --disable
-indev=jack --disable-outdev=alsa --disable-outdev=oss --disable-outdev=sdl
--disable-bzlib --disable-runtime-cpudetect --disable-debug --disable-gcrypt
--disable-gnutls --disable-gmp --enable-gpl --enable-hardco
ded-tables --disable-iconv --disable-lzma --disable-network --disable-opencl
--disable-openssl --disable-postproc --disable-libsmbclient --disable-ffplay
--disable-sdl2 --disable-vaapi --disable-vdpau --disable-x
lib --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes
--disable-zlib --disable-libcdio --disable-libiec61883 --disable-libdc1394
--disable-libcaca --disable-openal --disable-opengl --disable-libv4l2 -
-disable-libpulse --disable-libdrm --disable-libopencore-amrwb
--disable-libopencore-amrnb --disable-libfdk-aac --disable-libopenjpeg
--disable-libbluray --disable-libcelt --disable-libgme --disable-libgsm --disa
ble-mmal --disable-libmodplug --disable-libopus --disable-libilbc
--disable-librtmp --disable-libssh --disable-libspeex --disable-librsvg
--disable-libvorbis --disable-libvpx --disable-libzvbi --disable-appkit --
disable-libbs2b --disable-chromaprint --disable-libflite --disable-frei0r
--disable-libfribidi --disable-fontconfig --disable-ladspa --disable-libass
--disable-libfreetype --disable-librubberband --disable-libzmq
 --disable-libzimg --disable-libsoxr --enable-pthreads --disable-armv5te
--disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-vfpv3
--disable-armv8 --disable-mipsdsp --disable-mipsdspr2 --disa
ble-mipsfpu --disable-altivec --disable-amd3dnow --disable-amd3dnowext
--disable-fma4 --disable-xop --cpu=znver1 --enable-lto --disable-doc
--disable-htmlpages --enable-manpages

[Bug lto/85132] New: ffmpeg runtime segfault with lto

2018-03-30 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85132

Bug ID: 85132
   Summary: ffmpeg runtime segfault with lto
   Product: gcc
   Version: 8.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

ffmpeg-3.4.2 built with gcc-8 as of 20180330 and LTO enabled causes a runtime
segfault:

Thread 1 "mpv" received signal SIGSEGV, Segmentation fault.
0x7686b305 in ff_sine_window_init (window=0x7739a2c0 ,
n=960) at src/libavcodec/sinewin_tablegen.h:73
73  window[i] = SIN_FIX(sinf((i + 0.5) * (M_PI / (2.0 * n;
(gdb) bt
#0  0x7686b305 in ff_sine_window_init (window=0x7739a2c0
, n=960) at src/libavcodec/sinewin_tablegen.h:73
#1  0x76861d54 in aac_static_table_init () at
src/libavcodec/aacdec_template.c:1142
#2  0x7511d187 in __pthread_once_slow (once_control=0x77b4cf20
, init_routine=0x76861256 )
at pthread_once.c:116
#3  0x76862aae in aac_decode_init (avctx=0xa5ef00) at
src/libavcodec/aacdec_template.c:1159
#4  0x76ecbef6 in avcodec_open2 (avctx=0xa5ef00, codec=,
options=) at src/libavcodec/utils.c:1020
#5  0x00502b3a in ?? ()
#6  0x004fb7be in ?? ()
#7  0x0045afb7 in ?? ()
#8  0x0045b8af in ?? ()
#9  0x004d3246 in ?? ()
#10 0x0040fa21 in ?? ()
#11 0x74c8854b in __libc_start_main (main=0x40f9d0, argc=2,
argv=0x7fffd1c8, init=, fini=,
rtld_fini=, stack_end=0x7fffd1b8)
at ../csu/libc-start.c:308
#12 0x0040fb9a in ?? ()
(gdb) disass
Dump of assembler code for function ff_sine_window_init:
   0x7686b2c9 <+0>: push   %r12
   0x7686b2cb <+2>: mov%rdi,%r12
   0x7686b2ce <+5>: push   %rbp
   0x7686b2cf <+6>: mov%esi,%ebp
   0x7686b2d1 <+8>: push   %rbx
   0x7686b2d2 <+9>: xor%ebx,%ebx
   0x7686b2d4 <+11>:cmp%ebx,%ebp
   0x7686b2d6 <+13>:jle0x7686b310 <ff_sine_window_init+71>
   0x7686b2d8 <+15>:vmovsd 0x878108(%rip),%xmm2#
0x770e33e8
   0x7686b2e0 <+23>:vcvtsi2sd %ebp,%xmm0,%xmm0
   0x7686b2e4 <+27>:vaddsd %xmm0,%xmm0,%xmm0
   0x7686b2e8 <+31>:vcvtsi2sd %ebx,%xmm1,%xmm1
   0x7686b2ec <+35>:vaddsd 0x87811c(%rip),%xmm1,%xmm1#
0x770e3410
   0x7686b2f4 <+43>:vdivsd %xmm0,%xmm2,%xmm0
   0x7686b2f8 <+47>:vmulsd %xmm1,%xmm0,%xmm0
   0x7686b2fc <+51>:vcvtsd2ss %xmm0,%xmm0,%xmm0
   0x7686b300 <+55>:callq  0x76801db0 <sinf@plt>
=> 0x7686b305 <+60>:vmovss %xmm0,(%r12,%rbx,4)
   0x7686b30b <+66>:inc%rbx
   0x7686b30e <+69>:jmp0x7686b2d4 <ff_sine_window_init+11>
   0x7686b310 <+71>:pop%rbx
   0x7686b311 <+72>:pop%rbp
   0x7686b312 <+73>:pop%r12
   0x7686b314 <+75>:retq   
End of assembler dump.
(gdb) info registers
rax0x0 0
rbx0x0 0
rcx0x1 1
rdx0x78120
rsi0x3c0   960
rdi0x7739a2c0  140737341137600
rbp0x3c0   0x3c0
rsp0x7fffc840  0x7fffc840
r8 0x7fffa850  140737488332880
r9 0x7 7
r100xfd07  -761
r110x75682c90  140737310633104
r120x7739a2c0  140737341137600
r130x7fffc9f8  140737488341496
r140x0 0
r150x0 0
rip0x7686b305  0x7686b305 <ff_sine_window_init+60>
eflags 0x10202 [ IF RF ]
cs 0x3351
ss 0x2b43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0


Without LTO it's fine, the assembly of the faulting function is the same.
I tried to isolate a testcase but failed.

ffmpeg built with:
configure --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--docdir=/usr/share/doc/ffmpeg-3.4.2-r1/html --mandir=/usr/share/man
--enable-share
d --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++
--ar=x86_64-pc-linux-gnu-ar --optflags=-O3 -ggdb -march=znver1 -mtune=znver1
-flto=16 -fno-fat-lto-objects -fno-strict-aliasing -fexpensive-optimizatio
ns -Wno-deprecated -pipe --disable-static --enable-avfilter --enable

[Bug target/84719] gcc's __builtin_memcpy performance with certain number of bytes is terrible compared to clang's

2018-03-06 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84719

Manuel Lauss  changed:

   What|Removed |Added

 CC||manuel.lauss at googlemail dot 
com

--- Comment #12 from Manuel Lauss  ---
clang-7 achieves an impressive level of ipc (amd zen):

 Performance counter stats for './memtime-clangO2' (10 runs):

358,260795  task-clock:u (msec)   #0,999 CPUs utilized 
  ( +-  1,43% )
 0  context-switches:u#0,000 K/sec  
 0  cpu-migrations:u  #0,000 K/sec  
   244.191  page-faults:u #0,682 M/sec 
  ( +-  0,00% )
 1.253.573.425  cycles:u  #3,499 GHz   
  ( +-  1,50% )
   149.207.036  stalled-cycles-frontend:u #   11,90% frontend cycles
idle ( +-  2,04% )
   333.373.414  stalled-cycles-backend:u  #   26,59% backend cycles
idle  ( +-  0,00% )
 4.333.767.562  instructions:u#3,46  insn per cycle 
  #0,08  stalled cycles per
insn  ( +-  0,00% )
   333.621.304  branches:u#  931,225 M/sec 
  ( +-  0,00% )
   248.011  branch-misses:u   #0,07% of all branches   
  ( +-  0,06% )

   0,358644336 seconds time elapsed
 ( +-  1,43% )


compared to gcc-8 as of today:
 Performance counter stats for './memtime-gcc8O2' (10 runs):

   2087,357431  task-clock:u (msec)   #1,000 CPUs utilized 
  ( +-  0,19% )
 0  context-switches:u#0,000 K/sec  
 0  cpu-migrations:u  #0,000 K/sec  
   244.191  page-faults:u #0,117 M/sec 
  ( +-  0,00% )
 8.273.911.027  cycles:u  #3,964 GHz   
  ( +-  0,00% )
 3.691.281.142  stalled-cycles-frontend:u #   44,61% frontend cycles
idle ( +-  0,02% )
   333.373.414  stalled-cycles-backend:u  #4,03% backend cycles
idle  ( +-  0,00% )
 3.667.101.412  instructions:u#0,44  insn per cycle 
  #1,01  stalled cycles per
insn  ( +-  0,00% )
   333.621.824  branches:u#  159,830 M/sec 
  ( +-  0,00% )
   248.423  branch-misses:u   #0,07% of all branches   
  ( +-  0,01% )

   2,088370519 seconds time elapsed
 ( +-  0,19% )

[Bug target/81763] Issues with BMI on 32bit x86 apps on GCC 7.1+

2018-01-26 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81763

--- Comment #46 from Manuel Lauss  ---
Created attachment 43257
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43257=edit
reducest testcase

reduced testcase for Jakub's patch in comment #36 and the build failure it
causes in comment #42:

g++ (Gentoo 7.2.0-r1 p1.1) 7.2.0

g++ -m32 -O2 -mbmi -fPIC -fno-strict-aliasing -c testcase.i
testcase.i:126:12: warning: ‘unsigned int {anonymous}::bc::bn()’ used but never
defined
   unsigned bn();
^~
testcase.i:98:8: warning: ‘void {anonymous}::bc::bo({anonymous}::bc&)’ used but
never defined
   void bo(bc &);
^~
testcase.i:154:3: warning: ‘{anonymous}::bw::bw(unsigned int)’ used but never
defined
   bw(unsigned);
   ^~
testcase.i: In function ‘bool bz({anonymous}::bw&, ai::as, by&, bool,
ai::av&)’:
testcase.i:178:1: internal compiler error: in gen_split_178, at
config/i386/i386.md:8623
 }
 ^

[Bug target/81763] Issues with BMI on 32bit x86 apps on GCC 7.1+

2018-01-26 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81763

--- Comment #44 from Manuel Lauss  ---
Created attachment 43252
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43252=edit
compressed preprocessed source

g++ -m32 -O3 -ggdb -march=znver1 -mtune=broadwell -pipe -fPIC
-fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -Wdelete-non-virtual-dtor -Wno-comment
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual
-fno-strict-aliasing -pedantic -Wno-long-long -fPIC -o test.o -c
PPExpressions.i

/tmp-ram/portage/sys-devel/clang-/work/x/y/clang-/lib/Lex/PPExpressions.cpp:
In function ‘bool EvaluateValue({anonymous}::PPValue&, clang::Token&,
DefinedTracker&, bool, clang::Preprocessor&)’:
/tmp-ram/portage/sys-devel/clang-/work/x/y/clang-/lib/Lex/PPExpressions.cpp:492:1:
internal compiler error: in gen_split_178, at config/i386/i386.md:8623
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug target/81763] Issues with BMI on 32bit x86 apps on GCC 7.1+

2018-01-25 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81763

--- Comment #38 from Manuel Lauss  ---
(In reply to Jakub Jelinek from comment #36)

Your patch does fix my llvm issue. Thank you!

[Bug target/81763] Issues with BMI on 32bit x86 apps on GCC 7.1+

2018-01-25 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81763

--- Comment #32 from Manuel Lauss  ---
(In reply to Uroš Bizjak from comment #31)
> (In reply to Uroš Bizjak from comment #30)
> > So, I'll bootstrap:
> 
> Maybe we can also allow  <- (r,r) for BMI, to be safe (c.f. comment #23):
> 
> (define_insn "*andndi3_doubleword"
>   [(set (match_operand:DI 0 "register_operand" "=r,")
>   (and:DI
> (not:DI (match_operand:DI 1 "register_operand" "0,r"))
> (match_operand:DI 2 "nonimmediate_operand" "rm,rm")))
>(clobber (reg:CC FLAGS_REG))]
>   "!TARGET_64BIT && TARGET_STV && TARGET_SSE2"
>   "#"
>   [(set_attr "isa" "*,bmi")])
> 
> Manuel, can you please test this pattern?

Seems to work as well:

[...]
  b1:   c4 e2 73 f7 d2  shrx   %ecx,%edx,%edx
  b6:   0f 45 c2cmovne %edx,%eax
  b9:   0f 45 d5cmovne %ebp,%edx
  bc:   c4 e2 68 f2 54 df 04andn   0x4(%edi,%ebx,8),%edx,%edx
  c3:   89 d1   mov%edx,%ecx
  c5:   c4 e2 78 f2 04 df   andn   (%edi,%ebx,8),%eax,%eax
  cb:   09 c1   or %eax,%ecx
[...]

[Bug target/81763] Issues with BMI on 32bit x86 apps on GCC 7.1+

2018-01-25 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81763

--- Comment #27 from Manuel Lauss  ---
(In reply to Uroš Bizjak from comment #21)
> Following patch should fix the problem:
> 
> --cut here--
> Index: i386.md
> ===
> --- i386.md (revision 256935)
> +++ i386.md (working copy)
> @@ -9250,10 +9250,10 @@
>  })
>  
>  (define_insn "*andndi3_doubleword"
> -  [(set (match_operand:DI 0 "register_operand" "=r,")
> +  [(set (match_operand:DI 0 "register_operand" "=r,r")
> (and:DI
>   (not:DI (match_operand:DI 1 "register_operand" "r,0"))
> - (match_operand:DI 2 "nonimmediate_operand" "rm,rm")))
> + (match_operand:DI 2 "nonimmediate_operand" "r,rm")))
> (clobber (reg:CC FLAGS_REG))]
>"!TARGET_64BIT && TARGET_STV && TARGET_SSE2"
>"#"
> --cut here--
> 
> So, the pattern now reads:
> 
> (define_insn "*andndi3_doubleword"
>   [(set (match_operand:DI 0 "register_operand" "=r,r")
>   (and:DI
> (not:DI (match_operand:DI 1 "register_operand" "r,0"))
> (match_operand:DI 2 "nonimmediate_operand" "r,rm")))
>(clobber (reg:CC FLAGS_REG))]
>   "!TARGET_64BIT && TARGET_STV && TARGET_SSE2"
>   "#"
>   [(set_attr "isa" "bmi,*")])


I rebuilt gcc-7.3 with this applied, now the generated code looks much better:
  ab:   0f ad d0shrd   %cl,%edx,%eax
  ae:   f6 c1 20test   $0x20,%cl
  b1:   c4 e2 73 f7 d2  shrx   %ecx,%edx,%edx
  b6:   0f 45 c2cmovne %edx,%eax
  b9:   0f 45 d5cmovne %ebp,%edx
  bc:   c4 e2 68 f2 54 df 04andn   0x4(%edi,%ebx,8),%edx,%edx
  c3:   89 d1   mov%edx,%ecx
  c5:   c4 e2 78 f2 04 df   andn   (%edi,%ebx,8),%eax,%eax
  cb:   09 c1   or %eax,%ecx

And it seems to work as well, 32bit llvm now built successfully.

[Bug target/81763] Issues with BMI on 32bit x86 apps on GCC 7.1+

2018-01-25 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81763

--- Comment #20 from Manuel Lauss  ---
Created attachment 43242
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43242=edit
preprocessed source

preprocessed source of file that contains the function
"llvm::TypeInfer::EnforceSmallerThan", compressed due it being 2.5MB.

The Makefile builds it with these parameters: (stripped the includes)
g++ -m32 -O3 -ggdb -march=znver1 -mtune=broadwell -pipe -fPIC
-fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long
-Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment
-ffunction-sections -fdata-sections

[Bug target/81763] Issues with BMI on 32bit x86 apps on GCC 7.1+

2018-01-25 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81763

Manuel Lauss  changed:

   What|Removed |Added

 CC||manuel.lauss at googlemail dot 
com

--- Comment #16 from Manuel Lauss  ---
I've seen this as well.
Build llvm-7 with gcc-7.3, -m32 -march=znver1 -mtune=broadwell
-O1 / -Og: all good
-O2: llvm-tblgen runs in an infinite(?) loop
-O3: llvm-tblgen segfaults

-mno-bmi: all good, at all optimization levels

In case it helps, here's gdb info:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x080a96c9 in llvm::MachineValueTypeSet::const_iterator::find_from_pos
(P=, this=)
at
/tmp-ram/x1/portage/sys-devel/llvm-/work/llvm-/utils/TableGen/CodeGenDAGPatterns.h:148
148 W &= maskLeadingOnes(WordWidth-SkipBits);

(gdb) list
143
144   // If P is in the middle of a word, process it manually here,
because
145   // the trailing bits need to be masked off to use findFirstSet.
146   if (SkipBits != 0) {
147 WordType W = Set->Words[SkipWords];
148 W &= maskLeadingOnes(WordWidth-SkipBits);
149 if (W != 0)
150   return Count + findFirstSet(W);
151 Count += WordWidth;
152 SkipWords++;

[...]
   0x080a968d <+1293>:  shr$0x6,%ebx
   0x080a9690 <+1296>:  and$0xffc0,%esi
   0x080a9693 <+1299>:  and$0x3f,%eax
   0x080a9696 <+1302>:  je 0x80a96e0
<llvm::TypeInfer::EnforceSmallerThan(llvm::TypeSetByHwMode&,
llvm::TypeSetByHwMode&)+1376>
   0x080a9698 <+1304>:  mov$0x40,%ecx
   0x080a969d <+1309>:  mov$0x,%edx
   0x080a96a2 <+1314>:  xor%edi,%edi
   0x080a96a4 <+1316>:  sub%eax,%ecx
   0x080a96a6 <+1318>:  mov$0x,%eax
   0x080a96ab <+1323>:  shrd   %cl,%edx,%eax
   0x080a96ae <+1326>:  test   $0x20,%cl
   0x080a96b1 <+1329>:  shrx   %ecx,%edx,%edx
   0x080a96b6 <+1334>:  cmovne %edx,%eax
   0x080a96b9 <+1337>:  cmovne %edi,%edx
   0x080a96bc <+1340>:  mov%edx,%ecx
   0x080a96be <+1342>:  mov%eax,%edx
   0x080a96c0 <+1344>:  mov-0x3c(%ebp),%eax
   0x080a96c3 <+1347>:  andn   (%eax,%ebx,8),%edx,%eax
=> 0x080a96c9 <+1353>:  andn   0x4(%eax,%ebx,8),%ecx,%edx
   0x080a96d0 <+1360>:  mov%edx,%edi
   0x080a96d2 <+1362>:  or %eax,%edi
   0x080a96d4 <+1364>:  jne0x80a9e70
<llvm::TypeInfer::EnforceSmallerThan(llvm::TypeSetByHwMode&,
llvm::TypeSetByHwMode&)+3312>
   0x080a96da <+1370>:  add$0x40,%esi
   0x080a96dd <+1373>:  add$0x1,%ebx
   0x080a96e0 <+1376>:  cmp$0x4,%ebx
   0x080a96e3 <+1379>:  je 0x80a9e60
<llvm::TypeInfer::EnforceSmallerThan(llvm::TypeSetByHwMode&,
llvm::TypeSetByHwMode&)+3296>
   0x080a96e9 <+1385>:  mov-0x3c(%ebp),%eax
   0x080a96ec <+1388>:  mov0x4(%eax,%ebx,8),%edx
   0x080a96f0 <+1392>:  mov(%eax,%ebx,8),%eax
   0x080a96f3 <+1395>:  mov%edx,%ecx
   0x080a96f5 <+1397>:  or %eax,%ecx
   0x080a96f7 <+1399>:  jne0x80a9e42
<llvm::TypeInfer::EnforceSmallerThan(llvm::TypeSetByHwMode&,
llvm::TypeSetByHwMode&)+3266>
   0x080a96fd <+1405>:  lea0x1(%ebx),%eax
[...]


(gdb) info registers
eax0x1840   402653248
ecx0x0  0
edx0x3f 63
ebx0x0  0
esp0xff8f9660   0xff8f9660
ebp0xff8f96c8   0xff8f96c8
esi0x0  0
edi0x0  0
eip0x80a96c90x80a96c9
<llvm::TypeInfer::EnforceSmallerThan(llvm::TypeSetByHwMode&,
llvm::TypeSetByHwMode&)+1353>
eflags 0x10202  [ IF RF ]
cs 0x23 35
ss 0x2b 43
ds 0x2b 43
es 0x2b 43
fs 0x0  0
gs 0x63 99

[Bug other/80069] ICE at graphite-sese-to-poly.c:1176

2017-03-16 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80069

--- Comment #2 from Manuel Lauss  ---
Created attachment 40987
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40987=edit
condensed preprocessed source

condensed the source a bit, narrowed it down to this:

x86_64-pc-linux-gnu-gcc -O3 -fgraphite-identity -c nellymoser.i
nellymoser.i: In function 'ff_nelly_get_sample_bits':
nellymoser.i:40:6: internal compiler error: in outer_projection_mupa, at
graphite-sese-to-poly.c:1176
 void ff_nelly_get_sample_bits(const float *buf, int *bits)
  ^~~~
Please submit a full bug report,
with preprocessed source if appropriate.


-O2 -fgraphite-identity works,
-O3 alone also works.

[Bug other/80069] ICE at graphite-sese-to-poly.c:1176

2017-03-16 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80069

--- Comment #1 from Manuel Lauss  ---
Created attachment 40986
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40986=edit
preprocessed source

x86_64-pc-linux-gnu-gcc -O3 -march=haswell -mtune=haswell
-fexpensive-optimizations -fgraphite-identity -floop-interchange
-floop-strip-mine -floop-block -funroll-loops -pipe -fno-math-errno
-fno-signed-zeros -fno-tree-vectorize -Werror=format-security
-Werror=implicit-function-declaration -Werror=missing-prototypes
-Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto
-Wno-maybe-uninitialized -c nellymoser.i

src/libavcodec/nellymoser.c: In function 'ff_nelly_get_sample_bits':
src/libavcodec/nellymoser.c:116:6: internal compiler error: in
outer_projection_mupa, at graphite-sese-to-poly.c:1176
 void ff_nelly_get_sample_bits(const float *buf, int *bits)
  ^~~~
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug lto/80069] New: LTO: ICE at graphite-sese-to-poly.c:1176

2017-03-16 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80069

Bug ID: 80069
   Summary: LTO: ICE at graphite-sese-to-poly.c:1176
   Product: gcc
   Version: 6.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Hitting this ICE when building ffmpeg.git with LTO and Graphite options
enabled:

src/libavcodec/nellymoser.c: In function 'ff_nelly_get_sample_bits':
src/libavcodec/nellymoser.c:116:6: internal compiler error: in
outer_projection_mupa, at graphite-sese-to-poly.c:1176
 void ff_nelly_get_sample_bits(const float *buf, int *bits)
  ^
Please submit a full bug report,
with preprocessed source if appropriate.


gcc-6.3.1 as of today, CFLAGS used are:
-O3 -march=haswell -mtune=haswell -fexpensive-optimizations -flto=9
-fno-fat-lto-objects -fgraphite-identity -floop-interchange -floop-strip-mine
-floop-block -funroll-loops -pipe


ffmpeg is configured this way:
configure --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
---enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++
--ar=x86_64-pc-linux-gnu-ar --optflags='-O3 -march=haswell -mtune=haswell
-fexpensive-optimiza
tions -flto=9 -fno-fat-lto-objects -fgraphite-identity -floop-interchange
-floop-strip-mine -floop-block -funroll-loops -pipe' --disable-static
--enable-avfilter
 --enable-avresample --disable-stripping --enable-nonfree --enable-version3
--disable-indev=alsa --disable-indev=oss --disable-indev=jack
--disable-outdev=alsa --disable-outdev=oss
 --enable-version3 --enable-version3 --enable-bzlib --disable-runtime-cpudetect
--disable-debug --disable-gcrypt --enable-gnutls --enable-gmp --enable-gpl
--enable-hardcoded-tables
 --enable-iconv --enable-lzma --enable-network --enable-openssl
--enable-postproc --disable-libsmbclient --enable-ffplay --enable-sdl2
--enable-vaapi --enable-vdpau --enable-xlib -
-enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-zlib
--disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca
--enable-openal --enable-openg
l --enable-libv4l2 --enable-libpulse --enable-libopencore-amrwb
--enable-libopencore-amrnb --disable-libfdk-aac --enable-libopenjpeg
--enable-libbluray --disable-libcelt --disable-
libgme --enable-libgsm --disable-mmal --disable-libmodplug --enable-libopus
--disable-libilbc --disable-librtmp --disable-libssh --enable-libschroedinger
--enable-libspeex --enable
-libvorbis --enable-libvpx --disable-libzvbi --disable-libbs2b
--disable-chromaprint --disable-libflite --enable-frei0r --disable-libfribidi
--enable-fontconfig --disable-ladspa --
disable-libass --enable-libfreetype --disable-librubberband --disable-netcdf
--disable-libzmq --disable-libzimg --disable-libsoxr --enable-pthreads
--enable-libvo-amrwbenc --enable
-libmp3lame --disable-libkvazaar --disable-nvenc --disable-libopenh264
--disable-libsnappy --enable-libtheora --disable-libtwolame --enable-libwavpack
--enable-libwebp --enable-lib
x264 --enable-libx265 --disable-libxvid --disable-amd3dnow
--disable-amd3dnowext --disable-fma4 --disable-xop --enable-pic --cpu=haswell
--enable-lto --disable-doc --disable-htmlpa
ges

Thanks!

[Bug target/59874] Missing builtin (__builtin_clzs) when compiling with g++

2016-10-30 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59874

--- Comment #4 from Manuel Lauss  ---
(In reply to Uroš Bizjak from comment #3)
> (In reply to Manuel Lauss from comment #2)
> 
> > I've run into this issue with current gcc-6-branch while building for
> > example qt-5.7.  gcc-5-branch can build this source just fine:
> 
> __builtin_clzs and __builtin_ctzs are internal x86 builtins and were
> recently removed. You should use __lzcnt16 and __tzcnt_u16 intrinsics.

Done,

> 
> > return v ? __builtin_ctzs(v) : 16U;
> >  return v ? __builtin_clzs(v) : 16U;
> 
> You don't need this, the instruction does exactly the above.

without it there are errors with missing constexprs.

Thanks, I've successfully built qt-5.7 with updated source.

[Bug target/59874] Missing builtin (__builtin_clzs) when compiling with g++

2016-10-30 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59874

Manuel Lauss  changed:

   What|Removed |Added

 CC||manuel.lauss at googlemail dot 
com

--- Comment #2 from Manuel Lauss  ---
Hello,

I've run into this issue with current gcc-6-branch while building for example
qt-5.7.  gcc-5-branch can build this source just fine:

x86_64-pc-linux-gnu-g++ -c -o qmakeparser.o -O3 -march=haswell -mtune=haswell
-fno-lifetime-dse -fno-delete-null-pointer-checks -pipe -std=c++11
-ffunction-sections 
-I/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/qmake
-I/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/qmake/library
-I/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/qmake/generators
-I/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/qmake/generators/unix
-I/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/qmake/generators/win32
-I/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/qmake/generators/mac
-I/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/qmake/generators/integrity
-I/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/include
-I/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/include/QtCore
-I/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/include/QtCore/5.7.0
-I/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/include/QtCore/5.7.0/QtCore
-I../src/corelib/global -DHAVE_QCONFIG_CPP
-I/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/mkspecs/linux-g++
-I/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/tools/shared
-DQT_VERSION_STR=\"5.7.0\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=7
-DQT_VERSION_PATCH=0 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL
-DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS
-DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM
-DQT_NO_FOREACH -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 -DQT_JSON_READONLY
-DQT_NO_STANDARDPATHS
/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/qmake/library/qmakeparser.cpp
In file included from
/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/include/QtCore/qalgorithms.h:1:0,
 from
/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/include/QtCore/../../src/corelib/tools/qvector.h:43,
 from
/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/include/QtCore/qvector.h:1,
 from
/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/qmake/library/proitems.h:35,
 from
/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/qmake/library/qmakeparser.h:33,
 from
/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/qmake/library/qmakeevaluator.h:36,
 from
/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/qmake/project.h:32,
 from
/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/qmake/project.cpp:29:
/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/include/QtCore/../../src/corelib/tools/qalgorithms.h:
In function 'uint qCountTrailingZeroBits(quint16)':
/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/include/QtCore/../../src/corelib/tools/qalgorithms.h:630:32:
error: '__builtin_ctzs' was not declared in this scope
 return v ? __builtin_ctzs(v) : 16U;
^
/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/include/QtCore/../../src/corelib/tools/qalgorithms.h:
In function 'uint qCountLeadingZeroBits(quint16)':
/tmp-ram/portage/dev-qt/qtcore-5.7.0/work/qtbase-opensource-src-5.7.0/include/QtCore/../../src/corelib/tools/qalgorithms.h:693:32:
error: '__builtin_clzs' was not declared in this scope
 return v ? __builtin_clzs(v) : 16U;

[Bug c/68958] New: MIPS: cannot build glibc with mips32r2 at O1 or higher

2015-12-17 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68958

Bug ID: 68958
   Summary: MIPS: cannot build glibc with mips32r2 at O1 or higher
   Product: gcc
   Version: 5.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com
  Target Milestone: ---

Created attachment 37063
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37063=edit
fully preprocessed source of gconv_conf.

Building glibc-2.22/iconv/gconv_conf.c for mips32r2 hardfloat little endian
results in the following GAS error. Gcc is configured "--with-arch=mips32r2
--with-tune=mips32r2 --with-abi=32 --with-little-endian"


mips32r2el-hardfloat-linux-gnu-gcc -mips32r2 -c -o gconv_conf.o gconv_conf.i
-pipe -fgnu89-inline -O2
{standard input}: Assembler messages:
{standard input}:794: Warning: macro instruction expanded into multiple
instructions
{standard input}:798: Error: macro used $at after ".set noat"
{standard input}:798: Warning: macro instruction expanded into multiple
instructions
{standard input}:821: Warning: macro instruction expanded into multiple
instructions
{standard input}:823: Error: macro used $at after ".set noat"
{standard input}:823: Warning: macro instruction expanded into multiple
instructions

-O0 is fine, every other optimization level produces this error.


The errors point to ll/sc pairs:

__gconv_get_path:
.frame  $fp,88,$31  # vars= 24, regs= 10/0, args= 16, gp= 8
.mask   0xc0ff,-4
.fmask  0x,0
.setnoreorder
.cpload $25
.setreorder
addiu   $sp,$sp,-88
sw  $fp,80($sp)
move$fp,$sp
sw  $31,84($sp)
sw  $23,76($sp)
sw  $22,72($sp)
sw  $21,68($sp)
sw  $20,64($sp)
sw  $19,60($sp)
sw  $18,56($sp)
sw  $17,52($sp)
sw  $16,48($sp)
.cprestore  16
sw  $0,24($fp)
.setnoreorder
.setnomacro
.setnoat
1:
ll  $3,lock.10985<
bne $3,$0,2f
li  $2,0
li  $1,1
sc  $1,lock.10985<
beq $1,$0,1b
li  $2,1
sync
2:
.setat
.setmacro
.setreorder



I'm attaching preprocessed source.

[Bug c/68958] MIPS: cannot build glibc with mips32r2 at O1 or higher

2015-12-17 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68958

Manuel Lauss  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Manuel Lauss  ---
This seems to be related to the tuple itself.  configured as
mipsel-unknown-linux-gnu the build succeeds.

[Bug middle-end/61654] [4.9/4.10 Regression] ICE in release_function_body, at cgraph.c:1699

2014-07-04 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61654

--- Comment #4 from Manuel Lauss manuel.lauss at googlemail dot com ---
The patch shifted the ICE to the following, same source file:

In file included from ./engines/tony/input.h:32:0,
 from engines/tony/font.cpp:32:
./common/events.h:239:7: internal compiler error: in ipa_propagate_frequency,
at ipa-profile.c:411
 class DefaultEventMapper : public EventMapper {
   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See https://bugs.gentoo.org/ for instructions.
Makefile.common:98: recipe for target 'engines/tony/font.o' failed


[Bug c++/61654] New: [4.9.1] ICE in release_function_body, at cgraph.c:1699

2014-06-30 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61654

Bug ID: 61654
   Summary: [4.9.1] ICE in release_function_body, at cgraph.c:1699
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com

Created attachment 33032
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33032action=edit
preprocessed source

current gcc-4_9-branch, ICE with -O3. -O2 works; gcc-4.8.3 handles -O3 fine
as well.

(source is scummvm-1.6.0/engines/tony/font.cpp)

i686-pc-linux-gnu-g++ -O3 -c font.i
In file included from ./engines/tony/input.h:32:0,
 from engines/tony/font.cpp:32:
./common/events.h: In function 'built-in':
./common/events.h:239:7: internal compiler error: in release_function_body, at
cgraph.c:1699

Thanks!


[Bug c/61634] New: [4.8.3/4.9.1] ICE in in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1423

2014-06-27 Thread manuel.lauss at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61634

Bug ID: 61634
   Summary: [4.8.3/4.9.1] ICE in in vect_get_vec_def_for_operand,
at tree-vect-stmts.c:1423
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manuel.lauss at googlemail dot com

Created attachment 33018
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33018action=edit
preprocessed source

Hello,

I get the following ICE on current 4_8-branch and 4_9-branch with the attached
preprocessed source (taken from opencore-amr-1.3.0):

x86_64-pc-linux-gnu-g++ -x c -O3 -fwrapv -c autocorr.x  -fPIC -DPIC -o
autocorr.o
autocorr.x: In function 'Autocorr':
autocorr.x:418:8: internal compiler error: in vect_get_vec_def_for_operand, at
tree-vect-stmts.c:1423
 Word16 Autocorr(
^
Please submit a full bug report,
with preprocessed source if appropriate.

-O3 -fwrapv throws ICE,
-O2 -fwrapv or plain -O3 pass.


[Bug bootstrap/49681] 4.6.1 cross-build fails in libquadmath/libiberty

2011-08-12 Thread manuel.lauss at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49681

Manuel Lauss manuel.lauss at googlemail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #4 from Manuel Lauss manuel.lauss at googlemail dot com 
2011-08-12 15:11:09 UTC ---
Seems to have been a Gentoo-problem after all: Just built 4.6.1
for mipsel-softfloat-linux-gnu without a hitch.

# mipsel-softfloat-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/mipsel-softfloat-linux-gnu/gcc-bin/4.6.1/mipsel-softfloat-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/mipsel-softfloat-linux-gnu/4.6.1/lto-wrapper
Target: mipsel-softfloat-linux-gnu
Configured with:
/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/gcc-4.6.1/configure
--prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/mipsel-softfloat-linux-gnu/gcc-bin/4.6.1
--includedir=/usr/lib/gcc/mipsel-softfloat-linux-gnu/4.6.1/include
--datadir=/usr/share/gcc-data/mipsel-softfloat-linux-gnu/4.6.1
--mandir=/usr/share/gcc-data/mipsel-softfloat-linux-gnu/4.6.1/man
--infodir=/usr/share/gcc-data/mipsel-softfloat-linux-gnu/4.6.1/info
--with-gxx-include-dir=/usr/lib/gcc/mipsel-softfloat-linux-gnu/4.6.1/include/g++-v4
--host=x86_64-pc-linux-gnu --target=mipsel-softfloat-linux-gnu
--build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point
--without-ppl --without-cloog --enable-lto --with-float=soft --disable-nls
--with-system-zlib --disable-werror --enable-secureplt --disable-multilib
--disable-libmudflap --disable-libssp --disable-libgomp --enable-cld
--with-python-dir=/share/gcc-data/mipsel-softfloat-linux-gnu/4.6.1/python
--enable-checking=release --disable-libgcj --enable-languages=c,c++
--with-sysroot=/usr/mipsel-softfloat-linux-gnu --disable-bootstrap
--enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.1 p1.0'
--with-mips-plt --with-arch=mips32 --with-tune=mips32 --with-float=soft
--with-llsc
Thread model: posix
gcc version 4.6.1 (Gentoo 4.6.1 p1.0)


[Bug bootstrap/49681] 4.6.1 cross-build fails in libquadmath/libiberty

2011-07-31 Thread manuel.lauss at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49681

--- Comment #3 from Manuel Lauss manuel.lauss at googlemail dot com 
2011-07-31 10:42:14 UTC ---
Okay, but I'm more concerned about this message which also 
appears during libiberty configuration, and all previous versions
of gcc can be built successfully with the same headers available.

checking dynamic linker characteristics... configure: error: Link tests are not
allowed after GCC_NO_EXECUTABLES.


[Bug bootstrap/49681] New: 4.6.1 cross-build fails in libquadmath/libiberty

2011-07-08 Thread manuel.lauss at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49681

   Summary: 4.6.1 cross-build fails in libquadmath/libiberty
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: manuel.la...@googlemail.com


cross-building 4.6.1 for mips on x64 fails in stage2 configuration of
libquadmath/libiberty:


checking command to parse
/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/nm
output from
/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/xgcc
-B/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/
-B/usr/mipsel-softfloat-linux-gnu/bin/ -B/usr/mipsel-softfloat-linux-gnu/lib/
-isystem /usr/mipsel-softfloat-linux-gnu/include -isystem
/usr/mipsel-softfloat-linux-gnu/sys-includeobject... failed
checking for dlfcn.h... no
checking for objdir... .libs
checking if
/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/xgcc
-B/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/
-B/usr/mipsel-softfloat-linux-gnu/bin/ -B/usr/mipsel-softfloat-linux-gnu/lib/
-isystem /usr/mipsel-softfloat-linux-gnu/include -isystem
/usr/mipsel-softfloat-linux-gnu/sys-includesupports -fno-rtti
-fno-exceptions... no
checking for
/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/xgcc
-B/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/
-B/usr/mipsel-softfloat-linux-gnu/bin/ -B/usr/mipsel-softfloat-linux-gnu/lib/
-isystem /usr/mipsel-softfloat-linux-gnu/include -isystem
/usr/mipsel-softfloat-linux-gnu/sys-includeoption to produce PIC... -fPIC
-DPIC
checking if
/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/xgcc
-B/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/
-B/usr/mipsel-softfloat-linux-gnu/bin/ -B/usr/mipsel-softfloat-linux-gnu/lib/
-isystem /usr/mipsel-softfloat-linux-gnu/include -isystem
/usr/mipsel-softfloat-linux-gnu/sys-includePIC flag -fPIC -DPIC works...
yes
checking if
/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/xgcc
-B/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/
-B/usr/mipsel-softfloat-linux-gnu/bin/ -B/usr/mipsel-softfloat-linux-gnu/lib/
-isystem /usr/mipsel-softfloat-linux-gnu/include -isystem
/usr/mipsel-softfloat-linux-gnu/sys-includestatic flag -static works... no
checking if
/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/xgcc
-B/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/
-B/usr/mipsel-softfloat-linux-gnu/bin/ -B/usr/mipsel-softfloat-linux-gnu/lib/
-isystem /usr/mipsel-softfloat-linux-gnu/include -isystem
/usr/mipsel-softfloat-linux-gnu/sys-includesupports -c -o file.o... yes
checking if
/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/xgcc
-B/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/
-B/usr/mipsel-softfloat-linux-gnu/bin/ -B/usr/mipsel-softfloat-linux-gnu/lib/
-isystem /usr/mipsel-softfloat-linux-gnu/include -isystem
/usr/mipsel-softfloat-linux-gnu/sys-includesupports -c -o file.o...
(cached) yes
checking whether the
/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/xgcc
-B/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/
-B/usr/mipsel-softfloat-linux-gnu/bin/ -B/usr/mipsel-softfloat-linux-gnu/lib/
-isystem /usr/mipsel-softfloat-linux-gnu/include -isystem
/usr/mipsel-softfloat-linux-gnu/sys-includelinker
(/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build/./gcc/collect-ld)
supports shared libraries... yes
checking dynamic linker characteristics... configure: error: Link tests are not
allowed after GCC_NO_EXECUTABLES.
make[1]: *** [configure-target-libquadmath] Error 1
make[1]: Leaving directory
`/tmp-ram/portage/cross-mipsel-softfloat-linux-gnu/gcc-4.6.1/work/build'
make: *** [all] Error 2


configure --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/mipsel-softfloat-linux-gnu/gcc-bin/4.6.1
--includedir=/usr/lib/gcc/mipsel-softfloat-linux-gnu/4.6.1/include
--datadir=/usr/share/gcc-data/mipsel-softfloat-linux-gnu/4.6.1
--mandir=/usr/share/gcc-data/mipsel-softfloat-linux-gnu/4.6.1/man
--infodir=/usr/share/gcc-data/mipsel-softfloat-linux-gnu/4.6.1/info
--with-gxx-include-dir=/usr/lib/gcc/mipsel-softfloat-linux-gnu/4.6.1/include/g++-v4
--host=x86_64-pc-linux-gnu --target=mipsel-softfloat-linux-gnu
--build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point
--without-ppl --without-cloog --enable-lto --with-float=soft --disable-nls
--with-system-zlib --disable-werror --enable-secureplt --disable-multilib
--disable-libmudflap --disable-libssp --disable-libgomp --enable-cld