aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinput-c.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2013-10-10 12:37:53 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2013-10-10 12:37:53 +0200
commitcd38efa560f565cb02cba62fe919e591dc110b74 (patch)
tree4eae409e43f75727ce132480e1c6fc7592638197 /gcc/ada/sinput-c.adb
parentd6394e2bbc175f53f60e71fccc5a9be4542ce68e (diff)
downloadgcc-cd38efa560f565cb02cba62fe919e591dc110b74.zip
gcc-cd38efa560f565cb02cba62fe919e591dc110b74.tar.gz
gcc-cd38efa560f565cb02cba62fe919e591dc110b74.tar.bz2
[multiple changes]
2013-10-10 Robert Dewar <dewar@adacore.com> * sem_ch3.adb: Minor reformatting. 2013-10-10 Robert Dewar <dewar@adacore.com> * sinput-c.adb (Load_File): Ensure Source_Align alignment. * sinput-d.adb (Create_Debug_Source): Ensure Source_Align alignment. * sinput-l.adb (Create_Instantiation_Source): Ensure Source_Align alignment. (Load_File): Ditto. * sinput.ads, sinput.adb (Get_Source_File_Index): New optimized (single line) version. * types.ads (Source_Align): New definition. (Source_Buffer): Document new alignment requirement. 2013-10-10 Robert Dewar <dewar@adacore.com> * sem_prag.adb (Analyze_Pragma, case Linker_Section): Allow this for types. 2013-10-10 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Minor adjustment to doc for To_Address attribute. 2013-10-10 Vadim Godunko <godunko@adacore.com> * s-stopoo.ads (Root_Storage_Pool): Add pragma Preelaborable_Initialization. From-SVN: r203343
Diffstat (limited to 'gcc/ada/sinput-c.adb')
-rw-r--r--gcc/ada/sinput-c.adb5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ada/sinput-c.adb b/gcc/ada/sinput-c.adb
index 4ad212b..83dadaf 100644
--- a/gcc/ada/sinput-c.adb
+++ b/gcc/ada/sinput-c.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- --
@@ -68,7 +68,8 @@ package body Sinput.C is
if X = Source_File.First then
Lo := First_Source_Ptr;
else
- Lo := Source_File.Table (X - 1).Source_Last + 1;
+ Lo := ((Source_File.Table (X - 1).Source_Last + Source_Align) /
+ Source_Align) * Source_Align;
end if;
Name_Len := Path'Length;