i386: Fix assert in ix86_function_arg [PR105970]
authorUros Bizjak <ubizjak@gmail.com>
Fri, 17 Jun 2022 15:01:31 +0000 (17:01 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Mon, 20 Jun 2022 18:33:22 +0000 (20:33 +0200)
commitddc9b963ab9f267e8cc54be1fa6fcca2e8b0eb84
treec29f786243fddf6794c82317fae78e6a153af0b9
parent1c79be2d3daf01d8fb4680eea5f45c21635abde2
i386: Fix assert in ix86_function_arg [PR105970]

The mode of pointer argument should equal ptr_mode, not Pmode.

2022-06-17  Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog:

PR target/105970
* config/i386/i386.cc (ix86_function_arg): Assert that
the mode of pointer argumet is equal to ptr_mode, not Pmode.

gcc/testsuite/ChangeLog:

PR target/105970
* gcc.target/i386/pr105970.c: New test.

(cherry picked from commit 1f8278bfcfc7f7157bf2b405471e67dd5097636b)
gcc/config/i386/i386.cc
gcc/testsuite/gcc.target/i386/pr105970.c [new file with mode: 0644]