mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-22 13:49:49 +08:00
utils.c (gnat_write_global_declarations): Put a name on the dummy global variable.
* gcc-interface/utils.c (gnat_write_global_declarations): Put a name on the dummy global variable. From-SVN: r187692
This commit is contained in:
parent
4fe4de900d
commit
d3c268abbd
@ -1,3 +1,8 @@
|
|||||||
|
2012-05-20 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* gcc-interface/utils.c (gnat_write_global_declarations): Put a name
|
||||||
|
on the dummy global variable.
|
||||||
|
|
||||||
2012-05-19 Eric Botcazou <ebotcazou@adacore.com>
|
2012-05-19 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
|
* gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
|
||||||
|
@ -5586,8 +5586,12 @@ gnat_write_global_declarations (void)
|
|||||||
if (!VEC_empty (tree, types_used_by_cur_var_decl))
|
if (!VEC_empty (tree, types_used_by_cur_var_decl))
|
||||||
{
|
{
|
||||||
struct varpool_node *node;
|
struct varpool_node *node;
|
||||||
|
char *label;
|
||||||
|
|
||||||
|
ASM_FORMAT_PRIVATE_NAME (label, first_global_object_name, 0);
|
||||||
dummy_global
|
dummy_global
|
||||||
= build_decl (BUILTINS_LOCATION, VAR_DECL, NULL_TREE, void_type_node);
|
= build_decl (BUILTINS_LOCATION, VAR_DECL, get_identifier (label),
|
||||||
|
void_type_node);
|
||||||
TREE_STATIC (dummy_global) = 1;
|
TREE_STATIC (dummy_global) = 1;
|
||||||
TREE_ASM_WRITTEN (dummy_global) = 1;
|
TREE_ASM_WRITTEN (dummy_global) = 1;
|
||||||
node = varpool_node (dummy_global);
|
node = varpool_node (dummy_global);
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2012-05-20 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* gnat.dg/lto13.adb: New test.
|
||||||
|
* gnat.dg/lto13_pkg.ad[sb]: New helper.
|
||||||
|
|
||||||
2012-05-18 Eric Botcazou <ebotcazou@adacore.com>
|
2012-05-18 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* gnat.dg/specs/lto12.ads: New test.
|
* gnat.dg/specs/lto12.ads: New test.
|
||||||
|
9
gcc/testsuite/gnat.dg/lto13.adb
Normal file
9
gcc/testsuite/gnat.dg/lto13.adb
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
-- { dg-do link }
|
||||||
|
-- { dg-options "-g -flto" { target lto } }
|
||||||
|
|
||||||
|
with Lto13_Pkg; use Lto13_Pkg;
|
||||||
|
|
||||||
|
procedure Lto13 is
|
||||||
|
begin
|
||||||
|
Proc;
|
||||||
|
end;
|
10
gcc/testsuite/gnat.dg/lto13_pkg.adb
Normal file
10
gcc/testsuite/gnat.dg/lto13_pkg.adb
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package body Lto13_Pkg is
|
||||||
|
|
||||||
|
procedure Proc is
|
||||||
|
begin
|
||||||
|
raise Constraint_Error;
|
||||||
|
end;
|
||||||
|
|
||||||
|
type T is null record;
|
||||||
|
|
||||||
|
end Lto13_Pkg;
|
9
gcc/testsuite/gnat.dg/lto13_pkg.ads
Normal file
9
gcc/testsuite/gnat.dg/lto13_pkg.ads
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package Lto13_Pkg is
|
||||||
|
|
||||||
|
procedure Proc;
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
type T;
|
||||||
|
|
||||||
|
end Lto13_Pkg;
|
Loading…
Reference in New Issue
Block a user