Bug 21384 - internal compiler error: Bus error
Summary: internal compiler error: Bus error
Status: RESOLVED DUPLICATE of bug 20059
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2005-05-04 17:54 UTC by George Bosilca
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host: powerpc-apple-darwin8.0.0
Target: powerpc-apple-darwin8.0.0
Build: powerpc-apple-darwin8.0.0
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 George Bosilca 2005-05-04 17:54:28 UTC
Unaligned COMMON blocks generate bus erros. One of the most basic test used by
configure to test the alignement of the Fortran types fail to compile. Even
worst it generate a bus error on an Apple computer.

      program falign
      external ALIGN
      LOGICAL  w,x,y,z
      CHARACTER a,b,c
      common /foo/a,w,b,x,y,c,z
      call ALIGN(w,x,y,z)
      end


gfortran has been compiled from snapshot download today (4 May 2005) from the
gcc website. I compile it on a dual G5 machine using the flags "-mcpu=G5 -maltivec".
Comment 1 Andrew Pinski 2005-05-04 18:00:16 UTC
I thought this was fixed.
on i686-pc-linux-gnu we get the following warnings:
 In file t.f:7

      common /foo/a,w,b,x,y,c,z                                         
                 1
Warning: Padding of 3 bytes required before 'x' in COMMON 'foo' at (1)
 In file t.f:7

      common /foo/a,w,b,x,y,c,z                                         
                 1
Warning: Padding of 3 bytes required before 'z' in COMMON 'foo' at (1)
 In file t.f:7

      common /foo/a,w,b,x,y,c,z                                         
                 1
Warning: COMMON 'foo' at (1) requires 3 bytes of padding at start

Guess I have to check on my Mac OS X box when I get back to my dorm room.
Comment 2 George Bosilca 2005-05-04 19:24:22 UTC
I get the latest version from CVS. And the bug seems to be fixed on this version.

fortran compiler version:

applebasket:/tmp root# gfortran --version
GNU Fortran 95 (GCC 4.1.0 20050504 (experimental))
Copyright (C) 2005 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

Result of the code:

 In file check_size.F:5

      common /foo/a,w,b,x,y,c,z
                 1
Warning: Padding of 3 bytes required before 'x' in COMMON 'foo' at (1)
 In file check_size.F:5

      common /foo/a,w,b,x,y,c,z
                 1
Warning: Padding of 3 bytes required before 'z' in COMMON 'foo' at (1)
 In file check_size.F:5

      common /foo/a,w,b,x,y,c,z
                 1
Warning: COMMON 'foo' at (1) requires 3 bytes of padding at start
Comment 3 Andrew Pinski 2005-05-04 19:30:57 UTC
Lets reopen it and ...
Comment 4 Andrew Pinski 2005-05-04 19:31:19 UTC
Close it as a dup of bug 20059.

*** This bug has been marked as a duplicate of 20059 ***