This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: alignment: store_one_arg vs emit_push_insn


>     align = MIN (to ? MEM_ALIGN (to) : align, MEM_ALIGN (from));

Ok, something funny is going on here.  In
gcc.c-torture/compile/structs.c, there's a case where align is 16, to
is NULL, and MEM_ALIGN(from) is 8.  So, we reset align to 8.  It then
crashes:

a 16 t 0 f 8 => 8
/greed/dj/ges/sanyo/uber/src/gcc/testsuite/gcc.c-torture/compile/structs.c: In function `main':
/greed/dj/ges/sanyo/uber/src/gcc/testsuite/gcc.c-torture/compile/structs.c:260: internal compiler error: in expand_call, at calls.c:3378

      else
	{
	  normal_call_insns = insns;

	  /* Verify that we've deallocated all the stack we used.  */
	  if (old_stack_allocated !=
	      stack_pointer_delta - pending_stack_adjust)
	    abort ();
	}

At that point, old_stack_allocated is 0, stack_pointer_delta is 16,
and pending_stack_adjust is 0.  If I take the patch out,
stack_pointer_delta is 0 instead.

I'm guessing that move_by_pieces does not know how to push a
byte-aligned value onto a word-rounded (PUSH_ROUNDING) stack :-(

Any ideas?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]