forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tree-optimization/109139 - fix .DEFERRED_INIT removal
The following make sure to strip MEMs when looking for unused decls on the LHS of .DEFERRED_INIT. PR tree-optimization/109139 * tree-ssa-live.cc (remove_unused_locals): Look at the base address for unused decls on the LHS of .DEFERRED_INIT. * gcc.dg/torture/pr109139.c: New testcase.
- Loading branch information
Showing
2 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* { dg-do compile } */ | ||
/* { dg-additional-options "-ftrivial-auto-var-init=zero" } */ | ||
|
||
const int COMPARE_CANDIDATE; | ||
char ipmi_ek_compare_link_record1_0, ipmi_ek_compare_link_record2_0; | ||
void ipmi_ek_compare_link() | ||
{ | ||
for (; ipmi_ek_compare_link_record1_0;) | ||
for (; ipmi_ek_compare_link_record2_0;) { | ||
int link[COMPARE_CANDIDATE]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters