public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/23232] New: DATA implied DO variables
@ 2005-08-04 15:58 rofi at ya dot com
  2005-08-04 15:59 ` [Bug fortran/23232] " rofi at ya dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: rofi at ya dot com @ 2005-08-04 15:58 UTC (permalink / raw)
  To: gcc-bugs

gcc version 4.1.0 20050730 (experimental)

The following two DATA statements are rejected by gfortran because "J" is not
considered a valid primary in those expressions although it is the variable of
another enclosing data-implied-do.

 PROGRAM p
  REAL :: ONE_ARRAY(100, 100)
  INTEGER :: K, J

  DATA ((ONE_ARRAY (K, J), K = 1, J-1), J = 1, 100) /4950 * 1.0/
  DATA ((ONE_ARRAY (K, J), K = J, 100), J = 1, 100) /5050 * 0.0/
 END PROGRAM

$ gfortran -fsyntax-only snippet.f90
 In file snippet.f90:5

  DATA ((ONE_ARRAY (K, J), K = 1, J-1), J = 1, 100) /4950 * 1.0/
                                1
Error: Variable 'j' at (1) cannot appear in an initialization expression
 In file snippet.f90:6

  DATA ((ONE_ARRAY (K, J), K = J, 100), J = 1, 100) /5050 * 0.0/
                             1
Error: Variable 'j' at (1) cannot appear in an initialization expression

-- 
           Summary: DATA implied DO variables
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rofi at ya dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


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

* [Bug fortran/23232] DATA implied DO variables
  2005-08-04 15:58 [Bug fortran/23232] New: DATA implied DO variables rofi at ya dot com
@ 2005-08-04 15:59 ` rofi at ya dot com
  2005-08-16 19:22 ` tobi at gcc dot gnu dot org
  2005-09-28 13:24 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 10+ messages in thread
From: rofi at ya dot com @ 2005-08-04 15:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rofi at ya dot com  2005-08-04 15:59 -------
Created an attachment (id=9431)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9431&action=view)
Failing case with an optional commented checking part


-- 


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


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

* [Bug fortran/23232] DATA implied DO variables
  2005-08-04 15:58 [Bug fortran/23232] New: DATA implied DO variables rofi at ya dot com
  2005-08-04 15:59 ` [Bug fortran/23232] " rofi at ya dot com
@ 2005-08-16 19:22 ` tobi at gcc dot gnu dot org
  2005-09-28 13:24 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 10+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-08-16 19:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-08-16 19:20 -------
Confirmed g77. g77 accepts similar code.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-08-16 19:20:35
               date|                            |


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


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

* [Bug fortran/23232] DATA implied DO variables
  2005-08-04 15:58 [Bug fortran/23232] New: DATA implied DO variables rofi at ya dot com
  2005-08-04 15:59 ` [Bug fortran/23232] " rofi at ya dot com
  2005-08-16 19:22 ` tobi at gcc dot gnu dot org
@ 2005-09-28 13:24 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-28 13:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-28 13:24 -------
*** Bug 24100 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |federico dot carminati at
                   |                            |cern dot ch


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


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

* [Bug fortran/23232] DATA implied DO variables
       [not found] <bug-23232-11116@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2007-01-04 15:47 ` pault at gcc dot gnu dot org
@ 2007-01-05 14:46 ` pault at gcc dot gnu dot org
  5 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-01-05 14:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pault at gcc dot gnu dot org  2007-01-05 14:45 -------
Subject: Bug 23232

Author: pault
Date: Fri Jan  5 14:45:20 2007
New Revision: 120485

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

        PR fortran/23232
        * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
        functions to signal that a DATA statement is being matched.
        (gfc_match_data): Call gfc_set_in_match_data on entry and on
        exit.
        * gfortran.h : Add prototypes for above.
        * expr.c (check_init_expr): Avoid check on parameter or
        variable if gfc_in_match_data is true.
        (gfc_match_init_expr): Do not call error on non-reduction of
        expression if gfc_in_match_data is true.

        PR fortran/27996
        PR fortran/27998
        * decl.c (gfc_set_constant_character_len): Add boolean arg to
        flag array constructor resolution.  Warn if string is being
        truncated.  Standard dependent error if string is padded. Set
        new arg to false for all three calls to
        gfc_set_constant_character_len.
        * match.h : Add boolean arg to prototype for
        gfc_set_constant_character_len.
        * gfortran.h : Add warn_character_truncation to gfc_options.
        * options.c (set_Wall): Set warn_character_truncation if -Wall
        is set.
        * resolve.c (resolve_code): Warn if rhs string in character
        assignment has to be truncated.
        * array.c (gfc_resolve_character_array_constructor): Set new
        argument to true for call to gfc_set_constant_character_len.

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

        PR fortran/23232
        * gfortran.dg/data_implied_do_1.f90: New test.

        PR fortran/27996
        PR fortran/27998
        * gfortran.dg/char_length_1.f90: New test.



Added:
    trunk/gcc/testsuite/gfortran.dg/data_implied_do_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/array.c
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/match.h
    trunk/gcc/fortran/options.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/char_length_1.f90


-- 


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


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

* [Bug fortran/23232] DATA implied DO variables
       [not found] <bug-23232-11116@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2007-01-04 15:35 ` patchapp at dberlin dot org
