diff --git a/gcc/cobol/parse_ante.h b/gcc/cobol/parse_ante.h
index 00ba21f2f9a7b1c1ad7b3cef92ad64c5e484dd9d..2ac877f3c9559704a65fc13e6f373c16181e1703 100644
--- a/gcc/cobol/parse_ante.h
+++ b/gcc/cobol/parse_ante.h
@@ -3542,7 +3542,7 @@ const char * keyword_str( int token );
 static YYLTYPE current_location;
 extern YYLTYPE yylloc;
 
-const YYLTYPE& cobol_location() { return yylloc; }
+const YYLTYPE& cobol_location() { return current_location; }
 
 static inline YYLTYPE
 location_set( const YYLTYPE& loc ) {