public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking
@ 2004-04-16 16:23 salevin at lgc dot com
  2004-04-16 17:26 ` [Bug debug/14977] " salevin at lgc dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: salevin at lgc dot com @ 2004-04-16 16:23 UTC (permalink / raw)
  To: gcc-bugs

The attached shar demonstrates the problem.  Run the "doit.sh"
script.  Removing the -gstabs+ flag lets the test run just fine.

Reading specs from /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-
checking --with-system-zlib --enable-__cxa_atexit --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-24)

#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.2.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 2004-04-16 08:53 MDT by <salevin@denamd64001>.
# Source directory was 
`/.automount/denfiler01/vol/vol0_den/home/salevin/falloctest'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#   1100 -rw-r--r-- testalloc.f
#    231 -rw-r--r-- doit.f
#    236 -rw-r--r-- doit2.f
#    822 -rw-r--r-- myalloc.f
#    310 -rw-r--r-- getmem.c
#    125 -rw-r--r-- cppmain.cpp
#   1157 -rw-r--r-- mem.inc
#    452 -rw-r--r-- dimen.inc
#     44 -rw-r--r-- spacez_reloc.ldscript
#    537 -rwxr-xr-x doit.sh
#
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
  if test "$gettext_dir" = FAILED && test -f $dir/gettext \
     && ($dir/gettext --version >/dev/null 2>&1)
  then
    set `$dir/gettext --version 2>&1`
    if test "$3" = GNU
    then
      gettext_dir=$dir
    fi
  fi
  if test "$locale_dir" = FAILED && test -f $dir/shar \
     && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
  then
    locale_dir=`$dir/shar --print-text-domain-dir`
  fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
  echo=echo
else
  TEXTDOMAINDIR=$locale_dir
  export TEXTDOMAINDIR
  TEXTDOMAIN=sharutils
  export TEXTDOMAIN
  echo="$gettext_dir/gettext -s"
fi
if touch -am -t 200112312359.59 $$.touch >/dev/null 2>&1 && test ! -f 
200112312359.59 -a -f $$.touch; then
  shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
elif touch -am 123123592001.59 $$.touch >/dev/null 2>&1 && test ! -f 
123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then
  shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
elif touch -am 1231235901 $$.touch >/dev/null 2>&1 && test ! -f 1231235901 -a -
f $$.touch; then
  shar_touch='touch -am $3$4$5$6$2 "$8"'
else
  shar_touch=:
  echo
  $echo 'WARNING: not restoring timestamps.  Consider getting and'
  $echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch
#
if mkdir _sh22636; then
  $echo 'x -' 'creating lock directory'
else
  $echo 'failed to create lock directory'
  exit 1
fi
# ============= testalloc.f ==============
if test -f 'testalloc.f' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'testalloc.f' '(file already exists)'
else
  $echo 'x -' extracting 'testalloc.f' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'testalloc.f' &&
X      SUBROUTINE TESTIT
X        IMPLICIT NONE
X        INCLUDE 'dimen.inc'
X        INCLUDE 'mem.inc'
X        INTEGER*8 GETMEM
X        EXTERNAL GETMEM
X
X        INTEGER*8 LOCSP1, NEWMEM, I8OFF, I8NDX
X        INTEGER NWORDS , I4NDX
X
X        INTEGER I,IBOT,ITOP
X
X        LOCSP1 = %LOC(ISPACEz(1))
X        WRITE(*,'(A,Z16)') 'ADDRESS OF ISPACEz ', LOCSP1
X        WRITE(*,'(A,Z16)') 'ADDRESS OF ITEMPz ', %LOC(ITEMPz(1))
X        NCALLSrz = 6
X        IBOT=28
X        ITOP=31 - 3
X        NWORDS=2**(IBOT-1)
X        WRITE(*,*) 'NWORDS ',NWORDS
X        CALL MYALLOC(NWORDS,I4NDX)
X        ISPACEz(I4NDX) = I4NDX
X
X      CALL DOIT(6,RSPACEz(I4NDX+3),ISPACEz(I4NDX+9),RSPACEz(I4NDX+20))
X      CALL DOIT2(RSPACEz(I4NDX+20),ISPACEz(I4NDX+9),RSPACEz(I4NDX+3),6)
X      CALL DOIT3(RSPACEz(I4NDX+20),ISPACEz(I4NDX+9),RSPACEz(I4NDX+3),6)
X
X      RETURN
X      END
X      SUBROUTINE DOIT3(C,IB,A,N)
X      IMPLICIT NONE
X      INCLUDE 'dimen.inc'
X      INCLUDE 'mem.inc'
X      INTEGER N
X      REAL A(N),C(NCALLSrz)
X      INTEGER IB(N)
X      INTEGER I
X      DO I=1,N
X         C(I) = A(I)*IB(I)
X      ENDDO
X      RETURN
X      END
SHAR_EOF
  (set 20 04 04 05 15 39 19 'testalloc.f'; eval "$shar_touch") &&
  chmod 0644 'testalloc.f' ||
  $echo 'restore of' 'testalloc.f' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'testalloc.f:' 'MD5 check failed'
