public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd
@ 2015-05-06 16:28 dougmencken at gmail dot com
  2015-05-06 16:30 ` [Bug bootstrap/66038] " dougmencken at gmail dot com
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: dougmencken at gmail dot com @ 2015-05-06 16:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66038
           Summary: SIGSEGV at stage 2 build/genmatch --gimple
                    ../../gcc-5.1.0/gcc/match.pd
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dougmencken at gmail dot com
  Target Milestone: ---

Created attachment 35481
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35481&action=edit
remake log

I want to try GCC 5.1.0. But at bootstrap, it gives

...
ld warning: atom sorting error for operand::gen_transform(__sFILE*, char
const*, bool, int, char const*, capture_info*, dt_operand**, bool) and
hash_table<id_base, xcallocator, false>::find_with_hash(id_base const*,
unsigned int) in build/genmatch.o
/bin/sh: line 1: 44113 Segmentation fault      build/genmatch --gimple
../../gcc-5.1.0/gcc/match.pd > tmp-gimple-match.c
make[3]: *** [s-match] Error 139
make[2]: *** [all-stage2-gcc] Error 2
make[1]: *** [stage2-bubble] Error 2
make: *** [all] Error 2

I attached remake log.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
@ 2015-05-06 16:30 ` dougmencken at gmail dot com
  2015-05-09  4:37 ` dougmencken at gmail dot com
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dougmencken at gmail dot com @ 2015-05-06 16:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Douglas Mencken <dougmencken at gmail dot com> ---
$ prev-gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=prev-gcc/xgcc
Target: powerpc-unknown-darwin
Configured with: ../gcc-5.1.0/configure --build=powerpc-unknown-darwin
--host=powerpc-unknown-darwin --target=powerpc-unknown-darwin --prefix=/usr
--sysconfdir=/etc --mandir=/usr/share/man --with-slibdir=/usr/lib
--program-prefix= --enable-languages=c,c++,objc,obj-c++ --disable-checking
--enable-shared --enable-static --enable-threads=posix --with-__thread
--with-system-zlib --disable-nls --disable-werror
Thread model: posix
gcc version 5.1.0 (GCC)

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc-unknown-darwin/4.9.2/lto-wrapper
Target: powerpc-unknown-darwin
Configured with: ../gcc-4.9.2/configure --build=powerpc-unknown-darwin
--host=powerpc-unknown-darwin --target=powerpc-unknown-darwin --prefix=/usr
--sysconfdir=/etc --mandir=/usr/share/man --with-slibdir=/usr/lib
--program-prefix= --enable-languages=c,c++,objc,obj-c++ --disable-checking
--enable-shared --enable-static --enable-threads=posix --with-__thread
--with-system-zlib --disable-nls --disable-werror
Thread model: posix
gcc version 4.9.2 (GCC)


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
  2015-05-06 16:30 ` [Bug bootstrap/66038] " dougmencken at gmail dot com
@ 2015-05-09  4:37 ` dougmencken at gmail dot com
  2015-05-11  7:57 ` [Bug bootstrap/66038] SIGSEGV at stage 2 - build/genmatch fails in operand::gen_transform rguenther at suse dot de
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dougmencken at gmail dot com @ 2015-05-09  4:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Douglas Mencken <dougmencken at gmail dot com> ---
(In reply to Richard Biener from comment #2)
> I think you may run into a host compiler issue?  (ISTR a similar bug for
> darwin)
> 
> What is your host compiler?  I suppose ppc-darwin still uses gcc 4.2.x,
> right?

My stage0 compiler is 4.9.2 (not Apple-patched 4.2.1). I also mentioned its "-v
output" in above comment. But I doubt it is related to host compiler...

This is happening on stage2, and
$ prev-gcc/build/genmatch --gimple ../gcc-5.1.0/gcc/match.pd
works well.

It is
$ gcc/build/genmatch --gimple ../gcc-5.1.0/gcc/match.pd
that fails.

Backtrace.

$ gdb --args gcc/build/genmatch --gimple ../gcc-5.1.0/gcc/match.pd
(gdb) run
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x419e04bc
0x0000dcb0 in operand::gen_transform ()
(gdb) bt
#0  0x0000dcb0 in operand::gen_transform ()
#1  0x00007fd8 in get_operator ()
#2  0x000099a0 in parser::parse_operator_list ()
#3  0x0000cc38 in parser::parse_pattern ()
#4  0x0000dc44 in parser::parser ()
#5  0x0006357c in main () at
../../../../gcc-5.1.0/libstdc++-v3/libsupc++/eh_alloc.cc:121


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] SIGSEGV at stage 2 - build/genmatch fails in operand::gen_transform
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
  2015-05-06 16:30 ` [Bug bootstrap/66038] " dougmencken at gmail dot com
  2015-05-09  4:37 ` dougmencken at gmail dot com
