Mercury Bugs - mercury | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0000211 | mercury | Bug | public | 2011-08-22 16:58 | 2011-12-09 10:26 |
| Reporter | wangp | ||||
|---|---|---|---|---|---|
| Assigned To | wangp | ||||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | resolved | Resolution | fixed | ||
| Platform | OS | OS Version | |||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Summary | 0000211: single-precision float grades broken on 64-bit | ||||
| Description | Both LLDS (and now high-level C grades) generate structures like this for static data. struct foo { MR_Word f1; MR_Float f2; MR_Float f3; }; which is then treated as an array of MR_Word. However, if using MR_Float==float on a 64-bit platform, the C compiler will pack the two float members into a single word. Two possible solutions are: 1. use C compiler extensions to force any MR_Float members to be word-aligned 2. replace the MR_Float members by a union, e.g. union MR_Float_Word { MR_Float f; MR_Word w; }; This requires additional braces in initialiser lists. | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
|---|---|---|---|---|---|
| 2011-08-22 16:58 | wangp | New Issue | |||
| 2011-08-22 21:51 | juliensf | Note Added: 0000350 | |||
| 2011-08-23 10:31 | wangp | Note Added: 0000351 | |||
| 2011-08-23 13:38 | juliensf | Note Added: 0000352 | |||
| 2011-12-09 10:26 | wangp | Note Added: 0000436 | |||
| 2011-12-09 10:26 | wangp | Status | new => resolved | ||
| 2011-12-09 10:26 | wangp | Resolution | open => fixed | ||
| 2011-12-09 10:26 | wangp | Assigned To | => wangp | ||