3d72c698e691dbdc92e9e20101e8c8b4  testalloc.f
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'testalloc.f'`"
    test 1100 -eq "$shar_count" ||
    $echo 'testalloc.f:' 'original size' '1100,' 'current size' "$shar_count!"
  fi
fi
# ============= doit.f ==============
if test -f 'doit.f' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'doit.f' '(file already exists)'
else
  $echo 'x -' extracting 'doit.f' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'doit.f' &&
X      SUBROUTINE DOIT(N,A,IB,C)
X      IMPLICIT NONE
X      INTEGER N
X      REAL A(N),C(*)
X      INTEGER IB(N)
X      INCLUDE 'mem.inc'
X      INTEGER I
X      DO I=1,N
X         C(I) = SIN(A(I)*IB(I))
X      ENDDO
X      RETURN
X      END
SHAR_EOF
  (set 20 04 04 05 14 45 37 'doit.f'; eval "$shar_touch") &&
  chmod 0644 'doit.f' ||
  $echo 'restore of' 'doit.f' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'doit.f:' 'MD5 check failed'
42cbe27055ca639e5a05f4cb8d6f66e7  doit.f
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'doit.f'`"
    test 231 -eq "$shar_count" ||
    $echo 'doit.f:' 'original size' '231,' 'current size' "$shar_count!"
  fi
fi
# ============= doit2.f ==============
if test -f 'doit2.f' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'doit2.f' '(file already exists)'
else
  $echo 'x -' extracting 'doit2.f' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'doit2.f' &&
X      SUBROUTINE DOIT2(C,IB,A,N)
X      IMPLICIT NONE
X      INCLUDE 'dimen.inc'
X      INTEGER N
X      REAL A(N),C(NCALLSrz)
X      INTEGER IB(N)
X      INTEGER I
X      DO I=1,N
X         C(I) = A(I)*IB(I)
X      ENDDO
X      RETURN
X      END
SHAR_EOF
  (set 20 04 04 05 15 36 11 'doit2.f'; eval "$shar_touch") &&
  chmod 0644 'doit2.f' ||
  $echo 'restore of' 'doit2.f' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'doit2.f:' 'MD5 check failed'
bed7bf552a5a4981eb723eae742b605d  doit2.f
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'doit2.f'`"
    test 236 -eq "$shar_count" ||
    $echo 'doit2.f:' 'original size' '236,' 'current size' "$shar_count!"
  fi
fi
# ============= myalloc.f ==============
if test -f 'myalloc.f' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'myalloc.f' '(file already exists)'
else
  $echo 'x -' extracting 'myalloc.f' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'myalloc.f' &&
X      SUBROUTINE MYALLOC(NWORDS,IXPTR)
X        IMPLICIT NONE
X        INCLUDE 'mem.inc'
X        INTEGER*8 GETMEM
X        EXTERNAL GETMEM
X
X        INTEGER*8 LOCSP1, NEWMEM, I8OFF, I8NDX
X        INTEGER NWORDS , I4NDX, IXPTR
X
X        INTEGER I,IBOT,ITOP
X
X        LOCSP1 = %LOC(ISPACEz(1))
X        WRITE(*,'(A,Z16)') 'ADDRESS OF ISPACEz ', LOCSP1
X        WRITE(*,'(A,Z16)') 'ADDRESS OF ITEMPz ', %LOC(ITEMPz(1))
X        NWORDS=2**(IBOT-1)
X        WRITE(*,*) 'NWORDS ',NWORDS
X        NEWMEM = GETMEM(NWORDS)
X        I8OFF = NEWMEM - LOCSP1
X        I8NDX = 1+I8OFF/4
X        I4NDX = I8NDX
X        WRITE(*,'(A,Z16,A,Z16,A,Z16)') 'GETMEM ADDRESS ',NEWMEM,
X     &     ' I8OFF ',I8OFF, ' I8NDX ',I8NDX
X        WRITE(*,'(A,Z8)')
X     &     '                                I4NDX ',I4NDX
X        IXPTR = I4NDX
X
X      RETURN
X      END
SHAR_EOF
  (set 20 04 04 04 15 08 25 'myalloc.f'; eval "$shar_touch") &&
  chmod 0644 'myalloc.f' ||
  $echo 'restore of' 'myalloc.f' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'myalloc.f:' 'MD5 check failed'
00179f6e11a0aaf5837cb899725ed31f  myalloc.f
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'myalloc.f'`"
    test 822 -eq "$shar_count" ||
    $echo 'myalloc.f:' 'original size' '822,' 'current size' "$shar_count!"
  fi
fi
# ============= getmem.c ==============
if test -f 'getmem.c' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'getmem.c' '(file already exists)'
else
  $echo 'x -' extracting 'getmem.c' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'getmem.c' &&
#include <malloc.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
long int getmem_(int *nwords)
{
X  struct mallinfo minfo;
X
X  mallopt(M_MMAP_MAX, 0);
X
X  fprintf(stdout," sbrk(0) %p\n", sbrk(0));
X  fflush(stdout);
/*  malloc_stats(); */
X  
X  return (long int) malloc((*nwords) * sizeof(int));
X  
}
SHAR_EOF
  (set 20 04 03 01 13 39 13 'getmem.c'; eval "$shar_touch") &&
  chmod 0644 'getmem.c' ||
  $echo 'restore of' 'getmem.c' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'getmem.c:' 'MD5 check failed'
c9800b3718226dffe4db3c6b47de4aa7  getmem.c
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'getmem.c'`"
    test 310 -eq "$shar_count" ||
    $echo 'getmem.c:' 'original size' '310,' 'current size' "$shar_count!"
  fi
fi
# ============= cppmain.cpp ==============
if test -f 'cppmain.cpp' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'cppmain.cpp' '(file already exists)'
else
  $echo 'x -' extracting 'cppmain.cpp' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'cppmain.cpp' &&
extern "C" {
extern int *spacez_;
extern void testit_(void);
}
X
int main(int argc, char **argv) {
X  testit_();
X  return 0;
}
SHAR_EOF
  (set 20 04 04 04 15 13 18 'cppmain.cpp'; eval "$shar_touch") &&
  chmod 0644 'cppmain.cpp' ||
  $echo 'restore of' 'cppmain.cpp' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'cppmain.cpp:' 'MD5 check failed'
006061bcb794aab431551c02595b4044  cppmain.cpp
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'cppmain.cpp'`"
    test 125 -eq "$shar_count" ||
    $echo 'cppmain.cpp:' 'original size' '125,' 'current size' "$shar_count!"
  fi
fi
# ============= mem.inc ==============
if test -f 'mem.inc' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'mem.inc' '(file already exists)'
else
  $echo 'x -' extracting 'mem.inc' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'mem.inc' &&
