public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/52140] New: ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu).
@ 2012-02-06 20:45 rsa at us dot ibm.com
  2012-02-06 20:46 ` [Bug c/52140] " rsa at us dot ibm.com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: rsa at us dot ibm.com @ 2012-02-06 20:45 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52140
           Summary: ICE in Libdfp testcase when compiled with soft-dfp (no
                    -mcpu).
    Classification: Unclassified
           Product: gcc
           Version: 4.5.4
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rsa@us.ibm.com


The following Libdfp test-case produces an ICE on PowerPC when compiled w/o
-mcpu (implies soft-dfp) and -O1 or greater optimization:

#ifndef __STDC_WANT_DEC_FP__
#define __STDC_WANT_DEC_FP__
#endif

int
foo (_Decimal64 x, _Decimal64 y)
{
  /* This is known to cause a GCC ICE when libdfp is compiled w/o -mcpu and -O1
     optimization level or greater.  */
  return (x < y) || (x > y);
}

int main(void)
{
  int ret = -1;
  _Decimal64 a = 12.45DD;
  _Decimal64 b = 12.43DD;
  ret = foo (a,b);
  return 0;
}

/opt/at4.0/bin/gcc -v:
Using built-in specs.
COLLECT_GCC=/opt/at4.0/bin/gcc
COLLECT_LTO_WRAPPER=/opt/at4.0/libexec/gcc/powerpc64-linux/4.5.4/lto-wrapper
Target: powerpc64-linux
Configured with: /home/cseo/at4.0/at4.0-5/src/gcc/configure
--build=powerpc64-linux --host=powerpc64-linux --target=powerpc64-linux
--with-cpu=default64 --prefix=/opt/at4.0 --with-long-double-128
--enable-decimal-float --enable-secureplt --enable-threads=posix
--enable-languages=c,c++,fortran --enable-__cxa_atexit --enable-shared
--enable-checking --enable-lto --enable-gnu-indirect-function
--with-gmp-include=/opt/at4.0/include --with-gmp-lib=/opt/at4.0/lib64
--with-mpfr-include=/opt/at4.0/include --with-mpfr-lib=/opt/at4.0/lib64
--with-mpc-include=/opt/at4.0/include --with-mpc-lib=/opt/at4.0/lib64
--with-ppl-include=/opt/at4.0/include --with-ppl-lib=/opt/at4.0/lib64
--with-cloog-include=/opt/at4.0/include --with-cloog-lib=/opt/at4.0/lib64
--with-libelf-include=/opt/at4.0/include --with-libelf-lib=/opt/at4.0/lib64
--with-host-libstdcxx='-L/opt/at4.0/lib64 -lstdc++ -lsupc++ -lppl -lppl_c -lpwl
-lgmp -lgmpxx' --with-cpu=power4 --with-tune=power6
Thread model: posix
gcc version 4.5.4 20110524 (Advance-Toolchain-4.0-5) [ibm/gcc-4_5-branch
revision 179810] (GCC)


/opt/at4.0/bin/gcc  -DSHARED -O2 -fpic -g -m32   -c ../tests/test-GCC-PR.c
-D__STDC_DEC_FP__=200704L -D__STDC_WANT_DEC_FP__=1
-DOPTION_EGLIBC_LOCALE_CODE=1 -D_POSIX_C_SOURCE=200809L -std=gnu99
-D_SVID_SOURCE -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute
-Wno-long-long -include ../include/libdfp-symbols.h -include ./config.h 
-I../include  -I../dfp  -I../dfp/decimal  -I../libdecnumber/dpd 
-I../libdecnumber  -I../sysdeps/powerpc/powerpc32 
-I../sysdeps/powerpc/fpu/bits  -I../sysdeps/powerpc/fpu  -I../sysdeps/powerpc 
-I../sysdeps/soft-dfp/dpd  -I../sysdeps/soft-dfp  -I../sysdeps/dpd 
-I../decNumberMath/  -I../ieee754/  -I../base-math/  -I..  -I.  -o
test-GCC-PR.os
../tests/test-GCC-PR.c:30:1: warning: no previous prototype for 'foo'
../tests/test-GCC-PR.c: In function 'foo':
../tests/test-GCC-PR.c:34:3: internal compiler error: in prepare_float_lib_cmp,
at optabs.c:4414

I've attached the test-GCC-PR.i and test-GCC-PR.s files generated with
--save-temps.


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

* [Bug c/52140] ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu).
  2012-02-06 20:45 [Bug c/52140] New: ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu) rsa at us dot ibm.com
@ 2012-02-06 20:46 ` rsa at us dot ibm.com
  2012-02-06 20:46 ` rsa at us dot ibm.com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rsa at us dot ibm.com @ 2012-02-06 20:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Ryan S. Arnold <rsa at us dot ibm.com> 2012-02-06 20:46:34 UTC ---
Created attachment 26590
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26590
Preprocessed .s file


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

* [Bug c/52140] ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu).
  2012-02-06 20:45 [Bug c/52140] New: ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu) rsa at us dot ibm.com
  2012-02-06 20:46 ` [Bug c/52140] " rsa at us dot ibm.com
