[Bug bootstrap/87252] gcc-4.4 cross-builds broken, apparently in self-tests

2020-04-05 Thread abrahm.scully at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87252

--- Comment #7 from Abrahm Scully  ---
I hit an ICE today that looks like this bug. I attempted to build
gcc-10-20200329 on 32-bit CentOS 6 using g++ 4.4.7-23.el6. I don't see this bug
building gcc-6.3, gcc-7.3, gcc-8.3, or gcc-9-20200118 on the same platform.

I'll dig into the problem more soon...

...
/build/Sonar/Alofts/tools/.build1/gcc-10-20200329/build/./gcc/xgcc
-B/build/Sonar/Alofts/tools/.build1/gcc-10-20200329/build/./gcc/ -xc -nostdinc
/dev/null -S -o /dev/null -fself-test=../../gcc/testsuite/selftests
pure virtual method called
terminate called without an active exception
cc1: internal compiler error: Aborted
0x8a9d967 crash_signal
../../gcc/toplev.c:328
0x9815c35 print_any_labels
../../gcc/diagnostic-show-locus.c:1691
0x9815c35 print_line
../../gcc/diagnostic-show-locus.c:2512
0x9819400 diagnostic_show_locus(diagnostic_context*, rich_location*,
diagnostic_t)
../../gcc/diagnostic-show-locus.c:2595
0x981e9c2 test_one_liner_labels_utf8
../../gcc/diagnostic-show-locus.c:3816
0x981fc0b test_diagnostic_show_locus_one_liner_utf8
../../gcc/diagnostic-show-locus.c:3902
0x9831637 selftest::for_each_line_table_case(void (*)(selftest::line_table_case
const&))
../../gcc/input.c:3571
0x9819d05 selftest::diagnostic_show_locus_c_tests()
../../gcc/diagnostic-show-locus.c:5021
0x9754969 selftest::run_tests()
../../gcc/selftest-run-tests.c:95
0x8a9e0e9 toplev::run_self_tests()
../../gcc/toplev.c:2337
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
make[2]: *** [s-selftest-c] Error 1
make[2]: Leaving directory
`/build/Sonar/Alofts/tools/.build1/gcc-10-20200329/build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory
`/build/Sonar/Alofts/tools/.build1/gcc-10-20200329/build'
make: *** [all] Error 2

[Bug bootstrap/87252] gcc-4.4 cross-builds broken, apparently in self-tests

2020-04-05 Thread abrahm.scully at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87252

--- Comment #8 from Abrahm Scully  ---
I don't think anything is wrong with gcc-10-20200329. The code looks fine.

I realized later that the versions of gcc I mentioned where I don't see this
problem are all from release branches. As described in
https://gcc.gnu.org/install/configure.html, the --enable-checking default
behavior is different in release branches. They just don't run the test during
the build.

Configuring the gcc-10-20200329 snapshot with --enable-checking=release skips
the test and the build finishes fine.

Sorry for the noise, but thanks for listening.

[Bug target/94494] New: gcc-10 unrecognizable insn

2020-04-05 Thread abrahm.scully at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94494

Bug ID: 94494
   Summary: gcc-10 unrecognizable insn
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: abrahm.scully at gmail dot com
  Target Milestone: ---

with gcc-10-20200329 built on 32-bit CentOS 6, passing -m32 -march=pentium3
-mfpmath=sse -mstackrealign -O2 -ftree-vectorize -flto ... got the following.

/build/file.cpp:1510:1: error: unrecognizable insn:
 1510 | }
  | ^
(insn 355 354 356 40 (set (reg:V1TI 201)
(lshiftrt:V1TI (subreg:V1TI (reg:V4SI 89 [ vect_feature_found_41.571 ])
0)
(const_int 64 [0x40]))) -1
 (nil))
during RTL pass: vregs
/build/file.cpp:1510:1: internal compiler error: in extract_insn, at
recog.c:2294
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.

The same code built fine with gcc-9-20200118.

[Bug target/94494] gcc-10 unrecognizable insn

2020-04-10 Thread abrahm.scully at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94494

--- Comment #2 from Abrahm Scully  ---
Created attachment 48255
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48255&action=edit
preprocessed source file

With gcc-10-20200329, "g++ -Wall -ftree-vectorize -march=pentium3 -O2 -m32 -c
illegal-insn.cpp.ii -o illegal-insn.cpp.o" prints the following:

