From: Robert Dewar Date: Mon, 4 Aug 2008 12:51:19 +0000 (+0200) Subject: 2008-08-04 Robert Dewar X-Git-Tag: releases/gcc-4.4.0~3409 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6e209b5f8793412fc20ffaa6b118dc7ef8dbd27;p=thirdparty%2Fgcc.git 2008-08-04 Robert Dewar * freeze.adb: (Freeze_Entity): Only check No_Default_Initialization restriction for constructs that come from source From-SVN: r138617 --- diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index a2dd517c509c..dffcbaf3b403 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -2665,7 +2665,8 @@ package body Freeze is -- ever default initialized, and is why the check is deferred -- until freezing, at which point we know if Import applies. - if not Is_Imported (E) + if Comes_From_Source (E) + and then not Is_Imported (E) and then not Has_Init_Expression (Declaration_Node (E)) and then ((Has_Non_Null_Base_Init_Proc (Etype (E))