[Bug fortran/50549] should detect different type parameters in structure constructors (r178939)

2022-03-29 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50549

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

 Resolution|--- |FIXED
   Target Milestone|--- |12.0
 Status|ASSIGNED|RESOLVED

--- Comment #6 from anlauf at gcc dot gnu.org ---
Fixed for gcc-12.  Closing.

Sorry that it took so long.

[Bug fortran/50549] should detect different type parameters in structure constructors (r178939)

2022-03-29 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50549

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Harald Anlauf :

https://gcc.gnu.org/g:0712f356374c2cf26015cccfa3141537e42cbb12

commit r12-7900-g0712f356374c2cf26015cccfa3141537e42cbb12
Author: Harald Anlauf 
Date:   Sun Mar 27 21:35:15 2022 +0200

Fortran: character length of pointer assignments in structure constructors

gcc/fortran/ChangeLog:

PR fortran/50549
* resolve.cc (resolve_structure_cons): Reject pointer assignments
of character with different lengths in structure constructor.

gcc/testsuite/ChangeLog:

PR fortran/50549
* gfortran.dg/char_pointer_assign_7.f90: New test.

[Bug fortran/50549] should detect different type parameters in structure constructors (r178939)

2022-03-27 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50549

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #4 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2022-March/057710.html

[Bug fortran/50549] should detect different type parameters in structure constructors (r178939)

2022-03-24 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50549

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

 CC||anlauf at gcc dot gnu.org

--- Comment #3 from anlauf at gcc dot gnu.org ---
Created attachment 52683
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52683&action=edit
Tentative patch

This patch provides an error message somewhat similar to NAG, e.g.

pr50549.f90:13:6:

   13 |   u=t(p1)! different character length
  |  1
Error: Unequal character lengths (2/1) for pointer component 'p2' in
constructor at (1)


Regtesting looks fine.

[Bug fortran/50549] should detect different type parameters in structure constructors (r178939)

2021-02-27 Thread zeccav at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50549

--- Comment #2 from Vittorio Zecca  ---
Still present on version 11.
NAG nagfor compiler detecs it.
nagfor -S gfbug87.f -w
NAG Fortran Compiler Release 7.0(Yurakucho) Build 7042
Error: gfbug87.f, line 13: Wrong character length (1 instead of 2) for pointer
component P2 in constructor for type T
Error: gfbug87.f, line 14: Wrong character length (1 instead of 2) for pointer
component P2 in constructor for type T
[NAG Fortran Compiler error termination, 2 errors]

[Bug fortran/50549] should detect different type parameters in structure constructors (r178939)

2013-06-22 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50549

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-06-22
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Still present at revision 200321.