public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/21565] New: namelist in block data is illegal
@ 2005-05-14  8:50 tkoenig at gcc dot gnu dot org
  2005-05-19 16:25 ` [Bug fortran/21565] " tobi at gcc dot gnu dot org
  0 siblings, 1 reply; 6+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-05-14  8:50 UTC (permalink / raw)
  To: gcc-bugs

gfortran falsely accepts a namelist in a block
data:

$ cat block_d.f
      block data
      common /foo/ a
      namelist /foo_n/ a
      data a /1.0/
      end
$ gfortran -S block_d.f
$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1/configure --prefix=/home/ig25 --enable-languages=c,f95
Thread model: posix
gcc version 4.1.0 20050508 (experimental)

g77 correctly rejects it, although with a confusing error message:

$ g77 -S block_d.f
block_d.f: In block-data unit `_BLOCK_DATA__':
block_d.f:2:
         common /foo/ a
         1
block_d.f:3: (continued):
         namelist /foo_n/ a
         2
Statement at (2) invalid in context established by statement at (1)

-- 
           Summary: namelist in block data is illegal
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, diagnostic
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug fortran/21565] namelist in block data is illegal
  2005-05-14  8:50 [Bug fortran/21565] New: namelist in block data is illegal tkoenig at gcc dot gnu dot org
@ 2005-05-19 16:25 ` tobi at gcc dot gnu dot org
  0 siblings, 0 replies; 6+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-05-19 16:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-05-19 16:25 -------
See the second constraint in 11.4 (f95 draft)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-05-19 16:25:06
               date|                            |


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


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

* [Bug fortran/21565] namelist in block data is illegal
       [not found] <bug-21565-10391@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2005-11-01 13:04 ` pault at gcc dot gnu dot org
@ 2005-11-10  2:44 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-10  2:44 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.3


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


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

* [Bug fortran/21565] namelist in block data is illegal
       [not found] <bug-21565-10391@http.gcc.gnu.org/bugzilla/>
  2005-11-01  5:53 ` pault at gcc dot gnu dot org
  2005-11-01 12:15 ` pault at gcc dot gnu dot org
@ 2005-11-01 13:04 ` pault at gcc dot gnu dot org
  2005-11-10  2:44 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu dot org @ 2005-11-01 13:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pault at gcc dot gnu dot org  2005-11-01 13:04 -------
Fixed on mainline and 4.0


-- 

pault at gcc dot gnu dot org changed:

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


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


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

* [Bug fortran/21565] namelist in block data is illegal
       [not found] <bug-21565-10391@http.gcc.gnu.org/bugzilla/>
  2005-11-01  5:53 ` pault at gcc dot gnu dot org
@ 2005-11-01 12:15 ` pault at gcc dot gnu dot org
  2005-11-01 13:04 ` pault at gcc dot gnu dot org
  2005-11-10  2:44 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu dot org @ 2005-11-01 12:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pault at gcc dot gnu dot org  2005-11-01 12:15 -------
Subject: Bug 21565

Author: pault
Date: Tue Nov  1 12:15:07 2005
New Revision: 106326

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

        PR fortran/21565
        * symbol.c (check_conflict): An object cannot be in a namelist and in
        block data.

        PR fortran/18737
        * resolve.c (resolve_symbol): Set the error flag to
        gfc_set_default_type, in the case of an external symbol, so that
        an error message is emitted if IMPLICIT NONE is set.

        PR fortran/14994
        * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SECNDS to enum.
        * check.c (gfc_check_secnds): New function.
        * intrinsic.c (add_functions): Add call to secnds.
        * iresolve.c (gfc_resolve_secnds): New function.
        * trans-intrinsic (gfc_conv_intrinsic_function): Add call to
        secnds via case GFC_ISYM_SECNDS.
        * intrinsic.texi: Add documentation for secnds.

2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/14994
        * libgfortran/intrinsics/date_and_time.c: Add interface to
        the functions date_and_time for the intrinsic function secnds.

