This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29537] ICE in gfc_match_common for blank common in BLOCK DATA unit
- From: "aldot at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Oct 2006 12:59:28 -0000
- Subject: [Bug fortran/29537] ICE in gfc_match_common for blank common in BLOCK DATA unit
- References: <bug-29537-11811@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from aldot at gcc dot gnu dot org 2006-10-26 12:59 -------
(In reply to comment #8)
> Created an attachment (id=12476)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12476&action=view) [edit]
> untested proposed fix
>
> I hope to test this patch soon.
bootstrapped and regtested with no additional regression on i686-linux-gnu.
>
> Note that it adds a warning about blank common in block data but -- unlike the
> patch in the previous comment -- does accept the common instead of abandoning
> it via goto cleanup. Please advise if not cleaning this up is acceptable or if
> blank commons should be ignored there.
The symbol needs to be retained, AFAIU.
With the proposed patch, we have:
$ nm blockdata_2.o
00000004 C __BLNK__
00000000 B __BLOCK_DATA__
U _gfortran_set_std
00000000 T MAIN__
>
> fortran/ChangeLog:
> 2006-10-22 Bernhard Fischer <aldot@gcc.gnu.org>
>
> PR fortran/29537
> * trans-common.c (gfc_trans_common): For unnamed block data the
> proc_name is null, so use the locus of the common.
> (gfc_sym_mangled_common_id): Fix whitespace.
> * match.c (gfc_match_common): Emit warning about blank common in
> block data.
Rephrasing to
* trans-common.c (gfc_trans_common): If the blank common is
in a procedure or program without a name then proc_name is null, so use
the locus of the common.
> testsuite/ChangeLog:
> 2006-10-22 Bernhard Fischer <aldot@gcc.gnu.org>
>
> PR fortran/29537
> * blockdata_1.f90: Add warning about blank common in block data.
> * blockdata_2.f90: New testcase.
>
--
aldot at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29537