This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30689] equivalence modifies common block
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Feb 2007 16:11:12 -0000
- Subject: [Bug fortran/30689] equivalence modifies common block
- References: <bug-30689-3791@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pault at gcc dot gnu dot org 2007-02-03 16:11 -------
> Apparently the address of lenstr gets shifted in the subroutine because of the
> equivalence statement. Is this the right behavior?
This is what happens with my amd84:
$ /irun/bin/gfortran --version
GNU Fortran 95 (GCC) 4.3.0 20070202 (experimental)
Copyright (C) 2006 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
Paul@NONE-X6EIN5I8FN /home/fortran
$ /irun/bin/gfortran -fdefault-integer-8 pr30689.f90
pr30689.f90:5.20:
COMMON/QPSTAT/LASTYP,STATUS,CHRCTR,DIGIT,Intger,FP,dp,LENSTR
1
Warning: Padding of 4 bytes required before 'dp' in COMMON 'qpstat' at (1)
pr30689.f90:16.20:
Common/QPStat/LASTYP,STATUS,CHRCTR,DIGIT,Intger,FP,DP,LENSTR
1
Warning: Padding of 12 bytes required before 'dp' in COMMON 'qpstat' at (1)
pr30689.f90:16.20:
Common/QPStat/LASTYP,STATUS,CHRCTR,DIGIT,Intger,FP,DP,LENSTR
1
Warning: Named COMMON block 'qpstat' at (1) shall be of the same size
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30689