aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/expander.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-10-20 11:55:20 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2015-10-20 11:55:20 +0200
commit0489576ce8062475a2a90b3aae869166d9005460 (patch)
tree53fa0a054c99c1ef2de2e792abb010e01281b34e /gcc/ada/expander.adb
parent3c777b50a71002d3b0cb8c62a9bbdb846e286e96 (diff)
downloadgcc-0489576ce8062475a2a90b3aae869166d9005460.zip
gcc-0489576ce8062475a2a90b3aae869166d9005460.tar.gz
gcc-0489576ce8062475a2a90b3aae869166d9005460.tar.bz2
[multiple changes]
2015-10-20 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Check_Usage): Update the calls to Usage_Error. (Usage_Error): Remove formal parameter Item. Emit a clearer message concerning a missing dependency item and place it on the related pragma. 2015-10-20 Bob Duff <duff@adacore.com> * debug.adb, expander.adb: Implement -gnatd.B switch, which triggers a bug box when an abort_statement is seen. This is useful for testing Comperr.Compiler_Abort. * gnat1drv.adb: Trigger bug box on all exceptions other than Unrecoverable_Error. From-SVN: r229032
Diffstat (limited to 'gcc/ada/expander.adb')
-rw-r--r--gcc/ada/expander.adb14
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ada/expander.adb b/gcc/ada/expander.adb
index ff19759..2d9b6d9 100644
--- a/gcc/ada/expander.adb
+++ b/gcc/ada/expander.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-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- --
@@ -24,6 +24,7 @@
------------------------------------------------------------------------------
with Atree; use Atree;
+with Debug; use Debug;
with Debug_A; use Debug_A;
with Exp_Aggr; use Exp_Aggr;
with Exp_SPARK; use Exp_SPARK;
@@ -67,6 +68,10 @@ package body Expander is
Table_Increment => 200,
Table_Name => "Expander_Flags");
+ Abort_Bug_Box_Error : exception;
+ -- Arbitrary exception to raise for implementation of -gnatd.B. See "when
+ -- N_Abort_Statement" below. See also debug.adb.
+
------------
-- Expand --
------------
@@ -150,6 +155,13 @@ package body Expander is
when N_Abort_Statement =>
Expand_N_Abort_Statement (N);
+ -- If -gnatd.B switch was given, crash the compiler. See
+ -- debug.adb for explanation.
+
+ if Debug_Flag_Dot_BB then
+ raise Abort_Bug_Box_Error;
+ end if;
+
when N_Accept_Statement =>
Expand_N_Accept_Statement (N);