From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3102 invoked by alias); 17 Sep 2004 19:54:07 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 3093 invoked from network); 17 Sep 2004 19:54:05 -0000 Received: from unknown (HELO mail16.ha.ovh.net) (213.186.33.51) by sourceware.org with SMTP; 17 Sep 2004 19:54:05 -0000 Received: (qmail 18159 invoked by uid 503); 17 Sep 2004 19:53:09 -0000 Received: from d213-101-192-51.cust.tele2.fr (HELO ?192.168.1.100?) (laurent%guerby.net@213.101.192.51) by ns0.ovh.net with SMTP; 17 Sep 2004 19:53:09 -0000 Subject: Ada system.fat_lflt.fat_long_float.scaling problem analysis From: Laurent GUERBY To: Richard Kenner Cc: gcc@gcc.gnu.org In-Reply-To: <10409132124.AA11452@vlsi1.ultra.nyu.edu> References: <10409132124.AA11452@vlsi1.ultra.nyu.edu> Content-Type: text/plain Message-Id: <1095450828.6762.125.camel@pc.site> Mime-Version: 1.0 Date: Fri, 17 Sep 2004 20:52:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-09/txt/msg01084.txt.bz2 On Mon, 2004-09-13 at 23:24, Richard Kenner wrote: > s-fatlfl.o(.bss+0x0): In function `system.fat_lflt.fat_long_float.scaling': > /home/guerby/work/gcc/build/build-20040913T200122/gcc/ada/rts/s-fatgen.adb:540: multiple definition of `r' > s-fatflt.o(.bss+0x0):/home/guerby/work/gcc/build/build-20040913T200122/gcc/ada/rts/s-fatgen.adb:540: first defined here > > I'm assuming this is a problem in the Ada front end, though I haven't > gotten a chance to look at it yet. I looked at the expanded code for s-fatflt.ads and found the "r": xa : constant system.system__address := system__fat_flt__fat_float__valid__to_addressGP22755__target! (system__fat_flt__fat_float__valid__float_access(x)); r : system__fat_flt__fat_float__valid__float_rep; pragma import (ada, r); for r'address use xa; freeze r [] The following reduced test case shows the problem: procedure P is procedure P1 (X : access Integer) is R : Integer; pragma Import (Ada, R); for R'Address use X.all'Address; begin null; end P1; procedure P2 (X : access Integer) is R : Integer; pragma Import (Ada, R); for R'Address use X.all'Address; begin null; end P2; begin null; end P; $ /home/guerby/work/gcc/build/build-20040917T192720/gcc/xgcc -B/home/guerby/work/gcc/build/build-20040917T192720/gcc/ -c p.adb /tmp/ccK6lePn.s: Assembler messages: /tmp/ccK6lePn.s:13: Error: symbol `r' is already defined My guess is that the r symbol is not flagged as local when there's an address clause and an Import pragma, so it might be a gigi problem. Hope this helps, Laurent