diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-01-29 15:31:08 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-01-29 15:31:08 +0100 |
commit | 7096a67be07002e51b3fecaf0e5972172b717878 (patch) | |
tree | 3583702f3bbfcb39c8de68868c5151bd4feb6a2f /gcc/ada/sprint.adb | |
parent | a52e6d7e22be254f33fceb8899cd6d5d3d0e0413 (diff) | |
download | gcc-7096a67be07002e51b3fecaf0e5972172b717878.zip gcc-7096a67be07002e51b3fecaf0e5972172b717878.tar.gz gcc-7096a67be07002e51b3fecaf0e5972172b717878.tar.bz2 |
[multiple changes]
2013-01-29 Thomas Quinot <quinot@adacore.com>
* sprint.adb (Sprint_Node_Actual): Output freeze nodes for
itypes even if Dump_Freeze_Null is not set.
2013-01-29 Robert Dewar <dewar@adacore.com>
* sem_util.adb: Minor reformatting.
* s-rident.ads: Minor comment fixes.
2013-01-29 Pascal Obry <obry@adacore.com>
* prj-env.ads, prj-env.adb (Add_Directories): Add parameter to
control if the path is prepended or appended.
From-SVN: r195544
Diffstat (limited to 'gcc/ada/sprint.adb')
-rw-r--r-- | gcc/ada/sprint.adb | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb index bfa245f..6aa045f 100644 --- a/gcc/ada/sprint.adb +++ b/gcc/ada/sprint.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2013, 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- -- @@ -70,7 +70,10 @@ package body Sprint is -- or for Print_Generated_Code (-gnatG) or Dump_Generated_Code (-gnatD). Dump_Freeze_Null : Boolean; - -- Set True if freeze nodes and non-source null statements output + -- Set True if empty freeze nodes and non-source null statements output. + -- Note that freeze nodes containing freeze actions are always output, + -- as are freeze nodes for itypes, which in general have the effect of + -- causing elaboration of the itype. Freeze_Indent : Int := 0; -- Keep track of freeze indent level (controls output of blank lines before @@ -1827,7 +1830,15 @@ package body Sprint is if Dump_Original_Only then null; - elsif Present (Actions (Node)) or else Dump_Freeze_Null then + -- A freeze node is output if it has some effect (i.e. non-empty + -- actions, or freeze node for an itype, which causes elaboration + -- of the itype), and is also always output if Dump_Freeze_Null + -- is set True. + + elsif Present (Actions (Node)) + or else Is_Itype (Entity (Node)) + or else Dump_Freeze_Null + then Write_Indent; Write_Rewrite_Str ("<<<"); Write_Str_With_Col_Check_Sloc ("freeze "); @@ -4084,7 +4095,7 @@ package body Sprint is when E_Modular_Integer_Type => Write_Header; - Write_Str (" mod "); + Write_Str ("mod "); Write_Uint_With_Col_Check (Modulus (Typ), Auto); -- Floating point types and subtypes |