https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84877
Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amylaar at gcc dot gnu.org --- Comment #10 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> --- Created attachment 46567 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46567&action=edit Fix for targets that pass the argument by invisible reference I also observe this problem on esirisc. assign_parm is only relevant for the testcase if the argument is passed by value, where the copy is made in foo. If the argument is passed by invisible reference, we have instead during compilation of main expand_call calling initialize_argument_information, which calls assign_temp, which calls assign_temp_for_type, which calls assign_stack_local_1 . The attached patch changes initialize_argument_information to use the same code path as for variable-sized arguments; it's a bit more overhead, but I would think that excess alignment is a relatively rare case. If performance for this alignment were really important, you could change the stack management so that the alignment can be provided more cheaply. Since the esirisc port is not in the FSF tree, it doesn't really count for testing; also, the behaviour will vary depending on argument passing of the target, so we need to test a variety of targets.