public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/13920] New: Segmentation Faults with optimization greater than 0
@ 2004-01-29 12:11 klawson at ad-holdings dot co dot uk
  2004-01-29 12:12 ` [Bug c/13920] " klawson at ad-holdings dot co dot uk
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: klawson at ad-holdings dot co dot uk @ 2004-01-29 12:11 UTC (permalink / raw)
  To: gcc-bugs

sh-elf-gcc on cygwin fails with segmentation faults when building the eCos
FreeBSD stack. The same code can be built using the linux sh-elf-gcc build.

sh-elf-gcc -c  -I/ecos-c/data/ecos/net1_install/include
-I/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0
-I/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src
-I/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/tests -I.
-I/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/
-mb -m3 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef
-Woverloaded-virtual -ggdb -O2 -ffunction-sections -fdata-sections -fno-rtti
-fno-exceptions -fvtable-gc -finit-priority -D_KERNEL -save-temps
-Wp,-MD,src/sys/netinet/tcp_input.tmp -o
src/sys/netinet/net_bsd_tcpip_tcp_input.o
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/tcp_input.c
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/tcp_input.c:
In function `cyg_tcp_input':
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/tcp_input.c:405:
warning: implicit declaration of function `cyg_in_pseudo'
make[1]: Leaving directory `/ecos-c/data/ecos/net1_build/net/bsd_tcpip/v2_0'
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/tcp_input.c:
In function `tcp_pulloutofband':
make: Leaving directory `/ecos-c/data/ecos/net1_build'
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/net/bsd_tcpip/v2_0/src/sys/netinet/tcp_input.c:2541:
internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make[1]: *** [src/sys/netinet/tcp_input.o.d] Error 1
make: *** [build] Error 2

Segmentation faults can also occur in other areas of this file.

Host environment is cygwin 1.5.5. The sh-elf toolchain is that obtainable from
eCoscentric, but the same fault also occurs when building your own toolchain.
gcc was configured using:
configure --target=sh-elf --prefix=/newtools --enable-languages=c,c++ \
  --with-gnu-as --with-gnu-ld --with-newlib \
  --with-gxx-include-dir=/gnutools/sh-elf/include \
  -v 2>&1 | tee configure.out

The fault does not occur on a linux build of sh-elf-gcc.

-- 
           Summary: Segmentation Faults with optimization greater than 0
           Product: gcc
           Version: 3.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: klawson at ad-holdings dot co dot uk
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: sh-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13920


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

* [Bug c/13920] Segmentation Faults with optimization greater than 0
  2004-01-29 12:11 [Bug c/13920] New: Segmentation Faults with optimization greater than 0 klawson at ad-holdings dot co dot uk
@ 2004-01-29 12:12 ` klawson at ad-holdings dot co dot uk
  2004-01-29 12:30 ` klawson at ad-holdings dot co dot uk
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: klawson at ad-holdings dot co dot uk @ 2004-01-29 12:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From klawson at ad-holdings dot co dot uk  2004-01-29 12:12 -------
Created an attachment (id=5607)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5607&action=view)
Part of standard eCos network stack


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13920


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

* [Bug c/13920] Segmentation Faults with optimization greater than 0
  2004-01-29 12:11 [Bug c/13920] New: Segmentation Faults with optimization greater than 0 klawson at ad-holdings dot co dot uk
  2004-01-29 12:12 ` [Bug c/13920] " klawson at ad-holdings dot co dot uk
@ 2004-01-29 12:30 ` klawson at ad-holdings dot co dot uk
  2004-01-29 15:48 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: klawson at ad-holdings dot co dot uk @ 2004-01-29 12:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From klawson at ad-holdings dot co dot uk  2004-01-29 12:30 -------
Have noticed that the -save-temps flag is actually helping the problem. 

The fault still occurs with -O0. But if "-O0 -save-temps" is used, then there is
no segmentation fault.

Note that both -O0 and -save-temps must be present to avoid the fault.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13920


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

* [Bug c/13920] Segmentation Faults with optimization greater than 0
  2004-01-29 12:11 [Bug c/13920] New: Segmentation Faults with optimization greater than 0 klawson at ad-holdings dot co dot uk
  2004-01-29 12:12 ` [Bug c/13920] " klawson at ad-holdings dot co dot uk
  2004-01-29 12:30 ` klawson at ad-holdings dot co dot uk
@ 2004-01-29 15:48 ` pinskia at gcc dot gnu dot org
  2004-02-02 11:46 ` klawson at ad-holdings dot co dot uk
  2004-02-02 14:34 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-29 15:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-29 15:48 -------
Can you try 3.3.2 first? 
Also was this linux build on the same machine or a different one, if it was on a different, this 
sounds like you have a hardware issue.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13920


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

* [Bug c/13920] Segmentation Faults with optimization greater than 0
  2004-01-29 12:11 [Bug c/13920] New: Segmentation Faults with optimization greater than 0 klawson at ad-holdings dot co dot uk
                   ` (2 preceding siblings ...)
  2004-01-29 15:48 ` pinskia at gcc dot gnu dot org
@ 2004-02-02 11:46 ` klawson at ad-holdings dot co dot uk
  2004-02-02 14:34 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: klawson at ad-holdings dot co dot uk @ 2004-02-02 11:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From klawson at ad-holdings dot co dot uk  2004-02-02 11:46 -------
(In reply to comment #3)
> Can you try 3.3.2 first? 
> Also was this linux build on the same machine or a different one, if it was on
a different, this 
> sounds like you have a hardware issue.

I have switched to a new PC and no longer get this problem with sh-elf-gcc and
cygwin. I am still using the same build (3.2.1).

Many thanks.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13920


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

* [Bug c/13920] Segmentation Faults with optimization greater than 0
  2004-01-29 12:11 [Bug c/13920] New: Segmentation Faults with optimization greater than 0 klawson at ad-holdings dot co dot uk
                   ` (3 preceding siblings ...)
  2004-02-02 11:46 ` klawson at ad-holdings dot co dot uk
@ 2004-02-02 14:34 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-02 14:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-02 14:34 -------
Sounds like the old machine was having hardware problems and the reporter says the new is fixed 
it so closing.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13920


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

end of thread, other threads:[~2004-02-02 14:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-29 12:11 [Bug c/13920] New: Segmentation Faults with optimization greater than 0 klawson at ad-holdings dot co dot uk
2004-01-29 12:12 ` [Bug c/13920] " klawson at ad-holdings dot co dot uk
2004-01-29 12:30 ` klawson at ad-holdings dot co dot uk
2004-01-29 15:48 ` pinskia at gcc dot gnu dot org
2004-02-02 11:46 ` klawson at ad-holdings dot co dot uk
2004-02-02 14:34 ` pinskia at gcc dot gnu dot 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).