[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#45479: marked as done ([alpha] gcc 2.95.1 -O2 problem compiling oo2c_64)

Your message dated Thu, 2 Jan 2003 01:54:53 +0100
with message-id <15891.36317.54416.254754@gargle.gargle.HOWL>
and subject line no feedback for gcc-report, closing
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at submit) by bugs.debian.org; 19 Sep 1999 08:43:22 +0000
Received: (qmail 2068 invoked from network); 19 Sep 1999 08:43:22 -0000
Received: from pisces.tcg.sgi.net (
  by master.debian.org with SMTP; 19 Sep 1999 08:43:22 -0000
Received: from by.net (whig@dap-209-114-172-42.pm4-1.smds.cran.pa.stargate.net [])
	by pisces.tcg.sgi.net (StarGate/4.0.24) with ESMTP id EAA08681;
	Sun, 19 Sep 1999 04:43:15 -0400 (EDT)
Sender: whig@sgi.net
Message-ID: <37E4A21E.4852F725@by.net>
Date: Sun, 19 Sep 1999 08:43:10 +0000
From: Mike Goldman <whig@by.net>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: submit@bugs.debian.org
CC: Michael van Acken <acken@vanacken.do.uunet.de>
Subject: Problem with gcc 2.95.1/-O2 on Linux/Alpha
Content-Type: multipart/mixed;

This is a multi-part message in MIME format.
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Package: gcc

Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Received: from mill.adm.by.net ([] ident=mail)
	by kundera.adm.by.net with esmtp (Exim 3.02 #1)
	id 11Pd9V-000Nwo-00
	for whig@kundera.adm.by.net; Fri, 10 Sep 1999 22:44:33 -0400
Received: from binky.de.uu.net [] 
	by mill.adm.by.net with esmtp (Exim 3.03 #1)
	id 11PcaW-0000yw-00 (Debian); Fri, 10 Sep 1999 22:08:24 -0400
Received: from reflection (pec-25-2.tnt1.me2.uunet.de [])
	by binky.de.uu.net (5.5.5/5.5.5) with ESMTP id EAA03393
	for <whig@by.net>; Sat, 11 Sep 1999 04:07:51 +0200 (MET DST)
Date: Sat, 11 Sep 1999 04:07:51 +0200 (MET DST)
Message-Id: <199909110207.EAA03393@binky.de.uu.net>
Received: (qmail 740 invoked from network); 11 Sep 1999 02:10:05 -0000
Received: from localhost (HELO reflection.vanacken.do.uunet.de) (
  by localhost with SMTP; 11 Sep 1999 02:10:05 -0000
From: Michael van Acken <acken@vanacken.do.uunet.de>
To: gcc-bugs@gcc.gnu.org
CC: whig@by.net
Subject: Problem with gcc 2.95.1/-O2 on Linux/Alpha
Reply-to: acken@informatik.uni-kl.de

The problem: The Oberon to C compiler oo2c_64 fails to compile with
gcc 2.95.1 using the CFLAGS "-O2 -g" on Linux/Alpha, but can be
installed successfully using "-O1 -g".  The target machine and gcc in
question are

  $ hostname -f
  $ uname -a
  Linux faure 2.2.9 #1 Fri May 21 23:08:39 CDT 1999 alpha unknown
  $ gcc -v
  Reading specs from /usr/lib/gcc-lib/alpha-linux/2.95.1/specs
  gcc version 2.95.1 19990816 (release)

The specs file is attached to this mail.  I don't have any information
which configure call was used to install gcc on this machine.

Because the program in question is the output of a pre-compiler (and
not very readable), I cannot break it down into a handy test case for
you within a reasonable time frame.  But I can tell you how to
reproduce the error, and point out the very small code window where I
believe gcc is getting things wrong.


Get the oo2c tar ball at


and apply this patch to add some debug output to the program:

diff -Nru oo2c_64-1.4.6-orig/src.c/ParamPaths.c oo2c_64-1.4.6/src.c/ParamPaths.c
--- oo2c_64-1.4.6-orig/src.c/ParamPaths.c       Sun Aug  8 14:56:20 1999
+++ oo2c_64-1.4.6/src.c/ParamPaths.c    Fri Sep 10 20:18:38 1999
@@ -206,6 +206,7 @@
   if (!(i2)) goto l10;
   h3 = 0;
+printf("A: adr=%lx, value=%d\n", (long int)ParamPaths__ParsePatterns_sym, *ParamPaths__ParsePatterns_sym);
   return (void*)h3;
@@ -429,7 +430,9 @@
   if (i5) goto l7;
   sym = (signed char)2;
   sym = (signed char)2;
+printf("Calling ParamPaths__ParsePatterns_PathList\n");
   h1 = (hugeint)ParamPaths__ParsePatterns_PathList((unsigned char)1, str, &sym, &includeEnd);
+printf("B: adr=%lx, value=%d\n", (long int)&sym, sym);
   i5 = sym;
   i2 = includeEnd;
   goto l8;

Then try to build the program:

  CFLAGS="-O2 -g" ./configure --disable-gc --disable-libs

On faure this ends when the program `stage1/oo2c' (built from the
source files in src.c/) is called for the first time:

| [...]
| if test no = yes; then \
|   stage1/oo2c --config oo2crc.stage2 --libtool-cmd /usr/bin/libtool --make-lib --lib-path /usr/local/lib liboo2c && touch liboo2c; \
| else \
|   stage1/oo2c --config oo2crc.stage2 -Mv liboo2c; \
| fi
| Calling ParamPaths__ParsePatterns_PathList
| A: adr=11ffff930, value=1
| B: adr=11ffff930, value=0
| Error in oo2crc.stage2 at pos 861:
| GET expected
| make: *** [liboo2c] Error 1

The error message is wrong, the problem is summarized by the output
lines A and B: at the very end of the function
  (file oo2c_64-1.4.6/src.c/ParamPaths.c, line 148)
the value at the indicated address is reported as `1' (output A),
while directly after the call to this function, the same address is
reported to have the value `0' (output B).  "A" is correct, but
somehow the correct value does not show up in memory, or is
overwritten in between.  Btw, the same happens if -fno-strict-aliasing
is set.

On the other hand, when building with -O1, the Makefile completes all
rules without any errors:

  make distclean 
  CFLAGS="-O1 -g" ./configure --disable-gc --disable-libs

In particular, the first occurence of the debug output looks like this:

| [...]
| Calling ParamPaths__ParsePatterns_PathList
| A: adr=11ffff940, value=1
| B: adr=11ffff940, value=1
| [...]

Drop me a note if you need any additional information.

Michael van Acken

file: /usr/lib/gcc-lib/alpha-linux/2.95.1/specs
*asm: %{G*} %{relax:-relax} %{gdwarf*:-no-mdebug}


%{!undef:%{.S:-D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY }}%{.cc|.cxx|.C:-D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus }%{.m:-D__LANGUAGE_OBJECTIVE_C__ -D__LANGUAGE_OBJECTIVE_C }%{!.S:%{!.cc:%{!.cxx:%{!.C:%{!.m:-D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C }}}}}}%{mieee:-D_IEEE_FP }%{mieee-with-inexact:-D_IEEE_FP -D_IEEE_FP_INEXACT }}%(cpp_cpu) %(cpp_subtarget)



crtend.o%s crtn.o%s

-m elf64alpha %{G*} %{relax:-relax}		  %{O*:-O3} %{!O*:-O1}						  %{shared:-shared}						  %{!shared:							    %{!static:							      %{rdynamic:-export-dynamic}				      %{!dynamic-linker:-dynamic-linker %(elf_dynamic_linker)}}	    %{static:-static}}

%{shared:-lc}%{!shared:%{pthread:-lpthread }%{profile:-lc_p}%{!profile:-lc}} 


%{!shared:      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}   crti.o%s crtbegin.o%s



-Dlinux -Dunix -Asystem(linux) -D_LONGLONG -D__alpha__ -D__ELF__



. !mieee;ieee mieee;



mieee mieee;


-D__alpha_bwx__ -Acpu(bwx)

-D__alpha_max__ -Acpu(max)

-D__alpha_fix__ -Acpu(fix)

-D__alpha_cix__ -Acpu(cix)

-D__alpha_ev4__ -Acpu(ev4)

-D__alpha_ev5__ -Acpu(ev5)

-D__alpha_ev6__ -Acpu(ev6)



%(cpp_im_ev5) %(cpp_am_bwx)

%(cpp_im_ev5) %(cpp_am_bwx) %(cpp_am_max)

%(cpp_im_ev6) %(cpp_am_bwx) %(cpp_am_max) %(cpp_am_fix)


%{!undef:-Acpu(alpha) -Amachine(alpha) -D__alpha -D__alpha__ %{mcpu=ev4|mcpu=21064:%(cpp_cpu_ev4) }%{mcpu=ev5|mcpu=21164:%(cpp_cpu_ev5) }%{mcpu=ev56|mcpu=21164a:%(cpp_cpu_ev56) }%{mcpu=pca56|mcpu=21164pc|mcpu=21164PC:%(cpp_cpu_pca56) }%{mcpu=ev6|mcpu=21264:%(cpp_cpu_ev6) }%{!mcpu*:%(cpp_cpu_default) }}



%{!fsyntax-only:  %{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} 			%{r} %{s} %{t} %{u*} %{x} %{z} %{Z}			%{!A:%{!nostdlib:%{!nostartfiles:%S}}}			%{static:} %{L*} %D %o			%{!nostdlib:%{!nodefaultlibs:%G %L %G}}			%{!A:%{!nostdlib:%{!nostartfiles:%E}}}			%{T*}			


Received: (at 45479-done) by bugs.debian.org; 2 Jan 2003 00:57:16 +0000
>From doko@cs.tu-berlin.de Wed Jan 01 18:57:15 2003
Return-path: <doko@cs.tu-berlin.de>
Received: from mail.cs.tu-berlin.de [] (root)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 18Ttff-0004yw-00; Wed, 01 Jan 2003 18:57:15 -0600
Received: from bolero.cs.tu-berlin.de (daemon@bolero.cs.tu-berlin.de [])
	by mail.cs.tu-berlin.de (8.9.3/8.9.3) with ESMTP id BAA04083
	for <45479-done@bugs.debian.org>; Thu, 2 Jan 2003 01:54:54 +0100 (MET)
Received: (from doko@localhost)
	by bolero.cs.tu-berlin.de (8.11.6+Sun/8.9.3) id h020src22434;
	Thu, 2 Jan 2003 01:54:53 +0100 (MET)
From: Matthias Klose <doko@cs.tu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <15891.36317.54416.254754@gargle.gargle.HOWL>
Date: Thu, 2 Jan 2003 01:54:53 +0100
To: 45479-done@bugs.debian.org
Subject: no feedback for gcc-report, closing
X-Mailer: VM 7.03 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid
Delivered-To: 45479-done@bugs.debian.org
X-Spam-Status: No, hits=-0.1 required=5.0

feedback has been requested on Sat, 1 Jun 2002 22:19:25 +0200, now
closing the report. Please feel free to reopen the report providing
more information using recent compiler versions.

Reply to: