Bug 531385
| Summary: | internal compiler error: in simplify_subreg, at simplify-rtx.c:5055 | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Kevin O'Connor <kevin> |
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 12 | CC: | jakub, segher |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-04-12 15:54:05 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Kevin O'Connor
2009-10-28 00:22:50 UTC
GCC should have prepared a preprocessed testcase for you, please provide it. If it has not, please prepare it yourself. In any case, don't use -combine, it is known to be broken. Gcc did not provide a test case. I have come up with a test case:
============================================================
cat > file1.c << EOF
struct s1_s {
int v;
};
struct s1_s g1;
void __attribute__((externally_visible)) func1() {
struct s1_s *l1 = &g1;
}
EOF
cat > file2.c << EOF
extern struct s1_s g1;
void func2() {
&g1;
}
EOF
cc -O -g -fwhole-program -combine -c file1.c file2.c
============================================================
It happens on GCC mainline as well, filed there as http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41893 Should be fixed in gcc-4.4.2-8 and later. This came back in FC12:
$ rpm -q gcc
gcc-4.4.2-20.fc12.x86_64
The test case above no longer causes the problem - but simply changing the test case to also assign a value to the variable shows the problem.
New test case:
============================================================
cat > file1.c << EOF
struct s1_s {
int v;
};
struct s1_s g1;
void __attribute__((externally_visible)) func1() {
struct s1_s *l1 = &g1;
l1->v = 0;
}
EOF
cat > file2.c << EOF
extern struct s1_s g1;
void func2() {
&g1;
}
EOF
cc -O -g -fwhole-program -combine -c file1.c file2.c
============================================================
Should be fixed in gcc-4.4.3-14 and above. |