This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/13093] New: non-relocatable subtraction expression, "L3$pb" minus "LSJR11"
- From: "gcc at microbizz dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Nov 2003 22:49:11 -0000
- Subject: [Bug target/13093] New: non-relocatable subtraction expression, "L3$pb" minus "LSJR11"
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
See the thread "PR target/10129 ADA bootstrap failure on Darwin on
powerpc-apple-darwin" on the gcc-patches list
<http://gcc.gnu.org/ml/gcc-patches/2003-07/msg00171.html>.
With Pascal, based on gcc-3.3.2, I run into a similar problem on
powerpc-apple-darwin. See below.
S i d e b a r
The extra compiler argument passed (--longjmp-all-nonlocal-labels) is needed
because PR 10901 is still open. In fact, the compiler argument has only been
created because nonlocal goto's tend to be broken in gcc. With some luck, we get
a fix for some platform in some version of gcc, but invariably the problems come
back for some other platform in a later version of gcc.
E n d S i d e b a r
The workaround, by the way, is to pass -O2 instead of -O3.
Regards,
Adriaan van Os
<http://www.microbizz.nl/gpc.html>
[G4:~/gnu/testgpc/test-20030830] adriaan% make MASK=nlgpp2.pas
EXTRA_PFLAGS=--longjmp-all-nonlocal-labels
Running the GPC Test Suite. This may take a while ...
rm -f *.dat *.o *.s *.i *.gpi *.gpd *.gpc core a.out stderr.out *.exe
testmake.tmp dummy.c dummy.pas dummy.out diff_cr*.tmp fixcr fixcr.exe
rm -f todo/a.out todo/*.exe todo/*.o todo/*.s todo/*.i todo/*.gpi todo/*.gpd
todo/core
{ gpc --version | head -1; gpc --print-search-dirs | grep install | head -1;
hostname || echo "unknown host"; date "+%Y-%m-%d %H:%M:%S"; } | \
sed -e 's,^,Testing ,;N;s,\n.*gcc-lib[/\], (,;s,[/\].*,),;N;s,\n,
(,;s,$,),;N;s/\n/, /'
Testing gpc 20030830, based on gcc-3.3.2 (powerpc-apple-darwin) (G4.local.),
2003-11-17 22:26:56
echo "gpc -g -O3 -W -Wall -Wundef -Wpointer-arith -Wno-unused
--longjmp-all-nonlocal-labels "
gpc -g -O3 -W -Wall -Wundef -Wpointer-arith -Wno-unused
--longjmp-all-nonlocal-labels
PC="gpc" PFLAGS="--autobuild -g -O3 -W -Wall -Wundef -Wpointer-arith -Wno-unused
--longjmp-all-nonlocal-labels " SRCDIR="." TEST_MAKE_FLAG=test-make-flag
"./test_run" nlgpp2.pas | tee test_log | "./test_sum" | tee test_summary
objdump: a.out: No such file or directory
TEST nlgpp2.pas: /var/tmp//cca94hTX.s:399:non-relocatable subtraction
expression, "L3$pb" minus "LSJR11"
/var/tmp//cca94hTX.s:399:symbol: "L3$pb" can't be undefined in a subtraction
expression
/var/tmp//cca94hTX.s:398:non-relocatable subtraction expression, "L3$pb" minus
"LSJR11"
/var/tmp//cca94hTX.s:398:symbol: "L3$pb" can't be undefined in a subtraction
expression
/var/tmp//cca94hTX.s:unknown:Undefined local symbol L3$pb
failed
# of GPC tests 1
# of GPC tests passed 0
# of GPC tests skipped 0
# of GPC tests failed 1
[G4:~/gnu/testgpc/test-20030830] adriaan% gpc -v
Reading specs from
/Developer/Pascal/gpc332d2/lib/gcc-lib/powerpc-apple-darwin/3.3.2/specs
Configured with: ../gpc-332d2/configure --enable-languages=pascal,c
--prefix=/Developer/Pascal/gpc332d2 --enable-threads=posix
--target=powerpc-apple-darwin
Thread model: posix
gpc version 20030830, based on gcc-3.3.2
[G4:~/gnu/testgpc/test-20030830] adriaan% cat nlgpp2.pas
{ Same as nlgpp.pas, but with more paranoia checks. }
program NLGPP2 (Output);
procedure Fail;
begin
WriteLn ('failed')
end;
procedure Recursive (n: Integer; procedure Proc);
label 1, 2;
procedure DoGoto;
begin
WriteLn ('DoGoto ', n, ' ', @Proc = @Fail);
goto 1
end;
begin
WriteLn ('Recursive start ', n, ' ', @Proc = @Fail);
if n = 3 then
Recursive (n - 1, DoGoto)
else if n > 0 then
Recursive (n - 1, Proc)
else
Proc;
WriteLn ('Recursive before goto ', n, ' ', @Proc = @Fail);
goto 2;
1:
if n = 3 then
WriteLn ('OK')
else
WriteLn ('failed ', n);
2:
WriteLn ('Recursive end ', n, ' ', @Proc = @Fail);
end;
begin
WriteLn ('Main start');
Recursive (10, Fail);
WriteLn ('Main end')
end.
--
Summary: non-relocatable subtraction expression, "L3$pb" minus
"LSJR11"
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at microbizz dot nl
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc-apple-darwin
GCC host triplet: powerpc-apple-darwin
GCC target triplet: powerpc-apple-darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13093