--- Comment #11 from greened at obbligato dot org 2010-09-08 19:16 ---
(In reply to comment #9)
> >If it's an illegal program, gcc should at least emit a warning, if not an
> error.
>
>
> It is not an invalid program,
Yes, you are quite right. I will take this up with the LLVM folks.
--- Comment #10 from pinskia at gcc dot gnu dot org 2010-09-08 19:01
---
vector types are naturally aligned just like integer types. That is they are
aligned on their size.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45600
--- Comment #9 from pinskia at gcc dot gnu dot org 2010-09-08 19:01 ---
>If it's an illegal program, gcc should at least emit a warning, if not an
error.
It is not an invalid program, it is just undefined at runtime. There was a
defect report against the C standard asking if a diagnos
--- Comment #8 from greened at obbligato dot org 2010-09-08 18:59 ---
(In reply to comment #6)
> The alignment of llvm_cbe__24__StackDv_P53 is only 64bits so you are casting
> to
> a greater aligned type and then dereferencing it.
I didn't know that typing something as a vector guarant
--- Comment #7 from greened at obbligato dot org 2010-09-08 18:58 ---
(In reply to comment #5)
> Why is the code undefined? Can you explain in terms of the original test
> source? I don't immediately see anything undefined there.
Ah, the cast from int field5 to v4df? Yes, that doesn'
--- Comment #6 from pinskia at gcc dot gnu dot org 2010-09-08 18:55 ---
The alignment of llvm_cbe__24__StackDv_P53 is only 64bits so you are casting to
a greater aligned type and then dereferencing it.
That being said, the LLVM C back-end produces crazy c code that is also
undefined bec
--- Comment #5 from greened at obbligato dot org 2010-09-08 18:52 ---
Why is the code undefined? Can you explain in terms of the original test
source? I don't immediately see anything undefined there.
--
greened at obbligato dot org changed:
What|Removed
--- Comment #4 from pinskia at gcc dot gnu dot org 2010-09-08 17:43 ---
Yes this is invalid with respect of alignment requirements.
It becomes obvious from the optimized at -O0 on the trunk.
v4df llvm_cbe_r5585;
v4df llvm_cbe_r5584;
struct l_DV1 llvm_cbe__24__StackDv_P53;
unsig
--- Comment #3 from pinskia at gcc dot gnu dot org 2010-09-08 17:39 ---
I think this code is undefined with respect of alignment requirements.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45600