[Bug target/59679] gcc version 4.7.3 and gcc version 4.5.3 cause an unaligned access exception on NetBSD/Alpha
nullnilaki at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Jan 5 21:02:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59679
--- Comment #4 from nullnilaki at gmail dot com ---
(In reply to Andrew Pinski from comment #1)
> This looks more like a bug in perl sources. Can you attach the preprocessed
> source for scope.c?
>
> The big question is how is ARG0_PTR defined? GCC must be assuming the
> alignment is 64bits for some reason. This needs the preprocessed source to
> see why the alignment is being done incorrectly. Maybe ARG0_PTR was
> assigned from a long long pointer.
>
> In C, once you assign it to a pointer of bigger alignment and it is not
> aligned, the code is undefined.
Thank you for your reply!
ARG0_PTR is defined in scope.c.
#define ARG0_PTR arg0.any_ptr
and
any_ptr is defined in perl.h.
union any {
void* any_ptr;
I32 any_i32;
IV any_iv;
UV any_uv;
long any_long;
bool any_bool;
void (*any_dptr) (void*);
void (*any_dxptr) (pTHX_ void*);
};
More information about the Gcc-bugs
mailing list