https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68656
Bug ID: 68656
Summary: [4.8, 4.9, 5.0, 6.0 Regression] warning about disabled
var-tracking uses odd location info
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: aldot at gcc dot gnu.org
CC: dodji at gcc dot gnu.org
Target Milestone: ---
echo "/* This is a bugreport about using odd locations. */" > bug.c
gcc -c bug.c -fvar-tracking -o /dev/null
bug.c:1:0: warning: variable tracking requested, but useless unless producing
debug info
/* This is a bugreport about using odd locations. */
^
on stdin this looks like expected:
$ echo "/* This is a bugreport about using odd locations. */" | gcc -xc -c -
-g -fvar-tracking -gtoggle -o /dev/null
<stdin>:1:0: warning: variable tracking requested, but useless unless producing
debug info
$
Known to work: 4.7.4
$ gcc-4.7 -c bug.c -fvar-tracking -o /dev/null
bug.c:1:0: warning: variable tracking requested, but useless unless producing
debug info [enabled by default]
Fails: 4.8.5
$ gcc-4.8 -c bug.c -fvar-tracking -o /dev/null
bug.c:1:0: warning: variable tracking requested, but useless unless producing
debug info [enabled by default]
/* This is a bugreport about using odd locations. */
^