aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile.cc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2025-03-19 08:55:04 +0100
committerEric Botcazou <ebotcazou@adacore.com>2025-03-19 08:56:51 +0100
commit3a59a1e1bbc7c16477902149d200ce2d3d6c8df5 (patch)
treee99199d1bf6d872ce31ba5498a3558cc2a7f3cff /gcc/rust/backend/rust-compile.cc
parent1636e85270d918a84d57bb521c22c42abf42a47c (diff)
downloadgcc-3a59a1e1bbc7c16477902149d200ce2d3d6c8df5.zip
gcc-3a59a1e1bbc7c16477902149d200ce2d3d6c8df5.tar.gz
gcc-3a59a1e1bbc7c16477902149d200ce2d3d6c8df5.tar.bz2
Fix misoptimization at -O2 in LTO mode
This is a regression in recent releases. The problem is that the IPA mod/ref pass looks through the (nominal) type of a pointer-to-discriminated-type parameter in a call to a subprogram in order to see the (actual) type used for the dereferences of the parameter in the callee, which is a pointer-to-constrained-subtype. Historically the discriminated type is marked with the may_alias attribute because of the symmetric effect for the argument in the caller, so we mark the constrained subtype with the attribute now for the sake of the callee. gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Record_Subtype>: Set the may_alias attribute if a specific GCC type is built.
Diffstat (limited to 'gcc/rust/backend/rust-compile.cc')
0 files changed, 0 insertions, 0 deletions