@ 2015-05-11  7:57 ` rguenther at suse dot de
  2015-05-12 10:02 ` [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223) rguenth at gcc dot gnu.org
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rguenther at suse dot de @ 2015-05-11  7:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> ---
On Sat, 9 May 2015, dougmencken at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66038
> 
> --- Comment #3 from Douglas Mencken <dougmencken at gmail dot com> ---
> (In reply to Richard Biener from comment #2)
> > I think you may run into a host compiler issue?  (ISTR a similar bug for
> > darwin)
> > 
> > What is your host compiler?  I suppose ppc-darwin still uses gcc 4.2.x,
> > right?
> 
> My stage0 compiler is 4.9.2 (not Apple-patched 4.2.1). I also mentioned its "-v
> output" in above comment. But I doubt it is related to host compiler...
> 
> This is happening on stage2, and
> $ prev-gcc/build/genmatch --gimple ../gcc-5.1.0/gcc/match.pd
> works well.
> 
> It is
> $ gcc/build/genmatch --gimple ../gcc-5.1.0/gcc/match.pd
> that fails.
> 
> Backtrace.
> 
> $ gdb --args gcc/build/genmatch --gimple ../gcc-5.1.0/gcc/match.pd
> (gdb) run
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x419e04bc
> 0x0000dcb0 in operand::gen_transform ()
> (gdb) bt
> #0  0x0000dcb0 in operand::gen_transform ()
> #1  0x00007fd8 in get_operator ()
> #2  0x000099a0 in parser::parse_operator_list ()
> #3  0x0000cc38 in parser::parse_pattern ()
> #4  0x0000dc44 in parser::parser ()
> #5  0x0006357c in main () at
> ../../../../gcc-5.1.0/libstdc++-v3/libsupc++/eh_alloc.cc:121

Can you build stage2 with debuginfo?  (--without-build-config at 
configure)

That should imrpove the backtrace.

Thanks,
Richard.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (2 preceding siblings ...)
  2015-05-11  7:57 ` [Bug bootstrap/66038] SIGSEGV at stage 2 - build/genmatch fails in operand::gen_transform rguenther at suse dot de
@ 2015-05-12 10:02 ` rguenth at gcc dot gnu.org
  2015-05-13 15:21 ` dougmencken at gmail dot com
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-05-12 10:02 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikestump at comcast dot net
   Target Milestone|---                         |5.2
            Summary|[5.1.0 regression] (stage   |[5 regression] (stage 2)
                   |2) build/genmatch segfaults |build/genmatch segfaults in
                   |in operand::gen_transform   |operand::gen_transform
                   |(gcc/hash-table.h:223)      |(gcc/hash-table.h:223)

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Douglas Mencken from comment #5)
> (In reply to rguenther@suse.de from comment #4)
> > Can you build stage2 with debuginfo?  (--without-build-config at 
> > configure)
> > 
> > That should imrpove the backtrace.
> > 
> > Thanks,
> > Richard.
> 
> Sure I can. Here you go:
> 
> (gdb) bt
> #0  0x0000e208 in operand::gen_transform () at
> ../../gcc-5.1.0/gcc/hash-table.h:223
> #1  0x00008530 in get_operator (id=0x808bec "tcc_comparison") at
> ../../gcc-5.1.0/gcc/genmatch.c:1495
> #2  0x00009ef8 in parser::parse_operator_list (this=0xbffff698) at
> ../../gcc-5.1.0/gcc/genmatch.c:2941
> #3  0x0000d190 in parser::parse_pattern (this=0xbffff698) at
> ../../gcc-5.1.0/gcc/hash-table.h:223
> #4  0x0000e19c in parser::parser (this=0xbffff698, r_=0xbffff4f8) at
> ../../gcc-5.1.0/gcc/hash-table.h:223
> #5  0x0005f3ac in main (argc=3146720, argv=0xbffff4f8) at
> ../../gcc-5.1.0/gcc/genmatch.c:3711
> Current language:  auto; currently c++

Huh, the line numbers don't make any sense.

I wonder what

ld warning: atom sorting error for operand::gen_transform(__sFILE*, char
const*, bool, int, char const*, capture_info*, dt_operand**, bool) and
hash_table<id_base, xcallocator, false>::find_with_hash(id_base const*,
unsigned int) in build/genmatch.o

means and if that explains things?  Like it ends up calling the wrong
function because of a linker bug?  Can you paste the linker command for
linking stage2 build/genmatch and the output when -v -Wl,-v -Wl,-debug is
appended?

As far as I understand ld on ppc-darwin is a GNU ld variant, correct?
I can't find anything in current binutils though.  Mike?


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (3 preceding siblings ...)
  2015-05-12 10:02 ` [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223) rguenth at gcc dot gnu.org
@ 2015-05-13 15:21 ` dougmencken at gmail dot com
  2015-05-15 10:11 ` dougmencken at gmail dot com
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dougmencken at gmail dot com @ 2015-05-13 15:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Douglas Mencken <dougmencken at gmail dot com> ---
$ ls -l /usr/bin/ld
-rwxr-xr-x 1 root wheel 2622416 Jul 12  2008 /usr/bin/ld

$ /usr/bin/ld -v
@(#)PROGRAM:ld  PROJECT:ld64-85.2.1
LLVM version 3.5.0


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (4 preceding siblings ...)
  2015-05-13 15:21 ` dougmencken at gmail dot com
@ 2015-05-15 10:11 ` dougmencken at gmail dot com
  2015-05-18  0:33 ` dougmencken at gmail dot com
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dougmencken at gmail dot com @ 2015-05-15 10:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Douglas Mencken <dougmencken at gmail dot com> ---
Created attachment 35546
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35546&action=edit
linker output for genmatch


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (5 preceding siblings ...)
  2015-05-15 10:11 ` dougmencken at gmail dot com
@ 2015-05-18  0:33 ` dougmencken at gmail dot com
  2015-05-19 10:53 ` dougmencken at gmail dot com
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dougmencken at gmail dot com @ 2015-05-18  0:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Douglas Mencken <dougmencken at gmail dot com> ---
I decided to use git bisect to figure out.

Working genmatch@stage2:
  commit 852fa94e29ebd44814054f4657b7385788b0321b (2014-12-16)

$ prev-gcc/build/genmatch --gimple ../gcc-git/gcc/match.pd >../o1
$ gcc/build/genmatch --gimple ../gcc-git/gcc/match.pd >../o2
$ diff -u ../o1 ../o2
(nothing)

git bisect start

git bisect bad d5ad84b309d0d97d3955fb1f62a96fc262df2b76 #==gcc-5_1_0-release
git bisect good 852fa94e29ebd44814054f4657b7385788b0321b # [ unrelated to
genmatch ICE @stage2 ]
git bisect bad 6c13ec429c328b934e9f67d5cd6f5ab55e17ce73 # =%) genmatch issue
(%= @stage2

git bisect skip e2afa5c10fd41fe708959121f373fcb5435ef5d6 # ld issue @stage1
issue
#.# -=-= e2afa5c10fd41fe708959121f373fcb5435ef5d6 =-=-
#.# < @stage1 >
#.# ld: duplicate symbol char* std::__add_grouping<char>(char*, char, char
const*, unsigned long, char const*, char const*) in
.libs/libstdc++.lax/libc++11convenience.a/cxx11-locale-inst.o and
.libs/libstdc++.lax/libc++98convenience.a/locale-inst.o

git bisect skip bedd686385875f1706b0bf60f5ba8bf2ebd0321e # likewise

git checkout 4e28babd199a81ced4eb07ef9b65c13c42e0d830 # fix duplicate symbol
errors in Darwin bootstrap (2014-12-20)

Building 4e28babd199a81ced4eb07ef9b65c13c42e0d830 now.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (6 preceding siblings ...)
  2015-05-18  0:33 ` dougmencken at gmail dot com
@ 2015-05-19 10:53 ` dougmencken at gmail dot com
  2015-05-20  5:40 ` dougmencken at gmail dot com
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dougmencken at gmail dot com @ 2015-05-19 10:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Douglas Mencken <dougmencken at gmail dot com> ---
No, ``ld warning: atom sorting error'' has nothing to do with this issue.

For example, commit 2e723940b6a1e61dfb20e03b30fba89dd204b72d (2014-12-19),
genmatch@stage2 works fine while building:

(...)
/Development/gcc-toolchain/_gcc_build_git/./prev-gcc/xg++
-B/Development/gcc-toolchain/_gcc_build_git/./prev-gcc/
-B/usr/powerpc-unknown-darwin/bin/ -nostdinc++
-B/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/src/.libs
-B/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/libsupc++/.libs

-I/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/include/powerpc-unknown-darwin

-I/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/include
 -I/Development/gcc-toolchain/gcc-git/libstdc++-v3/libsupc++
-L/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/src/.libs
-L/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/libsupc++/.libs
  -g -O2 -mdynamic-no-pic -DIN_GCC    -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-DGENERATOR_FILE -static-libstdc++ -static-libgcc  -o build/genmatch \
            build/genmatch.o ../libcpp/libcpp.a ../libiberty/libiberty.a
build/errors.o build/vec.o build/hash-table.o .././libiberty/libiberty.a 
/usr/lib/libiconv.dylib
ld warning: atom sorting error for hash_table<id_base, xcallocator,
false>::find_with_hash(id_base const*, unsigned int) and
operand::gen_transform(__sFILE*, char const*, bool, int, char const*,
capture_info*, dt_operand**, bool) in build/genmatch.o
ld warning: atom sorting error for hash_table<id_base, xcallocator,
false>::find_with_hash(id_base const*, unsigned int) and
operand::gen_transform(__sFILE*, char const*, bool, int, char const*,
capture_info*, dt_operand**, bool) in build/genmatch.o
ld warning: atom sorting error for hash_table<id_base, xcallocator,
false>::find_with_hash(id_base const*, unsigned int) and
operand::gen_transform(__sFILE*, char const*, bool, int, char const*,
capture_info*, dt_operand**, bool) in build/genmatch.o
ld warning: atom sorting error for hash_table<id_base, xcallocator,
false>::find_with_hash(id_base const*, unsigned int) and
operand::gen_transform(__sFILE*, char const*, bool, int, char const*,
capture_info*, dt_operand**, bool) in build/genmatch.o
build/genmatch --gimple ../../gcc-git/gcc/match.pd \
            > tmp-gimple-match.c
build/genmatch --generic ../../gcc-git/gcc/match.pd \
            > tmp-generic-match.c
/bin/sh ../../gcc-git/gcc/../move-if-change tmp-gimple-match.c \
                                                gimple-match.c
/bin/sh ../../gcc-git/gcc/../move-if-change tmp-generic-match.c \
                                                generic-match.c
echo timestamp > s-match
/Development/gcc-toolchain/_gcc_build_git/./prev-gcc/xg++
-B/Development/gcc-toolchain/_gcc_build_git/./prev-gcc/
-B/usr/powerpc-unknown-darwin/bin/ -nostdinc++
-B/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/src/.libs
-B/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/libsupc++/.libs

-I/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/include/powerpc-unknown-darwin

-I/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/include
 -I/Development/gcc-toolchain/gcc-git/libstdc++-v3/libsupc++
-L/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/src/.libs
-L/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/libsupc++/.libs
-c   -g -O2 -mdynamic-no-pic -DIN_GCC    -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings  -Wno-unused
-DHAVE_CONFIG_H -I. -I. -I../../gcc-git/gcc -I../../gcc-git/gcc/.
-I../../gcc-git/gcc/../include -I../../gcc-git/gcc/../libcpp/include 
-I../../gcc-git/gcc/../libdecnumber -I../../gcc-git/gcc/../libdecnumber/dpd
-I../libdecnumber -I../../gcc-git/gcc/../libbacktrace   -o gimple-match.o -MT
gimple-match.o -MMD -MP -MF ./.deps/gimple-match.TPo gimple-match.c
/Development/gcc-toolchain/_gcc_build_git/./prev-gcc/xg++
-B/Development/gcc-toolchain/_gcc_build_git/./prev-gcc/
-B/usr/powerpc-unknown-darwin/bin/ -nostdinc++
-B/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/src/.libs
-B/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/libsupc++/.libs

-I/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/include/powerpc-unknown-darwin

-I/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/include
 -I/Development/gcc-toolchain/gcc-git/libstdc++-v3/libsupc++
-L/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/src/.libs
-L/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/libsupc++/.libs
-c   -g -O2 -mdynamic-no-pic -DIN_GCC    -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings  -Wno-unused
-DHAVE_CONFIG_H -I. -I. -I../../gcc-git/gcc -I../../gcc-git/gcc/.
-I../../gcc-git/gcc/../include -I../../gcc-git/gcc/../libcpp/include 
-I../../gcc-git/gcc/../libdecnumber -I../../gcc-git/gcc/../libdecnumber/dpd
-I../libdecnumber -I../../gcc-git/gcc/../libbacktrace   -o generic-match.o -MT
generic-match.o -MMD -MP -MF ./.deps/generic-match.TPo generic-match.c
/Development/gcc-toolchain/_gcc_build_git/./prev-gcc/xg++
-B/Development/gcc-toolchain/_gcc_build_git/./prev-gcc/
-B/usr/powerpc-unknown-darwin/bin/ -nostdinc++
-B/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/src/.libs
-B/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/libsupc++/.libs

-I/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/include/powerpc-unknown-darwin

-I/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/include
 -I/Development/gcc-toolchain/gcc-git/libstdc++-v3/libsupc++
-L/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/src/.libs
-L/Development/gcc-toolchain/_gcc_build_git/prev-powerpc-unknown-darwin/libstdc++-v3/libsupc++/.libs
-c   -g -O2 -mdynamic-no-pic -DIN_GCC    -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-I. -I. -I../../gcc-git/gcc -I../../gcc-git/gcc/.
-I../../gcc-git/gcc/../include -I../../gcc-git/gcc/../libcpp/include 
-I../../gcc-git/gcc/../libdecnumber -I../../gcc-git/gcc/../libdecnumber/dpd
-I../libdecnumber -I../../gcc-git/gcc/../libbacktrace   -o
gimple-pretty-print.o -MT gimple-pretty-print.o -MMD -MP -MF
./.deps/gimple-pretty-print.TPo ../../gcc-git/gcc/gimple-pretty-print.c
(...)


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (7 preceding siblings ...)
  2015-05-19 10:53 ` dougmencken at gmail dot com
@ 2015-05-20  5:40 ` dougmencken at gmail dot com
  2015-05-20  7:34 ` rguenther at suse dot de
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dougmencken at gmail dot com @ 2015-05-20  5:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Douglas Mencken <dougmencken at gmail dot com> ---
Causing commit found.

It is r218976 (e2afa5c10fd41fe708959121f373fcb5435ef5d6). With reverse-applied 
r218976's patch, 5.1.0 even reaches "Bootstrap comparison failure!‘‘ ;)

Maybe patch's author [ Author: hubicka ] can help here.

I see in patch:

-hashval_t
-hash_table_mod1 (hashval_t hash, unsigned int index)
-{
-  const struct prime_ent *p = &prime_tab[index];
-#ifdef UNSIGNED_64BIT_TYPE
-  if (sizeof (hashval_t) * CHAR_BIT <= 32)
-    return mul_mod (hash, p->prime, p->inv, p->shift);
-#endif
-  return hash % p->prime;
-}

+inline hashval_t
+hash_table_mod1 (hashval_t hash, unsigned int index)
+{
+  const struct prime_ent *p = &prime_tab[index];
+  gcc_checking_assert (sizeof (hashval_t) * CHAR_BIT <= 32);
+    return mul_mod (hash, p->prime, p->inv, p->shift);
+}

Before, when "sizeof (hashval_t) * CHAR_BIT <= 32”, hash % p->prime was
returned. After, <= 32 triggers assert (--> failure).

I suggest something like

inline hashval_t
hash_table_mod1 (hashval_t hash, unsigned int index)
{
  const struct prime_ent *p = &prime_tab[index];
  if (sizeof (hashval_t) * CHAR_BIT <= 32)
    return mul_mod (hash, p->prime, p->inv, p->shift);
  else
    return hash % p->prime;
}
>From gcc-bugs-return-486755-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 20 06:23:32 2015
Return-Path: <gcc-bugs-return-486755-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 46046 invoked by alias); 20 May 2015 06:23:32 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 45982 invoked by uid 48); 20 May 2015 06:23:28 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
Date: Wed, 20 May 2015 06:23:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: bootstrap
X-Bugzilla-Version: 5.1.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: WAITING
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-66038-4-oczWuGmbB3@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66038-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66038-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg01595.txt.bz2
Content-length: 514

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf038

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
hashval_t should be unsigned int?  Is it some other type on your host, or is
CHAR_BIT bigger than 8, or do you have 64-bit unsigned int?


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (8 preceding siblings ...)
  2015-05-20  5:40 ` dougmencken at gmail dot com
@ 2015-05-20  7:34 ` rguenther at suse dot de
  2015-05-20 10:21 ` dougmencken at gmail dot com
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rguenther at suse dot de @ 2015-05-20  7:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 20 May 2015, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66038
> 
> Jakub Jelinek <jakub at gcc dot gnu.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |jakub at gcc dot gnu.org
> 
> --- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> hashval_t should be unsigned int?  Is it some other type on your host, or is
> CHAR_BIT bigger than 8, or do you have 64-bit unsigned int?

Yeah, it looks odd.  All hosts should have uint64_t nowadays, so even
before honzas patch we _always_ should have gone the mul_mod path.

Can you attach pre-processed source with the revision you bisected
reverted?  (pre-processed source of genmatch.c, that is?)

Might be that bconfig.h/system.h combo for your host makes the difference
somehow.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (9 preceding siblings ...)
  2015-05-20  7:34 ` rguenther at suse dot de
