This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Save/restore value of pragma Normalize_Scalars


This patch reverses the previous patch which saved/restore the values of
pragma Normalize_Scalars because the value of Normalize_Scalars must not
be saved/restored because once set to true its value never changes. That
is, if a compilation unit has pragma Normalize_Scalars then it forces
that value for all with'ed units. After this patch the compilation
of the following small test must not cause an assertion failure
in the frontend.

with Ada.Text_IO;
package ImpDef is end;

pragma Normalize_Scalars;
with Impdef;
package CXH1001_0 is end;

Command: gcc -c cxh1001_0.ads

Tested on x86_64-pc-linux-gnu, committed on trunk

2011-08-04  Javier Miranda  <miranda@adacore.com>

	* opt.ads (Init_Or_Norm_Scalars_Config): Removed.
	(Normalize_Scalars_Config): Removed.
	* opt.adb
	(Register_Opt_Config_Switches): Remove registering config values of
	Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
	(Restore_Opt_Config_Switches): Remove code which restores the values of
	Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
	Init_Or_Norm_Scalars.
	(Save_Opt_Config_Switches): Remove code which saves values of
	Init_Or_Norm_Scalars and Normalize_Scalars.
	(Set_Opt_Config_Switches): Remove code which restores config values of
	Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
	Init_Or_Norm_Scalars.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]