c++/79786 - bougs invocation of DATA_ABI_ALIGNMENT macro

Message ID 20250203103443.34D923858416@sourceware.org
State New
Headers
Series c++/79786 - bougs invocation of DATA_ABI_ALIGNMENT macro |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply

Commit Message

Richard Biener Feb. 3, 2025, 10:33 a.m. UTC
  The first argument is supposed to be a type, not a decl.

Bootstrap & regtest running on x86_64-unknown-linux-gnu.

OK?

	PR c++/79786
gcc/cp/
	* rtti.cc (emit_tinfo_decl): Fix DATA_ABI_ALIGNMENT invocation.
---
 gcc/cp/rtti.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/gcc/cp/rtti.cc b/gcc/cp/rtti.cc
index 2dfc2e3d7c5..dcf84f17163 100644
--- a/gcc/cp/rtti.cc
+++ b/gcc/cp/rtti.cc
@@ -1741,7 +1741,8 @@  emit_tinfo_decl (tree decl)
       /* Avoid targets optionally bumping up the alignment to improve
 	 vector instruction accesses, tinfo are never accessed this way.  */
 #ifdef DATA_ABI_ALIGNMENT
-      SET_DECL_ALIGN (decl, DATA_ABI_ALIGNMENT (decl, TYPE_ALIGN (TREE_TYPE (decl))));
+      SET_DECL_ALIGN (decl, DATA_ABI_ALIGNMENT (TREE_TYPE (decl),
+						TYPE_ALIGN (TREE_TYPE (decl))));
       DECL_USER_ALIGN (decl) = true;
 #endif
       return true;