@ 2015-05-20 10:21 ` dougmencken at gmail dot com
  2015-05-20 10:30 ` dougmencken at gmail dot com
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dougmencken at gmail dot com @ 2015-05-20 10:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Douglas Mencken <dougmencken at gmail dot com> ---
sizeof(hashval_t) = 4, CHAR_BIT = 8

Just checked it manually. Built with patch subset, genmatch problem is here
again. It isn't related to changes in hash_table_mod1 & hash_table_mod2.

What's left? abort() replaced by gcc_checking_assert()?


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (10 preceding siblings ...)
  2015-05-20 10:21 ` dougmencken at gmail dot com
@ 2015-05-20 10:30 ` dougmencken at gmail dot com
  2015-05-20 10:35 ` schwab@linux-m68k.org
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dougmencken at gmail dot com @ 2015-05-20 10:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Douglas Mencken <dougmencken at gmail dot com> ---
I'm going to surround calls to gcc_[checking_]assert (in gcc/hash-table.*) with
#ifdef ENABLE_CHECKING {--disable-checking is in my config already}. Let's see
where it lands.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (11 preceding siblings ...)
  2015-05-20 10:30 ` dougmencken at gmail dot com
@ 2015-05-20 10:35 ` schwab@linux-m68k.org
  2015-05-20 11:27 ` rguenther at suse dot de
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: schwab@linux-m68k.org @ 2015-05-20 10:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Andreas Schwab <schwab@linux-m68k.org> ---
> After, <= 32 triggers assert (--> failure).