2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/21565
        gfortran.dg/namelist_blockdata.f90: New test.

        PR fortran/18737
        gfortran.dg/external_implicit_none.f90: New test.

        PR fortran/14994
        * gfortran.dg/secnds.f: New test.

Added:
   
branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/external_implicit_none.f90
    branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/namelist_blockdata.f
    branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/secnds.f
Modified:
    branches/gcc-4_0-branch/gcc/fortran/ChangeLog
    branches/gcc-4_0-branch/gcc/fortran/check.c
    branches/gcc-4_0-branch/gcc/fortran/gfortran.h
    branches/gcc-4_0-branch/gcc/fortran/intrinsic.c
    branches/gcc-4_0-branch/gcc/fortran/intrinsic.h
    branches/gcc-4_0-branch/gcc/fortran/intrinsic.texi
    branches/gcc-4_0-branch/gcc/fortran/iresolve.c
    branches/gcc-4_0-branch/gcc/fortran/resolve.c
    branches/gcc-4_0-branch/gcc/fortran/symbol.c
    branches/gcc-4_0-branch/gcc/fortran/trans-intrinsic.c
    branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_0-branch/libgfortran/ChangeLog
    branches/gcc-4_0-branch/libgfortran/intrinsics/date_and_time.c


-- 


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


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

* [Bug fortran/21565] namelist in block data is illegal
       [not found] <bug-21565-10391@http.gcc.gnu.org/bugzilla/>
@ 2005-11-01  5:53 ` pault at gcc dot gnu dot org
  2005-11-01 12:15 ` pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu dot org @ 2005-11-01  5:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pault at gcc dot gnu dot org  2005-11-01 05:53 -------
Subject: Bug 21565

Author: pault
Date: Tue Nov  1 05:53:29 2005
New Revision: 106317

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

        PR fortran/21565
        * symbol.c (check_conflict): An object cannot be in a namelist and in
        block data.

        PR fortran/18737
        * resolve.c (resolve_symbol): Set the error flag to
        gfc_set_default_type, in the case of an external symbol, so that
        an error message is emitted if IMPLICIT NONE is set.

        PR fortran/14994
        * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SECNDS to enum.
        * check.c (gfc_check_secnds): New function.
        * intrinsic.c (add_functions): Add call to secnds.
        * iresolve.c (gfc_resolve_secnds): New function.
        * trans-intrinsic (gfc_conv_intrinsic_function): Add call to
        secnds via case GFC_ISYM_SECNDS.
        * intrinsic.texi: Add documentation for secnds.

2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/14994
        * libgfortran/intrinsics/date_and_time.c: Add interface to
        the functions date_and_time for the intrinsic function secnds.

2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/21565
        gfortran.dg/namelist_blockdata.f90: New test.

        PR fortran/18737
        gfortran.dg/external_implicit_none.f90: New test.

        PR fortran/14994
        * gfortran.dg/secnds.f: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/external_implicit_none.f90
    trunk/gcc/testsuite/gfortran.dg/namelist_blockdata.f
    trunk/gcc/testsuite/gfortran.dg/secnds.f
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/fortran/iresolve.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/testsuite/ChangeLog
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/intrinsics/date_and_time.c


-- 


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


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

end of thread, other threads:[~2005-11-10  2:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-14  8:50 [Bug fortran/21565] New: namelist in block data is illegal tkoenig at gcc dot gnu dot org
2005-05-19 16:25 ` [Bug fortran/21565] " tobi at gcc dot gnu dot org
     [not found] <bug-21565-10391@http.gcc.gnu.org/bugzilla/>
2005-11-01  5:53 ` pault at gcc dot gnu dot org
2005-11-01 12:15 ` pault at gcc dot gnu dot org
2005-11-01 13:04 ` pault at gcc dot gnu dot org
2005-11-10  2:44 ` pinskia 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).