Bug 34135 - Bind(C): Alignment of commons wrong on OSX
Bind(C): Alignment of commons wrong on OSX
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: fortran
4.3.0
: P3 normal
: ---
Assigned To: Not yet assigned to anyone
: patch, wrong-code
Depends on:
Blocks: 32630
  Show dependency treegraph
 
Reported: 2007-11-17 14:31 UTC by Tobias Burnus
Modified: 2007-11-24 05:45 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2007-11-17 14:31:47 UTC
As reported by Dominique,
http://gcc.gnu.org/ml/fortran/2007-11/msg00105.html

Christopher D. Rickett replied:
> (3) gfortran.dg/bind_c_coms.f90 which fails because of the warnings:
> ld: warning alignment lost in merging tentative definition _f03_com2
> ld: warning alignment lost in merging tentative definition _mycom
> ld: warning alignment lost in merging tentative definition _mycom2
> ld: warning alignment lost in merging tentative definition _singl

i submitted a patch that fixes the alignment differences for bind(c)
commons on OSX back in August (i think), but noone ever reviewed it

 * * *

See the thread starting at
  http://gcc.gnu.org/ml/fortran/2007-08/msg00138.html
and the patch at
  http://gcc.gnu.org/ml/fortran/2007-08/msg00142.html
Comment 1 Dominique d'Humieres 2007-11-18 10:18:21 UTC
 I have applied the patch at http://gcc.gnu.org/ml/fortran/2007-08/msg00142.html and the warnings have disappeared without introducing any visible regression (Intel Darwin9.1).

Comment 2 Dominique d'Humieres 2007-11-23 09:13:08 UTC
This bug is really annoying, could someone test that the patch in

http://gcc.gnu.org/ml/fortran/2007-08/msg00142.html

does not break anything on other platforms? If it does not, could it be committed?

TIA

Dominique

Comment 3 Jerry DeLisle 2007-11-24 00:41:19 UTC
Reviewed and OK.  I will commit after regression testing completed.
Comment 4 Jerry DeLisle 2007-11-24 05:45:51 UTC
Patch committed on trunk.

2007-11-23 Christopher D. Rickett <crickett@lanl.gov>

	* trans-common.c (build_common_decl): Fix the alignment for
	BIND(C) common blocks.