This is backwards.  The failure case is sizeof (hashval_t) * CHAR_BIT > 32.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (12 preceding siblings ...)
  2015-05-20 10:35 ` schwab@linux-m68k.org
@ 2015-05-20 11:27 ` rguenther at suse dot de
  2015-05-20 15:44 ` dougmencken at gmail dot com
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rguenther at suse dot de @ 2015-05-20 11:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 20 May 2015, dougmencken at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66038
> 
> --- Comment #14 from Douglas Mencken <dougmencken at gmail dot com> ---
> sizeof(hashval_t) = 4, CHAR_BIT = 8
> 
> Just checked it manually. Built with patch subset, genmatch problem is here
> again. It isn't related to changes in hash_table_mod1 & hash_table_mod2.
> 
> What's left? abort() replaced by gcc_checking_assert()?

Well, it shouldn't segfault in this case either (well - maybe we
replace gcc_checking_assert () with gcc_unreachable () with
--disable-checking).  Indeed we do.  That would explain seeing
a segfault instead of an assertion failure (so yes, try without
--disable-checking)


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (13 preceding siblings ...)
  2015-05-20 11:27 ` rguenther at suse dot de
@ 2015-05-20 15:44 ` dougmencken at gmail dot com
  2015-05-20 15:50 ` jakub at gcc dot gnu.org
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dougmencken at gmail dot com @ 2015-05-20 15:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Douglas Mencken <dougmencken at gmail dot com> ---
> try without --disable-checking
Okay, doing it now.

