public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/50554] New: INQUIRE cannot redefine DO index    (r178939)
@ 2011-09-28  9:16 zeccav at gmail dot com
  2011-09-28 11:14 ` [Bug fortran/50554] " burnus at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zeccav at gmail dot com @ 2011-09-28  9:16 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50554
           Summary: INQUIRE cannot redefine DO index    (r178939)
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zeccav@gmail.com


! INQUIRE cannot redefine DO index    (r178939)
      do I=1,10
       inquire(iolength=I) n
      end do
      end


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

* [Bug fortran/50554] INQUIRE cannot redefine DO index    (r178939)
  2011-09-28  9:16 [Bug fortran/50554] New: INQUIRE cannot redefine DO index (r178939) zeccav at gmail dot com
@ 2011-09-28 11:14 ` burnus at gcc dot gnu.org
  2011-10-16 22:35 ` kargl at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-09-28 11:14 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid, diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-09-28
                 CC|                            |burnus at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-09-28 10:42:40 UTC ---
Confirmed. We need to add a gfc_check_do_variable in io.c's gfc_match_inquire.


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

* [Bug fortran/50554] INQUIRE cannot redefine DO index    (r178939)
  2011-09-28  9:16 [Bug fortran/50554] New: INQUIRE cannot redefine DO index (r178939) zeccav at gmail dot com
  2011-09-28 11:14 ` [Bug fortran/50554] " burnus at gcc dot gnu.org
@ 2011-10-16 22:35 ` kargl at gcc dot gnu.org
  2013-06-08 22:11 ` tkoenig at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu.org @ 2011-10-16 22:35 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org 2011-10-16 22:35:10 UTC ---
(In reply to comment #1)
> Confirmed. We need to add a gfc_check_do_variable in io.c's gfc_match_inquire.

This patch 

Index: io.c
===================================================================
--- io.c        (revision 180062)
+++ io.c        (working copy)
@@ -3921,6 +3921,9 @@ gfc_match_inquire (void)
       if (gfc_match_char (')') != MATCH_YES)
        goto syntax;

+      if (gfc_check_do_variable (inquire->iolength->symtree))
+       goto cleanup;
+
       m = match_io_list (M_INQUIRE, &code);
       if (m == MATCH_ERROR)
        goto cleanup;

generates

laptop:kargl[213] gfc4x -c -Wall foo.f90
foo.f90:2.26:

       inquire(iolength=I) n
                          1
foo.f90:1.15:

      do I=1,10
               2
Error: Variable 'i' at (1) cannot be redefined inside loop beginning at (2)
foo.f90:2.23:

       inquire(iolength=I) n
                       1
Error: Unexpected junk in formal argument list at (1)


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

* [Bug fortran/50554] INQUIRE cannot redefine DO index    (r178939)
  2011-09-28  9:16 [Bug fortran/50554] New: INQUIRE cannot redefine DO index (r178939) zeccav at gmail dot com
  2011-09-28 11:14 ` [Bug fortran/50554] " burnus at gcc dot gnu.org
  2011-10-16 22:35 ` kargl at gcc dot gnu.org
@ 2013-06-08 22:11 ` tkoenig at gcc dot gnu.org
  2013-06-30 11:49 ` tkoenig at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2013-06-08 22:11 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |tkoenig at gcc dot gnu.org


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

* [Bug fortran/50554] INQUIRE cannot redefine DO index    (r178939)
  2011-09-28  9:16 [Bug fortran/50554] New: INQUIRE cannot redefine DO index (r178939) zeccav at gmail dot com
                   ` (2 preceding siblings ...)
  2013-06-08 22:11 ` tkoenig at gcc dot gnu.org
@ 2013-06-30 11:49 ` tkoenig at gcc dot gnu.org
  2013-07-08 16:22 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2013-06-30 11:49 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
           Assignee|tkoenig at gcc dot gnu.org         |unassigned at gcc dot gnu.org


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

* [Bug fortran/50554] INQUIRE cannot redefine DO index    (r178939)
  2011-09-28  9:16 [Bug fortran/50554] New: INQUIRE cannot redefine DO index (r178939) zeccav at gmail dot com
                   ` (3 preceding siblings ...)
  2013-06-30 11:49 ` tkoenig at gcc dot gnu.org
@ 2013-07-08 16:22 ` burnus at gcc dot gnu.org
  2013-07-08 16:45 ` burnus at gcc dot gnu.org
  2013-07-09  4:15 ` zeccav at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-07-08 16:22 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Author: burnus
Date: Mon Jul  8 16:13:57 2013
New Revision: 200790

URL: http://gcc.gnu.org/viewcvs?rev=200790&root=gcc&view=rev
Log:
2013-07-08  Tobias Burnus  <burnus@net-b.de>

        PR fortran/50554
        * io.c (match_inquire_element): Add missing do-var check.

2013-07-08  Tobias Burnus  <burnus@net-b.de>

        PR fortran/50554
        * gfortran.dg/do_check_9.f90: New.

Added:
    trunk/gcc/testsuite/gfortran.dg/do_check_9.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/io.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug fortran/50554] INQUIRE cannot redefine DO index    (r178939)
  2011-09-28  9:16 [Bug fortran/50554] New: INQUIRE cannot redefine DO index (r178939) zeccav at gmail dot com
                   ` (4 preceding siblings ...)
  2013-07-08 16:22 ` burnus at gcc dot gnu.org
@ 2013-07-08 16:45 ` burnus at gcc dot gnu.org
  2013-07-09  4:15 ` zeccav at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-07-08 16:45 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

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

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
FIXED on the trunk (4.9).

Thanks for the report - and sorry for taking nearly two years to fix it.


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

* [Bug fortran/50554] INQUIRE cannot redefine DO index    (r178939)
  2011-09-28  9:16 [Bug fortran/50554] New: INQUIRE cannot redefine DO index (r178939) zeccav at gmail dot com
                   ` (5 preceding siblings ...)
  2013-07-08 16:45 ` burnus at gcc dot gnu.org
@ 2013-07-09  4:15 ` zeccav at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: zeccav at gmail dot com @ 2013-07-09  4:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Vittorio Zecca <zeccav at gmail dot com> ---
No problem, it was low priority and with easy workaround.
gfortran has much much improved from first time I looked at it around 2005.
Keep up the good work!


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

end of thread, other threads:[~2013-07-09  4:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-28  9:16 [Bug fortran/50554] New: INQUIRE cannot redefine DO index (r178939) zeccav at gmail dot com
2011-09-28 11:14 ` [Bug fortran/50554] " burnus at gcc dot gnu.org
2011-10-16 22:35 ` kargl at gcc dot gnu.org
2013-06-08 22:11 ` tkoenig at gcc dot gnu.org
2013-06-30 11:49 ` tkoenig at gcc dot gnu.org
2013-07-08 16:22 ` burnus at gcc dot gnu.org
2013-07-08 16:45 ` burnus at gcc dot gnu.org
2013-07-09  4:15 ` zeccav at gmail dot com

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).