diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2017-12-13 09:30:25 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2017-12-13 09:30:25 +0000 |
commit | 0c8af82a15cedbc181df3f0ec09622adffb9ef53 (patch) | |
tree | 048e583456b39c4fe52137c687131e14ce064ce7 /gcc/ada/gcc-interface | |
parent | 692317f4310e9652099f5097313e5965703aca92 (diff) | |
download | gcc-0c8af82a15cedbc181df3f0ec09622adffb9ef53.zip gcc-0c8af82a15cedbc181df3f0ec09622adffb9ef53.tar.gz gcc-0c8af82a15cedbc181df3f0ec09622adffb9ef53.tar.bz2 |
* gcc-interface/trans.c (Subprogram_Body_to_gnu): Initialize locus.
From-SVN: r255603
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 7a83acf..0cf37f1 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -3773,7 +3773,8 @@ Subprogram_Body_to_gnu (Node_Id gnat_node) } /* Set the line number in the decl to correspond to that of the body. */ - Sloc_to_locus (Sloc (gnat_node), &locus); + if (!Sloc_to_locus (Sloc (gnat_node), &locus)) + locus = input_location; DECL_SOURCE_LOCATION (gnu_subprog_decl) = locus; /* If the body comes from an expression function, arrange it to be inlined |