public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31194]  New: NaN transfer -  internal compiler error: in gfc_conv_constant
@ 2007-03-16  9:11 burnus at gcc dot gnu dot org
  2007-03-16  9:35 ` [Bug fortran/31194] " burnus at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-03-16  9:11 UTC (permalink / raw)
  To: gcc-bugs

ICE on valid code. Might be related to PR 18769.
Taken from PR 29471 comment 5.

  real(kind(0d0)) :: NaN = transfer(ishft(int(z'FFF80000',8),32),0d0)
  print *, NaN
  end

gives:

foo.f90:1: internal compiler error: in gfc_conv_constant, at
fortran/trans-const.c:348


-- 
           Summary: NaN transfer -  internal compiler error: in
                    gfc_conv_constant
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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

* [Bug fortran/31194] NaN transfer -  internal compiler error: in gfc_conv_constant
  2007-03-16  9:11 [Bug fortran/31194] New: NaN transfer - internal compiler error: in gfc_conv_constant burnus at gcc dot gnu dot org
@ 2007-03-16  9:35 ` burnus at gcc dot gnu dot org
  2007-03-16 20:24 ` fxcoudert at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-03-16  9:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2007-03-16 09:34 -------
I'm not anymore sure whether it is valid or not.

Related:
   NaN = transfer(ishft(int(z'FFF80000',8),32),0.0_8)
this prints duly "NaN" with NAG f95, sunf95, ifort, g95 and gfortran.

The example of comment 0 prints NaN with g95 and sunf95, ifort prints "0.0"
(???) and NAG f95 rejects it with:
Error: foo.f90, line 1: INT of non-integer not permitted in an initialisation
expression
which somehow looks strange.


-- 


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


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

* [Bug fortran/31194] NaN transfer -  internal compiler error: in gfc_conv_constant
  2007-03-16  9:11 [Bug fortran/31194] New: NaN transfer - internal compiler error: in gfc_conv_constant burnus at gcc dot gnu dot org
  2007-03-16  9:35 ` [Bug fortran/31194] " burnus at gcc dot gnu dot org
@ 2007-03-16 20:24 ` fxcoudert at gcc dot gnu dot org
  2007-04-06 22:00 ` brooks at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-03-16 20:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from fxcoudert at gcc dot gnu dot org  2007-03-16 20:24 -------
Yet another transfer bug :(

Reduced testcase:
  real :: NaN = transfer(0,0)
  print *, NaN
  end

Backtrace of the ICE:
Breakpoint 1, gfc_conv_constant (se=0xbf8f8fbc, expr=0x888dad8)
    at ../../../trunk/gcc/fortran/trans-const.c:348
348       gcc_assert (expr->expr_type == EXPR_CONSTANT);
(gdb) where
#0  gfc_conv_constant (se=0xbf8f8fbc, expr=0x888dad8)
    at ../../../trunk/gcc/fortran/trans-const.c:348
#1  0x080cf2f9 in gfc_conv_initializer (expr=0x888dad8, ts=0x888df00, 
    type=0xb7c9fa90, array=0 '\0', pointer=0 '\0')
    at ../../../trunk/gcc/fortran/trans-expr.c:2723
#2  0x080c672a in gfc_get_symbol_decl (sym=0x888def0)
    at ../../../trunk/gcc/fortran/trans-decl.c:1018
#3  0x080c6c78 in generate_local_decl (sym=0x888def0)
    at ../../../trunk/gcc/fortran/trans-decl.c:2985


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |4.1.3 4.2.0 4.3.0
   Last reconfirmed|0000-00-00 00:00:00         |2007-03-16 20:24:20
               date|                            |


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


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

* [Bug fortran/31194] NaN transfer -  internal compiler error: in gfc_conv_constant
  2007-03-16  9:11 [Bug fortran/31194] New: NaN transfer - internal compiler error: in gfc_conv_constant burnus at gcc dot gnu dot org
  2007-03-16  9:35 ` [Bug fortran/31194] " burnus at gcc dot gnu dot org
  2007-03-16 20:24 ` fxcoudert at gcc dot gnu dot org
