public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30869]  New: incorrect error message for valid code
@ 2007-02-20  7:49 jv244 at cam dot ac dot uk
  2007-02-20  9:03 ` [Bug fortran/30869] Rejects pointer to integer as loop variable burnus at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-02-20  7:49 UTC (permalink / raw)
  To: gcc-bugs

With recent trunk, gfortran incorrectly generates an error for the following
standard code:

INTEGER, POINTER :: i
ALLOCATE(i)
DO i=1,10
ENDDO
DEALLOCATE(i)
END


-- 
           Summary: incorrect error message for valid code
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk


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


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

* [Bug fortran/30869] Rejects pointer to integer as loop variable
  2007-02-20  7:49 [Bug fortran/30869] New: incorrect error message for valid code jv244 at cam dot ac dot uk
@ 2007-02-20  9:03 ` burnus at gcc dot gnu dot org
  2007-02-20 20:32 ` tkoenig 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-02-20  9:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2007-02-20 09:03 -------

Error: Loop variable at (1) cannot have the POINTER attribute

C820 (R831) The do-variable shall be a named scalar variable of type integer.

The program is accepted by ifort, NAG f95, g95 and sunf95.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2007-02-20 09:03:46
               date|                            |
            Summary|incorrect error message for |Rejects pointer to integer
                   |valid code                  |as loop variable


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


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

* [Bug fortran/30869] Rejects pointer to integer as loop variable
  2007-02-20  7:49 [Bug fortran/30869] New: incorrect error message for valid code jv244 at cam dot ac dot uk
  2007-02-20  9:03 ` [Bug fortran/30869] Rejects pointer to integer as loop variable burnus at gcc dot gnu dot org
@ 2007-02-20 20:32 ` tkoenig at gcc dot gnu dot org
  2007-02-20 20:55 ` patchapp at dberlin dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2007-02-20 20:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from tkoenig at gcc dot gnu dot org  2007-02-20 20:32 -------
Easy enough to do.


-- 

tkoenig at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |tkoenig at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-02-20 09:03:46         |2007-02-20 20:32:13
               date|                            |


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


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

* [Bug fortran/30869] Rejects pointer to integer as loop variable
  2007-02-20  7:49 [Bug fortran/30869] New: incorrect error message for valid code jv244 at cam dot ac dot uk
  2007-02-20  9:03 ` [Bug fortran/30869] Rejects pointer to integer as loop variable burnus at gcc dot gnu dot org
  2007-02-20 20:32 ` tkoenig at gcc dot gnu dot org
@ 2007-02-20 20:55 ` patchapp at dberlin dot org
  2007-02-20 21:50 ` tkoenig at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: patchapp at dberlin dot org @ 2007-02-20 20:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from patchapp at dberlin dot org  2007-02-20 20:55 -------
Subject: Bug number PR 30869

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-02/msg01724.html


-- 


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


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

* [Bug fortran/30869] Rejects pointer to integer as loop variable
  2007-02-20  7:49 [Bug fortran/30869] New: incorrect error message for valid code jv244 at cam dot ac dot uk
                   ` (2 preceding siblings ...)
  2007-02-20 20:55 ` patchapp at dberlin dot org
