This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/56453] Gcc segmentation fault building argz_add.c for xcompiler newlib for fr30-elf
- From: "simeon.pilgrim at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 26 Feb 2013 07:41:53 +0000
- Subject: [Bug c/56453] Gcc segmentation fault building argz_add.c for xcompiler newlib for fr30-elf
- Auto-submitted: auto-generated
- References: <bug-56453-4@http.gcc.gnu.org/bugzilla/>
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.