public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/28202]  New: ARM cross-compiler seg. fault with -mfpu=vfp and optimization
@ 2006-06-29 16:07 clifford dot slocombe at dyson dot com
  2006-06-29 16:08 ` [Bug c/28202] " clifford dot slocombe at dyson dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: clifford dot slocombe at dyson dot com @ 2006-06-29 16:07 UTC (permalink / raw)
  To: gcc-bugs

Version info:
------------------
E:\vfpfault>arm-elf-gcc -v
Using built-in specs.
Target: arm-elf
Configured with: ../../gcc-4.0.2/configure --enable-languages=c,c++
--enable-interwork --enable-multilib --with-gcc --with-gnu-ld --with-gnu-as
--with-stabs --disable-shared --disable-threads --disable-win32-registry
--disable-nls --target=arm-elf --with-newlib --prefix=c:/WinARM -v
Thread model: single
gcc version 4.0.2 (WinARM)
------------------

Compile log:
------------------
E:\vfpfault>arm-elf-gcc -c -O2 -mfpu=vfp -mfloat-abi=softfp test.c
test.c: In function 'test':
test.c:4: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
------------------

Code to reproduce error (test.c)
------------------
double test( double x )           // Line 1
{                                 // Line 2
  return (x >= 0 ? 0 : -1.0);     // Line 3
}                                 // Line 4 - error reproted here.

-EOF--------------

I originally encountered this bug in code written to evaluate the performance
of the Philips LPC3180 microcontroller (which has VFP hardware) and GCC. The
error went away when I modified the code. I then encountered it again when
attempting to rebuild Newlib-1.14.0 for VFP support, where it occurred in
mathfp/s_floor.c. The code presented here is derived from the newlib code by
cutting it down to the smallest code possible that reproduces the error and
with no dependencies.

The error occurs also when line 3 is replaced with the following:

return( x >= 0 ) ;
return( x <= 0 ) ;
return( x > 0 ) ;
return( x < 0 ) ;

Although in all four of the above, if the return type is changed to int, it
does not fail.

In all cases if -mfpu=vfp or the -Ox option is removed, the error does not
occur.

The error occurs for all of -Os, -O1, -O2, -O3, (but not -O0).

The test platform details for the test were:
Windows XP Pro SP2
HP Compaq nx8220 Laptop, Pentium M 2.0GHz, 1Gb RAM

Note that the compiler used was a native Win32 build and not a Cygwin dependant
or Linux hosted build.


-- 
           Summary: ARM cross-compiler seg. fault with -mfpu=vfp and
                    optimization
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: clifford dot slocombe at dyson dot com


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


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

* [Bug c/28202] ARM cross-compiler seg. fault with -mfpu=vfp and optimization
  2006-06-29 16:07 [Bug c/28202] New: ARM cross-compiler seg. fault with -mfpu=vfp and optimization clifford dot slocombe at dyson dot com
@ 2006-06-29 16:08 ` clifford dot slocombe at dyson dot com
  2006-06-29 17:05 ` [Bug target/28202] " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: clifford dot slocombe at dyson dot com @ 2006-06-29 16:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from clifford dot slocombe at dyson dot com  2006-06-29 16:06 -------
The line "The error occurs also when line 3 is replaced with the following:"
should read "The error occurs also when line 3 is replaced with either of the
following:"

Clifford


-- 


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


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

* [Bug target/28202] ARM cross-compiler seg. fault with -mfpu=vfp and optimization
  2006-06-29 16:07 [Bug c/28202] New: ARM cross-compiler seg. fault with -mfpu=vfp and optimization clifford dot slocombe at dyson dot com
  2006-06-29 16:08 ` [Bug c/28202] " clifford dot slocombe at dyson dot com
@ 2006-06-29 17:05 ` pinskia at gcc dot gnu dot org
  2006-06-29 19:14 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-29 17:05 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
          Component|c                           |target
           Keywords|                            |ice-on-valid-code


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


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

* [Bug target/28202] ARM cross-compiler seg. fault with -mfpu=vfp and optimization
  2006-06-29 16:07 [Bug c/28202] New: ARM cross-compiler seg. fault with -mfpu=vfp and optimization clifford dot slocombe at dyson dot com
  2006-06-29 16:08 ` [Bug c/28202] " clifford dot slocombe at dyson dot com
  2006-06-29 17:05 ` [Bug target/28202] " pinskia at gcc dot gnu dot org
@ 2006-06-29 19:14 ` pinskia at gcc dot gnu dot org
  2006-06-30 12:31 ` clifford dot slocombe at dyson dot com
  2006-06-30 12:40 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-29 19:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-06-29 19:08 -------
This works on the mainline.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.2.0


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


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

* [Bug target/28202] ARM cross-compiler seg. fault with -mfpu=vfp and optimization
  2006-06-29 16:07 [Bug c/28202] New: ARM cross-compiler seg. fault with -mfpu=vfp and optimization clifford dot slocombe at dyson dot com
                   ` (2 preceding siblings ...)
  2006-06-29 19:14 ` pinskia at gcc dot gnu dot org
@ 2006-06-30 12:31 ` clifford dot slocombe at dyson dot com
  2006-06-30 12:40 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: clifford dot slocombe at dyson dot com @ 2006-06-30 12:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from clifford dot slocombe at dyson dot com  2006-06-30 12:28 -------
I have now retested on 4.1.1 and seems good also. Thanks.

Details for reference:

$gcc -v
Using built-in specs.
Target: arm-elf
Configured with: ../../gcc-4.1.1/configure --enable-languages=c,c++
--enable-interwork --enable-multilib --with-gcc --with-gnu-ld --with-gnu-as
--with-stabs --disable-shared --disable-threads --disable-libssp
--disable-libstdcxx-pch --disable-libmudflap --disable-win32-registry
--disable-nls --disable-debug --without-headers --with-newlib --target=arm-elf
--prefix=c:/WinARM -v
Thread model: single
gcc version 4.1.1 (WinARM)


-- 


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


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

* [Bug target/28202] ARM cross-compiler seg. fault with -mfpu=vfp and optimization
  2006-06-29 16:07 [Bug c/28202] New: ARM cross-compiler seg. fault with -mfpu=vfp and optimization clifford dot slocombe at dyson dot com
                   ` (3 preceding siblings ...)
  2006-06-30 12:31 ` clifford dot slocombe at dyson dot com
@ 2006-06-30 12:40 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-30 12:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-06-30 12:31 -------
Fixed in 4.1.1 so closing as fixed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.1.1


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


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

end of thread, other threads:[~2006-06-30 12:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-29 16:07 [Bug c/28202] New: ARM cross-compiler seg. fault with -mfpu=vfp and optimization clifford dot slocombe at dyson dot com
2006-06-29 16:08 ` [Bug c/28202] " clifford dot slocombe at dyson dot com
2006-06-29 17:05 ` [Bug target/28202] " pinskia at gcc dot gnu dot org
2006-06-29 19:14 ` pinskia at gcc dot gnu dot org
2006-06-30 12:31 ` clifford dot slocombe at dyson dot com
2006-06-30 12:40 ` 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).