aboutsummaryrefslogtreecommitdiff
path: root/libffi/testsuite/libffi.closures/nested_struct9.c
diff options
context:
space:
mode:
authorYuao Ma <c8ef@outlook.com>2025-09-12 20:28:19 +0800
committerc8ef <c8ef@outlook.com>2025-09-14 18:24:50 +0800
commitaf53cfeb8352b18cbc0684f04c5106db20142f7b (patch)
tree3de0e72cacf6f091a6a6c85f4e76ffc1c486eab6 /libffi/testsuite/libffi.closures/nested_struct9.c
parent21d1bb1922fa7cd98f2a27d002e48b488e772176 (diff)
downloadgcc-af53cfeb8352b18cbc0684f04c5106db20142f7b.zip
gcc-af53cfeb8352b18cbc0684f04c5106db20142f7b.tar.gz
gcc-af53cfeb8352b18cbc0684f04c5106db20142f7b.tar.bz2
fortran: implement conditional expression for fortran 2023
This patch adds support for conditional expressions in Fortran 2023 for a limited set of types (logical, numerical), and also includes limited support for conditional arguments without `.nil.` support. gcc/fortran/ChangeLog: * dump-parse-tree.cc (show_expr): Add support for EXPR_CONDITIONAL. * expr.cc (gfc_get_conditional_expr): Add cond-expr constructor. (gfc_copy_expr, free_expr0, gfc_is_constant_expr, simplify_conditional, gfc_simplify_expr, gfc_check_init_expr, check_restricted, gfc_traverse_expr): Add support for EXPR_CONDITIONAL. * frontend-passes.cc (gfc_expr_walker): Ditto. * gfortran.h (enum expr_t): Add EXPR_CONDITIONAL. (gfc_get_operator_expr): Format fix. (gfc_get_conditional_expr): New decl. * matchexp.cc (match_conditional, match_primary): Parsing for EXPR_CONDITIONAL. * module.cc (mio_expr): Add support for EXPR_CONDITIONAL. * resolve.cc (resolve_conditional, gfc_resolve_expr): Ditto. * trans-array.cc (gfc_walk_conditional_expr, gfc_walk_subexpr): Ditto. * trans-expr.cc (gfc_conv_conditional_expr): Codegen for EXPR_CONDITIONAL. (gfc_apply_interface_mapping_to_expr, gfc_conv_expr, gfc_conv_expr_reference): Add support for EXPR_CONDITIONAL. gcc/testsuite/ChangeLog: * gfortran.dg/conditional_1.f90: New test. * gfortran.dg/conditional_2.f90: New test. * gfortran.dg/conditional_3.f90: New test. * gfortran.dg/conditional_4.f90: New test. * gfortran.dg/conditional_5.f90: New test. * gfortran.dg/conditional_6.f90: New test. * gfortran.dg/conditional_7.f90: New test. * gfortran.dg/conditional_8.f90: New test. * gfortran.dg/conditional_9.f90: New test.
Diffstat (limited to 'libffi/testsuite/libffi.closures/nested_struct9.c')
0 files changed, 0 insertions, 0 deletions