public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug ada/17540] New: Duplicate symbols while building Ada @ 2004-09-17 21:32 laurent at guerby dot net 2004-09-17 22:46 ` [Bug ada/17540] " fw at deneb dot enyo dot de ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: laurent at guerby dot net @ 2004-09-17 21:32 UTC (permalink / raw) To: gcc-bugs Filed to enable tracking, from "Ada system.fat_lflt.fat_long_float.scaling problem analysis" discussion on gcc@gcc.gnu.org: 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. Very similar code is present in GNAT sources and is causing the ACATS failures, see s-fatgen.adb, function Valid: XA : constant System.Address := To_Address (Float_Access (X)); R : Float_Rep; pragma Import (Ada, R); for R'Address use XA; -- R is a view of the input floating-point parameter. Note that we -- must avoid copying the actual bits of this parameter in float -- form (since it may be a signalling NaN. Since it's a generic, it might lead to generated code as I've writen in my example if multiple instanciation are present. Such a construct has worked for all versions of GNAT, but might depend on some specific code generation behaviour that is no longer present. -- Summary: Duplicate symbols while building Ada Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: laurent at guerby dot net CC: dewar at gnat dot com,gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17540 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/17540] Duplicate symbols while building Ada 2004-09-17 21:32 [Bug ada/17540] New: Duplicate symbols while building Ada laurent at guerby dot net @ 2004-09-17 22:46 ` fw at deneb dot enyo dot de 2004-09-20 10:51 ` charlet at gcc dot gnu dot org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: fw at deneb dot enyo dot de @ 2004-09-17 22:46 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- CC| |fw at deneb dot enyo dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17540 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/17540] Duplicate symbols while building Ada 2004-09-17 21:32 [Bug ada/17540] New: Duplicate symbols while building Ada laurent at guerby dot net 2004-09-17 22:46 ` [Bug ada/17540] " fw at deneb dot enyo dot de @ 2004-09-20 10:51 ` charlet at gcc dot gnu dot org 2004-09-20 12:08 ` cvs-commit at gcc dot gnu dot org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: charlet at gcc dot gnu dot org @ 2004-09-20 10:51 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From charlet at gcc dot gnu dot org 2004-09-20 10:51 ------- confirmed. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2004-09-20 10:51:05 date| | Target Milestone|--- |4.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17540 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/17540] Duplicate symbols while building Ada 2004-09-17 21:32 [Bug ada/17540] New: Duplicate symbols while building Ada laurent at guerby dot net 2004-09-17 22:46 ` [Bug ada/17540] " fw at deneb dot enyo dot de 2004-09-20 10:51 ` charlet at gcc dot gnu dot org @ 2004-09-20 12:08 ` cvs-commit at gcc dot gnu dot org 2004-09-20 12:10 ` charlet at gcc dot gnu dot org 2004-09-23 9:00 ` cvs-commit at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2004-09-20 12:08 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-09-20 12:08 ------- Subject: Bug 17540 CVSROOT: /cvs/gcc Module name: gcc Changes by: charlet@gcc.gnu.org 2004-09-20 12:07:53 Modified files: gcc/ada : freeze.adb ChangeLog Log message: 2004-09-20 Robert Dewar <dewar@gnat.com> PR ada/17540 * freeze.adb (Check_Address_Clause): Reset Is_Imported and Is_Public if an address clause is present, since that means that the Import should be ignored. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/freeze.adb.diff?cvsroot=gcc&r1=1.20&r2=1.21 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/ChangeLog.diff?cvsroot=gcc&r1=1.563&r2=1.564 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17540 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/17540] Duplicate symbols while building Ada 2004-09-17 21:32 [Bug ada/17540] New: Duplicate symbols while building Ada laurent at guerby dot net ` (2 preceding siblings ...) 2004-09-20 12:08 ` cvs-commit at gcc dot gnu dot org @ 2004-09-20 12:10 ` charlet at gcc dot gnu dot org 2004-09-23 9:00 ` cvs-commit at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: charlet at gcc dot gnu dot org @ 2004-09-20 12:10 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From charlet at gcc dot gnu dot org 2004-09-20 12:10 ------- Fixed. -- What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17540 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/17540] Duplicate symbols while building Ada 2004-09-17 21:32 [Bug ada/17540] New: Duplicate symbols while building Ada laurent at guerby dot net ` (3 preceding siblings ...) 2004-09-20 12:10 ` charlet at gcc dot gnu dot org @ 2004-09-23 9:00 ` cvs-commit at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2004-09-23 9:00 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-09-23 09:00 ------- Subject: Bug 17540 CVSROOT: /cvs/gcc Module name: gcc Changes by: charlet@gcc.gnu.org 2004-09-23 09:00:12 Modified files: gcc/ada : sem_prag.adb freeze.adb ChangeLog Log message: 2004-09-23 Robert Dewar <dewar@gnat.com> PR ada/17540 * sem_prag.adb (Process_Import_Or_Interface): Don't set Is_Public here, instead do this at freeze time (we won't do it if there is an address clause). Change "pragma inline" to "pragma Inline" in information and error messages. Minor reformatting. * freeze.adb (Check_Address_Clause): Remove previous change, not the right way of doing things after all. (Freeze_Entity): For object, set Is_Public for imported entities unless there is an address clause present. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/sem_prag.adb.diff?cvsroot=gcc&r1=1.42&r2=1.43 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/freeze.adb.diff?cvsroot=gcc&r1=1.21&r2=1.22 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/ChangeLog.diff?cvsroot=gcc&r1=1.567&r2=1.568 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17540 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-09-23 9:00 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-09-17 21:32 [Bug ada/17540] New: Duplicate symbols while building Ada laurent at guerby dot net 2004-09-17 22:46 ` [Bug ada/17540] " fw at deneb dot enyo dot de 2004-09-20 10:51 ` charlet at gcc dot gnu dot org 2004-09-20 12:08 ` cvs-commit at gcc dot gnu dot org 2004-09-20 12:10 ` charlet at gcc dot gnu dot org 2004-09-23 9:00 ` cvs-commit 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).