]> git.ipfire.org Git - thirdparty/gcc.git/commit
middle-end/112487 - inline and parameter mismatch
authorRichard Biener <rguenther@suse.de>
Mon, 13 Nov 2023 08:24:08 +0000 (09:24 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 13 Nov 2023 14:00:39 +0000 (15:00 +0100)
commit5021fa7076acd5a987362c8695ae3ebeff877d02
tree89381db0e025554ea5e0cc2022eacf0c24bbf084
parenta0b2abef4e62d816f669df478a3cc320647c3b31
middle-end/112487 - inline and parameter mismatch

When passing an aggregate to a implicitly declared function that's
later declared as receiving a register type we can run into a
sanity assert that cannot hold for such gross mismatches.  Instead
of asserting avoid emitting a debug temp that's invalid.

PR middle-end/112487
* tree-inline.cc (setup_one_parameter): When the parameter
is unused only insert a debug bind when there's not a gross
mismatch in value and declared parameter type.  Do not assert
there effectively isn't.

* gcc.dg/torture/pr112487.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr112487.c [new file with mode: 0644]
gcc/tree-inline.cc