X
C------------------------------------------------------------------------------
C       Include file for the use of managed memory
C------------------------------------------------------------------------------
X
C ..... MEMBLKpz is the length (in words) of the the first block of memory.
X        INTEGER MEMBLKpz
X        PARAMETER ( MEMBLKpz = 2 )
X
C ..... ISPACEz and RSPACEz are the space array, the managed memory buffers
X
X        INTEGER ISPACEz( MEMBLKpz )
X        REAL RSPACEz( MEMBLKpz )
C       DOUBLE PRECISION DSPACEz( MEMBLKpz/2 )
X        COMMON /SPACEz/ ISPACEz
X        SAVE /SPACEz/
C       EQUIVALENCE( ISPACEz, RSPACEz, DSPACEz )
X        EQUIVALENCE( ISPACEz, RSPACEz )
X
C ..... ITEMPz, RTEMPz, CARRTEMPz, and CTEMPz are unmanaged scratch buffers
X
X        INTEGER LTEMPpz
X        PARAMETER ( LTEMPpz=50000 )
X
X        COMMON /TEMPz/ ITEMPz
X        INTEGER ITEMPz( LTEMPpz )
X        REAL RTEMPz( LTEMPpz )
X        CHARACTER CARRTEMPz( LTEMPpz*4 )
X        EQUIVALENCE( ITEMPz, RTEMPz )
X        EQUIVALENCE( ITEMPz, CARRTEMPz )
X
X        COMMON /TEMPzc/ CCTEMPz
X        CHARACTER*500 CCTEMPz(100), CTEMPz
X        EQUIVALENCE ( CCTEMPz, CTEMPz )
X
SHAR_EOF
  (set 20 04 04 04 14 48 39 'mem.inc'; eval "$shar_touch") &&
  chmod 0644 'mem.inc' ||
  $echo 'restore of' 'mem.inc' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'mem.inc:' 'MD5 check failed'
2e5e7ddd1278dd7ec1b2bd19725f5e04  mem.inc
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'mem.inc'`"
    test 1157 -eq "$shar_count" ||
    $echo 'mem.inc:' 'original size' '1157,' 'current size' "$shar_count!"
  fi
fi
# ============= dimen.inc ==============
if test -f 'dimen.inc' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'dimen.inc' '(file already exists)'
else
  $echo 'x -' extracting 'dimen.inc' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'dimen.inc' &&
X
C------------------------------------------------------------------------------
C       Include file for the use of managed memory
C------------------------------------------------------------------------------
X
C ..... MEMBLKpz is the length (in words) of the the first block of memory.
X        INTEGER NCALLSrz
X
C ..... ISPACEz and RSPACEz are the space array, the managed memory buffers
X
X        COMMON /RUNTIMEz/ NCALLSrz
X        SAVE /RUNTIMEz/
X
SHAR_EOF
  (set 20 04 04 05 15 34 59 'dimen.inc'; eval "$shar_touch") &&
  chmod 0644 'dimen.inc' ||
  $echo 'restore of' 'dimen.inc' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'dimen.inc:' 'MD5 check failed'
67b2ba49872da68341194d81e83ddcf6  dimen.inc
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'dimen.inc'`"
    test 452 -eq "$shar_count" ||
    $echo 'dimen.inc:' 'original size' '452,' 'current size' "$shar_count!"
  fi
fi
# ============= spacez_reloc.ldscript ==============
if test -f 'spacez_reloc.ldscript' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'spacez_reloc.ldscript' '(file already exists)'
else
  $echo 'x -' extracting 'spacez_reloc.ldscript' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'spacez_reloc.ldscript' &&
spacez_ = ( _end + 8589934584 + 8 ) & ~ 7 ;
SHAR_EOF
  (set 20 04 04 03 00 36 45 'spacez_reloc.ldscript'; eval "$shar_touch") &&
  chmod 0644 'spacez_reloc.ldscript' ||
  $echo 'restore of' 'spacez_reloc.ldscript' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'spacez_reloc.ldscript:' 'MD5 check failed'
