aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-10-12 14:26:46 +0200
committerMarc Poulhiès <poulhies@adacore.com>2023-11-07 10:15:05 +0100
commitc210397b75df066ef96c6834a0d4273658d07ee7 (patch)
treeb740901fea78ecc9d0668401dd721c821c1f3719 /gcc
parent756e05d1565482e7b24f9cf51ffcfeced5a9d91c (diff)
downloadgcc-c210397b75df066ef96c6834a0d4273658d07ee7.zip
gcc-c210397b75df066ef96c6834a0d4273658d07ee7.tar.gz
gcc-c210397b75df066ef96c6834a0d4273658d07ee7.tar.bz2
ada: Fix spurious -Wstringop-overflow with link time optimization
It comes from an incomplete optimization performed by LTO that is caused by an obsolete transformation done in Gigi, which is redundant with the common uniquization of constant CONSTRUCTORs now performed during gimplification. gcc/ada/ * gcc-interface/trans.cc (gnat_gimplify_expr) <CALL_EXPR>: Delete.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/gcc-interface/trans.cc24
1 files changed, 0 insertions, 24 deletions
diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc
index 89f0a07..c7d9162 100644
--- a/gcc/ada/gcc-interface/trans.cc
+++ b/gcc/ada/gcc-interface/trans.cc
@@ -8950,30 +8950,6 @@ gnat_gimplify_expr (tree *expr_p, gimple_seq *pre_p,
}
break;
- case CALL_EXPR:
- /* If we are passing a constant fat pointer CONSTRUCTOR, make sure it is
- put into static memory; this performs a restricted version of constant
- propagation on fat pointers in calls. But do not do it for strings to
- avoid blocking concatenation in the caller when it is inlined. */
- for (int i = 0; i < call_expr_nargs (expr); i++)
- {
- tree arg = CALL_EXPR_ARG (expr, i);
-
- if (TREE_CODE (arg) == CONSTRUCTOR
- && TREE_CONSTANT (arg)
- && TYPE_IS_FAT_POINTER_P (TREE_TYPE (arg)))
- {
- tree t = CONSTRUCTOR_ELT (arg, 0)->value;
- if (TREE_CODE (t) == NOP_EXPR)
- t = TREE_OPERAND (t, 0);
- if (TREE_CODE (t) == ADDR_EXPR)
- t = TREE_OPERAND (t, 0);
- if (TREE_CODE (t) != STRING_CST)
- CALL_EXPR_ARG (expr, i) = tree_output_constant_def (arg);
- }
- }
- break;
-
case DECL_EXPR:
op = DECL_EXPR_DECL (expr);