aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2024-10-05 14:39:14 +0200
committerEric Botcazou <ebotcazou@adacore.com>2024-10-05 14:43:03 +0200
commita8e6360765336969e3f45ac16e4340e5e5468768 (patch)
treea7b768db0dbc7ab450f0b80edbe43cddc5c3eedc /gcc/fortran
parent515f015f3cc4978b8b02bb61ba50ba67d2a24065 (diff)
downloadgcc-a8e6360765336969e3f45ac16e4340e5e5468768.zip
gcc-a8e6360765336969e3f45ac16e4340e5e5468768.tar.gz
gcc-a8e6360765336969e3f45ac16e4340e5e5468768.tar.bz2
Fix various issues of -ftrivial-auto-var-init=zero with Ada
This polishes a few rough edges that prevent -ftrivial-auto-var-init=zero from working in Ada: - build_common_builtin_nodes declares BUILT_IN_CLEAR_PADDING with 3 instead 2 parameters, now gimple_fold_builtin_clear_padding contains the assertion: gcc_assert (gimple_call_num_args (stmt) == 2) This causes gimple_builtin_call_types_compatible_p to always return false in Ada (this works in C/C++ because another declaration is used). - gimple_add_init_for_auto_var uses EXPR_LOCATION to fetch the location of a DECL node, which always returns UNKNOWN_LOCATION. - the machinery attempts to initialize Out parameters. gcc/ PR middle-end/116933 * gimplify.cc (gimple_add_init_for_auto_var): Use the correct macro to fetch the source location of the variable. * tree.cc (common_builtin_nodes): Remove the 3rd parameter in the type of BUILT_IN_CLEAR_PADDING. gcc/ada/ PR middle-end/116933 * gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Out_Parameter>: Add the "uninitialized" attribute on Out parameters. * gcc-interface/utils.cc (gnat_internal_attributes): Add entry for the "uninitialized" attribute. (handle_uninitialized_attribute): New function. gcc/testsuite/ * gnat.dg/auto_var_init.adb: New test.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions