public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/40875]  New: ICE with illegal type conversion
@ 2009-07-27 15:50 michael dot a dot richmond at nasa dot gov
  2009-08-03 17:01 ` [Bug fortran/40875] " pault at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: michael dot a dot richmond at nasa dot gov @ 2009-07-27 15:50 UTC (permalink / raw)
  To: gcc-bugs

When I compile the module listed below with gfortran 4.5 I get the message:

f951: internal compiler error: in gfc_set_constant_character_len, at
fortran/decl.c:1112
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

gfortran 4.2, 4.3, and 4.4 produce similar messages. g95 produces the message:

In file crash.f90:6

      CHARACTER, PARAMETER :: the_beta = (/one_parameter('c')/)
                                           1
Error: Can't convert TYPE(one_parameter) to CHARACTER(1) at (1)

    MODULE cdf_aux_mod
      PUBLIC
      TYPE :: one_parameter
        CHARACTER :: name
      END TYPE one_parameter
      CHARACTER, PARAMETER :: the_beta = (/one_parameter('c')/)
    END MODULE cdf_aux_mod


-- 
           Summary: ICE with illegal type conversion
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: michael dot a dot richmond at nasa dot gov


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


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

* [Bug fortran/40875] ICE with illegal type conversion
  2009-07-27 15:50 [Bug fortran/40875] New: ICE with illegal type conversion michael dot a dot richmond at nasa dot gov
@ 2009-08-03 17:01 ` pault at gcc dot gnu dot org
  2009-08-03 21:14 ` burnus at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-08-03 17:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pault at gcc dot gnu dot org  2009-08-03 17:01 -------
Michael,

Thanks for the catch - it's confirmed.

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-08-03 17:01:40
               date|                            |


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


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

* [Bug fortran/40875] ICE with illegal type conversion
  2009-07-27 15:50 [Bug fortran/40875] New: ICE with illegal type conversion michael dot a dot richmond at nasa dot gov
  2009-08-03 17:01 ` [Bug fortran/40875] " pault at gcc dot gnu dot org
@ 2009-08-03 21:14 ` burnus at gcc dot gnu dot org
  2009-08-03 21:16 ` burnus at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-03 21:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2009-08-03 21:14 -------
See also:
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/eb7ca487876d9420


-- 


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


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

* [Bug fortran/40875] ICE with illegal type conversion
  2009-07-27 15:50 [Bug fortran/40875] New: ICE with illegal type conversion michael dot a dot richmond at nasa dot gov
  2009-08-03 17:01 ` [Bug fortran/40875] " pault at gcc dot gnu dot org
  2009-08-03 21:14 ` burnus at gcc dot gnu dot org
@ 2009-08-03 21:16 ` burnus at gcc dot gnu dot org
  2009-08-04 11:15 ` pault at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-03 21:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from burnus at gcc dot gnu dot org  2009-08-03 21:16 -------
(In reply to comment #2)
> See also: [...]
Mis-pasted. That should go to PR 40955 - sorry for the spam.


-- 


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


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

* [Bug fortran/40875] ICE with illegal type conversion
  2009-07-27 15:50 [Bug fortran/40875] New: ICE with illegal type conversion michael dot a dot richmond at nasa dot gov
                   ` (2 preceding siblings ...)
  2009-08-03 21:16 ` burnus at gcc dot gnu dot org
@ 2009-08-04 11:15 ` pault at gcc dot gnu dot org
  2009-08-04 12:55 ` pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-08-04 11:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pault at gcc dot gnu dot org  2009-08-04 11:14 -------
I am going to apply this, together with testcase, as obvious:

Index: gcc/fortran/decl.c
===================================================================
--- gcc/fortran/decl.c  (revision 150404)
+++ gcc/fortran/decl.c  (working copy)
@@ -1256,6 +1256,9 @@
       if (sym->ts.type == BT_CHARACTER && sym->ts.cl)
        {
          /* Update symbol character length according initializer.  */
+         if (gfc_check_assign_symbol (sym, init) == FAILURE)
+           return FAILURE;
+
          if (sym->ts.cl->length == NULL)
            {
              int clen;

Cheers

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-08-03 17:01:40         |2009-08-04 11:14:55
               date|                            |


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


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

* [Bug fortran/40875] ICE with illegal type conversion
  2009-07-27 15:50 [Bug fortran/40875] New: ICE with illegal type conversion michael dot a dot richmond at nasa dot gov
                   ` (3 preceding siblings ...)
  2009-08-04 11:15 ` pault at gcc dot gnu dot org
@ 2009-08-04 12:55 ` pault at gcc dot gnu dot org
  2010-05-07 19:53 ` dfranke at gcc dot gnu dot org
  2010-05-08 14:02 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-08-04 12:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pault at gcc dot gnu dot org  2009-08-04 12:53 -------
Subject: Bug 40875

Author: pault
Date: Tue Aug  4 12:41:08 2009
New Revision: 150454

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150454
Log:
2009-08-04  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/40875
        * decl.c (add_init_expr_to_sym): Character symbols can only be
        initialized with character expressions.

2009-08-04  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/40875
        * gfortran.dg/initialization_23.f90 : New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/initialization_23.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/40875] ICE with illegal type conversion
  2009-07-27 15:50 [Bug fortran/40875] New: ICE with illegal type conversion michael dot a dot richmond at nasa dot gov
                   ` (4 preceding siblings ...)
  2009-08-04 12:55 ` pault at gcc dot gnu dot org
@ 2010-05-07 19:53 ` dfranke at gcc dot gnu dot org
  2010-05-08 14:02 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-07 19:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dfranke at gcc dot gnu dot org  2010-05-07 19:53 -------
Paul, this PR seems to be fixed. Can it be closed?


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING


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


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

* [Bug fortran/40875] ICE with illegal type conversion
  2009-07-27 15:50 [Bug fortran/40875] New: ICE with illegal type conversion michael dot a dot richmond at nasa dot gov
                   ` (5 preceding siblings ...)
  2010-05-07 19:53 ` dfranke at gcc dot gnu dot org
@ 2010-05-08 14:02 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2010-05-08 14:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pault at gcc dot gnu dot org  2010-05-08 14:02 -------
(In reply to comment #6)
> Paul, this PR seems to be fixed. Can it be closed?
> 
Yes.  I said on the list that I would not backport, unless asked, and then
waited.... :-)

Thanks for jogging my memory.

Pau;


-- 

pault at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2010-05-08 14:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-27 15:50 [Bug fortran/40875] New: ICE with illegal type conversion michael dot a dot richmond at nasa dot gov
2009-08-03 17:01 ` [Bug fortran/40875] " pault at gcc dot gnu dot org
2009-08-03 21:14 ` burnus at gcc dot gnu dot org
2009-08-03 21:16 ` burnus at gcc dot gnu dot org
2009-08-04 11:15 ` pault at gcc dot gnu dot org
2009-08-04 12:55 ` pault at gcc dot gnu dot org
2010-05-07 19:53 ` dfranke at gcc dot gnu dot org
2010-05-08 14:02 ` pault 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).