diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2011-10-20 10:56:08 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-10-20 10:56:08 +0000 |
commit | b7562769594e07afe277cd93bff32740c79522f5 (patch) | |
tree | d9bd48a25fe74857f4b658b9278b9f09aa41a36a /gcc/ada/gcc-interface/trans.c | |
parent | 687adac02dad2cd7f2e175dabd2156925bf81e45 (diff) | |
download | gcc-b7562769594e07afe277cd93bff32740c79522f5.zip gcc-b7562769594e07afe277cd93bff32740c79522f5.tar.gz gcc-b7562769594e07afe277cd93bff32740c79522f5.tar.bz2 |
back_end.adb (Call_Back_End): Pass the maximum logical line number instead of the maximum physical line...
* back_end.adb (Call_Back_End): Pass the maximum logical line number
instead of the maximum physical line number to gigi.
* gcc-interface/trans.c (Sloc_to_locus): Cope with line zero.
From-SVN: r180242
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 69c66d1..ba47a7e 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -8393,6 +8393,10 @@ Sloc_to_locus (Source_Ptr Sloc, location_t *locus) Column_Number column = Get_Column_Number (Sloc); struct line_map *map = LINEMAPS_ORDINARY_MAP_AT (line_table, file - 1); + /* We can have zero if pragma Source_Reference is in effect. */ + if (line < 1) + line = 1; + /* Translate the location. */ *locus = linemap_position_for_line_and_column (map, line, column); } |