@ 2012-02-06 20:46 ` rsa at us dot ibm.com
  2012-02-06 20:48 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rsa at us dot ibm.com @ 2012-02-06 20:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Ryan S. Arnold <rsa at us dot ibm.com> 2012-02-06 20:46:00 UTC ---
Created attachment 26589
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26589
preprocessed .i file


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

* [Bug c/52140] ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu).
  2012-02-06 20:45 [Bug c/52140] New: ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu) rsa at us dot ibm.com
  2012-02-06 20:46 ` [Bug c/52140] " rsa at us dot ibm.com
  2012-02-06 20:46 ` rsa at us dot ibm.com
@ 2012-02-06 20:48 ` pinskia at gcc dot gnu.org
  2012-02-06 20:51 ` [Bug middle-end/52140] Libdfp testcase encounters ICE " rsa at us dot ibm.com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-02-06 20:48 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-06 20:47:54 UTC ---
Have you tried an FSF released 4.6.2?


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

* [Bug middle-end/52140] Libdfp testcase encounters ICE when compiled with soft-dfp (no -mcpu).
  2012-02-06 20:45 [Bug c/52140] New: ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu) rsa at us dot ibm.com
                   ` (2 preceding siblings ...)
  2012-02-06 20:48 ` pinskia at gcc dot gnu.org
@ 2012-02-06 20:51 ` rsa at us dot ibm.com
  2012-02-08 16:45 ` bergner at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rsa at us dot ibm.com @ 2012-02-06 20:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Ryan S. Arnold <rsa at us dot ibm.com> 2012-02-06 20:51:01 UTC ---
(In reply to comment #3)
> Have you tried an FSF released 4.6.2?

This also fails in the same way with:

gcc version 4.6.3 20111209 (Advance-Toolchain-5.0-2) [ibm/gcc-4_6-branch
revision 182176] (GCC)

Bergner said that he'd take a look.


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

* [Bug middle-end/52140] Libdfp testcase encounters ICE when compiled with soft-dfp (no -mcpu).
  2012-02-06 20:45 [Bug c/52140] New: ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu) rsa at us dot ibm.com
                   ` (3 preceding siblings ...)
  2012-02-06 20:51 ` [Bug middle-end/52140] Libdfp testcase encounters ICE " rsa at us dot ibm.com
@ 2012-02-08 16:45 ` bergner at gcc dot gnu.org
  2012-02-09 14:46 ` bergner at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: bergner at gcc dot gnu.org @ 2012-02-08 16:45 UTC (permalink / raw)
  To: gcc-bugs

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

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-02-08
     Ever Confirmed|0                           |1

--- Comment #5 from Peter Bergner <bergner at gcc dot gnu.org> 2012-02-08 16:44:05 UTC ---
I have a fix in testing.


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

* [Bug middle-end/52140] Libdfp testcase encounters ICE when compiled with soft-dfp (no -mcpu).
  2012-02-06 20:45 [Bug c/52140] New: ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu) rsa at us dot ibm.com
                   ` (4 preceding siblings ...)
  2012-02-08 16:45 ` bergner at gcc dot gnu.org
@ 2012-02-09 14:46 ` bergner at gcc dot gnu.org
  2012-02-09 14:56 ` bergner at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: bergner at gcc dot gnu.org @ 2012-02-09 14:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Peter Bergner <bergner at gcc dot gnu.org> 2012-02-09 14:46:07 UTC ---
Author: bergner
Date: Thu Feb  9 14:46:02 2012
New Revision: 184045

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184045
Log:
gcc/
    PR middle-end/52140
    * dojump.c (do_compare_rtx_and_jump): Use SCALAR_FLOAT_MODE_P.

gcc/testsuite/
    PR middle-end/52140
    * gcc.dg/dfp/pr52140.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/dfp/pr52140.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dojump.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug middle-end/52140] Libdfp testcase encounters ICE when compiled with soft-dfp (no -mcpu).
  2012-02-06 20:45 [Bug c/52140] New: ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu) rsa at us dot ibm.com
                   ` (5 preceding siblings ...)
  2012-02-09 14:46 ` bergner at gcc dot gnu.org
@ 2012-02-09 14:56 ` bergner at gcc dot gnu.org
  2012-02-09 15:00 ` bergner at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: bergner at gcc dot gnu.org @ 2012-02-09 14:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Peter Bergner <bergner at gcc dot gnu.org> 2012-02-09 14:56:03 UTC ---
Author: bergner
Date: Thu Feb  9 14:55:57 2012
New Revision: 184046

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184046
Log:
    Backport from mainline 
    2012-02-09  Peter Bergner  <bergner@vnet.ibm.com>

gcc/
    PR middle-end/52140
    * dojump.c (do_compare_rtx_and_jump): Use SCALAR_FLOAT_MODE_P.

gcc/testsuite/
    PR middle-end/52140
    * gcc.dg/dfp/pr52140.c: New test.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/dfp/pr52140.c
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/dojump.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


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

* [Bug middle-end/52140] Libdfp testcase encounters ICE when compiled with soft-dfp (no -mcpu).
  2012-02-06 20:45 [Bug c/52140] New: ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu) rsa at us dot ibm.com
                   ` (6 preceding siblings ...)
  2012-02-09 14:56 ` bergner at gcc dot gnu.org
@ 2012-02-09 15:00 ` bergner at gcc dot gnu.org
  2012-02-09 15:05 ` bergner at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: bergner at gcc dot gnu.org @ 2012-02-09 15:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Peter Bergner <bergner at gcc dot gnu.org> 2012-02-09 14:59:51 UTC ---
Author: bergner
Date: Thu Feb  9 14:59:46 2012
New Revision: 184047

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184047
Log:
    Backport from mainline 
    2012-02-09  Peter Bergner  <bergner@vnet.ibm.com>

gcc/
    PR middle-end/52140
    * dojump.c (do_compare_rtx_and_jump): Use SCALAR_FLOAT_MODE_P.

gcc/testsuite/
    PR middle-end/52140
    * gcc.dg/dfp/pr52140.c: New test.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/dfp/pr52140.c
Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/dojump.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


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

* [Bug middle-end/52140] Libdfp testcase encounters ICE when compiled with soft-dfp (no -mcpu).
  2012-02-06 20:45 [Bug c/52140] New: ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu) rsa at us dot ibm.com
                   ` (7 preceding siblings ...)
  2012-02-09 15:00 ` bergner at gcc dot gnu.org
@ 2012-02-09 15:05 ` bergner at gcc dot gnu.org
  2012-02-09 15:08 ` bergner at gcc dot gnu.org
  2012-02-09 15:08 ` bergner at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: bergner at gcc dot gnu.org @ 2012-02-09 15:05 UTC (permalink / raw)
  To: gcc-bugs

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

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #9 from Peter Bergner <bergner at gcc dot gnu.org> 2012-02-09 15:05:08 UTC ---
Fixed on trunk and the 4.6 and 4.5 branches.


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