illegal-insn.cpp: In function 'void illegal_insn(float*, float*, float*, int,
int, int, int, int)':
illegal-insn.cpp:16:1: error: unrecognizable insn:
   16 | }
  | ^
(insn 80 79 81 13 (set (reg:V1TI 144)
(lshiftrt:V1TI (subreg:V1TI (reg:V4SI 113 [ vect_found_18.20 ]) 0)
(const_int 64 [0x40]))) -1
 (nil))
during RTL pass: vregs
illegal-insn.cpp:16:1: internal compiler error: in extract_insn, at
recog.c:2294
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

[Bug target/94494] gcc-10 unrecognizable insn

2020-04-10 Thread abrahm.scully at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94494

--- Comment #3 from Abrahm Scully  ---
Not sure if this is helpful, but "gcc -v" outputs:
Reading specs from /opt/tools-20200401/lib/gcc/i686-pc-linux-gnu/10/specs
COLLECT_GCC=/opt/tools-20200401/bin/gcc
COLLECT_LTO_WRAPPER=/opt/tools-20200401/libexec/gcc/i686-pc-linux-gnu/10/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/opt/tools-20200401 --with-system-zlib
--enable-languages=c,c++,fortran,lto --enable-bootstrap --enable-libgomp
--enable-checking=release --enable-shared --enable-threads=posix
--with-arch=pentium3 --with-tune=pentium3 --disable-multilib
--enable-initfini-array --enable-gnu-unique-object --enable-linker-build-id
--with-linker-hash-style=gnu --with-zstd --disable-libssp --enable-__cxa_atexit
--disable-libunwind-exceptions --with-gcc-major-version-only --with-isl
-disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.0.1 20200329 (experimental) (GCC)

[Bug bootstrap/87252] gcc-4.4 cross-builds broken, apparently in self-tests

2020-04-10 Thread abrahm.scully at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87252

--- Comment #9 from Abrahm Scully  ---
I'm no longer convinced that I didn't see the problem previously because I just
wasn't running the tests. Stage 1 has checking enabled... so I don't know why
this problem showed up for others in gcc 9 but not for me until gcc 10.

Either way, building gcc-4.7.4 first and then building gcc-10 with that
produces a compiler without the problem.

Again, sorry for the noise.

[Bug target/94494] gcc-10 unrecognizable insn

2020-04-10 Thread abrahm.scully at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94494

--- Comment #5 from Abrahm Scully  ---
I can't comment on the patch's correctness, but applied to gcc-10-20200405 it
does prevent the "unrecognizable insn" error.

[Bug target/93254] New: g++ -m32 -mfpmath=sse -msse generates sse2 instructions

2020-01-13 Thread abrahm.scully at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93254

Bug ID: 93254
   Summary: g++ -m32 -mfpmath=sse -msse generates sse2
instructions
   Product: gcc
   Version: 9.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: abrahm.scully at gmail dot com
  Target Milestone: ---

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

Running "gcc -v" prints

"Reading specs from /opt/tools-20190901/lib/gcc/i686-pc-linux-gnu/9/specs
COLLECT_GCC=/opt/tools-20190901/bin/gcc
COLLECT_LTO_WRAPPER=/opt/tools-20190901/libexec/gcc/i686-pc-linux-gnu/9/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/opt/tools-20190901 --with-system-zlib
--enable-languages=c,c++,fortran,lto --enable-bootstrap --enable-libgomp
--enable-checking=release --enable-shared --enable-threads=posix
--with-host-libstdcxx=''\''-Wl,-rpath,/opt/tools-20190901/lib,-lstdc++'\'''
--enable-initfini-array --enable-gnu-unique-object --enable-linker-build-id
--with-linker-hash-style=gnu --with-zstd --enable-__cxa_atexit
--disable-libunwind-exceptions --with-gcc-major-version-only --with-isl
--disable-multilib
Thread model: posix
gcc version 9.2.1 20191214 (GCC)"

The host and target OS is x86-32 CentOS 6.10, and the target hardware has a
Pentium III (Coppermine) processor.

Compile the attached preprocessed file with "g++ -S -m32 -mfpmath=sse -msse
-mno-sse2 -o gcc-sse-broken.s gcc_sse_movd_test.ii".

The output contains "movd r32, xmm" instructions like "movd %ecx, %xmm1" that
according to https://www.felixcloutier.com/x86/movd:movq are SSE2 instructions.
I don't think they should be emitted with the given compiler, platform, and
command line options.

