https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67740
--- Comment #3 from anlauf at gcc dot gnu.org --- (In reply to anlauf from comment #2) > The dump-tree looks funny: it appears that in the last test > > print *, "Associated contents?", associated(p1%string, p2%string) > > the association is already evaluated at compile time to .false. I do not understand the following code in trans-intrinsic.c, which may be part of the underlying cause: 8426 nonzero_charlen = NULL_TREE; 8427 if (arg1->expr->ts.type == BT_CHARACTER) 8428 nonzero_charlen = fold_build2_loc (input_location, NE_EXPR, 8429 logical_type_node, 8430 arg1->expr->ts.u.cl->backend_decl, 8431 build_zero_cst 8432 (TREE_TYPE (arg1->expr->ts.u.cl->backend_decl))); and 8500 /* If target is present zero character length pointers cannot 8501 be associated. */ 8502 if (nonzero_charlen != NULL_TREE) 8503 se->expr = fold_build2_loc (input_location, TRUTH_AND_EXPR, 8504 logical_type_node, 8505 se->expr, nonzero_charlen);