This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to gfortran PR13742


Victor Leikehman wrote:
+      if (is_init)
+     gfc_error ("Variables in COMMON block should not"
+              " have initializers"); /* common_bad.f90 */
+      decl = build_common_decl (sym, union_type, is_init);

I don't believe this is correct. I didn't find a place where this is
explicitly allowed in the standard, but on line 22, page 49 of the (draft) Fortran 95 standard (this is section 5.1 right before 5.1.1) it says:
----
The presence of /initialization/ implies that /object-name/ is saved, except for an /object-name/ in a named common block or an /object-name/ with the PARAMETER attribute.
----


Regards,
- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]