(Using compiler explorer (see https://godbolt.org/z/nCeEnz), I did some probing
of other gcc versions. The problem is present with gcc 9.1 to trunk. Using gcc
8.3 and earlier don't emit the "movd r32, xmm" instructions in the
"std::complex::__rep() const" routine, unless I remove the -mno-sse2
which I expect.)

[Bug target/93254] g++ -m32 -mfpmath=sse -msse generates sse2 instructions

2020-01-13 Thread abrahm.scully at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93254

--- Comment #2 from Abrahm Scully  ---
(In reply to Uroš Bizjak from comment #1)
> The following patch that disables non-sse2 alternatives in *movsf_internal
> should fix the issue:
> 

Uroš, thank you for the quick help! The patch does appear to address the
problem.

Now I'm off to
https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gccint/Machine-Desc.html to figure out
how that worked, haha...

[Bug c++/96720] ICE with* after include

2020-11-04 Thread abrahm.scully at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96720

Abrahm Scully  changed:

   What|Removed |Added

 CC||abrahm.scully at gmail dot com

--- Comment #3 from Abrahm Scully  ---
Created attachment 49502
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49502&action=edit
preprocessed source (compressed)

I think the attached gcc-ice-range-v3.ii.gz contains preprocessed source that
reproduces this problem for me.


bash-4.2$ /opt/tools-20201014/libexec/gcc/x86_64-pc-linux-gnu/10/cc1plus
-fpreprocessed gcc-ice-range-v3.ii -quiet -dumpbase gcc-ice-range-v3.cc
-mtune=haswell -march=x86-64 -auxbase-strip gcc-ice-range-v3.cc.o -std=c++2a
-version -o gcc-ice-range-v3.s
GNU C++17 (GCC) version 10.2.1 20201010 (x86_64-pc-linux-gnu)
compiled by GNU C version 10.2.1 20201010, GMP version 6.1.2, MPFR
version 4.0.2, MPC version 1.1.0, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++17 (GCC) version 10.2.1 20201010 (x86_64-pc-linux-gnu)
compiled by GNU C version 10.2.1 20201010, GMP version 6.1.2, MPFR
version 4.0.2, MPC version 1.1.0, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 0e56445dd53dcd048df7b939913a89e2
In file included from
/build/Sonar/Alofts/ThirdParty/range-v3/range-v3-0.11.0/include/range/v3/view.hpp:25,
 from gcc-ice-range-v3.cc:3:
/build/Sonar/Alofts/ThirdParty/range-v3/range-v3-0.11.0/include/range/v3/view/cartesian_product.hpp:
In substitution of 'template template
template using constify_if = meta::const_if_c [with T =
ranges::cartesian_product_view; bool IsConst_ = IsConst_; Views = {Views
...}]':
/build/Sonar/Alofts/ThirdParty/range-v3/range-v3-0.11.0/include/range/v3/view/cartesian_product.hpp:154:47:
  required from here
/build/Sonar/Alofts/ThirdParty/range-v3/range-v3-0.11.0/include/range/v3/view/cartesian_product.hpp:154:47:
internal compiler error: Segmentation fault
  154 | constify_if * view_;
  |   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.


bash-4.2$ gcc -v
Reading specs from /opt/tools-20201014/lib/gcc/x86_64-pc-linux-gnu/10/specs
COLLECT_GCC=/opt/tools-20201014/bin/gcc
COLLECT_LTO_WRAPPER=/opt/tools-20201014/libexec/gcc/x86_64-pc-linux-gnu/10/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/opt/tools-20201014 --with-system-zlib
--enable-languages=c,c++,fortran,lto --enable-bootstrap --enable-libgomp
--enable-checking=release --enable-shared --enable-threads=posix
--with-arch=x86-64 --with-tune=haswell --with-arch-32=x86-64
--with-tune-32=haswell --disable-multilib --enable-gnu-indirect-function
--with-default-libstdcxx-abi=gcc4-compatible --enable-initfini-array
--enable-gnu-unique-object --enable-linker-build-id
--with-linker-hash-style=gnu --with-zstd --disable-libssp --enable-__cxa_atexit
--disable-libunwind-exceptions --with-gcc-major-version-only --with-isl
-disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20201010 (GCC)

[Bug c++/96720] ICE with* after include

2020-11-05 Thread abrahm.scully at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96720

--- Comment #4 from Abrahm Scully  ---
I think this bug should have keyword ice-on-valid-code and not
ice-on-invalid-code. The preprocessed source I attached to reproduce the issue
does not have the stray '*' in the original reproducer.