@ 2007-04-06 22:00 ` brooks at gcc dot gnu dot org
  2007-05-16  5:41 ` pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: brooks at gcc dot gnu dot org @ 2007-04-06 22:00 UTC (permalink / raw)
  To: gcc-bugs



-- 

brooks at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |brooks at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-03-16 20:24:20         |2007-04-06 23:00:09
               date|                            |


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


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

* [Bug fortran/31194] NaN transfer -  internal compiler error: in gfc_conv_constant
  2007-03-16  9:11 [Bug fortran/31194] New: NaN transfer - internal compiler error: in gfc_conv_constant burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-04-06 22:00 ` brooks at gcc dot gnu dot org
@ 2007-05-16  5:41 ` pault at gcc dot gnu dot org
  2007-05-16  8:13 ` pault at gcc dot gnu dot org
  2007-05-26  3:08 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-05-16  5:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pault at gcc dot gnu dot org  2007-05-16 06:41 -------
Subject: Bug 31194

Author: pault
Date: Wed May 16 05:40:51 2007
New Revision: 124759

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124759
Log:
2007-05-16  Brooks Moses  <brooks.moses@codesourcery.com>

        PR fortran/18769
        PR fortran/30881
        PR fortran/31194
        PR fortran/31216
        PR fortran/31427
        * target-memory.c: New file.
        * target-memory.h: New file.
        * simplify.c: Add #include "target-memory.h".
        (gfc_simplify_transfer): Implement constant-
        folding for TRANSFER intrinsic.
        * Make-lang.in: Add dependencies on new target-memory.* files.

2007-05-16  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/18769
        PR fortran/30881
        PR fortran/31194
        PR fortran/31216
        PR fortran/31427
        * transfer_simplify_1.f90: New test.
        * transfer_simplify_2.f90: New test.

Added:
    trunk/gcc/fortran/target-memory.c
    trunk/gcc/fortran/target-memory.h
    trunk/gcc/testsuite/gfortran.dg/transfer_simplify_1.f90
    trunk/gcc/testsuite/gfortran.dg/transfer_simplify_2.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/Make-lang.in
    trunk/gcc/fortran/simplify.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/31194] NaN transfer -  internal compiler error: in gfc_conv_constant
  2007-03-16  9:11 [Bug fortran/31194] New: NaN transfer - internal compiler error: in gfc_conv_constant burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-05-16  5:41 ` pault at gcc dot gnu dot org
@ 2007-05-16  8:13 ` pault at gcc dot gnu dot org
  2007-05-26  3:08 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-05-16  8:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pault at gcc dot gnu dot org  2007-05-16 09:13 -------
Fixed on trunk

Paul and Brooks


-- 

pault at gcc dot gnu dot org changed:

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


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


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

* [Bug fortran/31194] NaN transfer -  internal compiler error: in gfc_conv_constant
  2007-03-16  9:11 [Bug fortran/31194] New: NaN transfer - internal compiler error: in gfc_conv_constant burnus at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-05-16  8:13 ` pault at gcc dot gnu dot org
@ 2007-05-26  3:08 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-26  3:08 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.0


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


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

end of thread, other threads:[~2007-05-26  3:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-16  9:11 [Bug fortran/31194] New: NaN transfer - internal compiler error: in gfc_conv_constant burnus at gcc dot gnu dot org
2007-03-16  9:35 ` [Bug fortran/31194] " burnus at gcc dot gnu dot org
2007-03-16 20:24 ` fxcoudert at gcc dot gnu dot org
2007-04-06 22:00 ` brooks at gcc dot gnu dot org
2007-05-16  5:41 ` pault at gcc dot gnu dot org
2007-05-16  8:13 ` pault at gcc dot gnu dot org
2007-05-26  3:08 ` 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).