public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/13628] New: Assembly error: "section difference relocatable subtraction expression"
@ 2004-01-09 11:25 twhall at cuhk dot edu dot hk
  2004-01-09 16:45 ` [Bug fortran/13628] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: twhall at cuhk dot edu dot hk @ 2004-01-09 11:25 UTC (permalink / raw)
  To: gcc-bugs

I've just discovered that my g77 on my Mac OS X 10.2.8 chokes on
the simplest little stand-alone main programs:

C
C File: hello.f
C
      PRINT *, 'Hello, World!'
      STOP
      END

% g77 -o hello hello.f
/var/tmp//cccXywU0.s:48:section difference relocatable subtraction expression, "LC3" minus 
"L1$pb" using a symbol at the end of section will not produce an assembly time constant
/var/tmp//cccXywU0.s:48:use a symbol with a constant value created with an assignment instead 
of the expression, L_const_sym = LC3 - L1$pb
/var/tmp//cccXywU0.s:47:section difference relocatable subtraction expression, "LC3" minus 
"L1$pb" using a symbol at the end of section will not produce an assembly time constant
/var/tmp//cccXywU0.s:47:use a symbol with a constant value created with an assignment instead 
of the expression, L_const_sym = LC3 - L1$pb
% 

It seems unrelated to optimization or linking: the -O0 -g -c options
make no difference.

On the other hand, more complicated programs compile and execute fine --
which is why I didn't notice this problem sooner.

C
C File: hellosub.f
C
      CALL HELLO
      STOP
      END
C
      SUBROUTINE HELLO
      PRINT *, 'Hello, World!'
      RETURN
      END

% g77 -o hellosub hellosub.f
% ./hellosub
 Hello, World!
% 

System specs:

   Mac OS X 10.2.8

% uname -a
Darwin --- 6.8 Darwin Kernel Version 6.8: Wed Sep 10 15:20:55 PDT 2003; root:xnu/xnu-
344.49.obj~2/RELEASE_PPC  Power Macintosh powerpc

% which gcc
/usr/bin/gcc

%gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
Thread model: posix
gcc version 3.3 20030304 (Apple Computer, Inc. build 1493)

% which g77
/usr/local/bin/g77

% g77 -v
Reading specs from /usr/local/lib/gcc-lib/powerpc-apple-darwin6.6/3.3/specs
Configured with: ../gcc/configure --enable-shared --enable-threads=posix
Thread model: posix
gcc version 3.3

% /usr/local/bin/gcc -v
Reading specs from /usr/local/lib/gcc-lib/powerpc-apple-darwin6.6/3.3/specs
Configured with: ../gcc/configure --enable-shared --enable-threads=posix
Thread model: posix
gcc version 3.3


I compiled g77 from the CVS 3.3 release.  Looking at the "-v" specs,
I guess that was before "upgrading" from Darwin 6.6 to 6.8 (Mac OS X
10.2.6 to 10.2.8), but still with a compatible (?) gcc version 3.3 from
Apple.

Simple programs used to compile fine.  This would not be the first
time that some subtle change in the Mac OS revealed a subtle bug or
incompatibility with g77.  I've spent hours tracking down such things
in two previous releases.

Thanks for your time.  I think g77 is really a great compiler.  I dearly
wish that Apple would include it in their gcc distribution, so that there
would be no question of incompatibility.

-- 
           Summary: Assembly error: "section difference relocatable
                    subtraction expression"
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: twhall at cuhk dot edu dot hk
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin6.6
  GCC host triplet: powerpc-apple-darwin6.8
GCC target triplet: powerpc-apple-darwin6.6


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


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

* [Bug fortran/13628] Assembly error: "section difference relocatable subtraction expression"
  2004-01-09 11:25 [Bug fortran/13628] New: Assembly error: "section difference relocatable subtraction expression" twhall at cuhk dot edu dot hk
@ 2004-01-09 16:45 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-09 16:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-09 16:45 -------
Fixed for 3.3.2 at least.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.3.2


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


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

end of thread, other threads:[~2004-01-09 16:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-09 11:25 [Bug fortran/13628] New: Assembly error: "section difference relocatable subtraction expression" twhall at cuhk dot edu dot hk
2004-01-09 16:45 ` [Bug fortran/13628] " 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).