View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0000039 | mercury | Bug | public | 2008-01-22 17:48 | 2009-11-27 02:03 | ||||
Reporter | wangp | ||||||||
Assigned To | wangp | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000039: gcc 4.1.2 on x86-64 miscompiles computed gotos | ||||||||
Description | In compiler/purity.m we needed a work around to avoid a segfault while purity checking invalid/purity/purity.m. We get a segfault when jumping to the `unnecessary_promise_pure' branch. Happens with gcc 4.1.2 on x86-64, at gcc -O1 and above. | ||||||||
Additional Information | This also works around the problem. Note the volatile. #define MR_COMPUTED_GOTO(val, labels) \ { \ static MR_Code *jump_table[] = { \ labels \ }; \ volatile int val1 = (val); \ MR_GOTO(jump_table[val1]); \ } | ||||||||
Tags | No tags attached. | ||||||||
Attached Files |
|
Notes | |
pbone (administrator) 2009-09-26 06:24 |
Julian suggested I look at this, saying it might be related to bug66. It looks like there's a more general problem, GCC 4.x and in particular 4.3 loads addresses into registers in the prelude of a function and then dereferences the register later in the function. I'm trying to solve the more general problem, |
Issue History | |||
Date Modified | Username | Field | Change |
---|---|---|---|
2008-01-22 17:48 | wangp | New Issue | |
2009-09-26 06:24 | pbone | Note Added: 0000190 | |
2009-09-26 06:26 | pbone | Relationship added | related to 0000066 |
2009-11-24 00:18 | wangp | Status | new => assigned |
2009-11-24 00:18 | wangp | Assigned To | => wangp |
2009-11-27 02:03 | wangp | Status | assigned => resolved |
2009-11-27 02:03 | wangp | Resolution | open => fixed |