[Bug fortran/37173] Check whether intrinsic assignment between character kind=1 / 4 is allowed

2014-09-29 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37173

Francois-Xavier Coudert  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |INVALID

--- Comment #6 from Francois-Xavier Coudert  ---
So, given the clear change in wording since the 2008 interp, I close this
report as INVALID.


[Bug fortran/37173] Check whether intrinsic assignment between character kind=1 / 4 is allowed

2014-09-29 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37173

--- Comment #5 from Francois-Xavier Coudert  ---
(In reply to Tobias Burnus from comment #3)
> We still might add a -std=f2008 check there.

I find the same wording in my local copy of F2003, actually:

"If variable and expr have different kind type parameters, each character c in
expr is converted to the kind type parameter of variable by
ACHAR(IACHAR(c),KIND(variable))."

(ISO/IEC JTC1/SC22/WG5 N1578 dated 2003-10-8)


(In reply to Dominique d'Humieres from comment #4)
> (5) if the variable is of type character and of ISO 10646, ASCII, or default
> character kind, expr shall be of ISO 10646, ASCII, or default character kind,
> (6) otherwise if the variable is of type character expr shall have the same
> kind type parameter,

I think there is a reasonable interpretation where it does not conflict: it
means ISO 10646 and ASCII and default interconvert, but not necessarily other
character kinds. It does not say, for example, "expr shall be of ISO 10646,
ASCII, or default character kind (*respectively*)".


[Bug fortran/37173] Check whether intrinsic assignment between character kind=1 / 4 is allowed

2014-09-28 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37173

--- Comment #4 from Dominique d'Humieres  ---
In the same document I also see

7.2.1.2 Intrinsic assignment statement

1 An intrinsic assignment statement is an assignment statement that is not a
defined assignment statement (7.2.1.4).

In an intrinsic assignment statement,
...
(5) if the variable is of type character and of ISO 10646, ASCII, or default
character kind, expr shall be of ISO 10646, ASCII, or default character kind,
(6) otherwise if the variable is of type character expr shall have the same
kind type parameter,
...

which seems to conflict with

"For an intrinsic assignment statement where the variable is of type character,
if expr has a different kind type parameter, each character c in expr is
converted to the kind type parameterof the variable by ACHAR(IACHAR(c),
KIND(variable))"


[Bug fortran/37173] Check whether intrinsic assignment between character kind=1 / 4 is allowed

2014-09-28 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37173

--- Comment #3 from Tobias Burnus  ---
(In reply to Francois-Xavier Coudert from comment #2)
> Long overdue

But now changed as the current wording (seemingly as of F2008):

"For an intrinsic assignment statement where the variable is of type character,
if expr has a different kind type parameter, each character c in expr is
converted to the kind type parameterof the variable by ACHAR(IACHAR(c),
KIND(variable))"


See http://j3-fortran.org/doc/year/14/14-007r2.pdf, "7.2.1.3 Interpretation of
intrinsic assignments", paragraph 11.


We still might add a -std=f2008 check there.


[Bug fortran/37173] Check whether intrinsic assignment between character kind=1 / 4 is allowed

2014-09-27 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37173

Francois-Xavier Coudert  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||fxcoudert at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |fxcoudert at gcc dot 
gnu.org

--- Comment #2 from Francois-Xavier Coudert  ---
Long overdue, though it's not particularly bad (and it appears noöne uses
non-default character kinds anyway). I'll take care of it.

[Bug fortran/37173] Check whether intrinsic assignment between character kind=1 / 4 is allowed

2009-03-29 Thread fxcoudert at gcc dot gnu dot org


--- Comment #1 from fxcoudert at gcc dot gnu dot org  2009-03-29 08:52 
---
I think you're right.


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords|diagnostic  |accepts-invalid
   Last reconfirmed|-00-00 00:00:00 |2009-03-29 08:52:07
   date||


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