9f60633f72cc54122b941007d461725b  spacez_reloc.ldscript
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'spacez_reloc.ldscript'`"
    test 44 -eq "$shar_count" ||
    $echo 'spacez_reloc.ldscript:' 'original size' '44,' 'current 
size' "$shar_count!"
  fi
fi
# ============= doit.sh ==============
if test -f 'doit.sh' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'doit.sh' '(file already exists)'
else
  $echo 'x -' extracting 'doit.sh' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'doit.sh' &&
#! /bin/sh -v
g77 -g -gstabs+ -m64 -mieee-fp -fPIC -fno-second-underscore -c testalloc.f
g77 -g -gstabs+ -m64 -mieee-fp -fPIC -fno-second-underscore -c doit.f
g77 -g -gstabs+ -m64 -mieee-fp -fPIC -fno-second-underscore -c doit2.f
g77 -g -gstabs+ -m64 -mieee-fp -fPIC -fno-second-underscore -c myalloc.f
gcc -g -gstabs+ -m64 -mieee-fp -fPIC -c getmem.c
g++ -g -gstabs+ -m64 -mieee-fp -fPIC -c cppmain.cpp
g++ -g -gstabs+ -m64 -mieee-fp -fPIC cppmain.o doit.o doit2.o getmem.o 
myalloc.o testalloc.o -Wl,spacez_reloc.ldscript -lg2c
X./a.out
SHAR_EOF
  (set 20 04 04 16 08 50 50 'doit.sh'; eval "$shar_touch") &&
  chmod 0755 'doit.sh' ||
  $echo 'restore of' 'doit.sh' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'doit.sh:' 'MD5 check failed'
5f944cbb79315bd0b56226d4cec65831  doit.sh
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'doit.sh'`"
    test 537 -eq "$shar_count" ||
    $echo 'doit.sh:' 'original size' '537,' 'current size' "$shar_count!"
  fi
fi
rm -fr _sh22636
exit 1

-- 
           Summary: -gstabs+ breaks AMD 64-bit linking
           Product: gcc
           Version: 3.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: salevin at lgc dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: 3.3.2 20030502 (Red Hat Linux 3.2.3-24)
  GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux


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


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

* [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking
  2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
@ 2004-04-16 17:26 ` salevin at lgc dot com
  2004-04-17  8:12 ` pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: salevin at lgc dot com @ 2004-04-16 17:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From salevin at lgc dot com  2004-04-16 15:51 -------
Created an attachment (id=6096)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6096&action=view)
shar file


-- 


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


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

