[Bug middle-end/29078] wrong alignment with pragma pack(4)

2006-09-14 Thread pinskia at gcc dot gnu dot org
--- Comment #6 from pinskia at gcc dot gnu dot org 2006-09-14 14:56 --- (In reply to comment #5) > (In reply to comment #3) > And what with such example: > #include > #pragma pack(4) > struct ABC > { > double a; > int b; > bool c; > }; > void Init(double& a) > { a = 17

[Bug middle-end/29078] wrong alignment with pragma pack(4)

2006-09-14 Thread dsiata at poczta dot onet dot pl
--- Comment #5 from dsiata at poczta dot onet dot pl 2006-09-14 10:46 --- (In reply to comment #3) And what with such example: #include #pragma pack(4) struct ABC { double a; int b; bool c; }; void Init(double& a) { a = 17.0; } int main() { ABC A; ABC B; i

[Bug middle-end/29078] wrong alignment with pragma pack(4)

2006-09-14 Thread dsiata at poczta dot onet dot pl
--- Comment #4 from dsiata at poczta dot onet dot pl 2006-09-14 08:57 --- (In reply to comment #3) OK. Now I see it's new feature in 4.0 or 4.1 series. I have GPF in similar code but for now I cannot reproduce it on simple case... Thank you. Now I know to not use pack(4) :-) -- dsi

[Bug middle-end/29078] wrong alignment with pragma pack(4)

2006-09-14 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-09-14 08:19 --- (In reply to comment #2) > Because double have to be aligned on 8 on sparc or bus error occurs. > Note that first member of the structure is double. So now I'm not able to > assign any value to D.a. Wrong, wrong, wro

[Bug middle-end/29078] wrong alignment with pragma pack(4)

2006-09-14 Thread dsiata at poczta dot onet dot pl
--- Comment #2 from dsiata at poczta dot onet dot pl 2006-09-14 08:14 --- Subject: Re: wrong alignment with pragma pack(4) U¿ytkownik pinskia at gcc dot gnu dot org <[EMAIL PROTECTED]> napisa³: >--- Comment #1 from pinskia at gcc dot gnu dot org 2006-09-14 08:05 >--- >#pragm

[Bug middle-end/29078] wrong alignment with pragma pack(4)

2006-09-14 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-09-14 08:05 --- #pragma pack(4) "Variable D is aligned on 4 bytes and should be 8." No you said to align it to 4 bytes by that pack statement. This is not a bug. Why do you think otherwise? -- pinskia at gcc dot gnu dot org cha