[Ada] Undefined symbol with interface types
Arnaud Charlet
charlet@adacore.com
Mon May 2 09:58:00 GMT 2016
Compiling with optimizations enabled the linker may report undefined
symbols of the form "xxxT<number>s" associated with types that implement
interface types. This issue was introduced on 2016-01-16 as part of
improving the support of subprograms that are inlined across units
with optimization.
No small reproducer available.
Tested on x86_64-pc-linux-gnu, committed on trunk
2016-05-02 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Make_Tags): Do not generate the
external name of interface tags adding the suffix counter since
it causes problems at link time when the IP routines are inlined
across units with optimization.
-------------- next part --------------
Index: exp_disp.adb
===================================================================
--- exp_disp.adb (revision 235706)
+++ exp_disp.adb (working copy)
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -6751,8 +6751,7 @@
if Building_Static_DT (Typ) then
Iface_DT :=
Make_Defining_Identifier (Loc,
- Chars => New_External_Name
- (Typ_Name, 'T', Suffix_Index => -1));
+ Chars => New_External_Name (Typ_Name, 'T'));
Import_DT
(Tag_Typ => Related_Type (Node (AI_Tag_Comp)),
DT => Iface_DT,
More information about the Gcc-patches
mailing list