summaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorctice <ctice@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-13 23:11:15 +0000
committerctice <ctice@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-13 23:11:15 +0000
commitd53bb22673261b227d5045c435bd2acd4c87c236 (patch)
treeb87516d5c9ea7c2c70b26f837f1dada3f4c4d0f0 /gcc/toplev.c
parentaa9311a1b831d7e2f0575a09def64eff0dac9f6a (diff)
downloadgcc-d53bb22673261b227d5045c435bd2acd4c87c236.tar.gz
Add ability to track uninitialized variables, and mark uninitialized
variables in the Dwarf debug info. Controlled by compile option -fvar-tracking-uninit git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126630 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index ff0d8a3ea7d..de86b38ae16 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1874,7 +1874,8 @@ process_options (void)
if (debug_info_level < DINFO_LEVEL_NORMAL
|| debug_hooks->var_location == do_nothing_debug_hooks.var_location)
{
- if (flag_var_tracking == 1)
+ if (flag_var_tracking == 1
+ || flag_var_tracking_uninit == 1)
{
if (debug_info_level < DINFO_LEVEL_NORMAL)
warning (0, "variable tracking requested, but useless unless "
@@ -1884,6 +1885,7 @@ process_options (void)
"by this debug format");
}
flag_var_tracking = 0;
+ flag_var_tracking_uninit = 0;
}
if (flag_rename_registers == AUTODETECT_VALUE)
@@ -1893,6 +1895,12 @@ process_options (void)
if (flag_var_tracking == AUTODETECT_VALUE)
flag_var_tracking = optimize >= 1;
+ /* If the user specifically requested variable tracking with tagging
+ uninitialized variables, we need to turn on variable tracking.
+ (We already determined above that variable tracking is feasible.) */
+ if (flag_var_tracking_uninit)
+ flag_var_tracking = 1;
+
/* If auxiliary info generation is desired, open the output file.
This goes in the same directory as the source file--unlike
all the other output files. */