[Bug c++/26757] [4.1 regression] ICE (Segmentation fault) building 3ddesktop source
------- Comment #8 from pinskia at gcc dot gnu dot org 2006-03-26 16:17 -------
Confirmed, this only happens with the C++ Front-end, why I don't know why.
Anyways here is a testcase which should go into the testsuite for also testing
correct code:
#include <stdlib.h>
typedef struct Config {
int bg_size;
int autoacquire;
}Config;
Config *cfg;
void load_background_image(void)
{
cfg->bg_size++;
extern Config *cfg;
cfg->autoacquire++;
}
void
humbug ()
{
if (cfg->autoacquire)
cfg->bg_size++;
}
int main(void)
{
Config a;
cfg = &a;
load_background_image();
humbug();
if (cfg->bg_size != 2)
abort();
if (cfg->autoacquire != 1)
abort();
return 0;
}
----
And shows that it is only the C++ front-end also.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-03-26 16:17:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26757
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
Reply to: