public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32472]  New: ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter
@ 2007-06-23 13:38 burnus at gcc dot gnu dot org
  2007-06-23 13:47 ` [Bug fortran/32472] " dfranke at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-23 13:38 UTC (permalink / raw)
  To: gcc-bugs

r.f90:1: internal compiler error: in gfc_conv_string_init, at
fortran/trans-const.c:106
(4.3.0 20070623, x86_64-unknown-linux-gnu)

This is
  gcc_assert (expr->expr_type == EXPR_CONSTANT);

Test case:
CHARACTER(len=1025) :: string2 = repeat('?',1025)
print *, string2
end

If one uses PARAMETER or a separate line (i.e. no initialization expression)
then it works.


-- 
           Summary: ICE in trans-const.c:106 for REPEAT initialization
                    expression of non-parameter
           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=32472


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

* [Bug fortran/32472] ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter
  2007-06-23 13:38 [Bug fortran/32472] New: ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter burnus at gcc dot gnu dot org
@ 2007-06-23 13:47 ` dfranke at gcc dot gnu dot org
  2007-06-23 21:13 ` pault at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-06-23 13:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dfranke at gcc dot gnu dot org  2007-06-23 13:47 -------
I think this is parsed as a statement function. 
For something similar, I once got messages as: expected character but got
procedure. 

Couldn't find time to investigate further, though :(


-- 


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


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

* [Bug fortran/32472] ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter
  2007-06-23 13:38 [Bug fortran/32472] New: ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter burnus at gcc dot gnu dot org
  2007-06-23 13:47 ` [Bug fortran/32472] " dfranke at gcc dot gnu dot org
@ 2007-06-23 21:13 ` pault at gcc dot gnu dot org
  2007-06-25 14:51 ` pault at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-23 21:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pault at gcc dot gnu dot org  2007-06-23 21:13 -------
(In reply to comment #1)

It's wierd - this works fine:

Character(1), parameter :: query = "?"
CHARACTER(len=1025) :: string2 = repeat(query,1025)
print *, string2
end

Paul


-- 


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


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

* [Bug fortran/32472] ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter
  2007-06-23 13:38 [Bug fortran/32472] New: ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter burnus at gcc dot gnu dot org
  2007-06-23 13:47 ` [Bug fortran/32472] " dfranke at gcc dot gnu dot org
  2007-06-23 21:13 ` pault at gcc dot gnu dot org
@ 2007-06-25 14:51 ` pault at gcc dot gnu dot org
  2007-06-26  9:48 ` pault at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-25 14:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pault at gcc dot gnu dot org  2007-06-25 14:51 -------
I have a fix for this that needs a bit of cleaning up - will submit tonight.

For some reason, gfc_simplify_repeat denies even the possibility of character
literal arguments - it's not even a question of a failing attempt to deal with
them:-)

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|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-06-25 14:51:48
               date|                            |


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


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

* [Bug fortran/32472] ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter
  2007-06-23 13:38 [Bug fortran/32472] New: ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-06-25 14:51 ` pault at gcc dot gnu dot org
@ 2007-06-26  9:48 ` pault at gcc dot gnu dot org
  2007-06-30 13:08 ` 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 @ 2007-06-26  9:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pault at gcc dot gnu dot org  2007-06-26 09:48 -------
(In reply to comment #3)
> I have a fix for this that needs a bit of cleaning up - will submit tonight.
> For some reason, gfc_simplify_repeat denies even the possibility of character
> literal arguments - it's not even a question of a failing attempt to deal with
> them:-)

OK - the patch did not regtest but the principle is established:  I know how to
fix it and need to get the details of the interface to existing code right.

Paul


-- 


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


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

* [Bug fortran/32472] ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter
  2007-06-23 13:38 [Bug fortran/32472] New: ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-06-26  9:48 ` pault at gcc dot gnu dot org
@ 2007-06-30 13:08 ` pault at gcc dot gnu dot org
  2007-06-30 13:09 ` pault at gcc dot gnu dot org
  2007-06-30 15:11 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-30 13:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pault at gcc dot gnu dot org  2007-06-30 13:08 -------
Subject: Bug 32472

Author: pault
Date: Sat Jun 30 13:08:19 2007
New Revision: 126147

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126147
Log:
2007-06-30  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/32472
        * simplify.c (gfc_simplify_repeat): Add handling of character
        literal for first argument.

2007-06-30  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/30284
        * gfortran.dg/repeat_f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/repeat_5.f90
Modified:
    trunk/gcc/fortran/simplify.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/32472] ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter
  2007-06-23 13:38 [Bug fortran/32472] New: ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter burnus at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-06-30 13:08 ` pault at gcc dot gnu dot org
@ 2007-06-30 13:09 ` pault at gcc dot gnu dot org
  2007-06-30 15:11 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-30 13:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pault at gcc dot gnu dot org  2007-06-30 13:09 -------
Subject: Bug 32472

Author: pault
Date: Sat Jun 30 13:09:14 2007
New Revision: 126148

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126148
Log:
2007-06-30  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/32472
        * simplify.c (gfc_simplify_repeat): Add handling of character
        literal for first argument.

2007-06-30  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/30284
        * gfortran.dg/repeat_f90: New test.

Modified:
    trunk/gcc/fortran/ChangeLog


-- 


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


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

* [Bug fortran/32472] ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter
  2007-06-23 13:38 [Bug fortran/32472] New: ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter burnus at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-06-30 13:09 ` pault at gcc dot gnu dot org
@ 2007-06-30 15:11 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-06-30 15:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pault at gcc dot gnu dot org  2007-06-30 15:11 -------
This, I seem to think is.... well, fixed on trunk.

Thanks for the report, Tibias.

Paul


-- 

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=32472


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

end of thread, other threads:[~2007-06-30 15:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-23 13:38 [Bug fortran/32472] New: ICE in trans-const.c:106 for REPEAT initialization expression of non-parameter burnus at gcc dot gnu dot org
2007-06-23 13:47 ` [Bug fortran/32472] " dfranke at gcc dot gnu dot org
2007-06-23 21:13 ` pault at gcc dot gnu dot org
2007-06-25 14:51 ` pault at gcc dot gnu dot org
2007-06-26  9:48 ` pault at gcc dot gnu dot org
2007-06-30 13:08 ` pault at gcc dot gnu dot org
2007-06-30 13:09 ` pault at gcc dot gnu dot org
2007-06-30 15:11 ` 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).