public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18794] New: warn about common variable alignment problems
@ 2004-12-02 20:12 Thomas dot Koenig at online dot de
  2004-12-02 21:01 ` [Bug fortran/18794] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-12-02 20:12 UTC (permalink / raw)
  To: gcc-bugs

$ cat common.f
      program main
      character*1 c
      common /foo/ c,r
      c = 'a'
      r = 1.2
      end
$ g77 common.f
common.f: In program `main':
common.f:3: warning:
         common /foo/ c,r
                 ^
Initial padding for common block `foo' is 3 bytes at (^) -- consider
reorderingmembers, largest-type-size first
$ gfortran common.f
$ gfortran -v
Reading specs from /home/ig25/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure --prefix=/home/ig25
--enable-languages=c,c++,f95 : (reconfigured) ../gcc/configure
--prefix=/home/ig25 --with-gcc-version-trigger=/home/ig25/gcc/gcc/version.c
--enable-languages=c,c++,f95 --no-create --no-recursion
Thread model: posix
gcc version 4.0.0 20041129 (experimental)

Just about any Fortran compiler warns about this sort
of thing (and they should, the performance penalty
for this kind of thing can be severe).

-- 
           Summary: warn about common variable alignment problems
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Thomas dot Koenig at online dot de
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18794


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-04-20  2:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-02 20:12 [Bug fortran/18794] New: warn about common variable alignment problems Thomas dot Koenig at online dot de
2004-12-02 21:01 ` [Bug fortran/18794] " pinskia at gcc dot gnu dot org
2005-01-06 14:42 ` tobi at gcc dot gnu dot org
2005-01-17 11:05 ` Thomas dot Koenig at online dot de
2005-04-20  2:00 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).