public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
       [not found] <bug-43062-4@http.gcc.gnu.org/bugzilla/>
@ 2010-10-01 20:21 ` jvdelisle at gcc dot gnu.org
  2010-10-02  6:44 ` burnus at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 28+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-10-01 20:21 UTC (permalink / raw)
  To: gcc-bugs

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

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

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

--- Comment #17 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-10-01 20:20:53 UTC ---
Any further direction on this?


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
       [not found] <bug-43062-4@http.gcc.gnu.org/bugzilla/>
  2010-10-01 20:21 ` [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute jvdelisle at gcc dot gnu.org
@ 2010-10-02  6:44 ` burnus at gcc dot gnu.org
  2011-01-18 13:07 ` burnus at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 28+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-10-02  6:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-10-02 06:44:41 UTC ---
(In reply to comment #16)
> Interpretation request for the June J3 meeting:
>   http://j3-fortran.org/doc/meeting/192/10-146.txt
> Proposed edit is to allow ALLOCATABLEs.

(In reply to comment #17)
> Any further direction on this?

Updated IR: http://j3-fortran.org/doc/meeting/192/10-146r1.txt

Status at the meeting: http://j3-fortran.org/doc/meeting/193/10-198.txt

> 0. List of papers passed at meeting #192
>
>    The interpretations passed by this meeting were:
>    [...] F08/0002 == 10-146r1 [...]


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
       [not found] <bug-43062-4@http.gcc.gnu.org/bugzilla/>
  2010-10-01 20:21 ` [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute jvdelisle at gcc dot gnu.org
  2010-10-02  6:44 ` burnus at gcc dot gnu.org
@ 2011-01-18 13:07 ` burnus at gcc dot gnu.org
  2011-01-18 13:40 ` jvdelisle at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 28+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-01-18 13:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-18 12:57:11 UTC ---
Related: PR 47339


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
       [not found] <bug-43062-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2011-01-18 13:40 ` jvdelisle at gcc dot gnu.org
@ 2011-01-18 13:40 ` zazzou at gmail dot com
  2011-01-22 21:58 ` burnus at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 28+ messages in thread
From: zazzou at gmail dot com @ 2011-01-18 13:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Xavier <zazzou at gmail dot com> 2011-01-18 13:14:38 UTC ---
Hi,

so, I am bit lost, "bug" is resolved or not ?
Correction available with next version of gcc ?

Thanks,

Xavier


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
       [not found] <bug-43062-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-01-18 13:07 ` burnus at gcc dot gnu.org
@ 2011-01-18 13:40 ` jvdelisle at gcc dot gnu.org
  2011-01-18 13:40 ` zazzou at gmail dot com
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 28+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2011-01-18 13:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2011-01-18 13:27:48 UTC ---
It is not resolved because we are waiting for an interpretation from the
Fortran standards committee on whether the test case is valid or invalid
Fortran.  If invalid, then we need to give an error, if valid, we need to make
sure it works correctly.  Unfortunately, this PR is in a waiting state.


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
       [not found] <bug-43062-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2011-01-18 13:40 ` zazzou at gmail dot com
@ 2011-01-22 21:58 ` burnus at gcc dot gnu.org
  2011-01-22 22:41 ` burnus at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 28+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-01-22 21:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-22 21:50:54 UTC ---
(In reply to comment #20)
> so, I am bit lost, "bug" is resolved or not ?
> Correction available with next version of gcc ?

No the bug (or problem report, PR) is not yet resolved. But PR 47339 contains
an almost ready patch, which fixes this issue (and some more namelist-related
issues). The patch will likely be submitted soon.


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
       [not found] <bug-43062-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2011-01-22 21:58 ` burnus at gcc dot gnu.org
@ 2011-01-22 22:41 ` burnus at gcc dot gnu.org
  2011-01-26 10:33 ` burnus at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 28+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-01-22 22:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #23 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-22 21:58:02 UTC ---
(In reply to comment #21)
> It is not resolved because we are waiting for an interpretation from the
> Fortran standards committee on whether the test case is valid or invalid
> Fortran.

Cf. comment 17: The J3 agreed that it is a bug in the standard and agreed on
the proposed change, which solves the ambiguity in the standard and allows such
namelists. The next step is to get passed a WG5 ballot. Finally, the change
will be released as Corrigendum 1 to Fortran 2008. While it could be still
rejected, the changes for a rejection are quite low. Thus, I went ahead and
implemented it. (cf. attachment 23080 of PR 47339).

Xavier: You do not have to wait for a new release, you could fetch the patch
and build GCC/gfortran your self. Alternatively, when the patch is committed,
you can get nightly builds. Both is described at
http://gcc.gnu.org/wiki/GFortranBinaries


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
       [not found] <bug-43062-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2011-01-22 22:41 ` burnus at gcc dot gnu.org
@ 2011-01-26 10:33 ` burnus at gcc dot gnu.org
  2011-01-28  9:43 ` zazzou at gmail dot com
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 28+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-01-26 10:33 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #24 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-26 10:12:52 UTC ---
Author: burnus
Date: Wed Jan 26 10:12:47 2011
New Revision: 169282

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169282
Log:
2011-01-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/47339
        PR fortran/43062
        * match.c (gfc_match_namelist): Allow assumed-length characters.
        * resolve.c (resolve_fl_namelist): Adapt and add error messages.
        * symbol.c (check_conflict): Allow allocatables in NML for
        * F2003.
        * trans-io.c (nml_get_addr_expr,transfer_namelist_element):
        Changes due to that change.

2011-01-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/47339
        PR fortran/43062
        * fortran.dg/namelist_69.f90: New test.
        * fortran.dg/namelist_70.f90: New test.
        * fortran.dg/namelist_assumed_char.f90: Modify dg-error, augment
        * test.
        * fortran.dg/namelist_3.f90: Adapt test.
        * fortran.dg/namelist_34.f90: Ditto.
        * fortran.dg/namelist_35.f90: Ditto.
        * fortran.dg/namelist_5.f90: Ditto.
        * fortran.dg/namelist_63.f90: Ditto.
        * gfortran.dg/alloc_comp_constraint_1.f90: Ditto.


Added:
    trunk/gcc/testsuite/gfortran.dg/namelist_69.f90
    trunk/gcc/testsuite/gfortran.dg/namelist_70.f90
Modified:
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/fortran/trans-io.c
    trunk/gcc/testsuite/gfortran.dg/alloc_comp_constraint_1.f90
    trunk/gcc/testsuite/gfortran.dg/namelist_3.f90
    trunk/gcc/testsuite/gfortran.dg/namelist_34.f90
    trunk/gcc/testsuite/gfortran.dg/namelist_35.f90
    trunk/gcc/testsuite/gfortran.dg/namelist_5.f90
    trunk/gcc/testsuite/gfortran.dg/namelist_63.f90
    trunk/gcc/testsuite/gfortran.dg/namelist_assumed_char.f90

--- Comment #25 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-26 10:13:45 UTC ---
FIXED on the trunk (4.6). Thanks for the report Xavier!


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
       [not found] <bug-43062-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2011-01-26 10:33 ` burnus at gcc dot gnu.org
@ 2011-01-28  9:43 ` zazzou at gmail dot com
  2011-01-28 10:19 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 28+ messages in thread
From: zazzou at gmail dot com @ 2011-01-28  9:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #26 from Xavier <zazzou at gmail dot com> 2011-01-28 09:11:27 UTC ---
Thanks for your work.

Question : I tried to build my own version, but i did not succeed.
 (1) gcc-4.5.2 : ok
 (2) gcc-4.5.2 + modified/added files from trunk (4.6) : compilation error on
file match.c
 (3) gcc-4.6 (from trunk) : some errors... (I don't remerber)

Is it normal that test (2) did not work ? 
Do i need to modify directly files related to this bug report ?


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
       [not found] <bug-43062-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2011-01-28  9:43 ` zazzou at gmail dot com
@ 2011-01-28 10:19 ` burnus at gcc dot gnu.org
  2011-01-29 22:23 ` zazzou at gmail dot com
  2011-02-02 17:59 ` dnovillo at gcc dot gnu.org
  11 siblings, 0 replies; 28+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-01-28 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #27 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-28 09:45:58 UTC ---
(In reply to comment #26)
> Question : I tried to build my own version, but i did not succeed.
>  (1) gcc-4.5.2 : ok
>  (2) gcc-4.5.2 + modified/added files from trunk (4.6) : compilation error on
> file match.c

> Is it normal that test (2) did not work ? 

Well, it is not surprising that just applying 4.6 patches do not work on 4.5.
After all, one year of development is a lot. During that year the following,
user-visible changes were done for Fortran:
  http://gcc.gnu.org/gcc-4.6/changes.html#fortran

Thus, the chance that a patch applies without any changes to an older version
is relatively low.


> Do i need to modify directly files related to this bug report ?

Well, if applying the patch does not work and if you want to use 4.5, you
seemingly have to. I assume that the changes to match.c are not difficult, but
I have not tried it - and I do not plan to do so.


>  (3) gcc-4.6 (from trunk) : some errors... (I don't remerber)

Without error message, it is difficult to help (and this bug report is the
wrong forum*). However, you could also try to use the nightly builds, which are
available at http://gcc.gnu.org/wiki/GFortranBinaries

* Mailing list, cf. http://gcc.gnu.org/lists.html try gcc-help@ or fortran@ but
first glance at the instructions at http://gcc.gnu.org/install/


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
       [not found] <bug-43062-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2011-01-28 10:19 ` burnus at gcc dot gnu.org
@ 2011-01-29 22:23 ` zazzou at gmail dot com
  2011-02-02 17:59 ` dnovillo at gcc dot gnu.org
  11 siblings, 0 replies; 28+ messages in thread
From: zazzou at gmail dot com @ 2011-01-29 22:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #28 from Xavier <zazzou at gmail dot com> 2011-01-29 21:47:19 UTC ---
I tried again to build gcc 4.6 (from svn) and i succeeded. The patch works
fine.

Thanks.


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
       [not found] <bug-43062-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2011-01-29 22:23 ` zazzou at gmail dot com
@ 2011-02-02 17:59 ` dnovillo at gcc dot gnu.org
  11 siblings, 0 replies; 28+ messages in thread
From: dnovillo at gcc dot gnu.org @ 2011-02-02 17:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #29 from Diego Novillo <dnovillo at gcc dot gnu.org> 2011-02-02 17:52:20 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:52:14 2011
New Revision: 169614

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169614
Log:
2011-01-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/47339
        PR fortran/43062
        * match.c (gfc_match_namelist): Allow assumed-length characters.
        * resolve.c (resolve_fl_namelist): Adapt and add error messages.
        * symbol.c (check_conflict): Allow allocatables in NML for
        * F2003.
        * trans-io.c (nml_get_addr_expr,transfer_namelist_element):
        Changes due to that change.

2011-01-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/47339
        PR fortran/43062
        * fortran.dg/namelist_69.f90: New test.
        * fortran.dg/namelist_70.f90: New test.
        * fortran.dg/namelist_assumed_char.f90: Modify dg-error, augment
        * test.
        * fortran.dg/namelist_3.f90: Adapt test.
        * fortran.dg/namelist_34.f90: Ditto.
        * fortran.dg/namelist_35.f90: Ditto.
        * fortran.dg/namelist_5.f90: Ditto.
        * fortran.dg/namelist_63.f90: Ditto.
        * gfortran.dg/alloc_comp_constraint_1.f90: Ditto.

Added:
    branches/google/integration/gcc/testsuite/gfortran.dg/namelist_69.f90
    branches/google/integration/gcc/testsuite/gfortran.dg/namelist_70.f90
Modified:
    branches/google/integration/gcc/fortran/match.c
    branches/google/integration/gcc/fortran/resolve.c
    branches/google/integration/gcc/fortran/symbol.c
    branches/google/integration/gcc/fortran/trans-io.c
   
branches/google/integration/gcc/testsuite/gfortran.dg/alloc_comp_constraint_1.f90
    branches/google/integration/gcc/testsuite/gfortran.dg/namelist_3.f90
    branches/google/integration/gcc/testsuite/gfortran.dg/namelist_34.f90
    branches/google/integration/gcc/testsuite/gfortran.dg/namelist_35.f90
    branches/google/integration/gcc/testsuite/gfortran.dg/namelist_5.f90
    branches/google/integration/gcc/testsuite/gfortran.dg/namelist_63.f90
   
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_assumed_char.f90


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
                   ` (14 preceding siblings ...)
  2010-03-01  8:45 ` burnus at gcc dot gnu dot org
@ 2010-04-06 18:42 ` burnus at gcc dot gnu dot org
  15 siblings, 0 replies; 28+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-04-06 18:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from burnus at gcc dot gnu dot org  2010-04-06 18:42 -------
Interpretation request for the June J3 meeting:
  http://j3-fortran.org/doc/meeting/192/10-146.txt
Proposed edit is to allow ALLOCATABLEs.


-- 


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
                   ` (13 preceding siblings ...)
  2010-02-17 21:26 ` burnus at gcc dot gnu dot org
@ 2010-03-01  8:45 ` burnus at gcc dot gnu dot org
  2010-04-06 18:42 ` burnus at gcc dot gnu dot org
  15 siblings, 0 replies; 28+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-03-01  8:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from burnus at gcc dot gnu dot org  2010-03-01 08:45 -------
See also: http://j3-fortran.org/pipermail/j3/2010-February/003401.html
where Van and Malcolm agreed that changes should be done.


-- 


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
                   ` (12 preceding siblings ...)
  2010-02-17 16:03 ` kargl at gcc dot gnu dot org
@ 2010-02-17 21:26 ` burnus at gcc dot gnu dot org
  2010-03-01  8:45 ` burnus at gcc dot gnu dot org
  2010-04-06 18:42 ` burnus at gcc dot gnu dot org
  15 siblings, 0 replies; 28+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-02-17 21:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from burnus at gcc dot gnu dot org  2010-02-17 21:25 -------
Created an attachment (id=19899)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19899&action=view)
Draft patch - misses modifications to nml_get_addr_expr

The current standard is weird: allocatables/pointers/automatic/non-const-shape
dummy arrays are valid - but only via host/use association. Thus, I postpone
this until there is an official reply from J3/WG5.

I attach a draft patch in order to make sure it won't get lost. The patch goes
past the compile-time check and also past the ICE; however, it does not work as
  nml_get_addr_expr  needs to be modified. One needs to pass the address of the
array data, i.e.  &(array_descriptor.data) rather than &array_descriptor -
which should be done in nml_get_addr_expr. Note: nml_get_addr_expr's
"array_flagged" remains zero for array descriptors. trans-array.c's
gfc_conv_array_data might be a function, which one could use.


-- 


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
                   ` (11 preceding siblings ...)
  2010-02-17 15:57 ` kargl at gcc dot gnu dot org
@ 2010-02-17 16:03 ` kargl at gcc dot gnu dot org
  2010-02-17 21:26 ` burnus at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-02-17 16:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from kargl at gcc dot gnu dot org  2010-02-17 16:02 -------
(In reply to comment #11)
> Replying to myself (comment #10):
> > I think one should really send a interpretation request.
> 
> I have now created one and sent it to Van.
> 

Did you include the language from F2008 that make this
clearly nonconforming code?

> > What about POINTERs?
> Pointers seem to be treated similarly to allocatables. (I should have read the
> standard first).

Or comment #2.

> 
> > A patch would be the following.
> 
> It of cause fails (ICE) for  WRITE(*,nml=...) as the front end creates:
>     _gfortran_st_set_nml_var_dim (&dt_parm.1, 0, );
>                                                ^^^
> 

I've removed the reject-valid keyword, because until an official 
intrep is given there is conflicting language in the standard.


-- 

kargl at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|rejects-valid               |


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
                   ` (10 preceding siblings ...)
  2010-02-17  8:23 ` burnus at gcc dot gnu dot org
@ 2010-02-17 15:57 ` kargl at gcc dot gnu dot org
  2010-02-17 16:03 ` kargl at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-02-17 15:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from kargl at gcc dot gnu dot org  2010-02-17 15:57 -------
(In reply to comment #10)
> (NAG f95 v5.1 and g95 reject it unconditionally; ifort allows it by default but
> rejects it with -stand f95 or -stand f03.)
> 
> I think one should really send a interpretation request.

I already contacted Dan Nagle.  I'll write up the issue 
today and send it to whom.

> 
> A patch would be the following. What about POINTERs?
>

See comment #2.

> Index: symbol.c
> ===================================================================
> --- symbol.c    (Revision 156815)
> +++ symbol.c
> @@ -389,2 +389,10 @@ check_conflict (symbol_attribute *attr,
> 
> +  if (attr->in_namelist && attr->allocatable)
> +    {
> +      a1 = in_namelist;
> +      a2 = allocatable;
> +      standard = GFC_STD_F2003;
> +      goto conflict_std;
> +    }
> +
>    /* Check for attributes not allowed in a BLOCK DATA.  */
> @@ -493,3 +501,2 @@ check_conflict (symbol_attribute *attr,
>    conf (in_namelist, pointer);
> -  conf (in_namelist, allocatable);
> 

This isn't sufficient.  See comment #2.  During a namelist read/write,
gfortran needs to check that the allocatable array is allocated and
that a pointer is associated with a target.


-- 


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
                   ` (9 preceding siblings ...)
  2010-02-17  7:32 ` burnus at gcc dot gnu dot org
@ 2010-02-17  8:23 ` burnus at gcc dot gnu dot org
  2010-02-17 15:57 ` kargl at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-02-17  8:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from burnus at gcc dot gnu dot org  2010-02-17 08:22 -------
Replying to myself (comment #10):
> I think one should really send a interpretation request.

I have now created one and sent it to Van.

> What about POINTERs?
Pointers seem to be treated similarly to allocatables. (I should have read the
standard first).

> A patch would be the following.

It of cause fails (ICE) for  WRITE(*,nml=...) as the front end creates:
    _gfortran_st_set_nml_var_dim (&dt_parm.1, 0, );
                                               ^^^


-- 


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
                   ` (8 preceding siblings ...)
  2010-02-17  2:07 ` jvdelisle at gcc dot gnu dot org
@ 2010-02-17  7:32 ` burnus at gcc dot gnu dot org
  2010-02-17  8:23 ` burnus at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-02-17  7:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from burnus at gcc dot gnu dot org  2010-02-17 07:32 -------
(NAG f95 v5.1 and g95 reject it unconditionally; ifort allows it by default but
rejects it with -stand f95 or -stand f03.)

I think one should really send a interpretation request.

A patch would be the following. What about POINTERs?

Index: symbol.c
===================================================================
--- symbol.c    (Revision 156815)
+++ symbol.c
@@ -389,2 +389,10 @@ check_conflict (symbol_attribute *attr,

+  if (attr->in_namelist && attr->allocatable)
+    {
+      a1 = in_namelist;
+      a2 = allocatable;
+      standard = GFC_STD_F2003;
+      goto conflict_std;
+    }
+
   /* Check for attributes not allowed in a BLOCK DATA.  */
@@ -493,3 +501,2 @@ check_conflict (symbol_attribute *attr,
   conf (in_namelist, pointer);
-  conf (in_namelist, allocatable);


-- 

burnus at gcc dot gnu dot org changed:

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


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
                   ` (7 preceding siblings ...)
  2010-02-15 21:50 ` kargl at gcc dot gnu dot org
@ 2010-02-17  2:07 ` jvdelisle at gcc dot gnu dot org
  2010-02-17  7:32 ` burnus at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-02-17  2:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jvdelisle at gcc dot gnu dot org  2010-02-17 02:06 -------
After reading the thread on clf, its still not very clear.  The wording is less
then perfect, but thinking out of the box I suppose it would be reasonable to
allow it in the namelist as long as the array gets allocated before it is
actually used for example, in a namelist READ or WRITE.

It should be on the programmer to do that correctly though.


-- 


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
                   ` (6 preceding siblings ...)
  2010-02-15 21:47 ` kargl at gcc dot gnu dot org
@ 2010-02-15 21:50 ` kargl at gcc dot gnu dot org
  2010-02-17  2:07 ` jvdelisle at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-02-15 21:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from kargl at gcc dot gnu dot org  2010-02-15 21:50 -------
(In reply to comment #6)
> 
> Also, assuming it is something else, would it be invalid to use the namelist
> anywhere if TAB has not been allocated before it is used?
> 

I forgot to reply to this part.  See comment #2 where I quote
9.5.3.6 form F2003.


-- 


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
                   ` (5 preceding siblings ...)
  2010-02-15 20:34 ` jvdelisle at gcc dot gnu dot org
@ 2010-02-15 21:47 ` kargl at gcc dot gnu dot org
  2010-02-15 21:50 ` kargl at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-02-15 21:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from kargl at gcc dot gnu dot org  2010-02-15 21:47 -------
(In reply to comment #6)
> What is this?
> 
> REAL, DIMENSION(:), ALLOCATABLE :: TAB
> 
> If not assumed size?
> 
> Also, assuming it is something else, would it be invalid to use the namelist
> anywhere if TAB has not been allocated before it is used?
> 

It's a deferred-shape array.

5.1.2.5.3 Deferred-shape array

A deferred-shape array is an allocatable array or an array pointer.


5.1.2.5.4  Assumed-size array

An assumed-size array is a dummy argument array whose size is assumed
from that of an associated actual argument.


-- 


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
                   ` (4 preceding siblings ...)
  2010-02-15 17:04 ` kargl at gcc dot gnu dot org
@ 2010-02-15 20:34 ` jvdelisle at gcc dot gnu dot org
  2010-02-15 21:47 ` kargl at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-02-15 20:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jvdelisle at gcc dot gnu dot org  2010-02-15 20:33 -------
What is this?

REAL, DIMENSION(:), ALLOCATABLE :: TAB

If not assumed size?

Also, assuming it is something else, would it be invalid to use the namelist
anywhere if TAB has not been allocated before it is used?


-- 


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
                   ` (3 preceding siblings ...)
  2010-02-15  8:18 ` zazzou at gmail dot com
@ 2010-02-15 17:04 ` kargl at gcc dot gnu dot org
  2010-02-15 20:34 ` jvdelisle at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-02-15 17:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from kargl at gcc dot gnu dot org  2010-02-15 17:04 -------
(In reply to comment #4)
> (In reply to comment #3)
> > I've posted a question to c.l.f about this code.  I 
> > believe the language of the standard is contradictory
> > and as such the code can be interpreted as illegal or
> > legal.
> > 
> > http://groups.google.com/group/comp.lang.fortran/browse_frm/thread/76b23c9927b52161#
> > 
> 
> Into the final committee draft J3/03-007R2, section 5.4, I found :
> 
> C574 (R553) A namelist-group-object shall not be an assumed-size array.
> 
> It was not the case in F95.
> 

Your code doesn't contain an assumed-sized array.

-- 
steve


-- 


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
                   ` (2 preceding siblings ...)
  2010-02-15  1:30 ` kargl at gcc dot gnu dot org
@ 2010-02-15  8:18 ` zazzou at gmail dot com
  2010-02-15 17:04 ` kargl at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: zazzou at gmail dot com @ 2010-02-15  8:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from zazzou at gmail dot com  2010-02-15 08:17 -------
(In reply to comment #3)
> I've posted a question to c.l.f about this code.  I 
> believe the language of the standard is contradictory
> and as such the code can be interpreted as illegal or
> legal.
> 
> http://groups.google.com/group/comp.lang.fortran/browse_frm/thread/76b23c9927b52161#
> 

Into the final committee draft J3/03-007R2, section 5.4, I found :

C574 (R553) A namelist-group-object shall not be an assumed-size array.

It was not the case in F95.


-- 


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
  2010-02-14 17:21 ` [Bug fortran/43062] " pault at gcc dot gnu dot org
  2010-02-14 17:27 ` kargl at gcc dot gnu dot org
@ 2010-02-15  1:30 ` kargl at gcc dot gnu dot org
  2010-02-15  8:18 ` zazzou at gmail dot com
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-02-15  1:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from kargl at gcc dot gnu dot org  2010-02-15 01:29 -------
I've posted a question to c.l.f about this code.  I 
believe the language of the standard is contradictory
and as such the code can be interpreted as illegal or
legal.

http://groups.google.com/group/comp.lang.fortran/browse_frm/thread/76b23c9927b52161#


-- 


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
  2010-02-14 17:21 ` [Bug fortran/43062] " pault at gcc dot gnu dot org
@ 2010-02-14 17:27 ` kargl at gcc dot gnu dot org
  2010-02-15  1:30 ` kargl at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-02-14 17:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from kargl at gcc dot gnu dot org  2010-02-14 17:27 -------

> NAMELIST/TOTO/TAB
>                  1
> Error: NAMELIST attribute conflicts with ALLOCATABLE attribute in 'tab' at (1)
> ========
> 
> Test file :
> ========
> PROGRAM MAIN
> REAL, DIMENSION(:), ALLOCATABLE :: TAB
> NAMELIST/TOTO/TAB
> END PROGRAM MAIN
> ========
> 
> It should work with F2003 new features.

Interesting.  I can't find a passage in the F2003 standard that
specifically allows this form.  I do find a passage that indicates
that it is not allowed.  In section 5.4:

    A namelist group object shall either be accessed by use or
    host association or shall have its type, type parameters, and
    shape specified by previous specification statements ...

In your code, the shape of the array has not been specified by a
previous specification statement.  OTOH, I do find in 9.5.3.6,

    Every allocatable namelist-group-object in the namelist group
    shall be allocated and every namelist-group-object that is a
    pointer shall be associated with a target.

which suggests that the form is legal.


-- 


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


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

* [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute
  2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
@ 2010-02-14 17:21 ` pault at gcc dot gnu dot org
  2010-02-14 17:27 ` kargl at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 28+ messages in thread
From: pault at gcc dot gnu dot org @ 2010-02-14 17:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pault at gcc dot gnu dot org  2010-02-14 17:21 -------
Yes indeed!  Section 5.4 of F2003 removes most of the restrictions for
namelist-group-objects. Ifort 11.1 does the right thing with your testcase. 

Thanks for the report.

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2010-02-14 17:21:24
               date|                            |


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


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

end of thread, other threads:[~2011-02-02 17:59 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-43062-4@http.gcc.gnu.org/bugzilla/>
2010-10-01 20:21 ` [Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute jvdelisle at gcc dot gnu.org
2010-10-02  6:44 ` burnus at gcc dot gnu.org
2011-01-18 13:07 ` burnus at gcc dot gnu.org
2011-01-18 13:40 ` jvdelisle at gcc dot gnu.org
2011-01-18 13:40 ` zazzou at gmail dot com
2011-01-22 21:58 ` burnus at gcc dot gnu.org
2011-01-22 22:41 ` burnus at gcc dot gnu.org
2011-01-26 10:33 ` burnus at gcc dot gnu.org
2011-01-28  9:43 ` zazzou at gmail dot com
2011-01-28 10:19 ` burnus at gcc dot gnu.org
2011-01-29 22:23 ` zazzou at gmail dot com
2011-02-02 17:59 ` dnovillo at gcc dot gnu.org
2010-02-14 13:29 [Bug fortran/43062] New: " zazzou at gmail dot com
2010-02-14 17:21 ` [Bug fortran/43062] " pault at gcc dot gnu dot org
2010-02-14 17:27 ` kargl at gcc dot gnu dot org
2010-02-15  1:30 ` kargl at gcc dot gnu dot org
2010-02-15  8:18 ` zazzou at gmail dot com
2010-02-15 17:04 ` kargl at gcc dot gnu dot org
2010-02-15 20:34 ` jvdelisle at gcc dot gnu dot org
2010-02-15 21:47 ` kargl at gcc dot gnu dot org
2010-02-15 21:50 ` kargl at gcc dot gnu dot org
2010-02-17  2:07 ` jvdelisle at gcc dot gnu dot org
2010-02-17  7:32 ` burnus at gcc dot gnu dot org
2010-02-17  8:23 ` burnus at gcc dot gnu dot org
2010-02-17 15:57 ` kargl at gcc dot gnu dot org
2010-02-17 16:03 ` kargl at gcc dot gnu dot org
2010-02-17 21:26 ` burnus at gcc dot gnu dot org
2010-03-01  8:45 ` burnus at gcc dot gnu dot org
2010-04-06 18:42 ` burnus 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).