* [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking
  2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
  2004-04-16 17:26 ` [Bug debug/14977] " salevin at lgc dot com
@ 2004-04-17  8:12 ` pinskia at gcc dot gnu dot org
  2004-04-19  5:29 ` salevin at lgc dot com
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-17  8:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-17 05:34 -------
Can you try a newer release as 3.2.x is no longer being updated and the compiler is you 
used is not a FSF released compiler?

Also what is the error do you get?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
  GCC build triplet|3.3.2 20030502 (Red Hat     |
                   |Linux 3.2.3-24)             |


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


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

* [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking
  2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
  2004-04-16 17:26 ` [Bug debug/14977] " salevin at lgc dot com
  2004-04-17  8:12 ` pinskia at gcc dot gnu dot org
@ 2004-04-19  5:29 ` salevin at lgc dot com
  2004-04-21 22:52 ` salevin at lgc dot com
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: salevin at lgc dot com @ 2004-04-19  5:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From salevin at lgc dot com  2004-04-19 03:16 -------
Andrew,

I'm not the sysadmin for the AMD loaner machine, so I've got little control on 
the compiler version being used.  It will be several weeks before I get the 
spare cycles to build a private gcc from sources.  The error messages I get from 
the self-contained test in the shar attachment are:

/lair/salevin/falloctest/doit.f:11: relocation truncated to fit: R_X86_64_32 
spacez_
doit.o(.stab+0x2fc):/lair/salevin/falloctest/doit.f:11: relocation truncated to 
fit: R_X86_64_32 spacez_
myalloc.o(.stab+0x344): In function `myalloc_':
/lair/salevin/falloctest/myalloc.f:27: relocation truncated to fit: R_X86_64_32 
spacez_
myalloc.o(.stab+0x350):/lair/salevin/falloctest/myalloc.f:27: relocation 
truncated to fit: R_X86_64_32 spacez_
testalloc.o(.stab+0x350): In function `doit3_':
/lair/salevin/falloctest/testalloc.f:38: relocation truncated to fit: 
R_X86_64_32 spacez_
testalloc.o(.stab+0x35c):/lair/salevin/falloctest/testalloc.f:38: relocation 
truncated to fit: R_X86_64_32 spacez_
testalloc.o(.stab+0x59c):/lair/salevin/falloctest/testalloc.f:41: relocation 
truncated to fit: R_X86_64_32 spacez_
testalloc.o(.stab+0x5a8):/lair/salevin/falloctest/testalloc.f:41: relocation 
truncated to fit: R_X86_64_32 spacez_
collect2: ld returned 1 exit status



-- 


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


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

* [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking
  2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
                   ` (2 preceding siblings ...)
  2004-04-19  5:29 ` salevin at lgc dot com
@ 2004-04-21 22:52 ` salevin at lgc dot com
  2004-04-21 22:58 ` bangerth at dealii dot org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: salevin at lgc dot com @ 2004-04-21 22:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From salevin at lgc dot com  2004-04-21 21:53 -------
Since the test case is TOTALLY self-contained, wouldn't it make sense to simply
run it on an x86_64 (Opteron) machine without waiting weeks for me to find the
time to spend HOURS building a private compiler version?  If you don't have
ready access to such a machine, then I'm wasting everybody's time reporting the
problem to you in the first case, in which case, please close and delete the bug
report.

-- 


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


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

* [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking
  2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
                   ` (3 preceding siblings ...)
  2004-04-21 22:52 ` salevin at lgc dot com
@ 2004-04-21 22:58 ` bangerth at dealii dot org
  2004-04-22  2:45 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bangerth at dealii dot org @ 2004-04-21 22:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-04-21 22:11 -------
This being a volunteer project, we need the help of our users on some 
occasions. The question with running a newer version is certainly valid: 
IFAIK, the FSF gcc3.2 version did not contain support for AMD64, so this 
is something that redhat added by themselves. It may or may not be the 
case that our own sources have this problem as well. 
 
Apart from this, building your own gcc version in your homedirectory 
is actually quite simple once you have discovered the --prefix=... 
switch to ./configure. 
 
W. 

-- 


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


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

* [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking
  2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
                   ` (4 preceding siblings ...)
  2004-04-21 22:58 ` bangerth at dealii dot org
@ 2004-04-22  2:45 ` pinskia at gcc dot gnu dot org
  2004-04-22  4:31 ` salevin at lgc dot com
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-22  2:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-22 00:06 -------
Also after looking at the error message, can you try a newer bintutils as it looks that is where the 
problem is and not in GCC at all?  As GCC just emits asm and binutils assembles it.

-- 


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


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

* [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking
  2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
                   ` (5 preceding siblings ...)
  2004-04-22  2:45 ` pinskia at gcc dot gnu dot org
@ 2004-04-22  4:31 ` salevin at lgc dot com
  2004-04-22  4:33 ` salevin at lgc dot com
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: salevin at lgc dot com @ 2004-04-22  4:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From salevin at lgc dot com  2004-04-22 03:51 -------
Subject: RE:  -gstabs+ breaks AMD 64-bit linking

binutils is the latest (2.14) version on the machine.

-----Original Message-----
From: pinskia at gcc dot gnu dot org
To: salevin
Sent: 4/21/2004 7:06 PM
Subject: [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking


------- Additional Comments From pinskia at gcc dot gnu dot org
2004-04-22 00:06 -------
Also after looking at the error message, can you try a newer bintutils
as it looks that is where the 
problem is and not in GCC at all?  As GCC just emits asm and binutils
assembles it.



-- 


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


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

* [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking
  2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
                   ` (6 preceding siblings ...)
  2004-04-22  4:31 ` salevin at lgc dot com
@ 2004-04-22  4:33 ` salevin at lgc dot com
  2004-04-22  4:34 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: salevin at lgc dot com @ 2004-04-22  4:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From salevin at lgc dot com  2004-04-22 04:06 -------
Subject: RE:  -gstabs+ breaks AMD 64-bit linking

Tell you what, I'll wager $100 that the test will fail with the 3.4.0 latest
compiler release.  The time I've spent assembling the standalone test case
is worth more than that and I have yet to see anyone associated with the gcc
project attempting to meet me even 1% of the way, despite my completely
self-contained tiny test case that demonstrates the problem.  Perhaps the
lure of hard dollars will spark some interest.

-----Original Message-----
From: bangerth at dealii dot org
To: salevin
Sent: 4/21/2004 5:11 PM
Subject: [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking


------- Additional Comments From bangerth at dealii dot org  2004-04-21
22:11 -------
This being a volunteer project, we need the help of our users on some 
occasions. The question with running a newer version is certainly valid:

IFAIK, the FSF gcc3.2 version did not contain support for AMD64, so this

is something that redhat added by themselves. It may or may not be the 
case that our own sources have this problem as well. 
 
Apart from this, building your own gcc version in your homedirectory 
is actually quite simple once you have discovered the --prefix=... 
switch to ./configure. 
 
W. 



-- 


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


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

* [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking
  2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
                   ` (7 preceding siblings ...)
  2004-04-22  4:33 ` salevin at lgc dot com
@ 2004-04-22  4:34 ` pinskia at gcc dot gnu dot org
  2004-04-22  8:03 ` pme at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-22  4:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-22 04:15 -------
I also have a question why are using stabs anyways?  dwarf2 is more support and contains more 
information than stabs could ever contain.  (Note dwarf2 is enabled by default when supplying -g to 
gcc).  Also why don't you report this to RedHat as this is their compiler and not ours?

-- 


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


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

* [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking
  2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
                   ` (8 preceding siblings ...)
  2004-04-22  4:34 ` pinskia at gcc dot gnu dot org
@ 2004-04-22  8:03 ` pme at gcc dot gnu dot org
  2004-04-22 14:00 ` salevin at lgc dot com
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pme at gcc dot gnu dot org @ 2004-04-22  8:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pme at gcc dot gnu dot org  2004-04-22 05:27 -------
1)  This compiler...

    gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-24)

...is not ours.  We simply do not have the resources to maintain variants,
especially when there's a corporation to do just that.

2)  The error messages are from ld.  We do not maintain ld; it's not part
of the compiler.  You need to talk to the binutils (not GCC) package
maintainers at Red Hat.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking
  2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
                   ` (9 preceding siblings ...)
  2004-04-22  8:03 ` pme at gcc dot gnu dot org
@ 2004-04-22 14:00 ` salevin at lgc dot com
  2004-04-22 15:58 ` bangerth at dealii dot org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: salevin at lgc dot com @ 2004-04-22 14:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From salevin at lgc dot com  2004-04-22 13:36 -------
Subject: RE:  -gstabs+ breaks AMD 64-bit linking

In (1) you say it's a problem with some variant version of gcc,
In (2) you say it's not a problem with any version of gcc.

So, when I can shake loose the promised time to build the latest gcc 3.4.0
distribution and run my test, where, if anywhere, should I report the
failure that I've wagered $100 will reoccur?

-----Original Message-----
From: pme at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org]
Sent: Wednesday, April 21, 2004 11:28 PM
To: salevin
Subject: [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking



------- Additional Comments From pme at gcc dot gnu dot org  2004-04-22
05:27 -------
1)  This compiler...

    gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-24)

...is not ours.  We simply do not have the resources to maintain variants,
especially when there's a corporation to do just that.

2)  The error messages are from ld.  We do not maintain ld; it's not part
of the compiler.  You need to talk to the binutils (not GCC) package
maintainers at Red Hat.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


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

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.


-- 


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


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

* [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking
  2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
                   ` (10 preceding siblings ...)
  2004-04-22 14:00 ` salevin at lgc dot com
@ 2004-04-22 15:58 ` bangerth at dealii dot org
  2004-04-22 17:20 ` ian at wasabisystems dot com
  2004-04-22 17:32 ` salevin at lgc dot com
  13 siblings, 0 replies; 15+ messages in thread
From: bangerth at dealii dot org @ 2004-04-22 15:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-04-22 15:41 -------
I certainly believe that by insulting people you won't get very far. I, 
as most of the other guys working on the bug database, do this in my 
spare time. I do it on my own computer. I just happen to not have an AMD64 
standing around here. What am I supposed to do? 
 
However, if you are willing to pay money: there are companies out there  
that offer services with guaranteed turn-around time for a price. You may 
try, for example, to contact the company that apparently shipped your 
compiler, which as has been noted elsewhere is not identical to ours. They 
may be more responsive to cheque-waiving than we are over here. 
 
Thanks 
  Wolfgang 

-- 


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


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

* [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking
  2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
                   ` (11 preceding siblings ...)
  2004-04-22 15:58 ` bangerth at dealii dot org
@ 2004-04-22 17:20 ` ian at wasabisystems dot com
  2004-04-22 17:32 ` salevin at lgc dot com
  13 siblings, 0 replies; 15+ messages in thread
From: ian at wasabisystems dot com @ 2004-04-22 17:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ian at wasabisystems dot com  2004-04-22 17:07 -------
There is a real bug here, though I don't think the compiler can be described as
responsible.  The compiler generates lines like
        .stabs  "ispacez:V(0,54)=ar(0,28);1;2;(0,28)",40,0,12,spacez_
For this line, the assembler generates a relocation against spacez_.  This
relocation is always a four byte relocation.  The linker script arranges for
spacez_ to be at an address which can not be referenced by a four byte relocation.

Fixing this would require changing the assembler to generate an eight byte
relocation.  Of course, this would break the debugger, which only expects to see
a four byte value.

Most people just recommend using DWARF instead.

-- 


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


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

* [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking
  2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
                   ` (12 preceding siblings ...)
  2004-04-22 17:20 ` ian at wasabisystems dot com
@ 2004-04-22 17:32 ` salevin at lgc dot com
  13 siblings, 0 replies; 15+ messages in thread
From: salevin at lgc dot com @ 2004-04-22 17:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From salevin at lgc dot com  2004-04-22 17:19 -------
Subject: RE:  -gstabs+ breaks AMD 64-bit linking

Thanks for looking at it.  I can certainly live with -g (and print
statements) only.  Please close the bug.  

-----Original Message-----
From: ian at wasabisystems dot com [mailto:gcc-bugzilla@gcc.gnu.org]
Sent: Thursday, April 22, 2004 11:08 AM
To: salevin
Subject: [Bug debug/14977] -gstabs+ breaks AMD 64-bit linking



------- Additional Comments From ian at wasabisystems dot com  2004-04-22
17:07 -------
There is a real bug here, though I don't think the compiler can be described
as
responsible.  The compiler generates lines like
        .stabs  "ispacez:V(0,54)=ar(0,28);1;2;(0,28)",40,0,12,spacez_
For this line, the assembler generates a relocation against spacez_.  This
relocation is always a four byte relocation.  The linker script arranges for
spacez_ to be at an address which can not be referenced by a four byte
relocation.

Fixing this would require changing the assembler to generate an eight byte
relocation.  Of course, this would break the debugger, which only expects to
see
a four byte value.

Most people just recommend using DWARF instead.



-- 


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


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

end of thread, other threads:[~2004-04-22 17:19 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-16 16:23 [Bug debug/14977] New: -gstabs+ breaks AMD 64-bit linking salevin at lgc dot com
2004-04-16 17:26 ` [Bug debug/14977] " salevin at lgc dot com
2004-04-17  8:12 ` pinskia at gcc dot gnu dot org
2004-04-19  5:29 ` salevin at lgc dot com
2004-04-21 22:52 ` salevin at lgc dot com
2004-04-21 22:58 ` bangerth at dealii dot org
2004-04-22  2:45 ` pinskia at gcc dot gnu dot org
2004-04-22  4:31 ` salevin at lgc dot com
2004-04-22  4:33 ` salevin at lgc dot com
2004-04-22  4:34 ` pinskia at gcc dot gnu dot org
2004-04-22  8:03 ` pme at gcc dot gnu dot org
2004-04-22 14:00 ` salevin at lgc dot com
2004-04-22 15:58 ` bangerth at dealii dot org
2004-04-22 17:20 ` ian at wasabisystems dot com
2004-04-22 17:32 ` salevin at lgc dot com

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).