diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-29 14:31:08 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-29 14:31:08 +0000 |
commit | 8017c93af703c29a22b44b59d3ec75fc0cbf9a3f (patch) | |
tree | 3583702f3bbfcb39c8de68868c5151bd4feb6a2f /gcc/ada/sprint.adb | |
parent | 98595650c38e97041f825830482c4f91c45a8838 (diff) | |
download | gcc-8017c93af703c29a22b44b59d3ec75fc0cbf9a3f.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195544 138bc75d-0d04-0410-961f-82ee72b054a4
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 bfa245fd9dc..6aa045ff4e2 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 |