Meanwhile. Why ``sizeof (hashval_t) * CHAR_BIT'' cannot be checked at configure
time, not at buildtime nor runtime?


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (14 preceding siblings ...)
  2015-05-20 15:44 ` dougmencken at gmail dot com
@ 2015-05-20 15:50 ` jakub at gcc dot gnu.org
  2015-05-20 19:14 ` dougmencken at gmail dot com
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-05-20 15:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Douglas Mencken from comment #18)
> > try without --disable-checking
> Okay, doing it now.
> 
> Meanwhile. Why ``sizeof (hashval_t) * CHAR_BIT'' cannot be checked at
> configure time, not at buildtime nor runtime?

Because it is closer to the code which it wants to guard.  And, at least in
optimized built, it should be a no-op - optimized away completely if the
condition is true, because it can be evaluated at compile time.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223)
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (15 preceding siblings ...)
  2015-05-20 15:50 ` jakub at gcc dot gnu.org
@ 2015-05-20 19:14 ` dougmencken at gmail dot com
  2015-05-21  7:46 ` [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ] rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dougmencken at gmail dot com @ 2015-05-20 19:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Douglas Mencken <dougmencken at gmail dot com> ---
I'm lost. “Vanilla” 5.1.0 configured without --disable-checking went thru
stage2 w/o any issue...
>From gcc-bugs-return-486845-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 20 19:33:58 2015
Return-Path: <gcc-bugs-return-486845-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30092 invoked by alias); 20 May 2015 19:33:57 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 22867 invoked by uid 48); 20 May 2015 19:33:54 -0000
From: "meissner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libgcc/66225] New: libgcc/config/rs6000/morecore.S will not build on systems with an older assembler
Date: Wed, 20 May 2015 19:33:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libgcc
X-Bugzilla-Version: 5.1.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: meissner at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: amodra at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget cf_gccbuild
Message-ID: <bug-66225-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg01685.txt.bz2
Content-length: 897

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf225

            Bug ID: 66225
           Summary: libgcc/config/rs6000/morecore.S will not build on
                    systems with an older assembler
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: amodra at gcc dot gnu.org
          Reporter: meissner at gcc dot gnu.org
  Target Milestone: ---
              Host: powerpc64-unknown-linux-gnu
            Target: powerpc64-unknown-linux-gnu
             Build: powerpc64-unknown-linux-gnu