* [Bug middle-end/52140] Libdfp testcase encounters ICE when compiled with soft-dfp (no -mcpu).
  2012-02-06 20:45 [Bug c/52140] New: ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu) rsa at us dot ibm.com
                   ` (9 preceding siblings ...)
  2012-02-09 15:08 ` bergner at gcc dot gnu.org
@ 2012-02-09 15:08 ` bergner at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: bergner at gcc dot gnu.org @ 2012-02-09 15:08 UTC (permalink / raw)
  To: gcc-bugs

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

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0


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

* [Bug middle-end/52140] Libdfp testcase encounters ICE when compiled with soft-dfp (no -mcpu).
  2012-02-06 20:45 [Bug c/52140] New: ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu) rsa at us dot ibm.com
                   ` (8 preceding siblings ...)
  2012-02-09 15:05 ` bergner at gcc dot gnu.org
@ 2012-02-09 15:08 ` bergner at gcc dot gnu.org
  2012-02-09 15:08 ` bergner at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: bergner at gcc dot gnu.org @ 2012-02-09 15:08 UTC (permalink / raw)
  To: gcc-bugs

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

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

--- Comment #10 from Peter Bergner <bergner at gcc dot gnu.org> 2012-02-09 15:08:03 UTC ---
Closing as fixed


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

end of thread, other threads:[~2012-02-09 15:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-06 20:45 [Bug c/52140] New: ICE in Libdfp testcase when compiled with soft-dfp (no -mcpu) rsa at us dot ibm.com
2012-02-06 20:46 ` [Bug c/52140] " rsa at us dot ibm.com
2012-02-06 20:46 ` rsa at us dot ibm.com
2012-02-06 20:48 ` pinskia at gcc dot gnu.org
2012-02-06 20:51 ` [Bug middle-end/52140] Libdfp testcase encounters ICE " rsa at us dot ibm.com
2012-02-08 16:45 ` bergner at gcc dot gnu.org
2012-02-09 14:46 ` bergner at gcc dot gnu.org
2012-02-09 14:56 ` bergner at gcc dot gnu.org
2012-02-09 15:00 ` bergner at gcc dot gnu.org
2012-02-09 15:05 ` bergner at gcc dot gnu.org
2012-02-09 15:08 ` bergner at gcc dot gnu.org
2012-02-09 15:08 ` bergner 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).