@ 2007-02-20 21:50 ` tkoenig at gcc dot gnu dot org
  2007-02-28 21:37 ` [Bug fortran/30869] [4.1, 4.2 only] " tkoenig at gcc dot gnu dot org
  2007-02-28 21:38 ` [Bug fortran/30869] [4.1 " tkoenig at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2007-02-20 21:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from tkoenig at gcc dot gnu dot org  2007-02-20 21:50 -------
Subject: Bug 30869

Author: tkoenig
Date: Tue Feb 20 21:50:20 2007
New Revision: 122176

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122176
Log:
2007-02-20  Thomas Koenig  <Thomas.Koenig@online.de>

        PR fortran/30869
        * match.c(gfc_match_iterator):  Remove conflict between
        loop variable and pointer.

2007-02-20  Thomas Koenig  <Thomas.Koenig@online.de>

        PR fortran/30869
        * gfortran.dg/do_pointer_1.f90:  New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/do_pointer_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/match.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/30869] [4.1, 4.2 only] Rejects pointer to integer as loop variable
  2007-02-20  7:49 [Bug fortran/30869] New: incorrect error message for valid code jv244 at cam dot ac dot uk
                   ` (3 preceding siblings ...)
  2007-02-20 21:50 ` tkoenig at gcc dot gnu dot org
@ 2007-02-28 21:37 ` tkoenig at gcc dot gnu dot org
  2007-02-28 21:38 ` [Bug fortran/30869] [4.1 " tkoenig at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2007-02-28 21:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from tkoenig at gcc dot gnu dot org  2007-02-28 21:36 -------
Subject: Bug 30869

Author: tkoenig
Date: Wed Feb 28 21:36:31 2007
New Revision: 122412

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122412
Log:
2007-02-28  Thomas Koenig  <Thomas.Koenig@online.de>

        Backport from trunk
        PR fortran/30869
        PR libfortran/30533
        PR libfortran/30765
        * match.c(gfc_match_iterator):  Remove conflict between
        loop variable and pointer.
        * fortran/iresolve.c(gfc_resolve_maxloc):  Remove coercion of
        argument to default integer.
        (gfc_resolve_minloc):  Likewise.

2007-02-28  Thomas Koenig  <Thomas.Koenig@online.de>

        Backport from trunk
        PR libfortran/30533
        PR libfortran/30765
        * Makefile.am: Add $(srcdir) too all files in generated/.
        (i_maxloc0_c): Add maxloc0_4_i1.c, maxloc0_8_i1.c,
        maxloc0_16_i1.c, maxloc0_4_i2.c, maxloc0_8_i2.c and
        maxloc0_16_i2.c.
        (i_maxloc1_c): Add maxloc1_4_i1.c, maxloc1_8_i1.c,
        maxloc1_16_i1.c, maxloc1_4_i2.c, maxloc1_8_i2.c and
        maxloc1_16_i2.c.
        (i_maxval_c): Add maxval_i1.c and maxval_i2.c.
        (i_minloc0_c):  Add minloc0_4_i1.c, minloc0_8_i1.c,
        minloc0_16_i1.c, minloc0_4_i2.c, minloc0_8_i2.c and
        minloc0_16_i2.c.
        (i_minloc_1.c): Add minloc1_4_i1.c, minloc1_8_i1.c,
        minloc1_16_i1.c, minloc1_4_i2.c, minloc1_8_i2.c and
        minloc1_16_i2.c.
        (i_minval_c):  Add minval_i1.c and minval_i2.c.
        (i_sum_c):  Add sum_i1.c and sum_i2.c.
        (i_product_c):  Add product_i1.c and product_i2.c.
        (i_matmul_c):  Add matmul_i1.c and matmul_i2.c.
        (gfor_built_specific_src):  Remove $(srcdir) from target.
        (gfor_bulit_specific2_src):  Likewise.
        Use $(M4) instead of m4.
        Makefile.in:  Regenerated.
        libgfortran.h:  Add GFC_INTEGER_1_HUGE and GFC_INTEGER_2_HUGE.
        Add gfc_array_i1 and gfc_array_i2.
        * generated/matmul_i1.c: New file.
        * generated/matmul_i2.c: New file.
        * generated/maxloc0_16_i1.c: New file.
        * generated/maxloc0_16_i2.c: New file.
        * generated/maxloc0_4_i1.c: New file.
        * generated/maxloc0_4_i2.c: New file.
        * generated/maxloc0_8_i1.c: New file.
        * generated/maxloc0_8_i2.c: New file.
        * generated/maxloc1_16_i1.c: New file.
        * generated/maxloc1_16_i2.c: New file.
        * generated/maxloc1_4_i1.c: New file.
        * generated/maxloc1_4_i2.c: New file.
        * generated/maxloc1_8_i1.c: New file.
        * generated/maxloc1_8_i2.c: New file.
        * generated/maxval_i1.c: New file.
        * generated/maxval_i2.c: New file.
        * generated/minloc0_16_i1.c: New file.
        * generated/minloc0_16_i2.c: New file.
        * generated/minloc0_4_i1.c: New file.
        * generated/minloc0_4_i2.c: New file.
        * generated/minloc0_8_i1.c: New file.
        * generated/minloc0_8_i2.c: New file.
        * generated/minloc1_16_i1.c: New file.
        * generated/minloc1_16_i2.c: New file.
        * generated/minloc1_4_i1.c: New file.
        * generated/minloc1_4_i2.c: New file.
        * generated/minloc1_8_i1.c: New file.
        * generated/minloc1_8_i2.c: New file.
        * generated/minval_i1.c: New file.
        * generated/minval_i2.c: New file.
        * generated/product_i1.c: New file.
        * generated/product_i2.c: New file.
        * generated/sum_i1.c: New file.
        * generated/sum_i2.c: New file.

2007-02-28  Thomas Koenig  <Thomas.Koenig@online.de>

        Backport from trunk
        PR fortran/30869
        PR libfortran/30533
        PR libfortran/30765
        * gfortran.dg/intrinsic_intkinds_1.f90:  New test.
        * gfortran.dg/do_pointer_1.f90:  New test.



Added:
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/do_pointer_1.f90
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/intrinsic_intkinds_1.f90
    branches/gcc-4_2-branch/libgfortran/generated/matmul_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/matmul_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/maxloc0_16_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/maxloc0_16_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/maxloc0_4_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/maxloc0_4_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/maxloc0_8_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/maxloc0_8_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/maxloc1_16_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/maxloc1_16_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/maxloc1_4_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/maxloc1_4_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/maxloc1_8_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/maxloc1_8_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/maxval_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/maxval_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/minloc0_16_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/minloc0_16_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/minloc0_4_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/minloc0_4_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/minloc0_8_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/minloc0_8_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/minloc1_16_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/minloc1_16_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/minloc1_4_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/minloc1_4_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/minloc1_8_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/minloc1_8_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/minval_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/minval_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/product_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/product_i2.c
    branches/gcc-4_2-branch/libgfortran/generated/sum_i1.c
    branches/gcc-4_2-branch/libgfortran/generated/sum_i2.c
Modified:
    branches/gcc-4_2-branch/gcc/fortran/ChangeLog
    branches/gcc-4_2-branch/gcc/fortran/iresolve.c
    branches/gcc-4_2-branch/gcc/fortran/match.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_2-branch/libgfortran/ChangeLog
    branches/gcc-4_2-branch/libgfortran/Makefile.am
    branches/gcc-4_2-branch/libgfortran/Makefile.in
    branches/gcc-4_2-branch/libgfortran/libgfortran.h


-- 


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


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

* [Bug fortran/30869] [4.1 only] Rejects pointer to integer as loop variable
  2007-02-20  7:49 [Bug fortran/30869] New: incorrect error message for valid code jv244 at cam dot ac dot uk
                   ` (4 preceding siblings ...)
  2007-02-28 21:37 ` [Bug fortran/30869] [4.1, 4.2 only] " tkoenig at gcc dot gnu dot org
@ 2007-02-28 21:38 ` tkoenig at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2007-02-28 21:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from tkoenig at gcc dot gnu dot org  2007-02-28 21:37 -------
Fixed on 4.2.  Closing.


-- 

tkoenig at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
            Summary|[4.1, 4.2 only] Rejects     |[4.1 only] Rejects pointer
                   |pointer to integer as loop  |to integer as loop variable
                   |variable                    |


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


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

end of thread, other threads:[~2007-02-28 21:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-20  7:49 [Bug fortran/30869] New: incorrect error message for valid code jv244 at cam dot ac dot uk
2007-02-20  9:03 ` [Bug fortran/30869] Rejects pointer to integer as loop variable burnus at gcc dot gnu dot org
2007-02-20 20:32 ` tkoenig at gcc dot gnu dot org
2007-02-20 20:55 ` patchapp at dberlin dot org
2007-02-20 21:50 ` tkoenig at gcc dot gnu dot org
2007-02-28 21:37 ` [Bug fortran/30869] [4.1, 4.2 only] " tkoenig at gcc dot gnu dot org
2007-02-28 21:38 ` [Bug fortran/30869] [4.1 " tkoenig 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).