I downloaded subversion id 223451 of GCC and tried to build it on my big endian
power7 system running Sles 11r3, and it would not build due to the use of the
.abiversion pseudo op that is not available in either the host assembler or in
the Advance Toolchain 7.0 assembler.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ]
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (16 preceding siblings ...)
  2015-05-20 19:14 ` dougmencken at gmail dot com
@ 2015-05-21  7:46 ` rguenth at gcc dot gnu.org
  2015-05-24 20:34 ` dougmencken at gmail dot com
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-05-21  7:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Douglas Mencken from comment #20)
> I'm lost. “Vanilla” 5.1.0 configured without --disable-checking went thru
> stage2 w/o any issue...

That's interesting - we might run into a miscompilation here.  Can you
check with --disable-checking again but with just the gcc_checking_assert
in hash_table_mod1 removed?

Please also attach preprocessed source of genmatch.c for the stage2 build
so it's possible to investigate that with a cross compiler.  (preprocessed
source with --disable-checking and the assert left in place)

Btw, thanks for your help in tracking this down.

I wonder if anybody tried a powerpc-linux bootstrap with --disable-checking...
>From gcc-bugs-return-486879-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu May 21 07:48:38 2015
Return-Path: <gcc-bugs-return-486879-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 87748 invoked by alias); 21 May 2015 07:48:38 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 87685 invoked by uid 55); 21 May 2015 07:48:33 -0000
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66211] [5/6 Regression] Rvalue conversion in ternary operator causes internal compiler error
Date: Thu, 21 May 2015 07:48:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.1.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenther at suse dot de
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66211-4-ULbdk36f9S@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66211-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66211-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg01719.txt.bz2
Content-length: 445

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf211

--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 20 May 2015, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?idf211
>
> --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Perhaps just guard this particular match.pd pattern with GIMPLE guard for now
> (until the delayed C++ folding is committed)?

Will try.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ]
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (17 preceding siblings ...)
  2015-05-21  7:46 ` [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ] rguenth at gcc dot gnu.org
