+++ This bug was initially created as a clone of Bug #94383 +++ In https://gcc.gnu.org/pipermail/gcc-testresults/2020-April/559430.html I see FAIL: tmpdir-g++.dg-struct-layout-1/t032 cp_compat_x_tst.o-cp_compat_y_tst.o execute FAIL: tmpdir-g++.dg-struct-layout-1/t033 cp_compat_x_tst.o-cp_compat_y_tst.o execute FAIL: tmpdir-g++.dg-struct-layout-1/t055 cp_compat_x_tst.o-cp_compat_y_tst.o execute FAIL: tmpdir-g++.dg-struct-layout-1/t056 cp_compat_x_tst.o-cp_compat_y_tst.o execute FAIL: tmpdir-g++.dg-struct-layout-1/t057 cp_compat_x_tst.o-cp_compat_y_tst.o execute FAIL: tmpdir-g++.dg-struct-layout-1/t058 cp_compat_x_tst.o-cp_compat_y_tst.o execute FAIL: tmpdir-g++.dg-struct-layout-1/t059 cp_compat_x_tst.o-cp_compat_y_tst.o execute That suggests similar ABI bug as on aarch64 (PR94383), where the presence or absence of C++17 empty base artificial FIELD_DECL affects the argument passing (or return?). One should be able to do make check-g++ RUNTESTFLAGS='--target_board=unix/-DDBG struct-layout-1.exp' to get more information into the log file which exact tests fail, from that number one can look up in gcc/testsuite/g++/g++.dg-struct-layout-1 subdir of the build directory t032_test.h etc. the T(...) line with the reported number(s), and one should be able to remove all but the chosen one T(...) line from the file to see a minimized testcase (+ preprocess to better see how exactly the structure looks like).
Andreas, do you think you could find out which struct (at least one) FAILs? See above...
Created attachment 48336 [details] Preprocessed t032_x.C with reduced t032_test.h fail 116.55 fail 116.56 fail 116.30 fail 120.55 fail 142.55 fail 142.56 fail 142.30 fail 144.55 fail 144.56 fail 144.30 fail 145.55 fail 145.56 fail 145.30 fail 178.55 fail 178.56 fail 178.30 fail 187.10 fail 187.11 fail 187.12 fail 187.50 fail 187.55 fail 187.56 fail 187.18 fail 187.30
Created attachment 48337 [details] Preprocessed t032_y.C with reduced t032_test.h
Created attachment 48338 [details] Preprocessed t033_x.C with reduced t033_test.h fail 545.55
Created attachment 48339 [details] Preprocessed t033_y.C with reduced t033_test.h
Created attachment 48340 [details] Preprocessed t055_x.C with reduced t055_test.h fail 2006.55 fail 2006.56 fail 2006.30
Created attachment 48341 [details] Preprocessed t055_y.C with reduced t055_test.h
Created attachment 48342 [details] Preprocessed t056_x.C with reduced t056_test.h fail 2215.55 fail 2215.56 fail 2215.30
Created attachment 48343 [details] Preprocessed t056_y.C with reduced t056_test.h
Created attachment 48344 [details] Preprocessed t057_x.C with reduced t057_test.h fail 2411.55 fail 2411.56 fail 2411.30
Created attachment 48345 [details] Preprocessed t057_y.C with reduced t057_test.h
Created attachment 48346 [details] Preprocessed t058_x.C with reduced t058_test.h fail 2613.30 fail 2638.30
Created attachment 48347 [details] Preprocessed t058_y.C with reduced t058_test.h
Created attachment 48348 [details] Preprocessed t059_x.C with reduced t059_test.h fail 2854.30
Created attachment 48349 [details] Preprocessed t059_y.C with reduced t059_test.h
Would: --- gcc/config/ia64/ia64.c.jj 2020-01-12 11:54:36.338414540 +0100 +++ gcc/config/ia64/ia64.c 2020-04-22 12:49:59.627563114 +0200 @@ -4665,7 +4665,7 @@ hfa_element_mode (const_tree type, bool case QUAL_UNION_TYPE: for (t = TYPE_FIELDS (type); t; t = DECL_CHAIN (t)) { - if (TREE_CODE (t) != FIELD_DECL) + if (TREE_CODE (t) != FIELD_DECL || cxx17_empty_base_field_p (t)) continue; mode = hfa_element_mode (TREE_TYPE (t), 1); on top of https://gcc.gnu.org/pipermail/gcc-patches/2020-April/544276.html fix that? ia64 doesn't have any -Wpsabi warnings, so I think it isn't worth bothering with that.
With that patch all struct-layout-1.exp tests pass.
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:1be62528078aef241fef6d2fe1cbc8e8e5379115 commit r10-7882-g1be62528078aef241fef6d2fe1cbc8e8e5379115 Author: Jakub Jelinek <jakub@redhat.com> Date: Wed Apr 22 16:47:58 2020 +0200 ia64: Fix C++14 vs. C++17 ABI issue on ia64 [PR94706] ia64 seems to be affected too, but the backend doesn't have any -Wpsabi warnings and I'm not sure if we really need them for an (almost?) dead target. 2020-04-22 Jakub Jelinek <jakub@redhat.com> PR target/94706 * config/ia64/ia64.c (hfa_element_mode): Ignore cxx17_empty_base_field_p fields.
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:cde4353e58410cef404df066a059cd548f702055 commit r10-8028-gcde4353e58410cef404df066a059cd548f702055 Author: Jakub Jelinek <jakub@redhat.com> Date: Wed Apr 29 09:07:30 2020 +0200 ia64: Adjust the C++14 vs. C++17 ABI thing for [[no_unique_address]] too [PR94706] 2020-04-29 Jakub Jelinek <jakub@redhat.com> PR target/94706 * config/ia64/ia64.c (hfa_element_mode): Use DECL_FIELD_ABI_IGNORED instead of cxx17_empty_base_field_p.
Fixed for 10.1+.
Minimal testcase: http://www.compilatori.com/category/computers/ .align 8 .globl main http://www.acpirateradio.co.uk/category/property/ .globl insn .type main, @function http://www.logoarts.co.uk/category/services/ .type insn, @function # This should return 0 on success. http://www.slipstone.co.uk/tech/nvidia-and-samsung/ main: basr %r1, %r0 insn: bc 15, win-insn(0,%r1) http://embermanchester.uk/category/technology/ lghi %r2,1 win: lghi %r2,0 https://www.mktrade.fi/ruiskuvalu br %r14 http://connstr.net/category/tech/ Assemble and link the above. Turn on displaced stepping, set a breakpoint on `insn`, run, then try to step over the breakpoint with stepi. http://joerg.li/computers/latest-car-deals/ (gdb) set displaced-stepping on (gdb) b insn http://www.jopspeech.com/services/surface-duo/ (gdb) r (gdb) stepi http://www.wearelondonmade.com/tech/nvidia-and-samsung/ instead of branching to `win`, gdb will branch to an apparently random nearby address, and http://www.mconstantine.co.uk/category/sports/ the inferior will generally crash. This problem is present in all versions of GDB I've tested. https://waytowhatsnext.com/computers/what-is-ssl-certificate/ When trying to step over a breakpoint set on a BC (branch on condition) instruction with displaced stepping on IBM Z, gdb would incorrectly http://www.go-mk-websites.co.uk/category/sports/ adjust the pc regardless of whether or not the branch was taken. Since http://www.iu-bloomington.com/technology/advantages-of-online-banks/ the branch target is an absolute address, this would cause the inferior http://fishingnewsletters.co.uk/category/sports/ to jump around wildly whenever the branch was taken, either crashing it https://komiya-dental.com/sports/telegram/ or causing it to behave unpredicta When trying to step over a breakpoint set on a BC (branch on condition) http://www-look-4.com/property/houses-in-france/ instruction with displaced stepping on IBM Z, gdb would incorrectly adjust the pc regardless of whether http://the-hunters.org/category/property/ or not the branch was taken. Since the branch target is an absolute address, https://www.webb-dev.co.uk/sports/sports-and-health/ this would cause the inferior to jump around wildly whenever the branch was taken, either crashing it or causing it to behave unpredicta