[Bug target/61656] Undefined behavior in classify_argument
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 10 15:50:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61656
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Depends on what testcase. In pr42025-2.c, it clearly uses movl %edi, %eax,
with and without the patch. If I write:
typedef struct
{
int p;
} Ptr;
struct A
{
long int i;
union
{
Ptr p;
int q;
} u;
};
extern Ptr get_stuff (void);
extern void use_stuff (int);
__attribute__((noinline, noclone))
static int foo(struct A p, int q)
{
int ret = p.u.q;
if (p.i)
p.u.p = get_stuff ();
else
p.u.q = q;
use_stuff (p.u.q);
return ret;
}
void bar(struct A *p, int q)
{
foo(*p, q);
}
then it uses movq %rsi, ... and the patch doesn't change anything on that.
If you want to use movl %esi, ... in foo in this testcase, more changes are
needed of course.
More information about the Gcc-bugs
mailing list