@ 2015-05-24 20:34 ` dougmencken at gmail dot com
  2015-06-05 22:42 ` kumba at gentoo dot org
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: dougmencken at gmail dot com @ 2015-05-24 20:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from Douglas Mencken <dougmencken at gmail dot com> ---
Created attachment 35619
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35619&action=edit
pre-processed source of genmatch


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ]
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (18 preceding siblings ...)
  2015-05-24 20:34 ` dougmencken at gmail dot com
@ 2015-06-05 22:42 ` kumba at gentoo dot org
  2015-07-16  9:18 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: kumba at gentoo dot org @ 2015-06-05 22:42 UTC (permalink / raw)
  To: gcc-bugs

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

Joshua Kinard <kumba at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kumba at gentoo dot org

--- Comment #23 from Joshua Kinard <kumba at gentoo dot org> ---
I ran into this on a Linux/mips64 (MIPS-IV ISA) build as well, running N32 ABI.

mips64-unknown-linux-gnu-g++ -c      -DIN_GCC    -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings  
-DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild
-I/usr/obj/portage/sys-devel/gcc-5.1.0/work/gcc-5.1.0/gcc
-I/usr/obj/portage/sys-devel/gcc-5.1.0/work/gcc-5.1.0/gcc/build
-I/usr/obj/portage/sys-devel/gcc-5.1.0/work/gcc-5.1.0/gcc/../include 
-I/usr/obj/portage/sys-devel/gcc-5.1.0/work/gcc-5.1.0/gcc/../libcpp/include  \
        -o build/gcov-iov.o
/usr/obj/portage/sys-devel/gcc-5.1.0/work/gcc-5.1.0/gcc/gcov-iov.c
build/genmatch --gimple
/usr/obj/portage/sys-devel/gcc-5.1.0/work/gcc-5.1.0/gcc/match.pd \
    > tmp-gimple-match.c
/bin/bash: line 1:   835 Segmentation fault      build/genmatch --gimple
/usr/obj/portage/sys-devel/gcc-5.1.0/work/gcc-5.1.0/gcc/match.pd >
tmp-gimple-match.c
Makefile:2318: recipe for target 's-match' failed
make[3]: *** [s-match] Error 139
make[3]: *** Waiting for unfinished jobs....

This is in the 'all-stage1-gcc' stage from 'stage1-bubble'.  I did not see any
'ld' warnings prior to that, but I have this in dmesg:

[47163.043326]
               do_page_fault(): sending SIGSEGV to genmatch for invalid read
access from 0000000000000000
[47163.043354] epc = 0000000000000000 in
[47163.043402]  genmatch[10000000+90000]
[47163.043412] ra  = 000000001000b960 in
[47163.043436]  genmatch[10000000+90000]

Running a 64KB PAGE_SIZE, too, if that matters.  I'll try to reverse commit
r218976 from Comment #11 to see if that resolves the issue for me as well and
update later.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ]
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (19 preceding siblings ...)
  2015-06-05 22:42 ` kumba at gentoo dot org
@ 2015-07-16  9:18 ` rguenth at gcc dot gnu.org
  2015-08-24  8:21 ` kumba at gentoo dot org
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-16  9:18 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|5.2                         |5.3

--- Comment #24 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 5.2 is being released, adjusting target milestone to 5.3.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ]
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (20 preceding siblings ...)
  2015-07-16  9:18 ` rguenth at gcc dot gnu.org
@ 2015-08-24  8:21 ` kumba at gentoo dot org
  2015-08-25  8:14 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: kumba at gentoo dot org @ 2015-08-24  8:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #25 from Joshua Kinard <kumba at gentoo dot org> ---
Still present in gcc-5.2.  Reverting commit r218976 also didn't help. 
Reproduced on a second MIPS machine running N32 ABI as well.  any idea if this
is being looked at for 5.3?


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ]
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (21 preceding siblings ...)
  2015-08-24  8:21 ` kumba at gentoo dot org
@ 2015-08-25  8:14 ` rguenth at gcc dot gnu.org
  2015-08-25  9:00 ` kumba at gentoo dot org
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-08-25  8:14 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|powerpc-darwin              |powerpc-darwin,
                   |                            |mips64-linux-n32
             Status|WAITING                     |NEW