@ 2007-01-04 15:47 ` pault at gcc dot gnu dot org
  2007-01-05 14:46 ` pault at gcc dot gnu dot org
  5 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-01-04 15:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pault at gcc dot gnu dot org  2007-01-04 15:46 -------
I have just submitted a patch.

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|2006-10-08 21:59:43         |2007-01-04 15:46:52
               date|                            |


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


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

* [Bug fortran/23232] DATA implied DO variables
       [not found] <bug-23232-11116@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-10-24 14:05 ` happydeer at gmail dot com
@ 2007-01-04 15:35 ` patchapp at dberlin dot org
  2007-01-04 15:47 ` pault at gcc dot gnu dot org
  2007-01-05 14:46 ` pault at gcc dot gnu dot org
  5 siblings, 0 replies; 10+ messages in thread
From: patchapp at dberlin dot org @ 2007-01-04 15:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from patchapp at dberlin dot org  2007-01-04 15:35 -------
Subject: Bug number PR23232

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00239.html


-- 


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


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

* [Bug fortran/23232] DATA implied DO variables
       [not found] <bug-23232-11116@http.gcc.gnu.org/bugzilla/>
  2006-10-08 21:59 ` fxcoudert at gcc dot gnu dot org
  2006-10-08 21:59 ` fxcoudert at gcc dot gnu dot org
@ 2006-10-24 14:05 ` happydeer at gmail dot com
  2007-01-04 15:35 ` patchapp at dberlin dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: happydeer at gmail dot com @ 2006-10-24 14:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from happydeer at gmail dot com  2006-10-24 14:05 -------

Fortran runtime error: Bad real number in item 1 of list input




My READ statement is:
READ(2,*)(JM(I,IQ),IQ=0,MQ)

JM(I,IQ) got from an input file.

JM(I,IQ) defined :DOUBLE PRECISION JM(NSDMAX,0:MQ),JB(0:LMAX,0:MB)

I don't know if this is enough?


-- 

happydeer at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |happydeer at gmail dot com


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


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

* [Bug fortran/23232] DATA implied DO variables
       [not found] <bug-23232-11116@http.gcc.gnu.org/bugzilla/>
  2006-10-08 21:59 ` fxcoudert at gcc dot gnu dot org
@ 2006-10-08 21:59 ` fxcoudert at gcc dot gnu dot org
  2006-10-24 14:05 ` happydeer at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-10-08 21:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2006-10-08 21:59 -------
(In reply to comment #4)
> *** Bug 29395 has been marked as a duplicate of this bug. ***

$ cat a10.f90 
  integer :: i(2,2)
  data ((i(k,j), j = 1, k), k = 1, 2) / 3 * 0 / 
  end 
$ gfortran a10.f90 
 In file a10.f90:2

  data ((i(k,j), j = 1, k), k = 1, 2) / 3 * 0 / 
                      1
Error: Parameter 'k' at (1) has not been declared or is a variable, which does
not reduce to a constant expression


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2006-01-29 19:54:38         |2006-10-08 21:59:43
               date|                            |


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


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

* [Bug fortran/23232] DATA implied DO variables
       [not found] <bug-23232-11116@http.gcc.gnu.org/bugzilla/>
@ 2006-10-08 21:59 ` fxcoudert at gcc dot gnu dot org
  2006-10-08 21:59 ` fxcoudert at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-10-08 21:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from fxcoudert at gcc dot gnu dot org  2006-10-08 21:59 -------
*** Bug 29395 has been marked as a duplicate of this bug. ***


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org


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


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

end of thread, other threads:[~2007-01-05 14:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-04 15:58 [Bug fortran/23232] New: DATA implied DO variables rofi at ya dot com
2005-08-04 15:59 ` [Bug fortran/23232] " rofi at ya dot com
2005-08-16 19:22 ` tobi at gcc dot gnu dot org
2005-09-28 13:24 ` pinskia at gcc dot gnu dot org
     [not found] <bug-23232-11116@http.gcc.gnu.org/bugzilla/>
2006-10-08 21:59 ` fxcoudert at gcc dot gnu dot org
2006-10-08 21:59 ` fxcoudert at gcc dot gnu dot org
2006-10-24 14:05 ` happydeer at gmail dot com
2007-01-04 15:35 ` patchapp at dberlin dot org
2007-01-04 15:47 ` pault at gcc dot gnu dot org
2007-01-05 14:46 ` 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).