diff options
Diffstat (limited to 'gcc/ada/comperr.adb')
-rw-r--r-- | gcc/ada/comperr.adb | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/gcc/ada/comperr.adb b/gcc/ada/comperr.adb index 06fb0a4..064fae0 100644 --- a/gcc/ada/comperr.adb +++ b/gcc/ada/comperr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2021, 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- -- @@ -27,21 +27,22 @@ -- is detected. Calls to these routines cause termination of the current -- compilation with appropriate error output. -with Atree; use Atree; -with Debug; use Debug; -with Errout; use Errout; -with Gnatvsn; use Gnatvsn; -with Lib; use Lib; -with Namet; use Namet; -with Opt; use Opt; -with Osint; use Osint; -with Output; use Output; -with Sinfo; use Sinfo; -with Sinput; use Sinput; -with Sprint; use Sprint; -with Sdefault; use Sdefault; -with Treepr; use Treepr; -with Types; use Types; +with Atree; use Atree; +with Debug; use Debug; +with Errout; use Errout; +with Gnatvsn; use Gnatvsn; +with Lib; use Lib; +with Namet; use Namet; +with Opt; use Opt; +with Osint; use Osint; +with Output; use Output; +with Sinfo; use Sinfo; +with Sinfo.Nodes; use Sinfo.Nodes; +with Sinput; use Sinput; +with Sprint; use Sprint; +with Sdefault; use Sdefault; +with Treepr; use Treepr; +with Types; use Types; with Ada.Exceptions; use Ada.Exceptions; @@ -243,12 +244,17 @@ package body Comperr is end if; End_Line; + else Write_Str ("| Error detected at "); Write_Location (Sloc (Current_Error_Node)); End_Line; end if; + Write_Str ("| Compiling "); + Write_Str (Get_First_Main_File_Name); + End_Line; + -- There are two cases now. If the file gnat_bug.box exists, -- we use the contents of this file at this point. @@ -403,6 +409,7 @@ package body Comperr is Set_Standard_Output; Tree_Dump; + Sinput.Unlock; -- so Source_Dump can modify it Source_Dump; raise Unrecoverable_Error; end if; |