--- Comment #26 from Richard Biener <rguenth at gcc dot gnu.org> ---
Don't hold your breath.  Basically somebody who can reproduce it has to find
the root-cause and a fix.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ]
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (22 preceding siblings ...)
  2015-08-25  8:14 ` rguenth at gcc dot gnu.org
@ 2015-08-25  9:00 ` kumba at gentoo dot org
  2015-08-25  9:09 ` rguenther at suse dot de
  2015-09-10  9:33 ` dougmencken at gmail dot com
  25 siblings, 0 replies; 27+ messages in thread
From: kumba at gentoo dot org @ 2015-08-25  9:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #27 from Joshua Kinard <kumba at gentoo dot org> ---
(In reply to Richard Biener from comment #26)
> Don't hold your breath.  Basically somebody who can reproduce it has to find
> the root-cause and a fix.

4.9.3 works, and the problem appears specific to genmatch with the '--gimple'
argument.  I guess I can test to see if 5.0.0 is also affected, and then start
diffing the genmatch.c files between working/non-working version to trace the
problem down.  That will be quicker than git bisecting on these machines (old
SGI machines).  Can't stay stuck on 4.9.x forever...


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ]
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (23 preceding siblings ...)
  2015-08-25  9:00 ` kumba at gentoo dot org
@ 2015-08-25  9:09 ` rguenther at suse dot de
  2015-09-10  9:33 ` dougmencken at gmail dot com
  25 siblings, 0 replies; 27+ messages in thread
From: rguenther at suse dot de @ 2015-08-25  9:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #28 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 25 Aug 2015, kumba at gentoo dot org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66038
> 
> --- Comment #27 from Joshua Kinard <kumba at gentoo dot org> ---
> (In reply to Richard Biener from comment #26)
> > Don't hold your breath.  Basically somebody who can reproduce it has to find
> > the root-cause and a fix.
> 
> 4.9.3 works, and the problem appears specific to genmatch with the '--gimple'
> argument.  I guess I can test to see if 5.0.0 is also affected, and then start
> diffing the genmatch.c files between working/non-working version to trace the
> problem down.  That will be quicker than git bisecting on these machines (old
> SGI machines).  Can't stay stuck on 4.9.x forever...

Can you also nail the issue down to using --disable-checking?  For the
powerpc case I think we run into a miscompile of stage2 and thus
genmatch.c is really only the trigger and wouldn't be the place for
a fix (well, maybe a workaround is fine for the GCC 5 branch here)


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ]
  2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
                   ` (24 preceding siblings ...)
  2015-08-25  9:09 ` rguenther at suse dot de
@ 2015-09-10  9:33 ` dougmencken at gmail dot com
  25 siblings, 0 replies; 27+ messages in thread
From: dougmencken at gmail dot com @ 2015-09-10  9:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #29 from Douglas Mencken <dougmencken at gmail dot com> ---
Vanilla GCC 5.2 bootstraps perfectly (without --disable-checking) on my side


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2015-09-10  9:33 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-06 16:28 [Bug bootstrap/66038] New: SIGSEGV at stage 2 build/genmatch --gimple ../../gcc-5.1.0/gcc/match.pd dougmencken at gmail dot com
2015-05-06 16:30 ` [Bug bootstrap/66038] " dougmencken at gmail dot com
2015-05-09  4:37 ` dougmencken at gmail dot com
2015-05-11  7:57 ` [Bug bootstrap/66038] SIGSEGV at stage 2 - build/genmatch fails in operand::gen_transform rguenther at suse dot de
2015-05-12 10:02 ` [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch segfaults in operand::gen_transform (gcc/hash-table.h:223) rguenth at gcc dot gnu.org
2015-05-13 15:21 ` dougmencken at gmail dot com
2015-05-15 10:11 ` dougmencken at gmail dot com
2015-05-18  0:33 ` dougmencken at gmail dot com
2015-05-19 10:53 ` dougmencken at gmail dot com
2015-05-20  5:40 ` dougmencken at gmail dot com
2015-05-20  7:34 ` rguenther at suse dot de
2015-05-20 10:21 ` dougmencken at gmail dot com
2015-05-20 10:30 ` dougmencken at gmail dot com
2015-05-20 10:35 ` schwab@linux-m68k.org
2015-05-20 11:27 ` rguenther at suse dot de
2015-05-20 15:44 ` dougmencken at gmail dot com
2015-05-20 15:50 ` jakub at gcc dot gnu.org
2015-05-20 19:14 ` dougmencken at gmail dot com
2015-05-21  7:46 ` [Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ] rguenth at gcc dot gnu.org
2015-05-24 20:34 ` dougmencken at gmail dot com
2015-06-05 22:42 ` kumba at gentoo dot org
2015-07-16  9:18 ` rguenth at gcc dot gnu.org
2015-08-24  8:21 ` kumba at gentoo dot org
2015-08-25  8:14 ` rguenth at gcc dot gnu.org
2015-08-25  9:00 ` kumba at gentoo dot org
2015-08-25  9:09 ` rguenther at suse dot de
2015-09-10  9:33 ` dougmencken at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).