public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/56453] New: Gcc segmentation fault building argz_add.c for xcompiler newlib for fr30-elf
@ 2013-02-26 4:50 simeon.pilgrim at gmail dot com
2013-02-26 7:42 ` [Bug c/56453] " simeon.pilgrim at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: simeon.pilgrim at gmail dot com @ 2013-02-26 4:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56453
Bug #: 56453
Summary: Gcc segmentation fault building argz_add.c for
xcompiler newlib for fr30-elf
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: simeon.pilgrim@gmail.com
Created attachment 29538
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29538
saved temp state files
I'm building a cross compiler tool chain, for the fr30-elf system.
binutils-2.23.1
gcc-4.7.2
newlib-2.0.0
under cygwin on Windows 7 64bit system.
using:
export TARGET=fr30-elf
export PREFIX=/user/local/$TARGET
export PATH=$PATH:$PREFIX/bin
I build binutils (../binutils-2.23.1/configure --target=$TARGET
--prefix=$PREFIX
)
then built bootstrap GCC (../gcc-4.7.2/configure --target=$TARGET
--prefix=$PREFIX --without-headers --with-newlib --with-gnu-as --with-gnu-ld)
then started build newlib (../newlib-2.0.0/configure --target=$TARGET
--prefix=$PREFIX)
and "make all" crashed gcc on /newlib-2.0.0/newlib/libc/argz/argz_add.c:7:0
full command for crash is:
$ fr30-elf-gcc -B/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/newlib/ -isystem
/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/newlib/targ-include -isystem
/home/SPILGRIM/tmp/build/newlib-2.0.0/newlib/libc/include
-B/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/libgloss/fr30
-L/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/libgloss/libnosys
-L/home/SPILGRIM/tmp/build/newlib-2.0.0/libgloss/fr30
-DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\"
-DPACKAGE_VERSION=\"2.0.0\" -DPACKAGE_STRING=\"newlib\ 2.0.0\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I.
-I../../../../../newlib-2.0.0/newlib/libc/argz -fno-builtin -v -save-temps
-g -Os -c -o lib_a-argz_add.o `test -f 'argz_add.c' || echo
'../../../../../newlib-2.0.0/newlib/libc/argz/'`argz_add.c
with the output:
$ fr30-elf-gcc -B/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/newlib/ -isystem
/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/newlib/targ-include -isystem
/home/SPILGRIM/tmp/build/newlib-2.0.0/newlib/libc/include
-B/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/libgloss/fr30
-L/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/libgloss/libnosys
-L/home/SPILGRIM/tmp/build/newlib-2.0.0/libgloss/fr30
-DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\"
-DPACKAGE_VERSION=\"2.0.0\" -DPACKAGE_STRING=\"newlib\ 2.0.0\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I.
-I../../../../../newlib-2.0.0/newlib/libc/argz -fno-builtin -v -save-temps
-g -Os -c -o lib_a-argz_add.o `test -f 'argz_add.c' || echo
'../../../../../newlib-2.0.0/newlib/libc/argz/'`argz_add.c
Using built-in specs.
COLLECT_GCC=fr30-elf-gcc
Target: fr30-elf
Configured with: ../gcc-4.7.2/configure --target=fr30-elf
--prefix=/user/local/fr30-elf --without-headers --with-newlib --with-gnu-as
--with-gnu-ld
Thread model: single
gcc version 4.7.2 (GCC)
COLLECT_GCC_OPTIONS='-B' '/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/newlib/'
'-isystem' '/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/newlib/targ-include'
'-isystem' '/home/SPILGRIM/tmp/build/newlib-2.0.0/newlib/libc/include' '-B'
'/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/libgloss/fr30'
'-L/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/libgloss/libnosys'
'-L/home/SPILGRIM/tmp/build/newlib-2.0.0/libgloss/fr30' '-D'
'PACKAGE_NAME="newlib"' '-D' 'PACKAGE_TARNAME="newlib"' '-D'
'PACKAGE_VERSION="2.0.0"' '-D' 'PACKAGE_STRING="newlib 2.0.0"' '-D'
'PACKAGE_BUGREPORT=""' '-D' 'PACKAGE_URL=""' '-I' '.' '-I'
'../../../../../newlib-2.0.0/newlib/libc/argz' '-fno-builtin' '-v'
'-save-temps' '-g' '-Os' '-c' '-o' 'lib_a-argz_add.o'
/user/local/FR30-elf/bin/../libexec/gcc/fr30-elf/4.7.2/cc1.exe -E -quiet -v -I
. -I ../../../../../newlib-2.0.0/newlib/libc/argz -iprefix
/user/local/FR30-elf/bin/../lib/gcc/fr30-elf/4.7.2/ -D PACKAGE_NAME="newlib" -D
PACKAGE_TARNAME="newlib" -D PACKAGE_VERSION="2.0.0" -D PACKAGE_STRING="newlib
2.0.0" -D PACKAGE_BUGREPORT="" -D PACKAGE_URL="" -isystem
/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/newlib/targ-include -isystem
/home/SPILGRIM/tmp/build/newlib-2.0.0/newlib/libc/include
../../../../../newlib-2.0.0/newlib/libc/argz/argz_add.c -fno-builtin -g
-fworking-directory -Os -fpch-preprocess -o argz_add.i
ignoring nonexistent directory
"/user/local/FR30-elf/bin/../lib/gcc/fr30-elf/4.7.2/../../../../fr30-elf/sys-include"
ignoring nonexistent directory
"/user/local/FR30-elf/bin/../lib/gcc/fr30-elf/4.7.2/../../../../fr30-elf/include"
ignoring duplicate directory
"/user/local/fr30-elf/bin/../lib/gcc/../../lib/gcc/fr30-elf/4.7.2/include"
ignoring duplicate directory
"/user/local/fr30-elf/bin/../lib/gcc/../../lib/gcc/fr30-elf/4.7.2/include-fixed"
ignoring nonexistent directory
"/user/local/fr30-elf/bin/../lib/gcc/../../lib/gcc/fr30-elf/4.7.2/../../../../fr30-elf/sys-include"
ignoring nonexistent directory
"/user/local/fr30-elf/bin/../lib/gcc/../../lib/gcc/fr30-elf/4.7.2/../../../../fr30-elf/include"
#include "..." search starts here:
#include <...> search starts here:
.
../../../../../newlib-2.0.0/newlib/libc/argz
/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/newlib/targ-include
/home/SPILGRIM/tmp/build/newlib-2.0.0/newlib/libc/include
/user/local/FR30-elf/bin/../lib/gcc/fr30-elf/4.7.2/include
/user/local/FR30-elf/bin/../lib/gcc/fr30-elf/4.7.2/include-fixed
End of search list.
COLLECT_GCC_OPTIONS='-B' '/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/newlib/'
'-isystem' '/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/newlib/targ-include'
'-isystem' '/home/SPILGRIM/tmp/build/newlib-2.0.0/newlib/libc/include' '-B'
'/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/libgloss/fr30'
'-L/home/SPILGRIM/tmp/build/newlib-obj/fr30-elf/libgloss/libnosys'
'-L/home/SPILGRIM/tmp/build/newlib-2.0.0/libgloss/fr30' '-D'
'PACKAGE_NAME="newlib"' '-D' 'PACKAGE_TARNAME="newlib"' '-D'
'PACKAGE_VERSION="2.0.0"' '-D' 'PACKAGE_STRING="newlib 2.0.0"' '-D'
'PACKAGE_BUGREPORT=""' '-D' 'PACKAGE_URL=""' '-I' '.' '-I'
'../../../../../newlib-2.0.0/newlib/libc/argz' '-fno-builtin' '-v'
'-save-temps' '-g' '-Os' '-c' '-o' 'lib_a-argz_add.o'
/user/local/FR30-elf/bin/../libexec/gcc/fr30-elf/4.7.2/cc1.exe -fpreprocessed
argz_add.i -quiet -dumpbase argz_add.c -auxbase-strip lib_a-argz_add.o -g -Os
-version -fno-builtin -o argz_add.s
GNU C (GCC) version 4.7.2 (fr30-elf)
compiled by GNU C version 3.4.4 (cygming special, gdc 0.12, using dmd
0.125), GMP version 4.3.2, MPFR version 3.0.1-p4, MPC version 0.8
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.7.2 (fr30-elf)
compiled by GNU C version 3.4.4 (cygming special, gdc 0.12, using dmd
0.125), GMP version 4.3.2, MPFR version 3.0.1-p4, MPC version 0.8
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 2b3b992f45669b59ce4e55ad82ab7874
In file included from
../../../../../newlib-2.0.0/newlib/libc/argz/argz_add.c:7:0:
/home/SPILGRIM/tmp/build/newlib-2.0.0/newlib/libc/include/argz.h: In function
‘argz_add’:
/home/SPILGRIM/tmp/build/newlib-2.0.0/newlib/libc/include/argz.h:23:9: internal
compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/56453] Gcc segmentation fault building argz_add.c for xcompiler newlib for fr30-elf
2013-02-26 4:50 [Bug c/56453] New: Gcc segmentation fault building argz_add.c for xcompiler newlib for fr30-elf simeon.pilgrim at gmail dot com
@ 2013-02-26 7:42 ` simeon.pilgrim at gmail dot com
2013-02-26 7:46 ` simeon.pilgrim at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: simeon.pilgrim at gmail dot com @ 2013-02-26 7:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56453
--- Comment #1 from Simeon Pilgrim <simeon.pilgrim at gmail dot com> 2013-02-26 07:41:53 UTC ---
Simplified that case down to the command:
fr30-elf-gcc -c -o lib_a-argz_add.o argz_add.c
and the code:
void argz_add(char *str)
{
if (str == 0)
return;
return;
}
it appears to be the NULL comparison that's causing the problems. ie when more
of the function was present removing that logic block made it all happy.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/56453] Gcc segmentation fault building argz_add.c for xcompiler newlib for fr30-elf
2013-02-26 4:50 [Bug c/56453] New: Gcc segmentation fault building argz_add.c for xcompiler newlib for fr30-elf simeon.pilgrim at gmail dot com
2013-02-26 7:42 ` [Bug c/56453] " simeon.pilgrim at gmail dot com
@ 2013-02-26 7:46 ` simeon.pilgrim at gmail dot com
2013-02-26 14:59 ` [Bug target/56453] " nickc at gcc dot gnu.org
2013-02-26 15:04 ` nickc at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: simeon.pilgrim at gmail dot com @ 2013-02-26 7:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56453
--- Comment #2 from Simeon Pilgrim <simeon.pilgrim at gmail dot com> 2013-02-26 07:46:10 UTC ---
If you change the char* to just a char, thus:
void argz_add(char str)
{
if (str == 0)
return;
}
I now get:
argz_add.c:1:6: internal compiler error: in operand_subword_force, at
emit-rtl.c:1434
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/56453] Gcc segmentation fault building argz_add.c for xcompiler newlib for fr30-elf
2013-02-26 4:50 [Bug c/56453] New: Gcc segmentation fault building argz_add.c for xcompiler newlib for fr30-elf simeon.pilgrim at gmail dot com
2013-02-26 7:42 ` [Bug c/56453] " simeon.pilgrim at gmail dot com
2013-02-26 7:46 ` simeon.pilgrim at gmail dot com
@ 2013-02-26 14:59 ` nickc at gcc dot gnu.org
2013-02-26 15:04 ` nickc at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: nickc at gcc dot gnu.org @ 2013-02-26 14:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56453
--- Comment #3 from Nick Clifton <nickc at gcc dot gnu.org> 2013-02-26 14:58:34 UTC ---
Author: nickc
Date: Tue Feb 26 14:58:17 2013
New Revision: 196292
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196292
Log:
PR target/56453
Import this patch from the mainline:
2012-08-17 Nick Clifton <nickc@redhat.com>
* config/fr30/fr30.md (cbranchsi4): Remove mode from comparison.
(branch_true): Likewise.
(branch_false): Likewise.
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/config/fr30/fr30.md
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/56453] Gcc segmentation fault building argz_add.c for xcompiler newlib for fr30-elf
2013-02-26 4:50 [Bug c/56453] New: Gcc segmentation fault building argz_add.c for xcompiler newlib for fr30-elf simeon.pilgrim at gmail dot com
` (2 preceding siblings ...)
2013-02-26 14:59 ` [Bug target/56453] " nickc at gcc dot gnu.org
@ 2013-02-26 15:04 ` nickc at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: nickc at gcc dot gnu.org @ 2013-02-26 15:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56453
Nick Clifton <nickc at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |nickc at gcc dot gnu.org
Resolution| |FIXED
--- Comment #4 from Nick Clifton <nickc at gcc dot gnu.org> 2013-02-26 15:04:07 UTC ---
Hi Simeon,
I have checked in a patch to the 4.7 branch that should fix this. (The
mainline sources are already fixed).
Cheers
Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-02-26 15:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-26 4:50 [Bug c/56453] New: Gcc segmentation fault building argz_add.c for xcompiler newlib for fr30-elf simeon.pilgrim at gmail dot com
2013-02-26 7:42 ` [Bug c/56453] " simeon.pilgrim at gmail dot com
2013-02-26 7:46 ` simeon.pilgrim at gmail dot com
2013-02-26 14:59 ` [Bug target/56453] " nickc at gcc dot gnu.org
2013-02-26 15:04 ` nickc at gcc dot gnu.org
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).