diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-03-04 16:00:57 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-03-04 16:00:57 +0100 |
commit | d50a26f2bad59ba73c52694190aac02e90423bbd (patch) | |
tree | c174547473c0047a3ed8c4c166c52a592f1dfa34 /gcc/ada/a-coinho-shared.adb | |
parent | 58009744b53fa118a5caac4e20135cd5dd41f4aa (diff) | |
download | gcc-d50a26f2bad59ba73c52694190aac02e90423bbd.zip gcc-d50a26f2bad59ba73c52694190aac02e90423bbd.tar.gz gcc-d50a26f2bad59ba73c52694190aac02e90423bbd.tar.bz2 |
[multiple changes]
2015-03-04 Robert Dewar <dewar@adacore.com>
* sem_warn.adb: Minor reformatting.
* init.c: Minor tweaks.
2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
* a-coinho-shared.adb: Fix clear of already empty holder.
2015-03-04 Robert Dewar <dewar@adacore.com>
* exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
(Check_Uplevel_Reference_To_Type): Ignore call inside generic.
(Note_Uplevel_Reference): Ignore call inside generic.
(Note_Uplevel_Reference): Fix check for no entity field.
(Unnest_Subprogram): Ignore call inside generic.
(Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
(Visit_Node): Ignore calls to Imported subprograms.
(Visit_Node): Fix problem in finding subprogram body in some cases.
(Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
From-SVN: r221188
Diffstat (limited to 'gcc/ada/a-coinho-shared.adb')
-rw-r--r-- | gcc/ada/a-coinho-shared.adb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/ada/a-coinho-shared.adb b/gcc/ada/a-coinho-shared.adb index 783121c..9dd5b2f 100644 --- a/gcc/ada/a-coinho-shared.adb +++ b/gcc/ada/a-coinho-shared.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2013-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2015, 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- -- @@ -129,8 +129,10 @@ package body Ada.Containers.Indefinite_Holders is raise Program_Error with "attempt to tamper with elements"; end if; - Unreference (Container.Reference); - Container.Reference := null; + if Container.Reference /= null then + Unreference (Container.Reference); + Container.Reference := null; + end if; end Clear; ------------------------ |