This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/23511] [4.1 Regression] Segfault in fold_binary
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Aug 2005 11:50:57 -0000
- Subject: [Bug middle-end/23511] [4.1 Regression] Segfault in fold_binary
- References: <20050822050024.23511.aj@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-22 11:50 -------
Confirmed, reduced testcase:
struct locale_data {
int t;
union locale_data_value {
const char *string;
}values [];
};
void f(const char*);
extern const struct locale_data _nl_C_LC_TIME ;
void g(void)
{
int cnt;
for (cnt = 0;cnt < 12;++cnt)
f (((&_nl_C_LC_TIME.values[1].string)[cnt]));
}
Yes the backtrace is slightly different but the problem is that same, basicially the values[] is the issue
here. Changing it to values[1] and it works.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |spop at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC build triplet|x86_64-linux-gnu |
GCC host triplet|x86_64-linux-gnu |
GCC target triplet|x86_64-linux-gnu |
Last reconfirmed|0000-00-00 00:00:00 |2005-08-22 11:50:55
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23511