+2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/84381
+ * gfortran.dg/abort_shoulfail.f90: New test.
+ * gcc.target/powerpc/ppc-fortran/pr80108-1.f90: Replace CALL ABORT
+ by STOP n.
+ * gfortran.dg/PR19754_2.f90: Likewise.
+ * gfortran.dg/PR19872.f: Likewise.
+ * gfortran.dg/PR49268.f90: Likewise.
+ * gfortran.dg/Wall.f90: Likewise.
+ * gfortran.dg/Wno-all.f90: Likewise.
+ * gfortran.dg/achar_1.f90: Likewise.
+ * gfortran.dg/achar_2.f90: Likewise.
+ * gfortran.dg/achar_4.f90: Likewise.
+ * gfortran.dg/achar_6.F90: Likewise.
+ * gfortran.dg/actual_array_constructor_1.f90: Likewise.
+ * gfortran.dg/actual_array_constructor_2.f90: Likewise.
+ * gfortran.dg/actual_array_constructor_3.f90: Likewise.
+ * gfortran.dg/actual_array_offset_1.f90: Likewise.
+ * gfortran.dg/actual_array_result_1.f90: Likewise.
+ * gfortran.dg/actual_array_substr_1.f90: Likewise.
+ * gfortran.dg/actual_array_substr_2.f90: Likewise.
+ * gfortran.dg/actual_pointer_function_1.f90: Likewise.
+ * gfortran.dg/actual_procedure_1.f90: Likewise.
+ * gfortran.dg/adjustl_1.f90: Likewise.
+ * gfortran.dg/advance_1.f90: Likewise.
+ * gfortran.dg/advance_4.f90: Likewise.
+ * gfortran.dg/advance_5.f90: Likewise.
+ * gfortran.dg/advance_6.f90: Likewise.
+ * gfortran.dg/aint_anint_1.f90: Likewise.
+ * gfortran.dg/aliasing_array_result_1.f90: Likewise.
+ * gfortran.dg/aliasing_dummy_1.f90: Likewise.
+ * gfortran.dg/aliasing_dummy_4.f90: Likewise.
+ * gfortran.dg/aliasing_dummy_5.f90: Likewise.
+ * gfortran.dg/alloc_comp_assign_1.f90: Likewise.
+ * gfortran.dg/alloc_comp_assign_10.f90: Likewise.
+ * gfortran.dg/alloc_comp_assign_11.f90: Likewise.
+ * gfortran.dg/alloc_comp_assign_12.f03: Likewise.
+ * gfortran.dg/alloc_comp_assign_13.f08: Likewise.
+ * gfortran.dg/alloc_comp_assign_14.f08: Likewise.
+ * gfortran.dg/alloc_comp_assign_15.f03: Likewise.
+ * gfortran.dg/alloc_comp_assign_2.f90: Likewise.
+ * gfortran.dg/alloc_comp_assign_3.f90: Likewise.
+ * gfortran.dg/alloc_comp_assign_4.f90: Likewise.
+ * gfortran.dg/alloc_comp_assign_5.f90: Likewise.
+ * gfortran.dg/alloc_comp_assign_6.f90: Likewise.
+ * gfortran.dg/alloc_comp_assign_7.f90: Likewise.
+ * gfortran.dg/alloc_comp_assign_8.f90: Likewise.
+ * gfortran.dg/alloc_comp_assign_9.f90: Likewise.
+ * gfortran.dg/alloc_comp_auto_array_1.f90: Likewise.
+ * gfortran.dg/alloc_comp_auto_array_2.f90: Likewise.
+ * gfortran.dg/alloc_comp_basics_1.f90: Likewise.
+ * gfortran.dg/alloc_comp_basics_2.f90: Likewise.
+ * gfortran.dg/alloc_comp_basics_5.f90: Likewise.
+ * gfortran.dg/alloc_comp_bounds_1.f90: Likewise.
+ * gfortran.dg/alloc_comp_class_1.f90: Likewise.
+ * gfortran.dg/alloc_comp_class_2.f90: Likewise.
+ * gfortran.dg/alloc_comp_class_4.f03: Likewise.
+ * gfortran.dg/alloc_comp_class_5.f03: Likewise.
+ * gfortran.dg/alloc_comp_constructor_1.f90: Likewise.
+ * gfortran.dg/alloc_comp_constructor_2.f90: Likewise.
+ * gfortran.dg/alloc_comp_constructor_3.f90: Likewise.
+ * gfortran.dg/alloc_comp_constructor_4.f90: Likewise.
+ * gfortran.dg/alloc_comp_constructor_5.f90: Likewise.
+ * gfortran.dg/alloc_comp_constructor_6.f90: Likewise.
+ * gfortran.dg/alloc_comp_constructor_7.f90: Likewise.
+ * gfortran.dg/alloc_comp_deep_copy_1.f03: Likewise.
+ * gfortran.dg/alloc_comp_deep_copy_2.f03: Likewise.
+ * gfortran.dg/alloc_comp_deep_copy_3.f03: Likewise.
+ * gfortran.dg/alloc_comp_default_init_1.f90: Likewise.
+ * gfortran.dg/alloc_comp_default_init_2.f90: Likewise.
+ * gfortran.dg/alloc_comp_initializer_1.f90: Likewise.
+ * gfortran.dg/alloc_comp_initializer_4.f03: Likewise.
+ * gfortran.dg/alloc_comp_optional_1.f90: Likewise.
+ * gfortran.dg/alloc_comp_result_1.f90: Likewise.
+ * gfortran.dg/alloc_comp_result_2.f90: Likewise.
+ * gfortran.dg/alloc_comp_scalar_1.f90: Likewise.
+ * gfortran.dg/alloc_comp_transformational_1.f90: Likewise.
+ * gfortran.dg/allocatable_dummy_1.f90: Likewise.
+ * gfortran.dg/allocatable_dummy_3.f90: Likewise.
+ * gfortran.dg/allocatable_function_1.f90: Likewise.
+ * gfortran.dg/allocatable_function_10.f90: Likewise.
+ * gfortran.dg/allocatable_function_3.f90: Likewise.
+ * gfortran.dg/allocatable_function_5.f90: Likewise.
+ * gfortran.dg/allocatable_function_6.f90: Likewise.
+ * gfortran.dg/allocatable_function_7.f90: Likewise.
+ * gfortran.dg/allocatable_function_8.f90: Likewise.
+ * gfortran.dg/allocatable_scalar_1.f90: Likewise.
+ * gfortran.dg/allocatable_scalar_10.f90: Likewise.
+ * gfortran.dg/allocatable_scalar_12.f90: Likewise.
+ * gfortran.dg/allocatable_scalar_13.f90: Likewise.
+ * gfortran.dg/allocatable_scalar_3.f90: Likewise.
+ * gfortran.dg/allocatable_scalar_4.f90: Likewise.
+ * gfortran.dg/allocatable_scalar_5.f90: Likewise.
+ * gfortran.dg/allocatable_scalar_6.f90: Likewise.
+ * gfortran.dg/allocatable_scalar_7.f90: Likewise.
+ * gfortran.dg/allocatable_scalar_8.f90: Likewise.
+ * gfortran.dg/allocatable_scalar_9.f90: Likewise.
+ * gfortran.dg/allocate_alloc_opt_10.f90: Likewise.
+ * gfortran.dg/allocate_alloc_opt_3.f90: Likewise.
+ * gfortran.dg/allocate_alloc_opt_6.f90: Likewise.
+ * gfortran.dg/allocate_assumed_charlen_1.f90: Likewise.
+ * gfortran.dg/allocate_assumed_charlen_2.f90: Likewise.
+ * gfortran.dg/allocate_class_3.f90: Likewise.
+ * gfortran.dg/allocate_deferred_char_scalar_1.f03: Likewise.
+ * gfortran.dg/allocate_deferred_char_scalar_2.f03: Likewise.
+ * gfortran.dg/allocate_derived_5.f90: Likewise.
+ * gfortran.dg/allocate_with_arrayspec_1.f90: Likewise.
+ * gfortran.dg/allocate_with_mold_1.f90: Likewise.
+ * gfortran.dg/allocate_with_source_1.f90: Likewise.
+ * gfortran.dg/allocate_with_source_10.f08: Likewise.
+ * gfortran.dg/allocate_with_source_11.f08: Likewise.
+ * gfortran.dg/allocate_with_source_12.f03: Likewise.
+ * gfortran.dg/allocate_with_source_15.f03: Likewise.
+ * gfortran.dg/allocate_with_source_16.f90: Likewise.
+ * gfortran.dg/allocate_with_source_17.f03: Likewise.
+ * gfortran.dg/allocate_with_source_18.f03: Likewise.
+ * gfortran.dg/allocate_with_source_2.f90: Likewise.
+ * gfortran.dg/allocate_with_source_20.f03: Likewise.
+ * gfortran.dg/allocate_with_source_22.f03: Likewise.
+ * gfortran.dg/allocate_with_source_23.f03: Likewise.
+ * gfortran.dg/allocate_with_source_24.f90: Likewise.
+ * gfortran.dg/allocate_with_source_5.f90: Likewise.
+ * gfortran.dg/allocate_with_source_6.f90: Likewise.
+ * gfortran.dg/allocate_with_source_7.f08: Likewise.
+ * gfortran.dg/allocate_with_source_8.f08: Likewise.
+ * gfortran.dg/allocate_with_source_9.f08: Likewise.
+ * gfortran.dg/allocate_zerosize_1.f90: Likewise.
+ * gfortran.dg/allocate_zerosize_3.f: Likewise.
+ * gfortran.dg/altreturn_3.f90: Likewise.
+ * gfortran.dg/altreturn_5.f90: Likewise.
+ * gfortran.dg/altreturn_7.f90: Likewise.
+ * gfortran.dg/and_or_xor.f90: Likewise.
+ * gfortran.dg/anint_1.f90: Likewise.
+ * gfortran.dg/any_all_1.f90: Likewise.
+ * gfortran.dg/anyallcount_1.f90: Likewise.
+ * gfortran.dg/append_1.f90: Likewise.
+ * gfortran.dg/argument_checking_1.f90: Likewise.
+ * gfortran.dg/argument_checking_2.f90: Likewise.
+ * gfortran.dg/argument_checking_8.f90: Likewise.
+ * gfortran.dg/arithmetic_if.f90: Likewise.
+ * gfortran.dg/array_1.f90: Likewise.
+ * gfortran.dg/array_2.f90: Likewise.
+ * gfortran.dg/array_alloc_1.f90: Likewise.
+ * gfortran.dg/array_alloc_2.f90: Likewise.
+ * gfortran.dg/array_alloc_3.f90: Likewise.
+ * gfortran.dg/array_assignment_1.F90: Likewise.
+ * gfortran.dg/array_assignment_5.f90: Likewise.
+ * gfortran.dg/array_constructor_1.f90: Likewise.
+ * gfortran.dg/array_constructor_10.f90: Likewise.
+ * gfortran.dg/array_constructor_11.f90: Likewise.
+ * gfortran.dg/array_constructor_12.f90: Likewise.
+ * gfortran.dg/array_constructor_15.f90: Likewise.
+ * gfortran.dg/array_constructor_16.f90: Likewise.
+ * gfortran.dg/array_constructor_17.f90: Likewise.
+ * gfortran.dg/array_constructor_19.f90: Likewise.
+ * gfortran.dg/array_constructor_23.f: Likewise.
+ * gfortran.dg/array_constructor_24.f: Likewise.
+ * gfortran.dg/array_constructor_32.f90: Likewise.
+ * gfortran.dg/array_constructor_36.f90: Likewise.
+ * gfortran.dg/array_constructor_39.f90: Likewise.
+ * gfortran.dg/array_constructor_4.f90: Likewise.
+ * gfortran.dg/array_constructor_40.f90: Likewise.
+ * gfortran.dg/array_constructor_44.f90: Likewise.
+ * gfortran.dg/array_constructor_45.f90: Likewise.
+ * gfortran.dg/array_constructor_46.f90: Likewise.
+ * gfortran.dg/array_constructor_47.f90: Likewise.
+ * gfortran.dg/array_constructor_49.f90: Likewise.
+ * gfortran.dg/array_constructor_5.f90: Likewise.
+ * gfortran.dg/array_constructor_50.f90: Likewise.
+ * gfortran.dg/array_constructor_6.f90: Likewise.
+ * gfortran.dg/array_constructor_7.f90: Likewise.
+ * gfortran.dg/array_constructor_8.f90: Likewise.
+ * gfortran.dg/array_constructor_9.f90: Likewise.
+ * gfortran.dg/array_constructor_type_1.f03: Likewise.
+ * gfortran.dg/array_constructor_type_10.f03: Likewise.
+ * gfortran.dg/array_constructor_type_11.f03: Likewise.
+ * gfortran.dg/array_constructor_type_12.f03: Likewise.
+ * gfortran.dg/array_constructor_type_13.f90: Likewise.
+ * gfortran.dg/array_constructor_type_14.f03: Likewise.
+ * gfortran.dg/array_constructor_type_16.f03: Likewise.
+ * gfortran.dg/array_constructor_type_2.f03: Likewise.
+ * gfortran.dg/array_constructor_type_22.f03: Likewise.
+ * gfortran.dg/array_constructor_type_3.f03: Likewise.
+ * gfortran.dg/array_constructor_type_4.f03: Likewise.
+ * gfortran.dg/array_constructor_type_5.f03: Likewise.
+ * gfortran.dg/array_constructor_type_6.f03: Likewise.
+ * gfortran.dg/array_constructor_type_7.f03: Likewise.
+ * gfortran.dg/array_function_1.f90: Likewise.
+ * gfortran.dg/array_function_5.f90: Likewise.
+ * gfortran.dg/array_initializer_1.f90: Likewise.
+ * gfortran.dg/array_initializer_2.f90: Likewise.
+ * gfortran.dg/array_memcpy_5.f90: Likewise.
+ * gfortran.dg/array_memset_2.f90: Likewise.
+ * gfortran.dg/array_reference_1.f90: Likewise.
+ * gfortran.dg/array_return_value_1.f90: Likewise.
+ * gfortran.dg/array_section_1.f90: Likewise.
+ * gfortran.dg/array_temporaries_3.f90: Likewise.
+ * gfortran.dg/arrayio_1.f90: Likewise.
+ * gfortran.dg/arrayio_10.f90: Likewise.
+ * gfortran.dg/arrayio_11.f90: Likewise.
+ * gfortran.dg/arrayio_12.f90: Likewise.
+ * gfortran.dg/arrayio_13.f90: Likewise.
+ * gfortran.dg/arrayio_14.f90: Likewise.
+ * gfortran.dg/arrayio_16.f90: Likewise.
+ * gfortran.dg/arrayio_2.f90: Likewise.
+ * gfortran.dg/arrayio_3.f90: Likewise.
+ * gfortran.dg/arrayio_4.f90: Likewise.
+ * gfortran.dg/arrayio_5.f90: Likewise.
+ * gfortran.dg/arrayio_6.f90: Likewise.
+ * gfortran.dg/arrayio_7.f90: Likewise.
+ * gfortran.dg/arrayio_8.f90: Likewise.
+ * gfortran.dg/arrayio_9.f90: Likewise.
+ * gfortran.dg/arrayio_derived_1.f90: Likewise.
+ * gfortran.dg/assign_10.f90: Likewise.
+ * gfortran.dg/assign_9.f90: Likewise.
+ * gfortran.dg/assign_func_dtcomp_1.f90: Likewise.
+ * gfortran.dg/assignment_1.f90: Likewise.
+ * gfortran.dg/associate_1.f03: Likewise.
+ * gfortran.dg/associate_11.f90: Likewise.
+ * gfortran.dg/associate_13.f90: Likewise.
+ * gfortran.dg/associate_15.f90: Likewise.
+ * gfortran.dg/associate_17.f90: Likewise.
+ * gfortran.dg/associate_18.f08: Likewise.
+ * gfortran.dg/associate_19.f03: Likewise.
+ * gfortran.dg/associate_20.f03: Likewise.
+ * gfortran.dg/associate_22.f90: Likewise.
+ * gfortran.dg/associate_23.f90: Likewise.
+ * gfortran.dg/associate_24.f90: Likewise.
+ * gfortran.dg/associate_25.f90: Likewise.
+ * gfortran.dg/associate_27.f90: Likewise.
+ * gfortran.dg/associate_28.f90: Likewise.
+ * gfortran.dg/associate_32.f03: Likewise.
+ * gfortran.dg/associate_33.f03: Likewise.
+ * gfortran.dg/associate_34.f90: Likewise.
+ * gfortran.dg/associate_6.f03: Likewise.
+ * gfortran.dg/associate_7.f03: Likewise.
+ * gfortran.dg/associate_8.f03: Likewise.
+ * gfortran.dg/associate_9.f03: Likewise.
+ * gfortran.dg/associated_1.f90: Likewise.
+ * gfortran.dg/associated_2.f90: Likewise.
+ * gfortran.dg/associated_5.f90: Likewise.
+ * gfortran.dg/associated_6.f90: Likewise.
+ * gfortran.dg/associated_target_3.f90: Likewise.
+ * gfortran.dg/associated_target_4.f90: Likewise.
+ * gfortran.dg/associated_target_5.f03: Likewise.
+ * gfortran.dg/associated_target_6.f03: Likewise.
+ * gfortran.dg/assumed_dummy_1.f90: Likewise.
+ * gfortran.dg/assumed_rank_1.f90: Likewise.
+ * gfortran.dg/assumed_rank_10.f90: Likewise.
+ * gfortran.dg/assumed_rank_2.f90: Likewise.
+ * gfortran.dg/assumed_rank_7.f90: Likewise.
+ * gfortran.dg/assumed_rank_8.f90: Likewise.
+ * gfortran.dg/assumed_rank_9.f90: Likewise.
+ * gfortran.dg/assumed_rank_bounds_1.f90: Likewise.
+ * gfortran.dg/assumed_rank_bounds_2.f90: Likewise.
+ * gfortran.dg/assumed_shape_ranks_2.f90: Likewise.
+ * gfortran.dg/assumed_type_2.f90: Likewise.
+ * gfortran.dg/atan2_1.f90: Likewise.
+ * gfortran.dg/auto_array_1.f90: Likewise.
+ * gfortran.dg/auto_char_dummy_array_1.f90: Likewise.
+ * gfortran.dg/auto_char_dummy_array_3.f90: Likewise.
+ * gfortran.dg/auto_char_len_3.f90: Likewise.
+ * gfortran.dg/auto_char_pointer_array_result_1.f90: Likewise.
+ * gfortran.dg/auto_internal_assumed.f90: Likewise.
+ * gfortran.dg/auto_pointer_array_result_1.f90: Likewise.
+ * gfortran.dg/auto_save_2.f90: Likewise.
+ * gfortran.dg/automatic_default_init_1.f90: Likewise.
+ * gfortran.dg/backslash_1.f90: Likewise.
+ * gfortran.dg/backslash_2.f90: Likewise.
+ * gfortran.dg/backslash_3.f: Likewise.
+ * gfortran.dg/backspace_1.f: Likewise.
+ * gfortran.dg/backspace_10.f90: Likewise.
+ * gfortran.dg/backspace_11.f90: Likewise.
+ * gfortran.dg/backspace_2.f: Likewise.
+ * gfortran.dg/backspace_3.f: Likewise.
+ * gfortran.dg/backspace_4.f: Likewise.
+ * gfortran.dg/backspace_5.f: Likewise.
+ * gfortran.dg/backspace_6.f: Likewise.
+ * gfortran.dg/backspace_7.f90: Likewise.
+ * gfortran.dg/backspace_8.f: Likewise.
+ * gfortran.dg/backspace_9.f: Likewise.
+ * gfortran.dg/bessel_1.f90: Likewise.
+ * gfortran.dg/bessel_2.f90: Likewise.
+ * gfortran.dg/bessel_5.f90: Likewise.
+ * gfortran.dg/bessel_6.f90: Likewise.
+ * gfortran.dg/bessel_7.f90: Likewise.
+ * gfortran.dg/bind_c_dts_2.f03: Likewise.
+ * gfortran.dg/bind_c_dts_3.f03: Likewise.
+ * gfortran.dg/bind_c_usage_15.f90: Likewise.
+ * gfortran.dg/bind_c_usage_16.f03: Likewise.
+ * gfortran.dg/bind_c_usage_17.f90: Likewise.
+ * gfortran.dg/bind_c_usage_24.f90: Likewise.
+ * gfortran.dg/binding_c_table_15_1.f03: Likewise.
+ * gfortran.dg/binding_label_tests_16.f03: Likewise.
+ * gfortran.dg/binding_label_tests_23.f90: Likewise.
+ * gfortran.dg/bit_comparison_1.F90: Likewise.
+ * gfortran.dg/bit_comparison_2.F90: Likewise.
+ * gfortran.dg/block_1.f08: Likewise.
+ * gfortran.dg/block_13.f08: Likewise.
+ * gfortran.dg/block_14.f90: Likewise.
+ * gfortran.dg/block_2.f08: Likewise.
+ * gfortran.dg/block_6.f08: Likewise.
+ * gfortran.dg/block_7.f08: Likewise.
+ * gfortran.dg/block_8.f08: Likewise.
+ * gfortran.dg/blockdata_1.f90: Likewise.
+ * gfortran.dg/bound_1.f90: Likewise.
+ * gfortran.dg/bound_2.f90: Likewise.
+ * gfortran.dg/bound_3.f90: Likewise.
+ * gfortran.dg/bound_4.f90: Likewise.
+ * gfortran.dg/bound_5.f90: Likewise.
+ * gfortran.dg/bound_6.f90: Likewise.
+ * gfortran.dg/bound_7.f90: Likewise.
+ * gfortran.dg/bound_8.f90: Likewise.
+ * gfortran.dg/bound_9.f90: Likewise.
+ * gfortran.dg/bound_simplification_1.f90: Likewise.
+ * gfortran.dg/bound_simplification_3.f90: Likewise.
+ * gfortran.dg/bound_simplification_4.f90: Likewise.
+ * gfortran.dg/bound_simplification_5.f90: Likewise.
+ * gfortran.dg/bound_simplification_6.f90: Likewise.
+ * gfortran.dg/bounds_check_1.f90: Likewise.
+ * gfortran.dg/bounds_check_12.f90: Likewise.
+ * gfortran.dg/bounds_check_14.f90: Likewise.
+ * gfortran.dg/bounds_check_15.f90: Likewise.
+ * gfortran.dg/bounds_check_19.f90: Likewise.
+ * gfortran.dg/bounds_check_8.f90: Likewise.
+ * gfortran.dg/bounds_check_9.f90: Likewise.
+ * gfortran.dg/bounds_check_fail_2.f90: Likewise.
+ * gfortran.dg/bounds_check_fail_3.f90: Likewise.
+ * gfortran.dg/bounds_check_fail_4.f90: Likewise.
+ * gfortran.dg/boz_1.f90: Likewise.
+ * gfortran.dg/boz_11.f90: Likewise.
+ * gfortran.dg/boz_13.f90: Likewise.
+ * gfortran.dg/boz_14.f90: Likewise.
+ * gfortran.dg/boz_15.f90: Likewise.
+ * gfortran.dg/boz_3.f90: Likewise.
+ * gfortran.dg/boz_6.f90: Likewise.
+ * gfortran.dg/boz_9.f90: Likewise.
+ * gfortran.dg/byte_1.f90: Likewise.
+ * gfortran.dg/byte_2.f90: Likewise.
+ * gfortran.dg/c_assoc.f90: Likewise.
+ * gfortran.dg/c_assoc_2.f03: Likewise.
+ * gfortran.dg/c_assoc_3.f90: Likewise.
+ * gfortran.dg/c_by_val_1.f: Likewise.
+ * gfortran.dg/c_by_val_5.f90: Likewise.
+ * gfortran.dg/c_char_tests.f03: Likewise.
+ * gfortran.dg/c_char_tests_2.f03: Likewise.
+ * gfortran.dg/c_f_pointer_complex.f03: Likewise.
+ * gfortran.dg/c_f_pointer_logical.f03: Likewise.
+ * gfortran.dg/c_f_pointer_shape_tests_2.f03: Likewise.
+ * gfortran.dg/c_f_pointer_shape_tests_4.f03: Likewise.
+ * gfortran.dg/c_f_pointer_shape_tests_5.f90: Likewise.
+ * gfortran.dg/c_f_pointer_tests.f90: Likewise.
+ * gfortran.dg/c_f_pointer_tests_4.f90: Likewise.
+ * gfortran.dg/c_kind_int128_test2.f03: Likewise.
+ * gfortran.dg/c_kind_params.f90: Likewise.
+ * gfortran.dg/c_loc_test_20.f90: Likewise.
+ * gfortran.dg/c_loc_tests_2.f03: Likewise.
+ * gfortran.dg/c_ptr_tests_14.f90: Likewise.
+ * gfortran.dg/c_ptr_tests_15.f90: Likewise.
+ * gfortran.dg/c_size_t_test.f03: Likewise.
+ * gfortran.dg/c_sizeof_1.f90: Likewise.
+ * gfortran.dg/c_sizeof_5.f90: Likewise.
+ * gfortran.dg/c_sizeof_6.f90: Likewise.
+ * gfortran.dg/char4_iunit_1.f03: Likewise.
+ * gfortran.dg/char4_iunit_2.f03: Likewise.
+ * gfortran.dg/char_allocation_1.f90: Likewise.
+ * gfortran.dg/char_array_constructor.f90: Likewise.
+ * gfortran.dg/char_array_structure_constructor.f90: Likewise.
+ * gfortran.dg/char_assign_1.f90: Likewise.
+ * gfortran.dg/char_associated_1.f90: Likewise.
+ * gfortran.dg/char_cast_2.f90: Likewise.
+ * gfortran.dg/char_comparison_1.f: Likewise.
+ * gfortran.dg/char_component_initializer_1.f90: Likewise.
+ * gfortran.dg/char_component_initializer_2.f90: Likewise.
+ * gfortran.dg/char_cons_len.f90: Likewise.
+ * gfortran.dg/char_conversion.f90: Likewise.
+ * gfortran.dg/char_cshift_1.f90: Likewise.
+ * gfortran.dg/char_cshift_2.f90: Likewise.
+ * gfortran.dg/char_decl_2.f90: Likewise.
+ * gfortran.dg/char_eoshift_1.f90: Likewise.
+ * gfortran.dg/char_eoshift_2.f90: Likewise.
+ * gfortran.dg/char_eoshift_3.f90: Likewise.
+ * gfortran.dg/char_eoshift_4.f90: Likewise.
+ * gfortran.dg/char_eoshift_5.f90: Likewise.
+ * gfortran.dg/char_expr_1.f90: Likewise.
+ * gfortran.dg/char_expr_3.f90: Likewise.
+ * gfortran.dg/char_initialiser_actual.f90: Likewise.
+ * gfortran.dg/char_length_12.f90: Likewise.
+ * gfortran.dg/char_length_14.f90: Likewise.
+ * gfortran.dg/char_length_15.f90: Likewise.
+ * gfortran.dg/char_length_17.f90: Likewise.
+ * gfortran.dg/char_length_20.f90: Likewise.
+ * gfortran.dg/char_length_21.f90: Likewise.
+ * gfortran.dg/char_length_5.f90: Likewise.
+ * gfortran.dg/char_length_6.f90: Likewise.
+ * gfortran.dg/char_length_7.f90: Likewise.
+ * gfortran.dg/char_length_8.f90: Likewise.
+ * gfortran.dg/char_pack_1.f90: Likewise.
+ * gfortran.dg/char_pack_2.f90: Likewise.
+ * gfortran.dg/char_pointer_assign.f90: Likewise.
+ * gfortran.dg/char_pointer_assign_3.f90: Likewise.
+ * gfortran.dg/char_pointer_comp_assign.f90: Likewise.
+ * gfortran.dg/char_pointer_dependency.f90: Likewise.
+ * gfortran.dg/char_pointer_dummy.f90: Likewise.
+ * gfortran.dg/char_pointer_func.f90: Likewise.
+ * gfortran.dg/char_reshape_1.f90: Likewise.
+ * gfortran.dg/char_result_1.f90: Likewise.
+ * gfortran.dg/char_result_12.f90: Likewise.
+ * gfortran.dg/char_result_13.f90: Likewise.
+ * gfortran.dg/char_result_14.f90: Likewise.
+ * gfortran.dg/char_result_15.f90: Likewise.
+ * gfortran.dg/char_result_2.f90: Likewise.
+ * gfortran.dg/char_result_3.f90: Likewise.
+ * gfortran.dg/char_result_4.f90: Likewise.
+ * gfortran.dg/char_result_5.f90: Likewise.
+ * gfortran.dg/char_result_6.f90: Likewise.
+ * gfortran.dg/char_result_7.f90: Likewise.
+ * gfortran.dg/char_result_8.f90: Likewise.
+ * gfortran.dg/char_spread_1.f90: Likewise.
+ * gfortran.dg/char_transpose_1.f90: Likewise.
+ * gfortran.dg/char_type_len.f90: Likewise.
+ * gfortran.dg/char_unpack_1.f90: Likewise.
+ * gfortran.dg/char_unpack_2.f90: Likewise.
+ * gfortran.dg/character_array_constructor_1.f90: Likewise.
+ * gfortran.dg/character_comparison_1.f90: Likewise.
+ * gfortran.dg/character_comparison_2.f90: Likewise.
+ * gfortran.dg/character_comparison_3.f90: Likewise.
+ * gfortran.dg/character_comparison_4.f90: Likewise.
+ * gfortran.dg/character_comparison_5.f90: Likewise.
+ * gfortran.dg/character_comparison_6.f90: Likewise.
+ * gfortran.dg/character_comparison_7.f90: Likewise.
+ * gfortran.dg/character_comparison_8.f90: Likewise.
+ * gfortran.dg/character_comparison_9.f90: Likewise.
+ * gfortran.dg/charlen_15.f90: Likewise.
+ * gfortran.dg/charlen_16.f90: Likewise.
+ * gfortran.dg/chkbits.f90: Likewise.
+ * gfortran.dg/chmod_1.f90: Likewise.
+ * gfortran.dg/chmod_2.f90: Likewise.
+ * gfortran.dg/chmod_3.f90: Likewise.
+ * gfortran.dg/class_1.f03: Likewise.
+ * gfortran.dg/class_18.f03: Likewise.
+ * gfortran.dg/class_19.f03: Likewise.
+ * gfortran.dg/class_35.f90: Likewise.
+ * gfortran.dg/class_46.f03: Likewise.
+ * gfortran.dg/class_48.f90: Likewise.
+ * gfortran.dg/class_51.f90: Likewise.
+ * gfortran.dg/class_52.f90: Likewise.
+ * gfortran.dg/class_6.f03: Likewise.
+ * gfortran.dg/class_63.f90: Likewise.
+ * gfortran.dg/class_64.f90: Likewise.
+ * gfortran.dg/class_65.f90: Likewise.
+ * gfortran.dg/class_66.f90: Likewise.
+ * gfortran.dg/class_67.f90: Likewise.
+ * gfortran.dg/class_9.f03: Likewise.
+ * gfortran.dg/class_alias.f90: Likewise.
+ * gfortran.dg/class_allocate_1.f03: Likewise.
+ * gfortran.dg/class_allocate_10.f03: Likewise.
+ * gfortran.dg/class_allocate_13.f90: Likewise.
+ * gfortran.dg/class_allocate_14.f90: Likewise.
+ * gfortran.dg/class_allocate_15.f90: Likewise.
+ * gfortran.dg/class_allocate_19.f03: Likewise.
+ * gfortran.dg/class_allocate_21.f90: Likewise.
+ * gfortran.dg/class_allocate_22.f90: Likewise.
+ * gfortran.dg/class_allocate_3.f03: Likewise.
+ * gfortran.dg/class_allocate_4.f03: Likewise.
+ * gfortran.dg/class_allocate_5.f90: Likewise.
+ * gfortran.dg/class_allocate_6.f03: Likewise.
+ * gfortran.dg/class_allocate_7.f03: Likewise.
+ * gfortran.dg/class_allocate_8.f03: Likewise.
+ * gfortran.dg/class_allocate_9.f03: Likewise.
+ * gfortran.dg/class_array_1.f03: Likewise.
+ * gfortran.dg/class_array_14.f90: Likewise.
+ * gfortran.dg/class_array_15.f03: Likewise.
+ * gfortran.dg/class_array_16.f90: Likewise.
+ * gfortran.dg/class_array_2.f03: Likewise.
+ * gfortran.dg/class_array_20.f03: Likewise.
+ * gfortran.dg/class_array_21.f03: Likewise.
+ * gfortran.dg/class_array_3.f03: Likewise.
+ * gfortran.dg/class_array_4.f03: Likewise.
+ * gfortran.dg/class_array_7.f03: Likewise.
+ * gfortran.dg/class_array_8.f03: Likewise.
+ * gfortran.dg/class_array_9.f03: Likewise.
+ * gfortran.dg/class_defined_operator_1.f03: Likewise.
+ * gfortran.dg/class_dummy_1.f03: Likewise.
+ * gfortran.dg/class_optional_1.f90: Likewise.
+ * gfortran.dg/class_optional_2.f90: Likewise.
+ * gfortran.dg/class_result_5.f90: Likewise.
+ * gfortran.dg/class_result_6.f90: Likewise.
+ * gfortran.dg/class_to_type_1.f03: Likewise.
+ * gfortran.dg/class_to_type_2.f90: Likewise.
+ * gfortran.dg/class_to_type_3.f03: Likewise.
+ * gfortran.dg/class_to_type_4.f90: Likewise.
+ * gfortran.dg/coarray/alloc_comp_1.f90: Likewise.
+ * gfortran.dg/coarray/alloc_comp_4.f90: Likewise.
+ * gfortran.dg/coarray/allocate_errgmsg.f90: Likewise.
+ * gfortran.dg/coarray/atomic_1.f90: Likewise.
+ * gfortran.dg/coarray/atomic_2.f90: Likewise.
+ * gfortran.dg/coarray/codimension.f90: Likewise.
+ * gfortran.dg/coarray/coindexed_1.f90: Likewise.
+ * gfortran.dg/coarray/collectives_1.f90: Likewise.
+ * gfortran.dg/coarray/collectives_2.f90: Likewise.
+ * gfortran.dg/coarray/collectives_3.f90: Likewise.
+ * gfortran.dg/coarray/collectives_4.f90: Likewise.
+ * gfortran.dg/coarray/cosubscript_1.f90: Likewise.
+ * gfortran.dg/coarray/dummy_1.f90: Likewise.
+ * gfortran.dg/coarray/event_1.f90: Likewise.
+ * gfortran.dg/coarray/event_2.f90: Likewise.
+ * gfortran.dg/coarray/get_array.f90: Likewise.
+ * gfortran.dg/coarray/image_index_1.f90: Likewise.
+ * gfortran.dg/coarray/image_index_2.f90: Likewise.
+ * gfortran.dg/coarray/image_index_3.f90: Likewise.
+ * gfortran.dg/coarray/lib_realloc_1.f90: Likewise.
+ * gfortran.dg/coarray/lock_1.f90: Likewise.
+ * gfortran.dg/coarray/lock_2.f90: Likewise.
+ * gfortran.dg/coarray/move_alloc_1.f90: Likewise.
+ * gfortran.dg/coarray/poly_run_1.f90: Likewise.
+ * gfortran.dg/coarray/poly_run_2.f90: Likewise.
+ * gfortran.dg/coarray/poly_run_3.f90: Likewise.
+ * gfortran.dg/coarray/ptr_comp_3.f08: Likewise.
+ * gfortran.dg/coarray/registering_1.f90: Likewise.
+ * gfortran.dg/coarray/scalar_alloc_1.f90: Likewise.
+ * gfortran.dg/coarray/scalar_alloc_2.f90: Likewise.
+ * gfortran.dg/coarray/send_array.f90: Likewise.
+ * gfortran.dg/coarray/send_char_array_1.f90: Likewise.
+ * gfortran.dg/coarray/sendget_array.f90: Likewise.
+ * gfortran.dg/coarray/subobject_1.f90: Likewise.
+ * gfortran.dg/coarray/sync_1.f90: Likewise.
+ * gfortran.dg/coarray/sync_3.f90: Likewise.
+ * gfortran.dg/coarray/this_image_1.f90: Likewise.
+ * gfortran.dg/coarray/this_image_2.f90: Likewise.
+ * gfortran.dg/coarray_13.f90: Likewise.
+ * gfortran.dg/coarray_15.f90: Likewise.
+ * gfortran.dg/coarray_16.f90: Likewise.
+ * gfortran.dg/coarray_2.f90: Likewise.
+ * gfortran.dg/coarray_23.f90: Likewise.
+ * gfortran.dg/coarray_40.f90: Likewise.
+ * gfortran.dg/coarray_alloc_comp_1.f08: Likewise.
+ * gfortran.dg/coarray_alloc_comp_2.f08: Likewise.
+ * gfortran.dg/coarray_allocate_10.f08: Likewise.
+ * gfortran.dg/coarray_allocate_2.f08: Likewise.
+ * gfortran.dg/coarray_allocate_3.f08: Likewise.
+ * gfortran.dg/coarray_allocate_4.f08: Likewise.
+ * gfortran.dg/coarray_allocate_5.f08: Likewise.
+ * gfortran.dg/coarray_allocate_7.f08: Likewise.
+ * gfortran.dg/coarray_allocate_8.f08: Likewise.
+ * gfortran.dg/coarray_allocate_9.f08: Likewise.
+ * gfortran.dg/coarray_lib_alloc_4.f90: Likewise.
+ * gfortran.dg/coarray_lib_comm_1.f90: Likewise.
+ * gfortran.dg/coarray_lib_realloc_1.f90: Likewise.
+ * gfortran.dg/coarray_lib_token_1.f90: Likewise.
+ * gfortran.dg/coarray_lib_token_2.f90: Likewise.
+ * gfortran.dg/coarray_ptr_comp_1.f08: Likewise.
+ * gfortran.dg/coarray_ptr_comp_2.f08: Likewise.
+ * gfortran.dg/coarray_send_by_ref_1.f08: Likewise.
+ * gfortran.dg/coarray_stat_2.f90: Likewise.
+ * gfortran.dg/coarray_subobject_1.f90: Likewise.
+ * gfortran.dg/coindexed_1.f90: Likewise.
+ * gfortran.dg/comma.f: Likewise.
+ * gfortran.dg/comma_format_extension_3.f: Likewise.
+ * gfortran.dg/comma_format_extension_4.f: Likewise.
+ * gfortran.dg/common_2.f90: Likewise.
+ * gfortran.dg/common_4.f90: Likewise.
+ * gfortran.dg/common_align_1.f90: Likewise.
+ * gfortran.dg/common_align_2.f90: Likewise.
+ * gfortran.dg/common_equivalence_1.f: Likewise.
+ * gfortran.dg/common_pointer_1.f90: Likewise.
+ * gfortran.dg/common_resize_1.f: Likewise.
+ * gfortran.dg/complex_intrinsic_1.f90: Likewise.
+ * gfortran.dg/complex_intrinsic_3.f90: Likewise.
+ * gfortran.dg/complex_intrinsic_5.f90: Likewise.
+ * gfortran.dg/complex_intrinsic_7.f90: Likewise.
+ * gfortran.dg/complex_read.f90: Likewise.
+ * gfortran.dg/complex_write.f90: Likewise.
+ * gfortran.dg/constant_substring.f: Likewise.
+ * gfortran.dg/constructor_2.f90: Likewise.
+ * gfortran.dg/constructor_3.f90: Likewise.
+ * gfortran.dg/constructor_6.f90: Likewise.
+ * gfortran.dg/contained_1.f90: Likewise.
+ * gfortran.dg/contained_3.f90: Likewise.
+ * gfortran.dg/contained_equivalence_1.f90: Likewise.
+ * gfortran.dg/contained_module_proc_1.f90: Likewise.
+ * gfortran.dg/continuation_1.f90: Likewise.
+ * gfortran.dg/continuation_11.f90: Likewise.
+ * gfortran.dg/continuation_12.f90: Likewise.
+ * gfortran.dg/continuation_13.f90: Likewise.
+ * gfortran.dg/continuation_14.f: Likewise.
+ * gfortran.dg/continuation_8.f90: Likewise.
+ * gfortran.dg/convert_2.f90: Likewise.
+ * gfortran.dg/convert_implied_open.f90: Likewise.
+ * gfortran.dg/count_init_expr.f03: Likewise.
+ * gfortran.dg/cr_lf.f90: Likewise.
+ * gfortran.dg/cray_pointers_10.f90: Likewise.
+ * gfortran.dg/cray_pointers_2.f90: Likewise.
+ * gfortran.dg/cray_pointers_5.f90: Likewise.
+ * gfortran.dg/cray_pointers_7.f90: Likewise.
+ * gfortran.dg/cray_pointers_8.f90: Likewise.
+ * gfortran.dg/cshift_1.f90: Likewise.
+ * gfortran.dg/cshift_2.f90: Likewise.
+ * gfortran.dg/cshift_large_1.f90: Likewise.
+ * gfortran.dg/cshift_nan_1.f90: Likewise.
+ * gfortran.dg/csqrt_2.f: Likewise.
+ * gfortran.dg/data_array_1.f90: Likewise.
+ * gfortran.dg/data_char_1.f90: Likewise.
+ * gfortran.dg/data_char_2.f90: Likewise.
+ * gfortran.dg/data_char_3.f90: Likewise.
+ * gfortran.dg/data_derived_1.f90: Likewise.
+ * gfortran.dg/data_implied_do_1.f90: Likewise.
+ * gfortran.dg/data_namelist_conflict.f90: Likewise.
+ * gfortran.dg/deallocate_alloc_opt_3.f90: Likewise.
+ * gfortran.dg/deallocate_stat.f90: Likewise.
+ * gfortran.dg/deallocate_stat_2.f90: Likewise.
+ * gfortran.dg/debug/pr37738.f: Likewise.
+ * gfortran.dg/dec_bitwise_ops_1.f90: Likewise.
+ * gfortran.dg/dec_bitwise_ops_2.f90: Likewise.
+ * gfortran.dg/dec_exp_1.f90: Likewise.
+ * gfortran.dg/dec_init_1.f90: Likewise.
+ * gfortran.dg/dec_init_2.f90: Likewise.
+ * gfortran.dg/dec_init_3.f90: Likewise.
+ * gfortran.dg/dec_init_4.f90: Likewise.
+ * gfortran.dg/dec_io_1.f90: Likewise.
+ * gfortran.dg/dec_io_2.f90: Likewise.
+ * gfortran.dg/dec_io_2a.f90: Likewise.
+ * gfortran.dg/dec_io_6.f90: Likewise.
+ * gfortran.dg/dec_loc_rval_1.f90: Likewise.
+ * gfortran.dg/dec_logical_xor_1.f90: Likewise.
+ * gfortran.dg/dec_math.f90: Likewise.
+ * gfortran.dg/dec_parameter_1.f: Likewise.
+ * gfortran.dg/dec_parameter_2.f90: Likewise.
+ * gfortran.dg/dec_static_1.f90: Likewise.
+ * gfortran.dg/dec_static_2.f90: Likewise.
+ * gfortran.dg/dec_structure_1.f90: Likewise.
+ * gfortran.dg/dec_structure_10.f90: Likewise.
+ * gfortran.dg/dec_structure_18.f90: Likewise.
+ * gfortran.dg/dec_structure_19.f90: Likewise.
+ * gfortran.dg/dec_structure_2.f90: Likewise.
+ * gfortran.dg/dec_structure_22.f90: Likewise.
+ * gfortran.dg/dec_structure_3.f90: Likewise.
+ * gfortran.dg/dec_structure_4.f90: Likewise.
+ * gfortran.dg/dec_structure_5.f90: Likewise.
+ * gfortran.dg/dec_structure_6.f90: Likewise.
+ * gfortran.dg/dec_structure_7.f90: Likewise.
+ * gfortran.dg/dec_union_1.f90: Likewise.
+ * gfortran.dg/dec_union_2.f90: Likewise.
+ * gfortran.dg/dec_union_3.f90: Likewise.
+ * gfortran.dg/dec_union_4.f90: Likewise.
+ * gfortran.dg/dec_union_5.f90: Likewise.
+ * gfortran.dg/default_format_1.f90: Likewise.
+ * gfortran.dg/default_format_2.f90: Likewise.
+ * gfortran.dg/default_format_denormal_1.f90: Likewise.
+ * gfortran.dg/default_format_denormal_2.f90: Likewise.
+ * gfortran.dg/default_initialization_3.f90: Likewise.
+ * gfortran.dg/default_initialization_4.f90: Likewise.
+ * gfortran.dg/default_initialization_5.f90: Likewise.
+ * gfortran.dg/deferred_character_1.f90: Likewise.
+ * gfortran.dg/deferred_character_10.f90: Likewise.
+ * gfortran.dg/deferred_character_11.f90: Likewise.
+ * gfortran.dg/deferred_character_12.f90: Likewise.
+ * gfortran.dg/deferred_character_13.f90: Likewise.
+ * gfortran.dg/deferred_character_14.f90: Likewise.
+ * gfortran.dg/deferred_character_15.f90: Likewise.
+ * gfortran.dg/deferred_character_16.f90: Likewise.
+ * gfortran.dg/deferred_character_2.f90: Likewise.
+ * gfortran.dg/deferred_character_3.f90: Likewise.
+ * gfortran.dg/deferred_character_4.f90: Likewise.
+ * gfortran.dg/deferred_character_5.f90: Likewise.
+ * gfortran.dg/deferred_character_6.f90: Likewise.
+ * gfortran.dg/deferred_character_7.f90: Likewise.
+ * gfortran.dg/deferred_character_8.f90: Likewise.
+ * gfortran.dg/deferred_character_9.f90: Likewise.
+ * gfortran.dg/deferred_character_assignment_1.f90: Likewise.
+ * gfortran.dg/deferred_type_component_1.f90: Likewise.
+ * gfortran.dg/deferred_type_component_2.f90: Likewise.
+ * gfortran.dg/deferred_type_param_2.f90: Likewise.
+ * gfortran.dg/deferred_type_param_4.f90: Likewise.
+ * gfortran.dg/deferred_type_param_5.f90: Likewise.
+ * gfortran.dg/deferred_type_param_6.f90: Likewise.
+ * gfortran.dg/deferred_type_param_8.f90: Likewise.
+ * gfortran.dg/deferred_type_param_9.f90: Likewise.
+ * gfortran.dg/deferred_type_proc_pointer_1.f90: Likewise.
+ * gfortran.dg/deferred_type_proc_pointer_2.f90: Likewise.
+ * gfortran.dg/defined_assignment_1.f90: Likewise.
+ * gfortran.dg/defined_assignment_10.f90: Likewise.
+ * gfortran.dg/defined_assignment_11.f90: Likewise.
+ * gfortran.dg/defined_assignment_2.f90: Likewise.
+ * gfortran.dg/defined_assignment_3.f90: Likewise.
+ * gfortran.dg/defined_assignment_4.f90: Likewise.
+ * gfortran.dg/defined_assignment_5.f90: Likewise.
+ * gfortran.dg/defined_assignment_8.f90: Likewise.
+ * gfortran.dg/defined_assignment_9.f90: Likewise.
+ * gfortran.dg/dependency_2.f90: Likewise.
+ * gfortran.dg/dependency_21.f90: Likewise.
+ * gfortran.dg/dependency_22.f90: Likewise.
+ * gfortran.dg/dependency_23.f90: Likewise.
+ * gfortran.dg/dependency_24.f90: Likewise.
+ * gfortran.dg/dependency_25.f90: Likewise.
+ * gfortran.dg/dependency_26.f90: Likewise.
+ * gfortran.dg/dependency_39.f90: Likewise.
+ * gfortran.dg/dependency_40.f90: Likewise.
+ * gfortran.dg/dependency_41.f90: Likewise.
+ * gfortran.dg/dependency_42.f90: Likewise.
+ * gfortran.dg/dependency_43.f90: Likewise.
+ * gfortran.dg/dependency_44.f90: Likewise.
+ * gfortran.dg/dependency_45.f90: Likewise.
+ * gfortran.dg/dependency_50.f90: Likewise.
+ * gfortran.dg/dependency_51.f90: Likewise.
+ * gfortran.dg/dependent_decls_1.f90: Likewise.
+ * gfortran.dg/der_array_1.f90: Likewise.
+ * gfortran.dg/der_array_io_1.f90: Likewise.
+ * gfortran.dg/der_array_io_2.f90: Likewise.
+ * gfortran.dg/der_array_io_3.f90: Likewise.
+ * gfortran.dg/der_io_1.f90: Likewise.
+ * gfortran.dg/der_io_3.f90: Likewise.
+ * gfortran.dg/der_pointer_2.f90: Likewise.
+ * gfortran.dg/derived_comp_array_ref_1.f90: Likewise.
+ * gfortran.dg/derived_comp_array_ref_2.f90: Likewise.
+ * gfortran.dg/derived_comp_array_ref_4.f90: Likewise.
+ * gfortran.dg/derived_comp_array_ref_7.f90: Likewise.
+ * gfortran.dg/derived_constructor_char_3.f90: Likewise.
+ * gfortran.dg/derived_constructor_comps_1.f90: Likewise.
+ * gfortran.dg/derived_constructor_comps_4.f90: Likewise.
+ * gfortran.dg/derived_constructor_comps_5.f90: Likewise.
+ * gfortran.dg/derived_constructor_comps_6.f90: Likewise.
+ * gfortran.dg/derived_external_function_1.f90: Likewise.
+ * gfortran.dg/derived_init_1.f90: Likewise.
+ * gfortran.dg/derived_init_2.f90: Likewise.
+ * gfortran.dg/derived_init_3.f90: Likewise.
+ * gfortran.dg/derived_init_4.f90: Likewise.
+ * gfortran.dg/derived_pointer_null_1.f90: Likewise.
+ * gfortran.dg/derived_pointer_recursion_2.f90: Likewise.
+ * gfortran.dg/dev_null.F90: Likewise.
+ * gfortran.dg/dfloat_1.f90: Likewise.
+ * gfortran.dg/dim_sum_1.f90: Likewise.
+ * gfortran.dg/dim_sum_2.f90: Likewise.
+ * gfortran.dg/dim_sum_3.f90: Likewise.
+ * gfortran.dg/direct_io_10.f: Likewise.
+ * gfortran.dg/direct_io_11.f90: Likewise.
+ * gfortran.dg/direct_io_12.f90: Likewise.
+ * gfortran.dg/direct_io_2.f90: Likewise.
+ * gfortran.dg/direct_io_3.f90: Likewise.
+ * gfortran.dg/direct_io_4.f90: Likewise.
+ * gfortran.dg/direct_io_5.f90: Likewise.
+ * gfortran.dg/direct_io_6.f90: Likewise.
+ * gfortran.dg/direct_io_7.f90: Likewise.
+ * gfortran.dg/direct_io_8.f90: Likewise.
+ * gfortran.dg/direct_io_9.f: Likewise.
+ * gfortran.dg/do_1.f90: Likewise.
+ * gfortran.dg/do_3.F90: Likewise.
+ * gfortran.dg/do_concurrent_2.f90: Likewise.
+ * gfortran.dg/do_concurrent_4.f90: Likewise.
+ * gfortran.dg/do_corner_warn.f90: Likewise.
+ * gfortran.dg/do_iterator_2.f90: Likewise.
+ * gfortran.dg/dollar_edit_descriptor_1.f: Likewise.
+ * gfortran.dg/dollar_edit_descriptor_2.f: Likewise.
+ * gfortran.dg/dos_eol.f: Likewise.
+ * gfortran.dg/dot_product_1.f03: Likewise.
+ * gfortran.dg/dot_product_2.f90: Likewise.
+ * gfortran.dg/dot_product_4.f90: Likewise.
+ * gfortran.dg/dshift_1.F90: Likewise.
+ * gfortran.dg/dshift_2.F90: Likewise.
+ * gfortran.dg/dtio_1.f90: Likewise.
+ * gfortran.dg/dtio_10.f90: Likewise.
+ * gfortran.dg/dtio_12.f90: Likewise.
+ * gfortran.dg/dtio_14.f90: Likewise.
+ * gfortran.dg/dtio_15.f90: Likewise.
+ * gfortran.dg/dtio_16.f90: Likewise.
+ * gfortran.dg/dtio_17.f90: Likewise.
+ * gfortran.dg/dtio_19.f90: Likewise.
+ * gfortran.dg/dtio_2.f90: Likewise.
+ * gfortran.dg/dtio_20.f03: Likewise.
+ * gfortran.dg/dtio_22.f90: Likewise.
+ * gfortran.dg/dtio_24.f90: Likewise.
+ * gfortran.dg/dtio_25.f90: Likewise.
+ * gfortran.dg/dtio_26.f03: Likewise.
+ * gfortran.dg/dtio_27.f90: Likewise.
+ * gfortran.dg/dtio_28.f03: Likewise.
+ * gfortran.dg/dtio_3.f90: Likewise.
+ * gfortran.dg/dtio_30.f03: Likewise.
+ * gfortran.dg/dtio_31.f03: Likewise.
+ * gfortran.dg/dtio_32.f03: Likewise.
+ * gfortran.dg/dtio_4.f90: Likewise.
+ * gfortran.dg/dtio_5.f90: Likewise.
+ * gfortran.dg/dtio_7.f90: Likewise.
+ * gfortran.dg/dtio_8.f90: Likewise.
+ * gfortran.dg/dtio_9.f90: Likewise.
+ * gfortran.dg/dummy_procedure_3.f90: Likewise.
+ * gfortran.dg/dummy_procedure_7.f90: Likewise.
+ * gfortran.dg/dup_save_1.f90: Likewise.
+ * gfortran.dg/dup_save_2.f90: Likewise.
+ * gfortran.dg/dynamic_dispatch_1.f03: Likewise.
+ * gfortran.dg/dynamic_dispatch_11.f03: Likewise.
+ * gfortran.dg/dynamic_dispatch_12.f90: Likewise.
+ * gfortran.dg/dynamic_dispatch_2.f03: Likewise.
+ * gfortran.dg/dynamic_dispatch_3.f03: Likewise.
+ * gfortran.dg/dynamic_dispatch_4.f03: Likewise.
+ * gfortran.dg/dynamic_dispatch_5.f03: Likewise.
+ * gfortran.dg/dynamic_dispatch_7.f03: Likewise.
+ * gfortran.dg/dynamic_dispatch_8.f03: Likewise.
+ * gfortran.dg/dynamic_dispatch_9.f03: Likewise.
+ * gfortran.dg/e_d_fmt.f90: Likewise.
+ * gfortran.dg/edit_real_1.f90: Likewise.
+ * gfortran.dg/elemental_by_value_1.f90: Likewise.
+ * gfortran.dg/elemental_dependency_1.f90: Likewise.
+ * gfortran.dg/elemental_dependency_4.f90: Likewise.
+ * gfortran.dg/elemental_dependency_5.f90: Likewise.
+ * gfortran.dg/elemental_dependency_6.f90: Likewise.
+ * gfortran.dg/elemental_optional_args_2.f90: Likewise.
+ * gfortran.dg/elemental_optional_args_3.f90: Likewise.
+ * gfortran.dg/elemental_optional_args_4.f90: Likewise.
+ * gfortran.dg/elemental_optional_args_5.f03: Likewise.
+ * gfortran.dg/elemental_optional_args_6.f90: Likewise.
+ * gfortran.dg/elemental_optional_args_7.f90: Likewise.
+ * gfortran.dg/elemental_scalar_args_1.f90: Likewise.
+ * gfortran.dg/elemental_scalar_args_2.f90: Likewise.
+ * gfortran.dg/elemental_subroutine_1.f90: Likewise.
+ * gfortran.dg/elemental_subroutine_10.f90: Likewise.
+ * gfortran.dg/elemental_subroutine_11.f90: Likewise.
+ * gfortran.dg/elemental_subroutine_2.f90: Likewise.
+ * gfortran.dg/elemental_subroutine_3.f90: Likewise.
+ * gfortran.dg/elemental_subroutine_7.f90: Likewise.
+ * gfortran.dg/elemental_subroutine_9.f90: Likewise.
+ * gfortran.dg/empty_format_1.f90: Likewise.
+ * gfortran.dg/endfile.f: Likewise.
+ * gfortran.dg/endfile.f90: Likewise.
+ * gfortran.dg/endfile_2.f90: Likewise.
+ * gfortran.dg/entry_1.f90: Likewise.
+ * gfortran.dg/entry_10.f90: Likewise.
+ * gfortran.dg/entry_12.f90: Likewise.
+ * gfortran.dg/entry_13.f90: Likewise.
+ * gfortran.dg/entry_14.f90: Likewise.
+ * gfortran.dg/entry_16.f90: Likewise.
+ * gfortran.dg/entry_3.f90: Likewise.
+ * gfortran.dg/entry_6.f90: Likewise.
+ * gfortran.dg/entry_9.f90: Likewise.
+ * gfortran.dg/entry_array_specs_2.f: Likewise.
+ * gfortran.dg/enum_1.f90: Likewise.
+ * gfortran.dg/enum_9.f90: Likewise.
+ * gfortran.dg/eof_1.f90: Likewise.
+ * gfortran.dg/eof_2.f90: Likewise.
+ * gfortran.dg/eof_4.f90: Likewise.
+ * gfortran.dg/eof_5.f90: Likewise.
+ * gfortran.dg/eor_handling_1.f90: Likewise.
+ * gfortran.dg/eor_handling_2.f90: Likewise.
+ * gfortran.dg/eor_handling_3.f90: Likewise.
+ * gfortran.dg/eor_handling_4.f90: Likewise.
+ * gfortran.dg/eor_handling_5.f90: Likewise.
+ * gfortran.dg/eoshift_3.f90: Likewise.
+ * gfortran.dg/eoshift_4.f90: Likewise.
+ * gfortran.dg/eoshift_5.f90: Likewise.
+ * gfortran.dg/eoshift_6.f90: Likewise.
+ * gfortran.dg/eoshift_large_1.f90: Likewise.
+ * gfortran.dg/equiv_6.f90: Likewise.
+ * gfortran.dg/equiv_7.f90: Likewise.
+ * gfortran.dg/equiv_9.f90: Likewise.
+ * gfortran.dg/equiv_constraint_4.f90: Likewise.
+ * gfortran.dg/erf_2.F90: Likewise.
+ * gfortran.dg/erf_3.F90: Likewise.
+ * gfortran.dg/erfc_scaled_1.f90: Likewise.
+ * gfortran.dg/error_format_2.f90: Likewise.
+ * gfortran.dg/error_recovery_5.f90: Likewise.
+ * gfortran.dg/execute_command_line_2.f90: Likewise.
+ * gfortran.dg/execute_command_line_3.f90: Likewise.
+ * gfortran.dg/exit_1.f08: Likewise.
+ * gfortran.dg/exit_3.f08: Likewise.
+ * gfortran.dg/exponent_1.f90: Likewise.
+ * gfortran.dg/exponent_2.f90: Likewise.
+ * gfortran.dg/extended_char_comparison_1.f: Likewise.
+ * gfortran.dg/extends_1.f03: Likewise.
+ * gfortran.dg/extends_16.f90: Likewise.
+ * gfortran.dg/extends_2.f03: Likewise.
+ * gfortran.dg/extends_3.f03: Likewise.
+ * gfortran.dg/extends_4.f03: Likewise.
+ * gfortran.dg/extends_type_of_1.f03: Likewise.
+ * gfortran.dg/extends_type_of_2.f03: Likewise.
+ * gfortran.dg/external_procedures_3.f90: Likewise.
+ * gfortran.dg/f2003_inquire_1.f03: Likewise.
+ * gfortran.dg/f2003_io_1.f03: Likewise.
+ * gfortran.dg/f2003_io_4.f03: Likewise.
+ * gfortran.dg/f2003_io_5.f03: Likewise.
+ * gfortran.dg/f2003_io_6.f03: Likewise.
+ * gfortran.dg/f2003_io_7.f03: Likewise.
+ * gfortran.dg/f2c_1.f90: Likewise.
+ * gfortran.dg/f2c_2.f90: Likewise.
+ * gfortran.dg/f2c_3.f90: Likewise.
+ * gfortran.dg/f2c_4.f90: Likewise.
+ * gfortran.dg/f2c_6.f90: Likewise.
+ * gfortran.dg/f2c_7.f90: Likewise.
+ * gfortran.dg/f2c_9.f90: Likewise.
+ * gfortran.dg/fgetc_1.f90: Likewise.
+ * gfortran.dg/fgetc_2.f90: Likewise.
+ * gfortran.dg/filename_null.f90: Likewise.
+ * gfortran.dg/finalize_12.f90: Likewise.
+ * gfortran.dg/finalize_13.f90: Likewise.
+ * gfortran.dg/finalize_15.f90: Likewise.
+ * gfortran.dg/finalize_17.f90: Likewise.
+ * gfortran.dg/finalize_18.f90: Likewise.
+ * gfortran.dg/finalize_25.f90: Likewise.
+ * gfortran.dg/finalize_29.f08: Likewise.
+ * gfortran.dg/finalize_31.f90: Likewise.
+ * gfortran.dg/float_1.f90: Likewise.
+ * gfortran.dg/flush_1.f90: Likewise.
+ * gfortran.dg/fmt_bz_bn.f: Likewise.
+ * gfortran.dg/fmt_bz_bn_err.f: Likewise.
+ * gfortran.dg/fmt_cache_1.f: Likewise.
+ * gfortran.dg/fmt_cache_2.f: Likewise.
+ * gfortran.dg/fmt_cache_3.f90: Likewise.
+ * gfortran.dg/fmt_colon.f90: Likewise.
+ * gfortran.dg/fmt_e.f90: Likewise.
+ * gfortran.dg/fmt_en.f90: Likewise.
+ * gfortran.dg/fmt_error_10.f: Likewise.
+ * gfortran.dg/fmt_error_9.f: Likewise.
+ * gfortran.dg/fmt_exhaust.f90: Likewise.
+ * gfortran.dg/fmt_f0_1.f90: Likewise.
+ * gfortran.dg/fmt_f_an_p.f: Likewise.
+ * gfortran.dg/fmt_fw_d.f90: Likewise.
+ * gfortran.dg/fmt_g.f: Likewise.
+ * gfortran.dg/fmt_g0_1.f08: Likewise.
+ * gfortran.dg/fmt_g0_2.f08: Likewise.
+ * gfortran.dg/fmt_g0_4.f08: Likewise.
+ * gfortran.dg/fmt_g0_5.f08: Likewise.
+ * gfortran.dg/fmt_g0_6.f08: Likewise.
+ * gfortran.dg/fmt_g0_7.f08: Likewise.
+ * gfortran.dg/fmt_g_1.f90: Likewise.
+ * gfortran.dg/fmt_int_sign.f90: Likewise.
+ * gfortran.dg/fmt_l.f90: Likewise.
+ * gfortran.dg/fmt_missing_period_2.f: Likewise.
+ * gfortran.dg/fmt_missing_period_3.f: Likewise.
+ * gfortran.dg/fmt_p_1.f90: Likewise.
+ * gfortran.dg/fmt_pf.f90: Likewise.
+ * gfortran.dg/fmt_read.f90: Likewise.
+ * gfortran.dg/fmt_read_bz_bn.f90: Likewise.
+ * gfortran.dg/fmt_t_1.f90: Likewise.
+ * gfortran.dg/fmt_t_2.f90: Likewise.
+ * gfortran.dg/fmt_t_3.f90: Likewise.
+ * gfortran.dg/fmt_t_4.f90: Likewise.
+ * gfortran.dg/fmt_t_5.f90: Likewise.
+ * gfortran.dg/fmt_t_6.f: Likewise.
+ * gfortran.dg/fmt_t_7.f: Likewise.
+ * gfortran.dg/fmt_t_9.f: Likewise.
+ * gfortran.dg/fmt_tl.f: Likewise.
+ * gfortran.dg/fmt_unlimited.f90: Likewise.
+ * gfortran.dg/fmt_white.f: Likewise.
+ * gfortran.dg/fmt_zero_digits.f90: Likewise.
+ * gfortran.dg/fold_nearest.f90: Likewise.
+ * gfortran.dg/forall_1.f90: Likewise.
+ * gfortran.dg/forall_10.f90: Likewise.
+ * gfortran.dg/forall_12.f90: Likewise.
+ * gfortran.dg/forall_13.f90: Likewise.
+ * gfortran.dg/forall_15.f90: Likewise.
+ * gfortran.dg/forall_4.f90: Likewise.
+ * gfortran.dg/forall_5.f90: Likewise.
+ * gfortran.dg/forall_6.f90: Likewise.
+ * gfortran.dg/forall_7.f90: Likewise.
+ * gfortran.dg/fraction.f90: Likewise.
+ * gfortran.dg/fseek.f90: Likewise.
+ * gfortran.dg/ftell_1.f90: Likewise.
+ * gfortran.dg/ftell_2.f90: Likewise.
+ * gfortran.dg/ftell_3.f90: Likewise.
+ * gfortran.dg/func_assign_2.f90: Likewise.
+ * gfortran.dg/func_assign_3.f90: Likewise.
+ * gfortran.dg/func_derived_1.f90: Likewise.
+ * gfortran.dg/func_derived_2.f90: Likewise.
+ * gfortran.dg/func_derived_3.f90: Likewise.
+ * gfortran.dg/func_result_1.f90: Likewise.
+ * gfortran.dg/func_result_2.f90: Likewise.
+ * gfortran.dg/func_result_6.f90: Likewise.
+ * gfortran.dg/function_charlen_2.f90: Likewise.
+ * gfortran.dg/function_charlen_3.f: Likewise.
+ * gfortran.dg/function_kinds_1.f90: Likewise.
+ * gfortran.dg/function_kinds_4.f90: Likewise.
+ * gfortran.dg/function_optimize_10.f90: Likewise.
+ * gfortran.dg/function_optimize_11.f90: Likewise.
+ * gfortran.dg/function_optimize_12.f90: Likewise.
+ * gfortran.dg/function_optimize_4.f90: Likewise.
+ * gfortran.dg/function_optimize_8.f90: Likewise.
+ * gfortran.dg/g77/13037.f: Likewise.
+ * gfortran.dg/g77/1832.f: Likewise.
+ * gfortran.dg/g77/19981119-0.f: Likewise.
+ * gfortran.dg/g77/19990313-0.f: Likewise.
+ * gfortran.dg/g77/19990313-1.f: Likewise.
+ * gfortran.dg/g77/19990313-2.f: Likewise.
+ * gfortran.dg/g77/19990313-3.f: Likewise.
+ * gfortran.dg/g77/19990419-1.f: Likewise.
+ * gfortran.dg/g77/19990826-0.f: Likewise.
+ * gfortran.dg/g77/19990826-2.f: Likewise.
+ * gfortran.dg/g77/20000503-1.f: Likewise.
+ * gfortran.dg/g77/20001111.f: Likewise.
+ * gfortran.dg/g77/20010116.f: Likewise.
+ * gfortran.dg/g77/20010216-1.f: Likewise.
+ * gfortran.dg/g77/20010430.f: Likewise.
+ * gfortran.dg/g77/20010610.f: Likewise.
+ * gfortran.dg/g77/6177.f: Likewise.
+ * gfortran.dg/g77/7388.f: Likewise.
+ * gfortran.dg/g77/947.f: Likewise.
+ * gfortran.dg/g77/970625-2.f: Likewise.
+ * gfortran.dg/g77/971102-1.f: Likewise.
+ * gfortran.dg/g77/980628-0.f: Likewise.
+ * gfortran.dg/g77/980628-1.f: Likewise.
+ * gfortran.dg/g77/980628-10.f: Likewise.
+ * gfortran.dg/g77/980628-2.f: Likewise.
+ * gfortran.dg/g77/980628-3.f: Likewise.
+ * gfortran.dg/g77/980628-7.f: Likewise.
+ * gfortran.dg/g77/980628-8.f: Likewise.
+ * gfortran.dg/g77/980628-9.f: Likewise.
+ * gfortran.dg/g77/980701-0.f: Likewise.
+ * gfortran.dg/g77/980701-1.f: Likewise.
+ * gfortran.dg/g77/cabs.f: Likewise.
+ * gfortran.dg/g77/claus.f: Likewise.
+ * gfortran.dg/g77/complex_1.f: Likewise.
+ * gfortran.dg/g77/cpp3.F: Likewise.
+ * gfortran.dg/g77/cpp4.F: Likewise.
+ * gfortran.dg/g77/cpp5.F: Likewise.
+ * gfortran.dg/g77/dcomplex.f: Likewise.
+ * gfortran.dg/g77/dnrm2.f: Likewise.
+ * gfortran.dg/g77/erfc.f: Likewise.
+ * gfortran.dg/g77/f77-edit-i-in.f: Likewise.
+ * gfortran.dg/g77/f77-edit-t-in.f: Likewise.
+ * gfortran.dg/g77/f90-intrinsic-bit.f: Likewise.
+ * gfortran.dg/g77/f90-intrinsic-mathematical.f: Likewise.
+ * gfortran.dg/g77/f90-intrinsic-numeric.f: Likewise.
+ * gfortran.dg/g77/int8421.f: Likewise.
+ * gfortran.dg/g77/intrinsic-unix-bessel.f: Likewise.
+ * gfortran.dg/g77/intrinsic-unix-erf.f: Likewise.
+ * gfortran.dg/g77/le.f: Likewise.
+ * gfortran.dg/g77/short.f: Likewise.
+ * gfortran.dg/gamma_1.f90: Likewise.
+ * gfortran.dg/gamma_4.f90: Likewise.
+ * gfortran.dg/gamma_5.f90: Likewise.
+ * gfortran.dg/generic_13.f90: Likewise.
+ * gfortran.dg/generic_15.f90: Likewise.
+ * gfortran.dg/generic_19.f90: Likewise.
+ * gfortran.dg/generic_20.f90: Likewise.
+ * gfortran.dg/generic_23.f03: Likewise.
+ * gfortran.dg/generic_25.f90: Likewise.
+ * gfortran.dg/generic_27.f90: Likewise.
+ * gfortran.dg/generic_31.f90: Likewise.
+ * gfortran.dg/generic_4.f90: Likewise.
+ * gfortran.dg/global_vars_c_init.f90: Likewise.
+ * gfortran.dg/global_vars_f90_init.f90: Likewise.
+ * gfortran.dg/gnu_logical_1.F: Likewise.
+ * gfortran.dg/goacc/fixed-1.f: Likewise.
+ * gfortran.dg/goacc/fixed-2.f: Likewise.
+ * gfortran.dg/goacc/gang-static.f95: Likewise.
+ * gfortran.dg/goacc/kernels-loop-2.f95: Likewise.
+ * gfortran.dg/goacc/kernels-loop-data-2.f95: Likewise.
+ * gfortran.dg/goacc/kernels-loop-data-enter-exit-2.f95: Likewise.
+ * gfortran.dg/goacc/kernels-loop-data-enter-exit.f95: Likewise.
+ * gfortran.dg/goacc/kernels-loop-data-update.f95: Likewise.
+ * gfortran.dg/goacc/kernels-loop-data.f95: Likewise.
+ * gfortran.dg/goacc/kernels-loop-n.f95: Likewise.
+ * gfortran.dg/goacc/kernels-loop.f95: Likewise.
+ * gfortran.dg/goacc/omp-fixed.f: Likewise.
+ * gfortran.dg/gomp/crayptr5.f90: Likewise.
+ * gfortran.dg/gomp/pr48794-2.f90: Likewise.
+ * gfortran.dg/gomp/pr48794.f90: Likewise.
+ * gfortran.dg/gomp/pr72744.f90: Likewise.
+ * gfortran.dg/gomp/pr77665.f90: Likewise.
+ * gfortran.dg/gomp/workshare2.f90: Likewise.
+ * gfortran.dg/gomp/workshare3.f90: Likewise.
+ * gfortran.dg/goto_1.f: Likewise.
+ * gfortran.dg/goto_2.f90: Likewise.
+ * gfortran.dg/goto_4.f90: Likewise.
+ * gfortran.dg/goto_6.f: Likewise.
+ * gfortran.dg/graphite/id-26.f03: Likewise.
+ * gfortran.dg/graphite/id-pr45370.f90: Likewise.
+ * gfortran.dg/graphite/pr29581.f90: Likewise.
+ * gfortran.dg/graphite/pr29832.f90: Likewise.
+ * gfortran.dg/graphite/run-id-1.f: Likewise.
+ * gfortran.dg/graphite/run-id-2.f90: Likewise.
+ * gfortran.dg/graphite/run-id-3.f90: Likewise.
+ * gfortran.dg/hollerith.f90: Likewise.
+ * gfortran.dg/hollerith4.f90: Likewise.
+ * gfortran.dg/hollerith6.f90: Likewise.
+ * gfortran.dg/hollerith8.f90: Likewise.
+ * gfortran.dg/hollerith_1.f90: Likewise.
+ * gfortran.dg/hollerith_character_array_constructor.f90: Likewise.
+ * gfortran.dg/hollerith_f95.f90: Likewise.
+ * gfortran.dg/hollerith_legacy.f90: Likewise.
+ * gfortran.dg/host_assoc_call_3.f90: Likewise.
+ * gfortran.dg/host_assoc_function_1.f90: Likewise.
+ * gfortran.dg/host_assoc_function_3.f90: Likewise.
+ * gfortran.dg/host_assoc_function_4.f90: Likewise.
+ * gfortran.dg/host_assoc_function_9.f90: Likewise.
+ * gfortran.dg/host_dummy_index_1.f90: Likewise.
+ * gfortran.dg/hypot_1.f90: Likewise.
+ * gfortran.dg/iall_iany_iparity_1.f90: Likewise.
+ * gfortran.dg/iargc.f90: Likewise.
+ * gfortran.dg/ibits.f90: Likewise.
+ * gfortran.dg/ichar_1.f90: Likewise.
+ * gfortran.dg/ichar_2.f90: Likewise.
+ * gfortran.dg/ieee/ieee_1.F90: Likewise.
+ * gfortran.dg/ieee/ieee_2.f90: Likewise.
+ * gfortran.dg/ieee/ieee_3.f90: Likewise.
+ * gfortran.dg/ieee/ieee_4.f90: Likewise.
+ * gfortran.dg/ieee/ieee_6.f90: Likewise.
+ * gfortran.dg/ieee/ieee_7.f90: Likewise.
+ * gfortran.dg/ieee/ieee_8.f90: Likewise.
+ * gfortran.dg/ieee/intrinsics_1.f90: Likewise.
+ * gfortran.dg/ieee/intrinsics_2.F90: Likewise.
+ * gfortran.dg/ieee/large_1.f90: Likewise.
+ * gfortran.dg/ieee/large_2.f90: Likewise.
+ * gfortran.dg/ieee/large_3.F90: Likewise.
+ * gfortran.dg/ieee/large_4.f90: Likewise.
+ * gfortran.dg/ieee/rounding_1.f90: Likewise.
+ * gfortran.dg/ieee/underflow_1.f90: Likewise.
+ * gfortran.dg/impl_do_var_data.f90: Likewise.
+ * gfortran.dg/implicit_10.f90: Likewise.
+ * gfortran.dg/implicit_12.f90: Likewise.
+ * gfortran.dg/implicit_class_1.f90: Likewise.
+ * gfortran.dg/implicit_pure_1.f90: Likewise.
+ * gfortran.dg/implied_do_1.f90: Likewise.
+ * gfortran.dg/implied_do_io_1.f90: Likewise.
+ * gfortran.dg/implied_do_io_2.f90: Likewise.
+ * gfortran.dg/implied_do_io_3.f90: Likewise.
+ * gfortran.dg/implied_shape_1.f08: Likewise.
+ * gfortran.dg/import.f90: Likewise.
+ * gfortran.dg/import4.f90: Likewise.
+ * gfortran.dg/impure_1.f08: Likewise.
+ * gfortran.dg/index.f90: Likewise.
+ * gfortran.dg/index_2.f90: Likewise.
+ * gfortran.dg/init_flag_1.f90: Likewise.
+ * gfortran.dg/init_flag_10.f90: Likewise.
+ * gfortran.dg/init_flag_15.f03: Likewise.
+ * gfortran.dg/init_flag_2.f90: Likewise.
+ * gfortran.dg/init_flag_3.f90: Likewise.
+ * gfortran.dg/init_flag_4.f90: Likewise.
+ * gfortran.dg/init_flag_5.f90: Likewise.
+ * gfortran.dg/init_flag_6.f90: Likewise.
+ * gfortran.dg/init_flag_7.f90: Likewise.
+ * gfortran.dg/init_flag_9.f90: Likewise.
+ * gfortran.dg/initialization_11.f90: Likewise.
+ * gfortran.dg/initialization_19.f90: Likewise.
+ * gfortran.dg/initialization_2.f90: Likewise.
+ * gfortran.dg/initialization_22.f90: Likewise.
+ * gfortran.dg/initialization_27.f90: Likewise.
+ * gfortran.dg/initialization_5.f90: Likewise.
+ * gfortran.dg/initialization_6.f90: Likewise.
+ * gfortran.dg/inline_matmul_1.f90: Likewise.
+ * gfortran.dg/inline_matmul_10.f90: Likewise.
+ * gfortran.dg/inline_matmul_11.f90: Likewise.
+ * gfortran.dg/inline_matmul_13.f90: Likewise.
+ * gfortran.dg/inline_matmul_14.f90: Likewise.
+ * gfortran.dg/inline_matmul_16.f90: Likewise.
+ * gfortran.dg/inline_matmul_17.f90: Likewise.
+ * gfortran.dg/inline_matmul_18.f90: Likewise.
+ * gfortran.dg/inline_matmul_19.f90: Likewise.
+ * gfortran.dg/inline_matmul_2.f90: Likewise.
+ * gfortran.dg/inline_matmul_20.f90: Likewise.
+ * gfortran.dg/inline_matmul_22.f90: Likewise.
+ * gfortran.dg/inline_matmul_3.f90: Likewise.
+ * gfortran.dg/inline_matmul_4.f90: Likewise.
+ * gfortran.dg/inline_matmul_5.f90: Likewise.
+ * gfortran.dg/inline_matmul_6.f90: Likewise.
+ * gfortran.dg/inline_matmul_7.f90: Likewise.
+ * gfortran.dg/inline_matmul_8.f90: Likewise.
+ * gfortran.dg/inline_matmul_9.f90: Likewise.
+ * gfortran.dg/inline_sum_1.f90: Likewise.
+ * gfortran.dg/inline_sum_3.f90: Likewise.
+ * gfortran.dg/inline_sum_5.f90: Likewise.
+ * gfortran.dg/inquire-complex.f90: Likewise.
+ * gfortran.dg/inquire.f90: Likewise.
+ * gfortran.dg/inquire_10.f90: Likewise.
+ * gfortran.dg/inquire_13.f90: Likewise.
+ * gfortran.dg/inquire_15.f90: Likewise.
+ * gfortran.dg/inquire_16.f90: Likewise.
+ * gfortran.dg/inquire_17.f90: Likewise.
+ * gfortran.dg/inquire_5.f90: Likewise.
+ * gfortran.dg/inquire_6.f90: Likewise.
+ * gfortran.dg/inquire_7.f90: Likewise.
+ * gfortran.dg/inquire_9.f90: Likewise.
+ * gfortran.dg/inquire_internal.f90: Likewise.
+ * gfortran.dg/inquire_recl_f2018.f90: Likewise.
+ * gfortran.dg/inquire_size.f90: Likewise.
+ * gfortran.dg/int_1.f90: Likewise.
+ * gfortran.dg/int_conv_1.f90: Likewise.
+ * gfortran.dg/int_range_io_1.f90: Likewise.
+ * gfortran.dg/integer_exponentiation_2.f90: Likewise.
+ * gfortran.dg/integer_exponentiation_3.F90: Likewise.
+ * gfortran.dg/integer_exponentiation_5.F90: Likewise.
+ * gfortran.dg/integer_plus.f90: Likewise.
+ * gfortran.dg/intent_out_2.f90: Likewise.
+ * gfortran.dg/intent_out_5.f90: Likewise.
+ * gfortran.dg/intent_out_6.f90: Likewise.
+ * gfortran.dg/interface_12.f90: Likewise.
+ * gfortran.dg/interface_19.f90: Likewise.
+ * gfortran.dg/interface_4.f90: Likewise.
+ * gfortran.dg/interface_5.f90: Likewise.
+ * gfortran.dg/interface_9.f90: Likewise.
+ * gfortran.dg/interface_assignment_1.f90: Likewise.
+ * gfortran.dg/interface_assignment_2.f90: Likewise.
+ * gfortran.dg/internal_dummy_2.f08: Likewise.
+ * gfortran.dg/internal_dummy_3.f08: Likewise.
+ * gfortran.dg/internal_dummy_4.f08: Likewise.
+ * gfortran.dg/internal_pack_1.f90: Likewise.
+ * gfortran.dg/internal_pack_10.f90: Likewise.
+ * gfortran.dg/internal_pack_12.f90: Likewise.
+ * gfortran.dg/internal_pack_13.f90: Likewise.
+ * gfortran.dg/internal_pack_14.f90: Likewise.
+ * gfortran.dg/internal_pack_15.f90: Likewise.
+ * gfortran.dg/internal_pack_2.f90: Likewise.
+ * gfortran.dg/internal_pack_3.f90: Likewise.
+ * gfortran.dg/internal_pack_4.f90: Likewise.
+ * gfortran.dg/internal_pack_6.f90: Likewise.
+ * gfortran.dg/internal_pack_8.f90: Likewise.
+ * gfortran.dg/internal_readwrite_1.f90: Likewise.
+ * gfortran.dg/internal_readwrite_2.f90: Likewise.
+ * gfortran.dg/internal_readwrite_3.f90: Likewise.
+ * gfortran.dg/intrinsic_actual_1.f: Likewise.
+ * gfortran.dg/intrinsic_actual_2.f90: Likewise.
+ * gfortran.dg/intrinsic_actual_4.f90: Likewise.
+ * gfortran.dg/intrinsic_argument_conformance_2.f90: Likewise.
+ * gfortran.dg/intrinsic_char_1.f90: Likewise.
+ * gfortran.dg/intrinsic_ifunction_1.f90: Likewise.
+ * gfortran.dg/intrinsic_intkinds_1.f90: Likewise.
+ * gfortran.dg/intrinsic_modulo_1.f90: Likewise.
+ * gfortran.dg/intrinsic_pack_1.f90: Likewise.
+ * gfortran.dg/intrinsic_pack_2.f90: Likewise.
+ * gfortran.dg/intrinsic_pack_3.f90: Likewise.
+ * gfortran.dg/intrinsic_pack_5.f90: Likewise.
+ * gfortran.dg/intrinsic_product_1.f90: Likewise.
+ * gfortran.dg/intrinsic_sign_1.f90: Likewise.
+ * gfortran.dg/intrinsic_sign_2.f90: Likewise.
+ * gfortran.dg/intrinsic_spread_1.f90: Likewise.
+ * gfortran.dg/intrinsic_spread_2.f90: Likewise.
+ * gfortran.dg/intrinsic_spread_3.f90: Likewise.
+ * gfortran.dg/intrinsic_unpack_1.f90: Likewise.
+ * gfortran.dg/intrinsic_unpack_2.f90: Likewise.
+ * gfortran.dg/intrinsic_unpack_3.f90: Likewise.
+ * gfortran.dg/intrinsic_verify_1.f90: Likewise.
+ * gfortran.dg/intrinsics_kind_argument_1.f90: Likewise.
+ * gfortran.dg/io_err_1.f90: Likewise.
+ * gfortran.dg/io_real_boz.f90: Likewise.
+ * gfortran.dg/iomsg_1.f90: Likewise.
+ * gfortran.dg/iostat_1.f90: Likewise.
+ * gfortran.dg/iostat_2.f90: Likewise.
+ * gfortran.dg/iostat_4.f90: Likewise.
+ * gfortran.dg/is_iostat_end_eor_1.f90: Likewise.
+ * gfortran.dg/ishft_1.f90: Likewise.
+ * gfortran.dg/ishft_2.f90: Likewise.
+ * gfortran.dg/ishft_4.f90: Likewise.
+ * gfortran.dg/isnan_1.f90: Likewise.
+ * gfortran.dg/isnan_2.f90: Likewise.
+ * gfortran.dg/iso_c_binding_rename_1.f03: Likewise.
+ * gfortran.dg/iso_c_binding_rename_2.f03: Likewise.
+ * gfortran.dg/iso_fortran_env_1.f90: Likewise.
+ * gfortran.dg/iso_fortran_env_3.f90: Likewise.
+ * gfortran.dg/iso_fortran_env_5.f90: Likewise.
+ * gfortran.dg/iso_fortran_env_6.f90: Likewise.
+ * gfortran.dg/itime_idate_1.f: Likewise.
+ * gfortran.dg/itime_idate_2.f: Likewise.
+ * gfortran.dg/large_integer_kind_1.f90: Likewise.
+ * gfortran.dg/large_integer_kind_2.f90: Likewise.
+ * gfortran.dg/large_real_kind_1.f90: Likewise.
+ * gfortran.dg/large_real_kind_2.F90: Likewise.
+ * gfortran.dg/large_real_kind_3.F90: Likewise.
+ * gfortran.dg/large_real_kind_form_io_1.f90: Likewise.
+ * gfortran.dg/large_real_kind_form_io_2.f90: Likewise.
+ * gfortran.dg/large_recl.f90: Likewise.
+ * gfortran.dg/large_unit_1.f90: Likewise.
+ * gfortran.dg/large_unit_2.f90: Likewise.
+ * gfortran.dg/largeequiv_1.f90: Likewise.
+ * gfortran.dg/leadz_trailz_1.f90: Likewise.
+ * gfortran.dg/leadz_trailz_2.f90: Likewise.
+ * gfortran.dg/leadz_trailz_3.f90: Likewise.
+ * gfortran.dg/list_read_1.f90: Likewise.
+ * gfortran.dg/list_read_10.f90: Likewise.
+ * gfortran.dg/list_read_11.f90: Likewise.
+ * gfortran.dg/list_read_12.f90: Likewise.
+ * gfortran.dg/list_read_13.f: Likewise.
+ * gfortran.dg/list_read_14.f90: Likewise.
+ * gfortran.dg/list_read_2.f90: Likewise.
+ * gfortran.dg/list_read_3.f90: Likewise.
+ * gfortran.dg/list_read_4.f90: Likewise.
+ * gfortran.dg/list_read_5.f90: Likewise.
+ * gfortran.dg/list_read_6.f90: Likewise.
+ * gfortran.dg/list_read_7.f90: Likewise.
+ * gfortran.dg/list_read_8.f90: Likewise.
+ * gfortran.dg/list_read_9.f90: Likewise.
+ * gfortran.dg/loc_2.f90: Likewise.
+ * gfortran.dg/logical_1.f90: Likewise.
+ * gfortran.dg/logical_dot_product.f90: Likewise.
+ * gfortran.dg/logical_temp_io.f90: Likewise.
+ * gfortran.dg/logical_temp_io_kind8.f90: Likewise.
+ * gfortran.dg/lrshift_1.f90: Likewise.
+ * gfortran.dg/ltime_gmtime_1.f90: Likewise.
+ * gfortran.dg/ltime_gmtime_2.f90: Likewise.
+ * gfortran.dg/lto/pr40725_0.f03: Likewise.
+ * gfortran.dg/lto/pr41576_1.f90: Likewise.
+ * gfortran.dg/make_unit.f90: Likewise.
+ * gfortran.dg/mapping_1.f90: Likewise.
+ * gfortran.dg/mapping_2.f90: Likewise.
+ * gfortran.dg/mapping_3.f90: Likewise.
+ * gfortran.dg/masklr_1.F90: Likewise.
+ * gfortran.dg/masklr_2.F90: Likewise.
+ * gfortran.dg/matmul_1.f90: Likewise.
+ * gfortran.dg/matmul_10.f90: Likewise.
+ * gfortran.dg/matmul_12.f90: Likewise.
+ * gfortran.dg/matmul_16.f90: Likewise.
+ * gfortran.dg/matmul_17.f90: Likewise.
+ * gfortran.dg/matmul_18.f90: Likewise.
+ * gfortran.dg/matmul_2.f90: Likewise.
+ * gfortran.dg/matmul_3.f90: Likewise.
+ * gfortran.dg/matmul_4.f90: Likewise.
+ * gfortran.dg/matmul_6.f90: Likewise.
+ * gfortran.dg/matmul_8.f03: Likewise.
+ * gfortran.dg/matmul_9.f90: Likewise.
+ * gfortran.dg/matmul_bounds_12.f90: Likewise.
+ * gfortran.dg/matmul_bounds_6.f90: Likewise.
+ * gfortran.dg/matmul_const.f90: Likewise.
+ * gfortran.dg/maxloc_1.f90: Likewise.
+ * gfortran.dg/maxloc_2.f90: Likewise.
+ * gfortran.dg/maxloc_3.f90: Likewise.
+ * gfortran.dg/maxloc_4.f90: Likewise.
+ * gfortran.dg/maxloc_string_1.f90: Likewise.
+ * gfortran.dg/maxlocval_1.f90: Likewise.
+ * gfortran.dg/maxlocval_2.f90: Likewise.
+ * gfortran.dg/maxlocval_3.f90: Likewise.
+ * gfortran.dg/maxlocval_4.f90: Likewise.
+ * gfortran.dg/maxval_char_1.f90: Likewise.
+ * gfortran.dg/maxval_char_2.f90: Likewise.
+ * gfortran.dg/maxval_char_3.f90: Likewise.
+ * gfortran.dg/maxval_char_4.f90: Likewise.
+ * gfortran.dg/maxval_parameter_1.f90: Likewise.
+ * gfortran.dg/mclock.f90: Likewise.
+ * gfortran.dg/merge_bits_1.F90: Likewise.
+ * gfortran.dg/merge_bits_2.F90: Likewise.
+ * gfortran.dg/merge_char_1.f90: Likewise.
+ * gfortran.dg/merge_init_expr.f90: Likewise.
+ * gfortran.dg/min_max_optional_1.f90: Likewise.
+ * gfortran.dg/min_max_optional_5.f90: Likewise.
+ * gfortran.dg/minloc_1.f90: Likewise.
+ * gfortran.dg/minloc_2.f90: Likewise.
+ * gfortran.dg/minloc_3.f90: Likewise.
+ * gfortran.dg/minloc_4.f90: Likewise.
+ * gfortran.dg/minloc_string_1.f90: Likewise.
+ * gfortran.dg/minlocval_1.f90: Likewise.
+ * gfortran.dg/minlocval_2.f90: Likewise.
+ * gfortran.dg/minlocval_3.f90: Likewise.
+ * gfortran.dg/minlocval_4.f90: Likewise.
+ * gfortran.dg/minmax_char_1.f90: Likewise.
+ * gfortran.dg/minmaxloc_1.f90: Likewise.
+ * gfortran.dg/minmaxloc_10.f90: Likewise.
+ * gfortran.dg/minmaxloc_11.f90: Likewise.
+ * gfortran.dg/minmaxloc_12.f90: Likewise.
+ * gfortran.dg/minmaxloc_13.f90: Likewise.
+ * gfortran.dg/minmaxloc_2.f90: Likewise.
+ * gfortran.dg/minmaxloc_3.f90: Likewise.
+ * gfortran.dg/minmaxloc_4.f90: Likewise.
+ * gfortran.dg/minmaxloc_5.f90: Likewise.
+ * gfortran.dg/minmaxloc_6.f90: Likewise.
+ * gfortran.dg/minmaxloc_7.f90: Likewise.
+ * gfortran.dg/minmaxloc_8.f90: Likewise.
+ * gfortran.dg/minmaxval_1.f90: Likewise.
+ * gfortran.dg/minval_char_1.f90: Likewise.
+ * gfortran.dg/minval_char_2.f90: Likewise.
+ * gfortran.dg/minval_char_3.f90: Likewise.
+ * gfortran.dg/minval_char_4.f90: Likewise.
+ * gfortran.dg/minval_char_5.f90: Likewise.
+ * gfortran.dg/minval_parameter_1.f90: Likewise.
+ * gfortran.dg/missing_optional_dummy_1.f90: Likewise.
+ * gfortran.dg/missing_optional_dummy_2.f90: Likewise.
+ * gfortran.dg/missing_optional_dummy_6.f90: Likewise.
+ * gfortran.dg/missing_parens_1.f90: Likewise.
+ * gfortran.dg/missing_parens_2.f90: Likewise.
+ * gfortran.dg/mod_large_1.f90: Likewise.
+ * gfortran.dg/mod_sign0_1.f90: Likewise.
+ * gfortran.dg/module_blank_common.f90: Likewise.
+ * gfortran.dg/module_commons_1.f90: Likewise.
+ * gfortran.dg/module_commons_3.f90: Likewise.
+ * gfortran.dg/module_double_reuse.f90: Likewise.
+ * gfortran.dg/module_equivalence_1.f90: Likewise.
+ * gfortran.dg/module_equivalence_2.f90: Likewise.
+ * gfortran.dg/module_equivalence_3.f90: Likewise.
+ * gfortran.dg/module_equivalence_5.f90: Likewise.
+ * gfortran.dg/module_interface_1.f90: Likewise.
+ * gfortran.dg/module_nan.f90: Likewise.
+ * gfortran.dg/module_private_array_refs_1.f90: Likewise.
+ * gfortran.dg/module_procedure_1.f90: Likewise.
+ * gfortran.dg/module_read_1.f90: Likewise.
+ * gfortran.dg/module_read_2.f90: Likewise.
+ * gfortran.dg/module_widestring_1.f90: Likewise.
+ * gfortran.dg/move_alloc.f90: Likewise.
+ * gfortran.dg/move_alloc_10.f90: Likewise.
+ * gfortran.dg/move_alloc_13.f90: Likewise.
+ * gfortran.dg/move_alloc_14.f90: Likewise.
+ * gfortran.dg/move_alloc_15.f90: Likewise.
+ * gfortran.dg/move_alloc_16.f90: Likewise.
+ * gfortran.dg/move_alloc_2.f90: Likewise.
+ * gfortran.dg/move_alloc_5.f90: Likewise.
+ * gfortran.dg/move_alloc_6.f90: Likewise.
+ * gfortran.dg/move_alloc_9.f90: Likewise.
+ * gfortran.dg/multiple_allocation_1.f90: Likewise.
+ * gfortran.dg/multiple_allocation_3.f90: Likewise.
+ * gfortran.dg/mvbits_1.f90: Likewise.
+ * gfortran.dg/mvbits_2.f90: Likewise.
+ * gfortran.dg/mvbits_3.f90: Likewise.
+ * gfortran.dg/mvbits_4.f90: Likewise.
+ * gfortran.dg/mvbits_7.f90: Likewise.
+ * gfortran.dg/mvbits_8.f90: Likewise.
+ * gfortran.dg/namelist_11.f: Likewise.
+ * gfortran.dg/namelist_12.f: Likewise.
+ * gfortran.dg/namelist_13.f90: Likewise.
+ * gfortran.dg/namelist_14.f90: Likewise.
+ * gfortran.dg/namelist_15.f90: Likewise.
+ * gfortran.dg/namelist_16.f90: Likewise.
+ * gfortran.dg/namelist_17.f90: Likewise.
+ * gfortran.dg/namelist_18.f90: Likewise.
+ * gfortran.dg/namelist_19.f90: Likewise.
+ * gfortran.dg/namelist_20.f90: Likewise.
+ * gfortran.dg/namelist_21.f90: Likewise.
+ * gfortran.dg/namelist_22.f90: Likewise.
+ * gfortran.dg/namelist_23.f90: Likewise.
+ * gfortran.dg/namelist_24.f90: Likewise.
+ * gfortran.dg/namelist_26.f90: Likewise.
+ * gfortran.dg/namelist_27.f90: Likewise.
+ * gfortran.dg/namelist_28.f90: Likewise.
+ * gfortran.dg/namelist_29.f90: Likewise.
+ * gfortran.dg/namelist_37.f90: Likewise.
+ * gfortran.dg/namelist_38.f90: Likewise.
+ * gfortran.dg/namelist_39.f90: Likewise.
+ * gfortran.dg/namelist_40.f90: Likewise.
+ * gfortran.dg/namelist_41.f90: Likewise.
+ * gfortran.dg/namelist_42.f90: Likewise.
+ * gfortran.dg/namelist_43.f90: Likewise.
+ * gfortran.dg/namelist_44.f90: Likewise.
+ * gfortran.dg/namelist_47.f90: Likewise.
+ * gfortran.dg/namelist_48.f90: Likewise.
+ * gfortran.dg/namelist_49.f90: Likewise.
+ * gfortran.dg/namelist_50.f90: Likewise.
+ * gfortran.dg/namelist_51.f90: Likewise.
+ * gfortran.dg/namelist_52.f90: Likewise.
+ * gfortran.dg/namelist_54.f90: Likewise.
+ * gfortran.dg/namelist_55.f90: Likewise.
+ * gfortran.dg/namelist_56.f90: Likewise.
+ * gfortran.dg/namelist_57.f90: Likewise.
+ * gfortran.dg/namelist_58.f90: Likewise.
+ * gfortran.dg/namelist_59.f90: Likewise.
+ * gfortran.dg/namelist_60.f90: Likewise.
+ * gfortran.dg/namelist_61.f90: Likewise.
+ * gfortran.dg/namelist_64.f90: Likewise.
+ * gfortran.dg/namelist_65.f90: Likewise.
+ * gfortran.dg/namelist_69.f90: Likewise.
+ * gfortran.dg/namelist_70.f90: Likewise.
+ * gfortran.dg/namelist_71.f90: Likewise.
+ * gfortran.dg/namelist_72.f: Likewise.
+ * gfortran.dg/namelist_73.f90: Likewise.
+ * gfortran.dg/namelist_77.f90: Likewise.
+ * gfortran.dg/namelist_78.f90: Likewise.
+ * gfortran.dg/namelist_79.f90: Likewise.
+ * gfortran.dg/namelist_80.f90: Likewise.
+ * gfortran.dg/namelist_81.f90: Likewise.
+ * gfortran.dg/namelist_82.f90: Likewise.
+ * gfortran.dg/namelist_84.f90: Likewise.
+ * gfortran.dg/namelist_85.f90: Likewise.
+ * gfortran.dg/namelist_86.f90: Likewise.
+ * gfortran.dg/namelist_87.f90: Likewise.
+ * gfortran.dg/namelist_88.f90: Likewise.
+ * gfortran.dg/namelist_89.f90: Likewise.
+ * gfortran.dg/namelist_90.f: Likewise.
+ * gfortran.dg/namelist_95.f90: Likewise.
+ * gfortran.dg/namelist_char_only.f90: Likewise.
+ * gfortran.dg/namelist_empty.f90: Likewise.
+ * gfortran.dg/namelist_internal.f90: Likewise.
+ * gfortran.dg/namelist_use.f90: Likewise.
+ * gfortran.dg/namelist_use_only.f90: Likewise.
+ * gfortran.dg/namelist_utf8.f90: Likewise.
+ * gfortran.dg/nan_1.f90: Likewise.
+ * gfortran.dg/nan_2.f90: Likewise.
+ * gfortran.dg/nan_3.f90: Likewise.
+ * gfortran.dg/nan_6.f90: Likewise.
+ * gfortran.dg/nan_7.f90: Likewise.
+ * gfortran.dg/nearest_1.f90: Likewise.
+ * gfortran.dg/nearest_2.f90: Likewise.
+ * gfortran.dg/nearest_3.f90: Likewise.
+ * gfortran.dg/negative-z-descriptor.f90: Likewise.
+ * gfortran.dg/negative_automatic_size.f90: Likewise.
+ * gfortran.dg/negative_unit.f: Likewise.
+ * gfortran.dg/negative_unit2.f90: Likewise.
+ * gfortran.dg/negative_unit_int8.f: Likewise.
+ * gfortran.dg/nested_array_constructor_2.f90: Likewise.
+ * gfortran.dg/nested_array_constructor_3.f90: Likewise.
+ * gfortran.dg/nested_array_constructor_4.f90: Likewise.
+ * gfortran.dg/nested_modules_1.f90: Likewise.
+ * gfortran.dg/nested_modules_2.f90: Likewise.
+ * gfortran.dg/nested_modules_3.f90: Likewise.
+ * gfortran.dg/nesting_1.f90: Likewise.
+ * gfortran.dg/new_line.f90: Likewise.
+ * gfortran.dg/newunit_1.f90: Likewise.
+ * gfortran.dg/newunit_3.f90: Likewise.
+ * gfortran.dg/newunit_5.f90.f90: Likewise.
+ * gfortran.dg/nint_1.f90: Likewise.
+ * gfortran.dg/nint_2.f90: Likewise.
+ * gfortran.dg/no_arg_check_2.f90: Likewise.
+ * gfortran.dg/no_range_check_1.f90: Likewise.
+ * gfortran.dg/no_range_check_2.f90: Likewise.
+ * gfortran.dg/no_range_check_3.f90: Likewise.
+ * gfortran.dg/noadv_size.f90: Likewise.
+ * gfortran.dg/nonreturning_statements.f90: Likewise.
+ * gfortran.dg/norm2_1.f90: Likewise.
+ * gfortran.dg/norm2_3.f90: Likewise.
+ * gfortran.dg/nosigned_zero_1.f90: Likewise.
+ * gfortran.dg/nosigned_zero_2.f90: Likewise.
+ * gfortran.dg/nosigned_zero_3.f90: Likewise.
+ * gfortran.dg/null_4.f90: Likewise.
+ * gfortran.dg/null_9.f90: Likewise.
+ * gfortran.dg/nullify_3.f90: Likewise.
+ * gfortran.dg/oldstyle_1.f90: Likewise.
+ * gfortran.dg/open_access_append_1.f90: Likewise.
+ * gfortran.dg/open_access_append_2.f90: Likewise.
+ * gfortran.dg/open_errors.f90: Likewise.
+ * gfortran.dg/open_negative_unit_1.f90: Likewise.
+ * gfortran.dg/open_new.f90: Likewise.
+ * gfortran.dg/open_readonly_1.f90: Likewise.
+ * gfortran.dg/operator_1.f90: Likewise.
+ * gfortran.dg/optional_absent_1.f90: Likewise.
+ * gfortran.dg/optional_absent_2.f90: Likewise.
+ * gfortran.dg/optional_absent_3.f90: Likewise.
+ * gfortran.dg/optional_class_1.f90: Likewise.
+ * gfortran.dg/optional_dim_2.f90: Likewise.
+ * gfortran.dg/optional_dim_3.f90: Likewise.
+ * gfortran.dg/output_exponents_1.f90: Likewise.
+ * gfortran.dg/overload_1.f90: Likewise.
+ * gfortran.dg/overload_2.f90: Likewise.
+ * gfortran.dg/overwrite_1.f: Likewise.
+ * gfortran.dg/pad_no.f90: Likewise.
+ * gfortran.dg/parameter_array_init_1.f90: Likewise.
+ * gfortran.dg/parameter_array_init_2.f90: Likewise.
+ * gfortran.dg/parameter_array_init_4.f90: Likewise.
+ * gfortran.dg/parameter_array_init_5.f90: Likewise.
+ * gfortran.dg/parameter_array_section_2.f90: Likewise.
+ * gfortran.dg/parens_3.f90: Likewise.
+ * gfortran.dg/parens_5.f90: Likewise.
+ * gfortran.dg/parens_6.f90: Likewise.
+ * gfortran.dg/parent_result_ref_1.f90: Likewise.
+ * gfortran.dg/parent_result_ref_2.f90: Likewise.
+ * gfortran.dg/parent_result_ref_3.f90: Likewise.
+ * gfortran.dg/parent_result_ref_4.f90: Likewise.
+ * gfortran.dg/parity_1.f90: Likewise.
+ * gfortran.dg/past_eor.f90: Likewise.
+ * gfortran.dg/pdt_1.f03: Likewise.
+ * gfortran.dg/pdt_10.f03: Likewise.
+ * gfortran.dg/pdt_11.f03: Likewise.
+ * gfortran.dg/pdt_12.f03: Likewise.
+ * gfortran.dg/pdt_13.f03: Likewise.
+ * gfortran.dg/pdt_14.f03: Likewise.
+ * gfortran.dg/pdt_15.f03: Likewise.
+ * gfortran.dg/pdt_19.f03: Likewise.
+ * gfortran.dg/pdt_20.f03: Likewise.
+ * gfortran.dg/pdt_22.f03: Likewise.
+ * gfortran.dg/pdt_23.f03: Likewise.
+ * gfortran.dg/pdt_25.f03: Likewise.
+ * gfortran.dg/pdt_26.f03: Likewise.
+ * gfortran.dg/pdt_27.f03: Likewise.
+ * gfortran.dg/pdt_28.f03: Likewise.
+ * gfortran.dg/pdt_3.f03: Likewise.
+ * gfortran.dg/pdt_4.f03: Likewise.
+ * gfortran.dg/pdt_5.f03: Likewise.
+ * gfortran.dg/pdt_7.f03: Likewise.
+ * gfortran.dg/pointer_1.f90: Likewise.
+ * gfortran.dg/pointer_array_1.f90: Likewise.
+ * gfortran.dg/pointer_array_3.f90: Likewise.
+ * gfortran.dg/pointer_array_4.f90: Likewise.
+ * gfortran.dg/pointer_array_5.f90: Likewise.
+ * gfortran.dg/pointer_array_6.f90: Likewise.
+ * gfortran.dg/pointer_array_7.f90: Likewise.
+ * gfortran.dg/pointer_array_8.f90: Likewise.
+ * gfortran.dg/pointer_array_9.f90: Likewise.
+ * gfortran.dg/pointer_array_component_1.f90: Likewise.
+ * gfortran.dg/pointer_array_component_2.f90: Likewise.
+ * gfortran.dg/pointer_assign_10.f90: Likewise.
+ * gfortran.dg/pointer_assign_11.f90: Likewise.
+ * gfortran.dg/pointer_assign_4.f90: Likewise.
+ * gfortran.dg/pointer_assign_8.f90: Likewise.
+ * gfortran.dg/pointer_assign_9.f90: Likewise.
+ * gfortran.dg/pointer_check_10.f90: Likewise.
+ * gfortran.dg/pointer_check_9.f90: Likewise.
+ * gfortran.dg/pointer_function_actual_1.f90: Likewise.
+ * gfortran.dg/pointer_function_actual_2.f90: Likewise.
+ * gfortran.dg/pointer_function_result_1.f90: Likewise.
+ * gfortran.dg/pointer_init_1.f90: Likewise.
+ * gfortran.dg/pointer_init_3.f90: Likewise.
+ * gfortran.dg/pointer_init_4.f90: Likewise.
+ * gfortran.dg/pointer_init_5.f90: Likewise.
+ * gfortran.dg/pointer_init_8.f90: Likewise.
+ * gfortran.dg/pointer_intent_1.f90: Likewise.
+ * gfortran.dg/pointer_intent_4.f90: Likewise.
+ * gfortran.dg/pointer_intent_5.f90: Likewise.
+ * gfortran.dg/pointer_remapping_10.f90: Likewise.
+ * gfortran.dg/pointer_remapping_4.f03: Likewise.
+ * gfortran.dg/pointer_remapping_5.f08: Likewise.
+ * gfortran.dg/pointer_remapping_9.f90: Likewise.
+ * gfortran.dg/pointer_target_1.f90: Likewise.
+ * gfortran.dg/pointer_target_2.f90: Likewise.
+ * gfortran.dg/popcnt_poppar_1.F90: Likewise.
+ * gfortran.dg/popcnt_poppar_2.F90: Likewise.
+ * gfortran.dg/power.f90: Likewise.
+ * gfortran.dg/power1.f90: Likewise.
+ * gfortran.dg/power_3.f90: Likewise.
+ * gfortran.dg/power_4.f90: Likewise.
+ * gfortran.dg/power_5.f90: Likewise.
+ * gfortran.dg/pr12884.f: Likewise.
+ * gfortran.dg/pr15129.f90: Likewise.
+ * gfortran.dg/pr15140.f90: Likewise.
+ * gfortran.dg/pr15324.f90: Likewise.
+ * gfortran.dg/pr15332.f: Likewise.
+ * gfortran.dg/pr15957.f90: Likewise.
+ * gfortran.dg/pr15959.f90: Likewise.
+ * gfortran.dg/pr16597.f90: Likewise.
+ * gfortran.dg/pr16861.f90: Likewise.
+ * gfortran.dg/pr16938.f90: Likewise.
+ * gfortran.dg/pr17090.f90: Likewise.
+ * gfortran.dg/pr17143.f90: Likewise.
+ * gfortran.dg/pr17164.f90: Likewise.
+ * gfortran.dg/pr17229.f: Likewise.
+ * gfortran.dg/pr17285.f90: Likewise.
+ * gfortran.dg/pr17286.f90: Likewise.
+ * gfortran.dg/pr17472.f: Likewise.
+ * gfortran.dg/pr17612.f90: Likewise.
+ * gfortran.dg/pr17706.f90: Likewise.
+ * gfortran.dg/pr18025.f90: Likewise.
+ * gfortran.dg/pr18122.f90: Likewise.
+ * gfortran.dg/pr18210.f90: Likewise.
+ * gfortran.dg/pr18392.f90: Likewise.
+ * gfortran.dg/pr19155.f: Likewise.
+ * gfortran.dg/pr19216.f: Likewise.
+ * gfortran.dg/pr19467.f90: Likewise.
+ * gfortran.dg/pr19657.f: Likewise.
+ * gfortran.dg/pr19926.f90: Likewise.
+ * gfortran.dg/pr19928-1.f90: Likewise.
+ * gfortran.dg/pr19928-2.f90: Likewise.
+ * gfortran.dg/pr20086.f90: Likewise.
+ * gfortran.dg/pr20124.f90: Likewise.
+ * gfortran.dg/pr20163-2.f: Likewise.
+ * gfortran.dg/pr20480.f90: Likewise.
+ * gfortran.dg/pr20755.f: Likewise.
+ * gfortran.dg/pr20950.f: Likewise.
+ * gfortran.dg/pr21177.f90: Likewise.
+ * gfortran.dg/pr21730.f: Likewise.
+ * gfortran.dg/pr22491.f: Likewise.
+ * gfortran.dg/pr25603.f: Likewise.
+ * gfortran.dg/pr26246_2.f90: Likewise.
+ * gfortran.dg/pr32136.f90: Likewise.
+ * gfortran.dg/pr32533.f90: Likewise.
+ * gfortran.dg/pr33794.f90: Likewise.
+ * gfortran.dg/pr35662.f90: Likewise.
+ * gfortran.dg/pr35944-1.f90: Likewise.
+ * gfortran.dg/pr35944-2.f90: Likewise.
+ * gfortran.dg/pr35983.f90: Likewise.
+ * gfortran.dg/pr39865.f90: Likewise.
+ * gfortran.dg/pr41212.f90: Likewise.
+ * gfortran.dg/pr43808.f90: Likewise.
+ * gfortran.dg/pr44592.f90: Likewise.
+ * gfortran.dg/pr44735.f90: Likewise.
+ * gfortran.dg/pr45308.f03: Likewise.
+ * gfortran.dg/pr46297.f: Likewise.
+ * gfortran.dg/pr46588.f90: Likewise.
+ * gfortran.dg/pr46665.f90: Likewise.
+ * gfortran.dg/pr46804.f90: Likewise.
+ * gfortran.dg/pr47008.f03: Likewise.
+ * gfortran.dg/pr47614.f: Likewise.
+ * gfortran.dg/pr47878.f90: Likewise.
+ * gfortran.dg/pr49103.f90: Likewise.
+ * gfortran.dg/pr50069_1.f90: Likewise.
+ * gfortran.dg/pr50769.f90: Likewise.
+ * gfortran.dg/pr52608.f90: Likewise.
+ * gfortran.dg/pr55086_2.f90: Likewise.
+ * gfortran.dg/pr55086_2_tfat.f90: Likewise.
+ * gfortran.dg/pr55086_aliasing_dummy_4_tfat.f90: Likewise.
+ * gfortran.dg/pr55330.f90: Likewise.
+ * gfortran.dg/pr56015.f90: Likewise.
+ * gfortran.dg/pr57910.f90: Likewise.
+ * gfortran.dg/pr59700.f90: Likewise.
+ * gfortran.dg/pr62125.f90: Likewise.
+ * gfortran.dg/pr64530.f90: Likewise.
+ * gfortran.dg/pr65429.f90: Likewise.
+ * gfortran.dg/pr65450.f90: Likewise.
+ * gfortran.dg/pr65504.f90: Likewise.
+ * gfortran.dg/pr65903.f90: Likewise.
+ * gfortran.dg/pr66311.f90: Likewise.
+ * gfortran.dg/pr66864.f90: Likewise.
+ * gfortran.dg/pr67140.f90: Likewise.
+ * gfortran.dg/pr67524.f90: Likewise.
+ * gfortran.dg/pr67885.f90: Likewise.
+ * gfortran.dg/pr68053.f90: Likewise.
+ * gfortran.dg/pr68566.f90: Likewise.
+ * gfortran.dg/pr69514_1.f90: Likewise.
+ * gfortran.dg/pr69514_2.f90: Likewise.
+ * gfortran.dg/pr69739.f90: Likewise.
+ * gfortran.dg/pr70673.f90: Likewise.
+ * gfortran.dg/pr71523_2.f90: Likewise.
+ * gfortran.dg/pr71764.f90: Likewise.
+ * gfortran.dg/pr78092.f90: Likewise.
+ * gfortran.dg/pr82973.f90: Likewise.
+ * gfortran.dg/pr83864.f90: Likewise.
+ * gfortran.dg/pr83874.f90: Likewise.
+ * gfortran.dg/pr84088.f90: Likewise.
+ * gfortran.dg/pr84155.f90: Likewise.
+ * gfortran.dg/proc_decl_12.f90: Likewise.
+ * gfortran.dg/proc_decl_13.f90: Likewise.
+ * gfortran.dg/proc_decl_15.f90: Likewise.
+ * gfortran.dg/proc_decl_17.f90: Likewise.
+ * gfortran.dg/proc_decl_18.f90: Likewise.
+ * gfortran.dg/proc_decl_2.f90: Likewise.
+ * gfortran.dg/proc_decl_5.f90: Likewise.
+ * gfortran.dg/proc_decl_9.f90: Likewise.
+ * gfortran.dg/proc_ptr_1.f90: Likewise.
+ * gfortran.dg/proc_ptr_10.f90: Likewise.
+ * gfortran.dg/proc_ptr_12.f90: Likewise.
+ * gfortran.dg/proc_ptr_18.f90: Likewise.
+ * gfortran.dg/proc_ptr_19.f90: Likewise.
+ * gfortran.dg/proc_ptr_21.f90: Likewise.
+ * gfortran.dg/proc_ptr_22.f90: Likewise.
+ * gfortran.dg/proc_ptr_23.f90: Likewise.
+ * gfortran.dg/proc_ptr_25.f90: Likewise.
+ * gfortran.dg/proc_ptr_26.f90: Likewise.
+ * gfortran.dg/proc_ptr_3.f90: Likewise.
+ * gfortran.dg/proc_ptr_36.f90: Likewise.
+ * gfortran.dg/proc_ptr_47.f90: Likewise.
+ * gfortran.dg/proc_ptr_48.f90: Likewise.
+ * gfortran.dg/proc_ptr_5.f90: Likewise.
+ * gfortran.dg/proc_ptr_6.f90: Likewise.
+ * gfortran.dg/proc_ptr_7.f90: Likewise.
+ * gfortran.dg/proc_ptr_8.f90: Likewise.
+ * gfortran.dg/proc_ptr_common_1.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_1.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_11.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_12.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_13.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_14.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_15.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_16.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_17.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_18.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_19.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_2.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_29.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_45.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_47.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_5.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_6.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_8.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_9.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_pass_1.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_pass_2.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_pass_3.f90: Likewise.
+ * gfortran.dg/proc_ptr_comp_pass_5.f90: Likewise.
+ * gfortran.dg/proc_ptr_result_1.f90: Likewise.
+ * gfortran.dg/proc_ptr_result_3.f90: Likewise.
+ * gfortran.dg/proc_ptr_result_6.f90: Likewise.
+ * gfortran.dg/proc_ptr_result_7.f90: Likewise.
+ * gfortran.dg/proc_ptr_result_8.f90: Likewise.
+ * gfortran.dg/product_init_expr.f03: Likewise.
+ * gfortran.dg/promotion.f90: Likewise.
+ * gfortran.dg/promotion_3.f90: Likewise.
+ * gfortran.dg/promotion_4.f90: Likewise.
+ * gfortran.dg/protected_1.f90: Likewise.
+ * gfortran.dg/protected_2.f90: Likewise.
+ * gfortran.dg/ptr-func-1.f90: Likewise.
+ * gfortran.dg/ptr-func-2.f90: Likewise.
+ * gfortran.dg/ptr_func_assign_1.f08: Likewise.
+ * gfortran.dg/ptr_func_assign_2.f08: Likewise.
+ * gfortran.dg/ptr_func_assign_3.f08: Likewise.
+ * gfortran.dg/pure_byref_1.f90: Likewise.
+ * gfortran.dg/pure_byref_2.f90: Likewise.
+ * gfortran.dg/pure_byref_3.f90: Likewise.
+ * gfortran.dg/quad_2.f90: Likewise.
+ * gfortran.dg/quad_3.f90: Likewise.
+ * gfortran.dg/random_3.f90: Likewise.
+ * gfortran.dg/random_4.f90: Likewise.
+ * gfortran.dg/random_7.f90: Likewise.
+ * gfortran.dg/read_2.f90: Likewise.
+ * gfortran.dg/read_3.f90: Likewise.
+ * gfortran.dg/read_4.f90: Likewise.
+ * gfortran.dg/read_5.f90: Likewise.
+ * gfortran.dg/read_bad_advance.f90: Likewise.
+ * gfortran.dg/read_bang.f90: Likewise.
+ * gfortran.dg/read_bang4.f90: Likewise.
+ * gfortran.dg/read_comma.f: Likewise.
+ * gfortran.dg/read_dir.f90: Likewise.
+ * gfortran.dg/read_empty_file.f: Likewise.
+ * gfortran.dg/read_eof_1.f90: Likewise.
+ * gfortran.dg/read_eof_2.f90: Likewise.
+ * gfortran.dg/read_eof_3.f90: Likewise.
+ * gfortran.dg/read_eof_4.f90: Likewise.
+ * gfortran.dg/read_eof_5.f90: Likewise.
+ * gfortran.dg/read_eof_6.f: Likewise.
+ * gfortran.dg/read_eof_7.f90: Likewise.
+ * gfortran.dg/read_eof_8.f90: Likewise.
+ * gfortran.dg/read_eof_all.f90: Likewise.
+ * gfortran.dg/read_eor.f90: Likewise.
+ * gfortran.dg/read_float_1.f90: Likewise.
+ * gfortran.dg/read_float_2.f03: Likewise.
+ * gfortran.dg/read_float_3.f90: Likewise.
+ * gfortran.dg/read_float_4.f90: Likewise.
+ * gfortran.dg/read_infnan_1.f90: Likewise.
+ * gfortran.dg/read_list_eof_1.f90: Likewise.
+ * gfortran.dg/read_logical.f90: Likewise.
+ * gfortran.dg/read_many_1.f: Likewise.
+ * gfortran.dg/read_no_eor.f90: Likewise.
+ * gfortran.dg/read_noadvance.f90: Likewise.
+ * gfortran.dg/read_repeat.f90: Likewise.
+ * gfortran.dg/read_repeat_2.f90: Likewise.
+ * gfortran.dg/read_size_noadvance.f90: Likewise.
+ * gfortran.dg/read_x_eof.f90: Likewise.
+ * gfortran.dg/read_x_past.f: Likewise.
+ * gfortran.dg/readwrite_unf_direct_eor_1.f90: Likewise.
+ * gfortran.dg/real_const_1.f: Likewise.
+ * gfortran.dg/real_const_2.f90: Likewise.
+ * gfortran.dg/real_const_3.f90: Likewise.
+ * gfortran.dg/real_do_1.f90: Likewise.
+ * gfortran.dg/real_index_1.f90: Likewise.
+ * gfortran.dg/realloc_on_assign_1.f03: Likewise.
+ * gfortran.dg/realloc_on_assign_10.f90: Likewise.
+ * gfortran.dg/realloc_on_assign_11.f90: Likewise.
+ * gfortran.dg/realloc_on_assign_12.f90: Likewise.
+ * gfortran.dg/realloc_on_assign_16.f90: Likewise.
+ * gfortran.dg/realloc_on_assign_17.f90: Likewise.
+ * gfortran.dg/realloc_on_assign_18.f90: Likewise.
+ * gfortran.dg/realloc_on_assign_2.f03: Likewise.
+ * gfortran.dg/realloc_on_assign_23.f90: Likewise.
+ * gfortran.dg/realloc_on_assign_25.f90: Likewise.
+ * gfortran.dg/realloc_on_assign_26.f90: Likewise.
+ * gfortran.dg/realloc_on_assign_27.f08: Likewise.
+ * gfortran.dg/realloc_on_assign_28.f90: Likewise.
+ * gfortran.dg/realloc_on_assign_29.f90: Likewise.
+ * gfortran.dg/realloc_on_assign_3.f03: Likewise.
+ * gfortran.dg/realloc_on_assign_4.f03: Likewise.
+ * gfortran.dg/realloc_on_assign_5.f03: Likewise.
+ * gfortran.dg/realloc_on_assign_7.f03: Likewise.
+ * gfortran.dg/record_marker_1.f90: Likewise.
+ * gfortran.dg/record_marker_2.f: Likewise.
+ * gfortran.dg/record_marker_3.f90: Likewise.
+ * gfortran.dg/recursive_alloc_comp_1.f08: Likewise.
+ * gfortran.dg/recursive_alloc_comp_2.f08: Likewise.
+ * gfortran.dg/recursive_alloc_comp_3.f08: Likewise.
+ * gfortran.dg/recursive_alloc_comp_4.f08: Likewise.
+ * gfortran.dg/recursive_check_7.f90: Likewise.
+ * gfortran.dg/recursive_reference_1.f90: Likewise.
+ * gfortran.dg/recursive_reference_2.f90: Likewise.
+ * gfortran.dg/recursive_stack.f90: Likewise.
+ * gfortran.dg/reduction.f90: Likewise.
+ * gfortran.dg/repack_arrays_1.f90: Likewise.
+ * gfortran.dg/repeat_1.f90: Likewise.
+ * gfortran.dg/repeat_2.f90: Likewise.
+ * gfortran.dg/repeat_3.f90: Likewise.
+ * gfortran.dg/repeat_6.f90: Likewise.
+ * gfortran.dg/reshape-alloc.f90: Likewise.
+ * gfortran.dg/reshape-complex.f90: Likewise.
+ * gfortran.dg/reshape.f90: Likewise.
+ * gfortran.dg/reshape_2.f90: Likewise.
+ * gfortran.dg/reshape_7.f90: Likewise.
+ * gfortran.dg/reshape_empty_1.f03: Likewise.
+ * gfortran.dg/reshape_pad_1.f90: Likewise.
+ * gfortran.dg/reshape_rank7.f90: Likewise.
+ * gfortran.dg/reshape_transpose_1.f90: Likewise.
+ * gfortran.dg/reshape_zerosize_3.f90: Likewise.
+ * gfortran.dg/result_default_init_1.f90: Likewise.
+ * gfortran.dg/result_in_spec_1.f90: Likewise.
+ * gfortran.dg/result_in_spec_2.f90: Likewise.
+ * gfortran.dg/ret_array_1.f90: Likewise.
+ * gfortran.dg/ret_pointer_1.f90: Likewise.
+ * gfortran.dg/ret_pointer_2.f90: Likewise.
+ * gfortran.dg/rewind_1.f90: Likewise.
+ * gfortran.dg/round_1.f03: Likewise.
+ * gfortran.dg/round_2.f03: Likewise.
+ * gfortran.dg/round_3.f08: Likewise.
+ * gfortran.dg/round_4.f90: Likewise.
+ * gfortran.dg/rrspacing_1.f90: Likewise.
+ * gfortran.dg/runtime_warning_1.f90: Likewise.
+ * gfortran.dg/same_type_as_2.f03: Likewise.
+ * gfortran.dg/save_1.f90: Likewise.
+ * gfortran.dg/save_5.f90: Likewise.
+ * gfortran.dg/save_6.f90: Likewise.
+ * gfortran.dg/scalar_mask_1.f90: Likewise.
+ * gfortran.dg/scalar_mask_2.f90: Likewise.
+ * gfortran.dg/scalarize_parameter_array_1.f90: Likewise.
+ * gfortran.dg/scale_1.f90: Likewise.
+ * gfortran.dg/scan_1.f90: Likewise.
+ * gfortran.dg/scan_2.f90: Likewise.
+ * gfortran.dg/secnds-1.f: Likewise.
+ * gfortran.dg/secnds.f: Likewise.
+ * gfortran.dg/select_1.f90: Likewise.
+ * gfortran.dg/select_2.f90: Likewise.
+ * gfortran.dg/select_3.f90: Likewise.
+ * gfortran.dg/select_5.f90: Likewise.
+ * gfortran.dg/select_char_1.f90: Likewise.
+ * gfortran.dg/select_char_2.f90: Likewise.
+ * gfortran.dg/select_type_13.f03: Likewise.
+ * gfortran.dg/select_type_14.f03: Likewise.
+ * gfortran.dg/select_type_15.f03: Likewise.
+ * gfortran.dg/select_type_19.f03: Likewise.
+ * gfortran.dg/select_type_2.f03: Likewise.
+ * gfortran.dg/select_type_26.f03: Likewise.
+ * gfortran.dg/select_type_27.f03: Likewise.
+ * gfortran.dg/select_type_28.f03: Likewise.
+ * gfortran.dg/select_type_3.f03: Likewise.
+ * gfortran.dg/select_type_35.f03: Likewise.
+ * gfortran.dg/select_type_36.f03: Likewise.
+ * gfortran.dg/select_type_37.f03: Likewise.
+ * gfortran.dg/select_type_39.f03: Likewise.
+ * gfortran.dg/select_type_4.f90: Likewise.
+ * gfortran.dg/select_type_5.f03: Likewise.
+ * gfortran.dg/select_type_6.f03: Likewise.
+ * gfortran.dg/select_type_7.f03: Likewise.
+ * gfortran.dg/select_type_8.f03: Likewise.
+ * gfortran.dg/selected_char_kind_1.f90: Likewise.
+ * gfortran.dg/selected_char_kind_4.f90: Likewise.
+ * gfortran.dg/selected_kind_1.f90: Likewise.
+ * gfortran.dg/selected_real_kind_2.f90: Likewise.
+ * gfortran.dg/shape_2.f90: Likewise.
+ * gfortran.dg/shape_4.f90: Likewise.
+ * gfortran.dg/shape_5.f90: Likewise.
+ * gfortran.dg/shape_7.f90: Likewise.
+ * gfortran.dg/shape_8.f90: Likewise.
+ * gfortran.dg/shape_9.f90: Likewise.
+ * gfortran.dg/shift-kind_2.f90: Likewise.
+ * gfortran.dg/shiftalr_1.F90: Likewise.
+ * gfortran.dg/shiftalr_2.F90: Likewise.
+ * gfortran.dg/simpleif_1.f90: Likewise.
+ * gfortran.dg/simplify_argN_1.f90: Likewise.
+ * gfortran.dg/simplify_cshift_1.f90: Likewise.
+ * gfortran.dg/simplify_cshift_4.f90: Likewise.
+ * gfortran.dg/simplify_eoshift_1.f90: Likewise.
+ * gfortran.dg/simplify_modulo.f90: Likewise.
+ * gfortran.dg/single_char_string.f90: Likewise.
+ * gfortran.dg/size_dim.f90: Likewise.
+ * gfortran.dg/size_optional_dim_1.f90: Likewise.
+ * gfortran.dg/sizeof.f90: Likewise.
+ * gfortran.dg/sizeof_4.f90: Likewise.
+ * gfortran.dg/slash_1.f90: Likewise.
+ * gfortran.dg/sms-1.f90: Likewise.
+ * gfortran.dg/sms-2.f90: Likewise.
+ * gfortran.dg/spec_expr_7.f90: Likewise.
+ * gfortran.dg/specifics_1.f90: Likewise.
+ * gfortran.dg/spellcheck-procedure_1.f90: Likewise.
+ * gfortran.dg/spellcheck-procedure_2.f90: Likewise.
+ * gfortran.dg/spread_init_expr.f03: Likewise.
+ * gfortran.dg/spread_scalar_source.f90: Likewise.
+ * gfortran.dg/spread_shape_1.f90: Likewise.
+ * gfortran.dg/stat_1.f90: Likewise.
+ * gfortran.dg/stat_2.f90: Likewise.
+ * gfortran.dg/stfunc_1.f90: Likewise.
+ * gfortran.dg/stfunc_4.f90: Likewise.
+ * gfortran.dg/stfunc_6.f90: Likewise.
+ * gfortran.dg/storage_size_1.f08: Likewise.
+ * gfortran.dg/storage_size_3.f08: Likewise.
+ * gfortran.dg/storage_size_4.f90: Likewise.
+ * gfortran.dg/streamio_1.f90: Likewise.
+ * gfortran.dg/streamio_10.f90: Likewise.
+ * gfortran.dg/streamio_11.f90: Likewise.
+ * gfortran.dg/streamio_12.f90: Likewise.
+ * gfortran.dg/streamio_13.f90: Likewise.
+ * gfortran.dg/streamio_14.f90: Likewise.
+ * gfortran.dg/streamio_15.f90: Likewise.
+ * gfortran.dg/streamio_16.f90: Likewise.
+ * gfortran.dg/streamio_17.f90: Likewise.
+ * gfortran.dg/streamio_2.f90: Likewise.
+ * gfortran.dg/streamio_3.f90: Likewise.
+ * gfortran.dg/streamio_4.f90: Likewise.
+ * gfortran.dg/streamio_5.f90: Likewise.
+ * gfortran.dg/streamio_6.f90: Likewise.
+ * gfortran.dg/streamio_7.f90: Likewise.
+ * gfortran.dg/streamio_8.f90: Likewise.
+ * gfortran.dg/streamio_9.f90: Likewise.
+ * gfortran.dg/string_0xfe_0xff_1.f90: Likewise.
+ * gfortran.dg/string_4.f90: Likewise.
+ * gfortran.dg/string_array_constructor_2.f90: Likewise.
+ * gfortran.dg/string_assign_2.f90: Likewise.
+ * gfortran.dg/string_compare_1.f90: Likewise.
+ * gfortran.dg/string_compare_2.f90: Likewise.
+ * gfortran.dg/string_compare_3.f90: Likewise.
+ * gfortran.dg/string_ctor_1.f90: Likewise.
+ * gfortran.dg/string_length_1.f90: Likewise.
+ * gfortran.dg/string_length_2.f90: Likewise.
+ * gfortran.dg/string_length_3.f90: Likewise.
+ * gfortran.dg/string_length_4.f90: Likewise.
+ * gfortran.dg/string_null_compare_1.f: Likewise.
+ * gfortran.dg/string_pad_trunc.f90: Likewise.
+ * gfortran.dg/structure_constructor_1.f03: Likewise.
+ * gfortran.dg/structure_constructor_11.f90: Likewise.
+ * gfortran.dg/structure_constructor_13.f03: Likewise.
+ * gfortran.dg/structure_constructor_2.f03: Likewise.
+ * gfortran.dg/structure_constructor_5.f03: Likewise.
+ * gfortran.dg/submodule_1.f08: Likewise.
+ * gfortran.dg/submodule_11.f08: Likewise.
+ * gfortran.dg/submodule_14.f08: Likewise.
+ * gfortran.dg/submodule_15.f08: Likewise.
+ * gfortran.dg/submodule_17.f08: Likewise.
+ * gfortran.dg/submodule_18.f08: Likewise.
+ * gfortran.dg/submodule_19.f08: Likewise.
+ * gfortran.dg/submodule_2.f08: Likewise.
+ * gfortran.dg/submodule_27.f08: Likewise.
+ * gfortran.dg/submodule_28.f08: Likewise.
+ * gfortran.dg/submodule_29.f08: Likewise.
+ * gfortran.dg/submodule_30.f08: Likewise.
+ * gfortran.dg/submodule_6.f08: Likewise.
+ * gfortran.dg/submodule_7.f08: Likewise.
+ * gfortran.dg/submodule_8.f08: Likewise.
+ * gfortran.dg/subnormal_1.f90: Likewise.
+ * gfortran.dg/subref_array_pointer_1.f90: Likewise.
+ * gfortran.dg/subref_array_pointer_2.f90: Likewise.
+ * gfortran.dg/subref_array_pointer_4.f90: Likewise.
+ * gfortran.dg/substr_2.f: Likewise.
+ * gfortran.dg/substr_3.f: Likewise.
+ * gfortran.dg/substr_4.f: Likewise.
+ * gfortran.dg/substr_5.f90: Likewise.
+ * gfortran.dg/substr_6.f90: Likewise.
+ * gfortran.dg/substr_alloc_string_comp_1.f90: Likewise.
+ * gfortran.dg/sum_init_expr.f03: Likewise.
+ * gfortran.dg/sum_zero_array_1.f90: Likewise.
+ * gfortran.dg/system_clock_3.f08: Likewise.
+ * gfortran.dg/t_editing.f: Likewise.
+ * gfortran.dg/team_change_1.f90: Likewise.
+ * gfortran.dg/team_end_1.f90: Likewise.
+ * gfortran.dg/team_number_1.f90: Likewise.
+ * gfortran.dg/temporary_1.f90: Likewise.
+ * gfortran.dg/test_com_block.f90: Likewise.
+ * gfortran.dg/test_only_clause.f90: Likewise.
+ * gfortran.dg/tiny_1.f90: Likewise.
+ * gfortran.dg/tiny_2.f90: Likewise.
+ * gfortran.dg/tl_editing.f90: Likewise.
+ * gfortran.dg/transfer_array_intrinsic_1.f90: Likewise.
+ * gfortran.dg/transfer_array_intrinsic_2.f90: Likewise.
+ * gfortran.dg/transfer_array_intrinsic_3.f90: Likewise.
+ * gfortran.dg/transfer_array_intrinsic_4.f90: Likewise.
+ * gfortran.dg/transfer_assumed_size_1.f90: Likewise.
+ * gfortran.dg/transfer_class_2.f90: Likewise.
+ * gfortran.dg/transfer_intrinsic_2.f90: Likewise.
+ * gfortran.dg/transfer_intrinsic_3.f90: Likewise.
+ * gfortran.dg/transfer_intrinsic_5.f90: Likewise.
+ * gfortran.dg/transfer_resolve_1.f90: Likewise.
+ * gfortran.dg/transfer_simplify_1.f90: Likewise.
+ * gfortran.dg/transfer_simplify_10.f90: Likewise.
+ * gfortran.dg/transfer_simplify_11.f90: Likewise.
+ * gfortran.dg/transfer_simplify_2.f90: Likewise.
+ * gfortran.dg/transfer_simplify_3.f90: Likewise.
+ * gfortran.dg/transfer_simplify_4.f90: Likewise.
+ * gfortran.dg/transfer_simplify_8.f90: Likewise.
+ * gfortran.dg/transfer_simplify_9.f90: Likewise.
+ * gfortran.dg/transpose_1.f90: Likewise.
+ * gfortran.dg/transpose_3.f03: Likewise.
+ * gfortran.dg/transpose_4.f90: Likewise.
+ * gfortran.dg/transpose_conjg_1.f90: Likewise.
+ * gfortran.dg/transpose_intrinsic_func_call_1.f90: Likewise.
+ * gfortran.dg/transpose_optimization_2.f90: Likewise.
+ * gfortran.dg/trim_1.f90: Likewise.
+ * gfortran.dg/trim_optimize_1.f90: Likewise.
+ * gfortran.dg/trim_optimize_2.f90: Likewise.
+ * gfortran.dg/trim_optimize_3.f90: Likewise.
+ * gfortran.dg/trim_optimize_4.f90: Likewise.
+ * gfortran.dg/trim_optimize_5.f90: Likewise.
+ * gfortran.dg/trim_optimize_6.f90: Likewise.
+ * gfortran.dg/trim_optimize_7.f90: Likewise.
+ * gfortran.dg/trim_optimize_8.f90: Likewise.
+ * gfortran.dg/type_to_class_1.f03: Likewise.
+ * gfortran.dg/type_to_class_2.f03: Likewise.
+ * gfortran.dg/type_to_class_3.f03: Likewise.
+ * gfortran.dg/type_to_class_4.f03: Likewise.
+ * gfortran.dg/type_to_class_5.f03: Likewise.
+ * gfortran.dg/typebound_assignment_5.f03: Likewise.
+ * gfortran.dg/typebound_assignment_6.f03: Likewise.
+ * gfortran.dg/typebound_assignment_7.f90: Likewise.
+ * gfortran.dg/typebound_call_1.f03: Likewise.
+ * gfortran.dg/typebound_call_13.f03: Likewise.
+ * gfortran.dg/typebound_call_18.f03: Likewise.
+ * gfortran.dg/typebound_call_19.f03: Likewise.
+ * gfortran.dg/typebound_call_2.f03: Likewise.
+ * gfortran.dg/typebound_call_20.f03: Likewise.
+ * gfortran.dg/typebound_call_3.f03: Likewise.
+ * gfortran.dg/typebound_generic_5.f03: Likewise.
+ * gfortran.dg/typebound_generic_6.f03: Likewise.
+ * gfortran.dg/typebound_generic_9.f03: Likewise.
+ * gfortran.dg/typebound_operator_12.f03: Likewise.
+ * gfortran.dg/typebound_operator_13.f03: Likewise.
+ * gfortran.dg/typebound_operator_15.f90: Likewise.
+ * gfortran.dg/typebound_operator_20.f90: Likewise.
+ * gfortran.dg/typebound_operator_3.f03: Likewise.
+ * gfortran.dg/typebound_operator_6.f03: Likewise.
+ * gfortran.dg/typebound_operator_7.f03: Likewise.
+ * gfortran.dg/typebound_operator_8.f03: Likewise.
+ * gfortran.dg/typebound_operator_9.f03: Likewise.
+ * gfortran.dg/typebound_proc_19.f90: Likewise.
+ * gfortran.dg/typebound_proc_20.f90: Likewise.
+ * gfortran.dg/typebound_proc_23.f90: Likewise.
+ * gfortran.dg/typebound_proc_27.f03: Likewise.
+ * gfortran.dg/typebound_proc_35.f90: Likewise.
+ * gfortran.dg/typebound_proc_36.f90: Likewise.
+ * gfortran.dg/unf_io_convert_1.f90: Likewise.
+ * gfortran.dg/unf_io_convert_2.f90: Likewise.
+ * gfortran.dg/unf_io_convert_3.f90: Likewise.
+ * gfortran.dg/unf_io_convert_4.f90: Likewise.
+ * gfortran.dg/unf_read_corrupted_1.f90: Likewise.
+ * gfortran.dg/unf_read_corrupted_2.f90: Likewise.
+ * gfortran.dg/unf_short_record_1.f90: Likewise.
+ * gfortran.dg/unformatted_recl_1.f90: Likewise.
+ * gfortran.dg/unformatted_subrecord_1.f90: Likewise.
+ * gfortran.dg/unit_1.f90: Likewise.
+ * gfortran.dg/unlimited_fmt_1.f08: Likewise.
+ * gfortran.dg/unlimited_polymorphic_1.f03: Likewise.
+ * gfortran.dg/unlimited_polymorphic_13.f90: Likewise.
+ * gfortran.dg/unlimited_polymorphic_14.f90: Likewise.
+ * gfortran.dg/unlimited_polymorphic_17.f90: Likewise.
+ * gfortran.dg/unlimited_polymorphic_18.f90: Likewise.
+ * gfortran.dg/unlimited_polymorphic_20.f90: Likewise.
+ * gfortran.dg/unlimited_polymorphic_21.f90: Likewise.
+ * gfortran.dg/unlimited_polymorphic_22.f90: Likewise.
+ * gfortran.dg/unlimited_polymorphic_23.f90: Likewise.
+ * gfortran.dg/unlimited_polymorphic_24.f03: Likewise.
+ * gfortran.dg/unlimited_polymorphic_25.f90: Likewise.
+ * gfortran.dg/unlimited_polymorphic_26.f90: Likewise.
+ * gfortran.dg/unlimited_polymorphic_3.f03: Likewise.
+ * gfortran.dg/unlimited_polymorphic_5.f90: Likewise.
+ * gfortran.dg/unlimited_polymorphic_6.f90: Likewise.
+ * gfortran.dg/unpack_init_expr.f03: Likewise.
+ * gfortran.dg/use_10.f90: Likewise.
+ * gfortran.dg/use_11.f90: Likewise.
+ * gfortran.dg/use_13.f90: Likewise.
+ * gfortran.dg/use_24.f90: Likewise.
+ * gfortran.dg/use_27.f90: Likewise.
+ * gfortran.dg/use_5.f90: Likewise.
+ * gfortran.dg/use_allocated_1.f90: Likewise.
+ * gfortran.dg/use_only_1.f90: Likewise.
+ * gfortran.dg/use_only_4.f90: Likewise.
+ * gfortran.dg/use_rename_2.f90: Likewise.
+ * gfortran.dg/use_rename_4.f90: Likewise.
+ * gfortran.dg/used_dummy_types_1.f90: Likewise.
+ * gfortran.dg/used_interface_ref.f90: Likewise.
+ * gfortran.dg/used_types_5.f90: Likewise.
+ * gfortran.dg/utf8_1.f03: Likewise.
+ * gfortran.dg/utf8_2.f03: Likewise.
+ * gfortran.dg/value_1.f90: Likewise.
+ * gfortran.dg/value_2.f90: Likewise.
+ * gfortran.dg/value_4.f90: Likewise.
+ * gfortran.dg/value_6.f03: Likewise.
+ * gfortran.dg/value_7.f03: Likewise.
+ * gfortran.dg/value_test.f90: Likewise.
+ * gfortran.dg/vect/fast-math-pr33299.f90: Likewise.
+ * gfortran.dg/vect/no-fre-no-copy-prop-O3-pr51704.f90: Likewise.
+ * gfortran.dg/vect/pr60510.f: Likewise.
+ * gfortran.dg/vect/pr69882.f90: Likewise.
+ * gfortran.dg/vect/pr69980.f90: Likewise.
+ * gfortran.dg/vect/vect-5.f90: Likewise.
+ * gfortran.dg/vect/vect-alias-check-1.F90: Likewise.
+ * gfortran.dg/vector_subscript_1.f90: Likewise.
+ * gfortran.dg/vector_subscript_2.f90: Likewise.
+ * gfortran.dg/vector_subscript_3.f90: Likewise.
+ * gfortran.dg/vector_subscript_5.f90: Likewise.
+ * gfortran.dg/verify_2.f90: Likewise.
+ * gfortran.dg/volatile10.f90: Likewise.
+ * gfortran.dg/where_1.f90: Likewise.
+ * gfortran.dg/where_operator_assign_1.f90: Likewise.
+ * gfortran.dg/where_operator_assign_2.f90: Likewise.
+ * gfortran.dg/where_operator_assign_3.f90: Likewise.
+ * gfortran.dg/whole_file_13.f90: Likewise.
+ * gfortran.dg/whole_file_2.f90: Likewise.
+ * gfortran.dg/widechar_2.f90: Likewise.
+ * gfortran.dg/widechar_4.f90: Likewise.
+ * gfortran.dg/widechar_5.f90: Likewise.
+ * gfortran.dg/widechar_6.f90: Likewise.
+ * gfortran.dg/widechar_8.f90: Likewise.
+ * gfortran.dg/widechar_IO_1.f90: Likewise.
+ * gfortran.dg/widechar_IO_2.f90: Likewise.
+ * gfortran.dg/widechar_IO_3.f90: Likewise.
+ * gfortran.dg/widechar_IO_4.f90: Likewise.
+ * gfortran.dg/widechar_compare_1.f90: Likewise.
+ * gfortran.dg/widechar_intrinsics_10.f90: Likewise.
+ * gfortran.dg/widechar_intrinsics_4.f90: Likewise.
+ * gfortran.dg/widechar_intrinsics_5.f90: Likewise.
+ * gfortran.dg/widechar_intrinsics_6.f90: Likewise.
+ * gfortran.dg/widechar_intrinsics_7.f90: Likewise.
+ * gfortran.dg/widechar_intrinsics_8.f90: Likewise.
+ * gfortran.dg/widechar_intrinsics_9.f90: Likewise.
+ * gfortran.dg/widechar_select_1.f90: Likewise.
+ * gfortran.dg/winapi.f90: Likewise.
+ * gfortran.dg/write_0_pe_format.f90: Likewise.
+ * gfortran.dg/write_back.f: Likewise.
+ * gfortran.dg/write_check3.f90: Likewise.
+ * gfortran.dg/write_direct_eor.f90: Likewise.
+ * gfortran.dg/write_padding.f90: Likewise.
+ * gfortran.dg/write_recursive.f90: Likewise.
+ * gfortran.dg/write_rewind_1.f: Likewise.
+ * gfortran.dg/write_rewind_2.f: Likewise.
+ * gfortran.dg/write_zero_array.f90: Likewise.
+ * gfortran.dg/x_slash_1.f: Likewise.
+ * gfortran.dg/x_slash_2.f: Likewise.
+ * gfortran.dg/zero_array_components_1.f90: Likewise.
+ * gfortran.dg/zero_length_1.f90: Likewise.
+ * gfortran.dg/zero_length_2.f90: Likewise.
+ * gfortran.dg/zero_sized_1.f90: Likewise.
+ * gfortran.dg/zero_sized_3.f90: Likewise.
+ * gfortran.fortran-torture/compile/nested.f90: Likewise.
+ * gfortran.fortran-torture/compile/parameter_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/a_edit_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/adjustr.f90: Likewise.
+ * gfortran.fortran-torture/execute/allocate.f90: Likewise.
+ * gfortran.fortran-torture/execute/alternate_return.f90: Likewise.
+ * gfortran.fortran-torture/execute/args.f90: Likewise.
+ * gfortran.fortran-torture/execute/arithmeticif.f90: Likewise.
+ * gfortran.fortran-torture/execute/arrayarg.f90: Likewise.
+ * gfortran.fortran-torture/execute/arrayarg2.f90: Likewise.
+ * gfortran.fortran-torture/execute/arraysave.f90: Likewise.
+ * gfortran.fortran-torture/execute/assumed_size.f90: Likewise.
+ * gfortran.fortran-torture/execute/backspace.f90: Likewise.
+ * gfortran.fortran-torture/execute/bounds.f90: Likewise.
+ * gfortran.fortran-torture/execute/character_passing.f90: Likewise.
+ * gfortran.fortran-torture/execute/character_select_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/cmplx.f90: Likewise.
+ * gfortran.fortran-torture/execute/common.f90: Likewise.
+ * gfortran.fortran-torture/execute/common_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/common_init_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/common_size.f90: Likewise.
+ * gfortran.fortran-torture/execute/constructor.f90: Likewise.
+ * gfortran.fortran-torture/execute/contained.f90: Likewise.
+ * gfortran.fortran-torture/execute/contained2.f90: Likewise.
+ * gfortran.fortran-torture/execute/contained_3.f90: Likewise.
+ * gfortran.fortran-torture/execute/csqrt_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/data.f90: Likewise.
+ * gfortran.fortran-torture/execute/data_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/data_3.f90: Likewise.
+ * gfortran.fortran-torture/execute/data_4.f90: Likewise.
+ * gfortran.fortran-torture/execute/dep_fails.f90: Likewise.
+ * gfortran.fortran-torture/execute/der_init.f90: Likewise.
+ * gfortran.fortran-torture/execute/der_init_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/der_init_3.f90: Likewise.
+ * gfortran.fortran-torture/execute/der_init_4.f90: Likewise.
+ * gfortran.fortran-torture/execute/der_init_5.f90: Likewise.
+ * gfortran.fortran-torture/execute/der_io.f90: Likewise.
+ * gfortran.fortran-torture/execute/der_point.f90: Likewise.
+ * gfortran.fortran-torture/execute/der_type.f90: Likewise.
+ * gfortran.fortran-torture/execute/direct_io.f90: Likewise.
+ * gfortran.fortran-torture/execute/elemental.f90: Likewise.
+ * gfortran.fortran-torture/execute/empty_format.f90: Likewise.
+ * gfortran.fortran-torture/execute/emptyif.f90: Likewise.
+ * gfortran.fortran-torture/execute/entry_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/entry_10.f90: Likewise.
+ * gfortran.fortran-torture/execute/entry_11.f90: Likewise.
+ * gfortran.fortran-torture/execute/entry_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/entry_3.f90: Likewise.
+ * gfortran.fortran-torture/execute/entry_4.f90: Likewise.
+ * gfortran.fortran-torture/execute/entry_5.f90: Likewise.
+ * gfortran.fortran-torture/execute/entry_6.f90: Likewise.
+ * gfortran.fortran-torture/execute/entry_7.f90: Likewise.
+ * gfortran.fortran-torture/execute/entry_8.f90: Likewise.
+ * gfortran.fortran-torture/execute/entry_9.f90: Likewise.
+ * gfortran.fortran-torture/execute/enum_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/enum_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/enum_3.f90: Likewise.
+ * gfortran.fortran-torture/execute/enum_4.f90: Likewise.
+ * gfortran.fortran-torture/execute/equiv_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/equiv_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/equiv_3.f90: Likewise.
+ * gfortran.fortran-torture/execute/equiv_4.f90: Likewise.
+ * gfortran.fortran-torture/execute/equiv_init_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/f2_edit_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/forall.f90: Likewise.
+ * gfortran.fortran-torture/execute/forall_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/forall_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/forall_3.f90: Likewise.
+ * gfortran.fortran-torture/execute/forall_4.f90: Likewise.
+ * gfortran.fortran-torture/execute/forall_5.f90: Likewise.
+ * gfortran.fortran-torture/execute/forall_6.f90: Likewise.
+ * gfortran.fortran-torture/execute/forall_7.f90: Likewise.
+ * gfortran.fortran-torture/execute/function_module_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/getarg_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/hollerith.f90: Likewise.
+ * gfortran.fortran-torture/execute/in-pack.f90: Likewise.
+ * gfortran.fortran-torture/execute/initialization_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/initializer.f90: Likewise.
+ * gfortran.fortran-torture/execute/inquire_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/inquire_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/inquire_3.f90: Likewise.
+ * gfortran.fortran-torture/execute/inquire_4.f90: Likewise.
+ * gfortran.fortran-torture/execute/inquire_5.f90: Likewise.
+ * gfortran.fortran-torture/execute/integer_select.f90: Likewise.
+ * gfortran.fortran-torture/execute/integer_select_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/internal_write.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_abs.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_achar.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_aint_anint.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_anyall.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_associated.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_associated_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_bitops.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_count.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_cshift.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_dim.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_dotprod.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_dprod.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_dummy.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_eoshift.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_fraction_exponent.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_index.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_integer.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_leadz.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_len.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_matmul.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_merge.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_minmax.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_mmloc.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_mmloc_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_mmloc_3.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_mmloc_4.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_mmval.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_mod_ulo.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_mvbits.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_nearest.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_pack.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_present.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_product.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_rrspacing.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_scale.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_set_exponent.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_shape.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_si_kind.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_sign.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_size.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_spacing.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_spread.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_sr_kind.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_sum.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_trailz.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_transpose.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_trim.f90: Likewise.
+ * gfortran.fortran-torture/execute/intrinsic_unpack.f90: Likewise.
+ * gfortran.fortran-torture/execute/iolength_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/iolength_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/iolength_3.f90: Likewise.
+ * gfortran.fortran-torture/execute/list_read_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/logical_select_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/mainsub.f90: Likewise.
+ * gfortran.fortran-torture/execute/math.f90: Likewise.
+ * gfortran.fortran-torture/execute/module_init_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/module_interface_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/nan_inf_fmt.f90: Likewise.
+ * gfortran.fortran-torture/execute/nestcons.f90: Likewise.
+ * gfortran.fortran-torture/execute/nullarg.f90: Likewise.
+ * gfortran.fortran-torture/execute/optstring_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/parameter_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/parameter_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/partparm.f90: Likewise.
+ * gfortran.fortran-torture/execute/plusconst_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/power.f90: Likewise.
+ * gfortran.fortran-torture/execute/pr19269-1.f90: Likewise.
+ * gfortran.fortran-torture/execute/pr23373-1.f90: Likewise.
+ * gfortran.fortran-torture/execute/pr23373-2.f90: Likewise.
+ * gfortran.fortran-torture/execute/pr32140.f90: Likewise.
+ * gfortran.fortran-torture/execute/pr40021.f: Likewise.
+ * gfortran.fortran-torture/execute/pr43390.f90: Likewise.
+ * gfortran.fortran-torture/execute/pr54767.f90: Likewise.
+ * gfortran.fortran-torture/execute/pr57396.f90: Likewise.
+ * gfortran.fortran-torture/execute/procarg.f90: Likewise.
+ * gfortran.fortran-torture/execute/ptr.f90: Likewise.
+ * gfortran.fortran-torture/execute/random_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/random_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/random_init.f90: Likewise.
+ * gfortran.fortran-torture/execute/read_eof.f90: Likewise.
+ * gfortran.fortran-torture/execute/read_null_string.f90: Likewise.
+ * gfortran.fortran-torture/execute/retarray.f90: Likewise.
+ * gfortran.fortran-torture/execute/retarray_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/save_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/save_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/scalarize.f90: Likewise.
+ * gfortran.fortran-torture/execute/scalarize2.f90: Likewise.
+ * gfortran.fortran-torture/execute/scalarize3.f90: Likewise.
+ * gfortran.fortran-torture/execute/select_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/seq_io.f90: Likewise.
+ * gfortran.fortran-torture/execute/slash_edit.f90: Likewise.
+ * gfortran.fortran-torture/execute/spec_abs.f90: Likewise.
+ * gfortran.fortran-torture/execute/specifics.f90: Likewise.
+ * gfortran.fortran-torture/execute/st_function.f90: Likewise.
+ * gfortran.fortran-torture/execute/st_function_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/st_function_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/stack_varsize.f90: Likewise.
+ * gfortran.fortran-torture/execute/straret.f90: Likewise.
+ * gfortran.fortran-torture/execute/strarray_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/strarray_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/strarray_3.f90: Likewise.
+ * gfortran.fortran-torture/execute/strarray_4.f90: Likewise.
+ * gfortran.fortran-torture/execute/strcmp.f90: Likewise.
+ * gfortran.fortran-torture/execute/strcommon_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/string.f90: Likewise.
+ * gfortran.fortran-torture/execute/strlen.f90: Likewise.
+ * gfortran.fortran-torture/execute/strret.f90: Likewise.
+ * gfortran.fortran-torture/execute/t_edit.f90: Likewise.
+ * gfortran.fortran-torture/execute/test_slice.f90: Likewise.
+ * gfortran.fortran-torture/execute/transfer1.f90: Likewise.
+ * gfortran.fortran-torture/execute/transfer2.f90: Likewise.
+ * gfortran.fortran-torture/execute/unopened_unit_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/userop.f90: Likewise.
+ * gfortran.fortran-torture/execute/where17.f90: Likewise.
+ * gfortran.fortran-torture/execute/where18.f90: Likewise.
+ * gfortran.fortran-torture/execute/where19.f90: Likewise.
+ * gfortran.fortran-torture/execute/where20.f90: Likewise.
+ * gfortran.fortran-torture/execute/where21.f90: Likewise.
+ * gfortran.fortran-torture/execute/where_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/where_10.f90: Likewise.
+ * gfortran.fortran-torture/execute/where_11.f90: Likewise.
+ * gfortran.fortran-torture/execute/where_14.f90: Likewise.
+ * gfortran.fortran-torture/execute/where_15.f90: Likewise.
+ * gfortran.fortran-torture/execute/where_16.f90: Likewise.
+ * gfortran.fortran-torture/execute/where_2.f90: Likewise.
+ * gfortran.fortran-torture/execute/where_3.f90: Likewise.
+ * gfortran.fortran-torture/execute/where_4.f90: Likewise.
+ * gfortran.fortran-torture/execute/where_5.f90: Likewise.
+ * gfortran.fortran-torture/execute/where_6.f90: Likewise.
+ * gfortran.fortran-torture/execute/where_7.f90: Likewise.
+ * gfortran.fortran-torture/execute/where_8.f90: Likewise.
+ * gfortran.fortran-torture/execute/write_a_1.f90: Likewise.
+ * gfortran.fortran-torture/execute/write_logical.f90: Likewise.
+ * gfortran.dg/extends_type_of_3.f90: Likewise. Adjust tree scans.
+ * gfortran.dg/inline_transpose_1.f90: Likewise.
+
2018-02-17 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84115
rewind(10)
read(10,*) str1
read(10,*) str2
- if(str1 /= rec1 .or. str2 /= rec2) call abort()
+ if(str1 /= rec1 .or. str2 /= rec2) STOP 1
rewind(10)
read(10,'(a)') str1
read(10,'(a)') str2
- if(str1 /= rec1 .or. str2 /= rec2) call abort()
+ if(str1 /= rec1 .or. str2 /= rec2) STOP 2
close(10)
open(10,form='formatted',access='stream',&
read(10,*) i,str1
read(10,*) r
if(i /= 123 .or. str1 /= rec1 .or. r /= 12345.6789) &
- call abort()
+ STOP 3
close(10)
open(unit=10,form='unformatted',access='stream', &
len = len_trim(rec1//new_line('a')//rec2)
rewind(10)
read(10) str1(1:len)
- if(str1 /= rec1//new_line('a')//rec2) call abort()
+ if(str1 /= rec1//new_line('a')//rec2) STOP 4
end program stream_test
a = 1. ; b = 2. ; i = 4
c = b - floor( a / b ) ! this caused an ICE
d = b - real(floor( a / b ))
- if (any (c/=d)) call abort ()
+ if (any (c/=d)) STOP 1
j = aint(b) - floor( a / b ) ! this caused an ICE
- if (any(real(j)/=d)) call abort ()
+ if (any(real(j)/=d)) STOP 2
c = i
- if (any(real(i)/=c)) call abort ()
+ if (any(real(i)/=c)) STOP 3
c = i + b ! this caused an ICE
d = real(i) + b
- if (any(c/=d)) call abort ()
+ if (any(c/=d)) STOP 4
j = i + aint (a)
k = i + a ! this caused an ICE
- if (any(j/=k)) call abort ()
+ if (any(j/=k)) STOP 5
end program PR19754_2
close(1)
open(1,form='FORMATTED')
read(1,*)i
- if(i(1).ne.9.or.i(2).ne.8.or.i(3).ne.7.or.i(4).ne.6)call abort
+ if(i(1).ne.9.or.i(2).ne.8.or.i(3).ne.7.or.i(4).ne.6)STOP 1
read(1,*, end=200)i
! should only be able to read one line from the file
- call abort
+ STOP 2
200 continue
close(1,STATUS='delete')
end
do i=1,n
do j=1,m
boo=foo(i,j)+1.0
- if (abs (boo - 2.0) .gt. 1e-6) call abort
+ if (abs (boo - 2.0) .gt. 1e-6) STOP 1
end do
end do
world!" ! { dg-warning "Missing '&' in continued character constant" }
if (c.ne.&
"Hello, world!")&
- call abort();end program main
+ STOP 1;end program main
world!" ! { dg-bogus "Warning: Missing '&' in continued character constant" }
if (c.ne.&
"Hello, world!")&
- call abort();end program main
+ STOP 1;end program main
--- /dev/null
+! { dg-do run }
+! { dg-shouldfail "Program aborted." }
+program main
+ call abort
+end program main
integer(1) :: i = 65
character a
a = achar(i)
- if (a /= 'A') call abort
+ if (a /= 'A') STOP 1
end program bug6
program main
integer :: i
character(len=1) :: c
- if (iachar(achar(1)) /= 1) call abort
- if (iachar ("\ 1")/= 1) call abort
- if (achar (1) /= "\ 1") call abort
- if ("\ 1" /= achar ( ichar ( "\ 1"))) call abort
+ if (iachar(achar(1)) /= 1) STOP 1
+ if (iachar ("\ 1")/= 1) STOP 2
+ if (achar (1) /= "\ 1") STOP 3
+ if ("\ 1" /= achar ( ichar ( "\ 1"))) STOP 4
i = 1
c = "\ 1"
- if (achar(i) /= "\ 1") call abort
- if (iachar(c) /= iachar("\ 1")) call abort
- if (iachar(achar(2)) /= 2) call abort
- if (iachar ("\ 2")/= 2) call abort
- if (achar (2) /= "\ 2") call abort
- if ("\ 2" /= achar ( ichar ( "\ 2"))) call abort
+ if (achar(i) /= "\ 1") STOP 5
+ if (iachar(c) /= iachar("\ 1")) STOP 6
+ if (iachar(achar(2)) /= 2) STOP 7
+ if (iachar ("\ 2")/= 2) STOP 8
+ if (achar (2) /= "\ 2") STOP 9
+ if ("\ 2" /= achar ( ichar ( "\ 2"))) STOP 10
i = 2
c = "\ 2"
- if (achar(i) /= "\ 2") call abort
- if (iachar(c) /= iachar("\ 2")) call abort
- if (iachar(achar(3)) /= 3) call abort
- if (iachar ("\ 3")/= 3) call abort
- if (achar (3) /= "\ 3") call abort
- if ("\ 3" /= achar ( ichar ( "\ 3"))) call abort
+ if (achar(i) /= "\ 2") STOP 11
+ if (iachar(c) /= iachar("\ 2")) STOP 12
+ if (iachar(achar(3)) /= 3) STOP 13
+ if (iachar ("\ 3")/= 3) STOP 14
+ if (achar (3) /= "\ 3") STOP 15
+ if ("\ 3" /= achar ( ichar ( "\ 3"))) STOP 16
i = 3
c = "\ 3"
- if (achar(i) /= "\ 3") call abort
- if (iachar(c) /= iachar("\ 3")) call abort
- if (iachar(achar(4)) /= 4) call abort
- if (iachar ("\ 4")/= 4) call abort
- if (achar (4) /= "\ 4") call abort
- if ("\ 4" /= achar ( ichar ( "\ 4"))) call abort
+ if (achar(i) /= "\ 3") STOP 17
+ if (iachar(c) /= iachar("\ 3")) STOP 18
+ if (iachar(achar(4)) /= 4) STOP 19
+ if (iachar ("\ 4")/= 4) STOP 20
+ if (achar (4) /= "\ 4") STOP 21
+ if ("\ 4" /= achar ( ichar ( "\ 4"))) STOP 22
i = 4
c = "\ 4"
- if (achar(i) /= "\ 4") call abort
- if (iachar(c) /= iachar("\ 4")) call abort
- if (iachar(achar(5)) /= 5) call abort
- if (iachar ("\ 5")/= 5) call abort
- if (achar (5) /= "\ 5") call abort
- if ("\ 5" /= achar ( ichar ( "\ 5"))) call abort
+ if (achar(i) /= "\ 4") STOP 23
+ if (iachar(c) /= iachar("\ 4")) STOP 24
+ if (iachar(achar(5)) /= 5) STOP 25
+ if (iachar ("\ 5")/= 5) STOP 26
+ if (achar (5) /= "\ 5") STOP 27
+ if ("\ 5" /= achar ( ichar ( "\ 5"))) STOP 28
i = 5
c = "\ 5"
- if (achar(i) /= "\ 5") call abort
- if (iachar(c) /= iachar("\ 5")) call abort
- if (iachar(achar(6)) /= 6) call abort
- if (iachar ("\ 6")/= 6) call abort
- if (achar (6) /= "\ 6") call abort
- if ("\ 6" /= achar ( ichar ( "\ 6"))) call abort
+ if (achar(i) /= "\ 5") STOP 29
+ if (iachar(c) /= iachar("\ 5")) STOP 30
+ if (iachar(achar(6)) /= 6) STOP 31
+ if (iachar ("\ 6")/= 6) STOP 32
+ if (achar (6) /= "\ 6") STOP 33
+ if ("\ 6" /= achar ( ichar ( "\ 6"))) STOP 34
i = 6
c = "\ 6"
- if (achar(i) /= "\ 6") call abort
- if (iachar(c) /= iachar("\ 6")) call abort
- if (iachar(achar(7)) /= 7) call abort
- if (iachar ("\a")/= 7) call abort
- if (achar (7) /= "\a") call abort
- if ("\a" /= achar ( ichar ( "\a"))) call abort
+ if (achar(i) /= "\ 6") STOP 35
+ if (iachar(c) /= iachar("\ 6")) STOP 36
+ if (iachar(achar(7)) /= 7) STOP 37
+ if (iachar ("\a")/= 7) STOP 38
+ if (achar (7) /= "\a") STOP 39
+ if ("\a" /= achar ( ichar ( "\a"))) STOP 40
i = 7
c = "\a"
- if (achar(i) /= "\a") call abort
- if (iachar(c) /= iachar("\a")) call abort
- if (iachar(achar(8)) /= 8) call abort
- if (iachar ("\b")/= 8) call abort
- if (achar (8) /= "\b") call abort
- if ("\b" /= achar ( ichar ( "\b"))) call abort
+ if (achar(i) /= "\a") STOP 41
+ if (iachar(c) /= iachar("\a")) STOP 42
+ if (iachar(achar(8)) /= 8) STOP 43
+ if (iachar ("\b")/= 8) STOP 44
+ if (achar (8) /= "\b") STOP 45
+ if ("\b" /= achar ( ichar ( "\b"))) STOP 46
i = 8
c = "\b"
- if (achar(i) /= "\b") call abort
- if (iachar(c) /= iachar("\b")) call abort
- if (iachar(achar(9)) /= 9) call abort
- if (iachar (" ")/= 9) call abort
- if (achar (9) /= " ") call abort
- if (" " /= achar ( ichar ( " "))) call abort
+ if (achar(i) /= "\b") STOP 47
+ if (iachar(c) /= iachar("\b")) STOP 48
+ if (iachar(achar(9)) /= 9) STOP 49
+ if (iachar (" ")/= 9) STOP 50
+ if (achar (9) /= " ") STOP 51
+ if (" " /= achar ( ichar ( " "))) STOP 52
i = 9
c = " "
- if (achar(i) /= " ") call abort
- if (iachar(c) /= iachar(" ")) call abort
- if (iachar(achar(10)) /= 10) call abort
- if (iachar(achar(11)) /= 11) call abort
- if (iachar ("\v")/= 11) call abort
- if (achar (11) /= "\v") call abort
- if ("\v" /= achar ( ichar ( "\v"))) call abort
+ if (achar(i) /= " ") STOP 53
+ if (iachar(c) /= iachar(" ")) STOP 54
+ if (iachar(achar(10)) /= 10) STOP 55
+ if (iachar(achar(11)) /= 11) STOP 56
+ if (iachar ("\v")/= 11) STOP 57
+ if (achar (11) /= "\v") STOP 58
+ if ("\v" /= achar ( ichar ( "\v"))) STOP 59
i = 11
c = "\v"
- if (achar(i) /= "\v") call abort
- if (iachar(c) /= iachar("\v")) call abort
- if (iachar(achar(12)) /= 12) call abort
- if (iachar ("\f")/= 12) call abort
- if (achar (12) /= "\f") call abort
- if ("\f" /= achar ( ichar ( "\f"))) call abort
+ if (achar(i) /= "\v") STOP 60
+ if (iachar(c) /= iachar("\v")) STOP 61
+ if (iachar(achar(12)) /= 12) STOP 62
+ if (iachar ("\f")/= 12) STOP 63
+ if (achar (12) /= "\f") STOP 64
+ if ("\f" /= achar ( ichar ( "\f"))) STOP 65
i = 12
c = "\f"
- if (achar(i) /= "\f") call abort
- if (iachar(c) /= iachar("\f")) call abort
- if (iachar(achar(13)) /= 13) call abort
- if (iachar(achar(14)) /= 14) call abort
- if (iachar ("\ e")/= 14) call abort
- if (achar (14) /= "\ e") call abort
- if ("\ e" /= achar ( ichar ( "\ e"))) call abort
+ if (achar(i) /= "\f") STOP 66
+ if (iachar(c) /= iachar("\f")) STOP 67
+ if (iachar(achar(13)) /= 13) STOP 68
+ if (iachar(achar(14)) /= 14) STOP 69
+ if (iachar ("\ e")/= 14) STOP 70
+ if (achar (14) /= "\ e") STOP 71
+ if ("\ e" /= achar ( ichar ( "\ e"))) STOP 72
i = 14
c = "\ e"
- if (achar(i) /= "\ e") call abort
- if (iachar(c) /= iachar("\ e")) call abort
- if (iachar(achar(15)) /= 15) call abort
- if (iachar ("\ f")/= 15) call abort
- if (achar (15) /= "\ f") call abort
- if ("\ f" /= achar ( ichar ( "\ f"))) call abort
+ if (achar(i) /= "\ e") STOP 73
+ if (iachar(c) /= iachar("\ e")) STOP 74
+ if (iachar(achar(15)) /= 15) STOP 75
+ if (iachar ("\ f")/= 15) STOP 76
+ if (achar (15) /= "\ f") STOP 77
+ if ("\ f" /= achar ( ichar ( "\ f"))) STOP 78
i = 15
c = "\ f"
- if (achar(i) /= "\ f") call abort
- if (iachar(c) /= iachar("\ f")) call abort
- if (iachar(achar(16)) /= 16) call abort
- if (iachar ("\10")/= 16) call abort
- if (achar (16) /= "\10") call abort
- if ("\10" /= achar ( ichar ( "\10"))) call abort
+ if (achar(i) /= "\ f") STOP 79
+ if (iachar(c) /= iachar("\ f")) STOP 80
+ if (iachar(achar(16)) /= 16) STOP 81
+ if (iachar ("\10")/= 16) STOP 82
+ if (achar (16) /= "\10") STOP 83
+ if ("\10" /= achar ( ichar ( "\10"))) STOP 84
i = 16
c = "\10"
- if (achar(i) /= "\10") call abort
- if (iachar(c) /= iachar("\10")) call abort
- if (iachar(achar(17)) /= 17) call abort
- if (iachar ("\11")/= 17) call abort
- if (achar (17) /= "\11") call abort
- if ("\11" /= achar ( ichar ( "\11"))) call abort
+ if (achar(i) /= "\10") STOP 85
+ if (iachar(c) /= iachar("\10")) STOP 86
+ if (iachar(achar(17)) /= 17) STOP 87
+ if (iachar ("\11")/= 17) STOP 88
+ if (achar (17) /= "\11") STOP 89
+ if ("\11" /= achar ( ichar ( "\11"))) STOP 90
i = 17
c = "\11"
- if (achar(i) /= "\11") call abort
- if (iachar(c) /= iachar("\11")) call abort
- if (iachar(achar(18)) /= 18) call abort
- if (iachar ("\12")/= 18) call abort
- if (achar (18) /= "\12") call abort
- if ("\12" /= achar ( ichar ( "\12"))) call abort
+ if (achar(i) /= "\11") STOP 91
+ if (iachar(c) /= iachar("\11")) STOP 92
+ if (iachar(achar(18)) /= 18) STOP 93
+ if (iachar ("\12")/= 18) STOP 94
+ if (achar (18) /= "\12") STOP 95
+ if ("\12" /= achar ( ichar ( "\12"))) STOP 96
i = 18
c = "\12"
- if (achar(i) /= "\12") call abort
- if (iachar(c) /= iachar("\12")) call abort
- if (iachar(achar(19)) /= 19) call abort
- if (iachar ("\13")/= 19) call abort
- if (achar (19) /= "\13") call abort
- if ("\13" /= achar ( ichar ( "\13"))) call abort
+ if (achar(i) /= "\12") STOP 97
+ if (iachar(c) /= iachar("\12")) STOP 98
+ if (iachar(achar(19)) /= 19) STOP 99
+ if (iachar ("\13")/= 19) STOP 100
+ if (achar (19) /= "\13") STOP 101
+ if ("\13" /= achar ( ichar ( "\13"))) STOP 102
i = 19
c = "\13"
- if (achar(i) /= "\13") call abort
- if (iachar(c) /= iachar("\13")) call abort
- if (iachar(achar(20)) /= 20) call abort
- if (iachar ("\14")/= 20) call abort
- if (achar (20) /= "\14") call abort
- if ("\14" /= achar ( ichar ( "\14"))) call abort
+ if (achar(i) /= "\13") STOP 103
+ if (iachar(c) /= iachar("\13")) STOP 104
+ if (iachar(achar(20)) /= 20) STOP 105
+ if (iachar ("\14")/= 20) STOP 106
+ if (achar (20) /= "\14") STOP 107
+ if ("\14" /= achar ( ichar ( "\14"))) STOP 108
i = 20
c = "\14"
- if (achar(i) /= "\14") call abort
- if (iachar(c) /= iachar("\14")) call abort
- if (iachar(achar(21)) /= 21) call abort
- if (iachar ("\15")/= 21) call abort
- if (achar (21) /= "\15") call abort
- if ("\15" /= achar ( ichar ( "\15"))) call abort
+ if (achar(i) /= "\14") STOP 109
+ if (iachar(c) /= iachar("\14")) STOP 110
+ if (iachar(achar(21)) /= 21) STOP 111
+ if (iachar ("\15")/= 21) STOP 112
+ if (achar (21) /= "\15") STOP 113
+ if ("\15" /= achar ( ichar ( "\15"))) STOP 114
i = 21
c = "\15"
- if (achar(i) /= "\15") call abort
- if (iachar(c) /= iachar("\15")) call abort
- if (iachar(achar(22)) /= 22) call abort
- if (iachar ("\16")/= 22) call abort
- if (achar (22) /= "\16") call abort
- if ("\16" /= achar ( ichar ( "\16"))) call abort
+ if (achar(i) /= "\15") STOP 115
+ if (iachar(c) /= iachar("\15")) STOP 116
+ if (iachar(achar(22)) /= 22) STOP 117
+ if (iachar ("\16")/= 22) STOP 118
+ if (achar (22) /= "\16") STOP 119
+ if ("\16" /= achar ( ichar ( "\16"))) STOP 120
i = 22
c = "\16"
- if (achar(i) /= "\16") call abort
- if (iachar(c) /= iachar("\16")) call abort
- if (iachar(achar(23)) /= 23) call abort
- if (iachar ("\17")/= 23) call abort
- if (achar (23) /= "\17") call abort
- if ("\17" /= achar ( ichar ( "\17"))) call abort
+ if (achar(i) /= "\16") STOP 121
+ if (iachar(c) /= iachar("\16")) STOP 122
+ if (iachar(achar(23)) /= 23) STOP 123
+ if (iachar ("\17")/= 23) STOP 124
+ if (achar (23) /= "\17") STOP 125
+ if ("\17" /= achar ( ichar ( "\17"))) STOP 126
i = 23
c = "\17"
- if (achar(i) /= "\17") call abort
- if (iachar(c) /= iachar("\17")) call abort
- if (iachar(achar(24)) /= 24) call abort
- if (iachar ("\18")/= 24) call abort
- if (achar (24) /= "\18") call abort
- if ("\18" /= achar ( ichar ( "\18"))) call abort
+ if (achar(i) /= "\17") STOP 127
+ if (iachar(c) /= iachar("\17")) STOP 128
+ if (iachar(achar(24)) /= 24) STOP 129
+ if (iachar ("\18")/= 24) STOP 130
+ if (achar (24) /= "\18") STOP 131
+ if ("\18" /= achar ( ichar ( "\18"))) STOP 132
i = 24
c = "\18"
- if (achar(i) /= "\18") call abort
- if (iachar(c) /= iachar("\18")) call abort
- if (iachar(achar(25)) /= 25) call abort
- if (iachar ("\19")/= 25) call abort
- if (achar (25) /= "\19") call abort
- if ("\19" /= achar ( ichar ( "\19"))) call abort
+ if (achar(i) /= "\18") STOP 133
+ if (iachar(c) /= iachar("\18")) STOP 134
+ if (iachar(achar(25)) /= 25) STOP 135
+ if (iachar ("\19")/= 25) STOP 136
+ if (achar (25) /= "\19") STOP 137
+ if ("\19" /= achar ( ichar ( "\19"))) STOP 138
i = 25
c = "\19"
- if (achar(i) /= "\19") call abort
- if (iachar(c) /= iachar("\19")) call abort
- if (iachar(achar(26)) /= 26) call abort
- if (iachar(achar(27)) /= 27) call abort
- if (iachar ("\e")/= 27) call abort
- if (achar (27) /= "\e") call abort
- if ("\e" /= achar ( ichar ( "\e"))) call abort
+ if (achar(i) /= "\19") STOP 139
+ if (iachar(c) /= iachar("\19")) STOP 140
+ if (iachar(achar(26)) /= 26) STOP 141
+ if (iachar(achar(27)) /= 27) STOP 142
+ if (iachar ("\e")/= 27) STOP 143
+ if (achar (27) /= "\e") STOP 144
+ if ("\e" /= achar ( ichar ( "\e"))) STOP 145
i = 27
c = "\e"
- if (achar(i) /= "\e") call abort
- if (iachar(c) /= iachar("\e")) call abort
- if (iachar(achar(28)) /= 28) call abort
- if (iachar ("\1c")/= 28) call abort
- if (achar (28) /= "\1c") call abort
- if ("\1c" /= achar ( ichar ( "\1c"))) call abort
+ if (achar(i) /= "\e") STOP 146
+ if (iachar(c) /= iachar("\e")) STOP 147
+ if (iachar(achar(28)) /= 28) STOP 148
+ if (iachar ("\1c")/= 28) STOP 149
+ if (achar (28) /= "\1c") STOP 150
+ if ("\1c" /= achar ( ichar ( "\1c"))) STOP 151
i = 28
c = "\1c"
- if (achar(i) /= "\1c") call abort
- if (iachar(c) /= iachar("\1c")) call abort
- if (iachar(achar(29)) /= 29) call abort
- if (iachar ("\1d")/= 29) call abort
- if (achar (29) /= "\1d") call abort
- if ("\1d" /= achar ( ichar ( "\1d"))) call abort
+ if (achar(i) /= "\1c") STOP 152
+ if (iachar(c) /= iachar("\1c")) STOP 153
+ if (iachar(achar(29)) /= 29) STOP 154
+ if (iachar ("\1d")/= 29) STOP 155
+ if (achar (29) /= "\1d") STOP 156
+ if ("\1d" /= achar ( ichar ( "\1d"))) STOP 157
i = 29
c = "\1d"
- if (achar(i) /= "\1d") call abort
- if (iachar(c) /= iachar("\1d")) call abort
- if (iachar(achar(30)) /= 30) call abort
- if (iachar ("\1e")/= 30) call abort
- if (achar (30) /= "\1e") call abort
- if ("\1e" /= achar ( ichar ( "\1e"))) call abort
+ if (achar(i) /= "\1d") STOP 158
+ if (iachar(c) /= iachar("\1d")) STOP 159
+ if (iachar(achar(30)) /= 30) STOP 160
+ if (iachar ("\1e")/= 30) STOP 161
+ if (achar (30) /= "\1e") STOP 162
+ if ("\1e" /= achar ( ichar ( "\1e"))) STOP 163
i = 30
c = "\1e"
- if (achar(i) /= "\1e") call abort
- if (iachar(c) /= iachar("\1e")) call abort
- if (iachar(achar(31)) /= 31) call abort
- if (iachar ("\1f")/= 31) call abort
- if (achar (31) /= "\1f") call abort
- if ("\1f" /= achar ( ichar ( "\1f"))) call abort
+ if (achar(i) /= "\1e") STOP 164
+ if (iachar(c) /= iachar("\1e")) STOP 165
+ if (iachar(achar(31)) /= 31) STOP 166
+ if (iachar ("\1f")/= 31) STOP 167
+ if (achar (31) /= "\1f") STOP 168
+ if ("\1f" /= achar ( ichar ( "\1f"))) STOP 169
i = 31
c = "\1f"
- if (achar(i) /= "\1f") call abort
- if (iachar(c) /= iachar("\1f")) call abort
- if (iachar(achar(32)) /= 32) call abort
- if (iachar (" ")/= 32) call abort
- if (achar (32) /= " ") call abort
- if (" " /= achar ( ichar ( " "))) call abort
+ if (achar(i) /= "\1f") STOP 170
+ if (iachar(c) /= iachar("\1f")) STOP 171
+ if (iachar(achar(32)) /= 32) STOP 172
+ if (iachar (" ")/= 32) STOP 173
+ if (achar (32) /= " ") STOP 174
+ if (" " /= achar ( ichar ( " "))) STOP 175
i = 32
c = " "
- if (achar(i) /= " ") call abort
- if (iachar(c) /= iachar(" ")) call abort
- if (iachar(achar(33)) /= 33) call abort
- if (iachar ("!")/= 33) call abort
- if (achar (33) /= "!") call abort
- if ("!" /= achar ( ichar ( "!"))) call abort
+ if (achar(i) /= " ") STOP 176
+ if (iachar(c) /= iachar(" ")) STOP 177
+ if (iachar(achar(33)) /= 33) STOP 178
+ if (iachar ("!")/= 33) STOP 179
+ if (achar (33) /= "!") STOP 180
+ if ("!" /= achar ( ichar ( "!"))) STOP 181
i = 33
c = "!"
- if (achar(i) /= "!") call abort
- if (iachar(c) /= iachar("!")) call abort
- if (iachar(achar(34)) /= 34) call abort
- if (iachar ('"')/= 34) call abort
- if (achar (34) /= '"') call abort
- if ('"' /= achar ( ichar ( '"'))) call abort
+ if (achar(i) /= "!") STOP 182
+ if (iachar(c) /= iachar("!")) STOP 183
+ if (iachar(achar(34)) /= 34) STOP 184
+ if (iachar ('"')/= 34) STOP 185
+ if (achar (34) /= '"') STOP 186
+ if ('"' /= achar ( ichar ( '"'))) STOP 187
i = 34
c = '"'
- if (achar(i) /= '"') call abort
- if (iachar(c) /= iachar('"')) call abort
- if (iachar(achar(35)) /= 35) call abort
- if (iachar ("#")/= 35) call abort
- if (achar (35) /= "#") call abort
- if ("#" /= achar ( ichar ( "#"))) call abort
+ if (achar(i) /= '"') STOP 188
+ if (iachar(c) /= iachar('"')) STOP 189
+ if (iachar(achar(35)) /= 35) STOP 190
+ if (iachar ("#")/= 35) STOP 191
+ if (achar (35) /= "#") STOP 192
+ if ("#" /= achar ( ichar ( "#"))) STOP 193
i = 35
c = "#"
- if (achar(i) /= "#") call abort
- if (iachar(c) /= iachar("#")) call abort
- if (iachar(achar(36)) /= 36) call abort
- if (iachar ("$")/= 36) call abort
- if (achar (36) /= "$") call abort
- if ("$" /= achar ( ichar ( "$"))) call abort
+ if (achar(i) /= "#") STOP 194
+ if (iachar(c) /= iachar("#")) STOP 195
+ if (iachar(achar(36)) /= 36) STOP 196
+ if (iachar ("$")/= 36) STOP 197
+ if (achar (36) /= "$") STOP 198
+ if ("$" /= achar ( ichar ( "$"))) STOP 199
i = 36
c = "$"
- if (achar(i) /= "$") call abort
- if (iachar(c) /= iachar("$")) call abort
- if (iachar(achar(37)) /= 37) call abort
- if (iachar ("%")/= 37) call abort
- if (achar (37) /= "%") call abort
- if ("%" /= achar ( ichar ( "%"))) call abort
+ if (achar(i) /= "$") STOP 200
+ if (iachar(c) /= iachar("$")) STOP 201
+ if (iachar(achar(37)) /= 37) STOP 202
+ if (iachar ("%")/= 37) STOP 203
+ if (achar (37) /= "%") STOP 204
+ if ("%" /= achar ( ichar ( "%"))) STOP 205
i = 37
c = "%"
- if (achar(i) /= "%") call abort
- if (iachar(c) /= iachar("%")) call abort
- if (iachar(achar(38)) /= 38) call abort
- if (iachar ("&")/= 38) call abort
- if (achar (38) /= "&") call abort
- if ("&" /= achar ( ichar ( "&"))) call abort
+ if (achar(i) /= "%") STOP 206
+ if (iachar(c) /= iachar("%")) STOP 207
+ if (iachar(achar(38)) /= 38) STOP 208
+ if (iachar ("&")/= 38) STOP 209
+ if (achar (38) /= "&") STOP 210
+ if ("&" /= achar ( ichar ( "&"))) STOP 211
i = 38
c = "&"
- if (achar(i) /= "&") call abort
- if (iachar(c) /= iachar("&")) call abort
- if (iachar(achar(39)) /= 39) call abort
- if (iachar ("'")/= 39) call abort
- if (achar (39) /= "'") call abort
- if ("'" /= achar ( ichar ( "'"))) call abort
+ if (achar(i) /= "&") STOP 212
+ if (iachar(c) /= iachar("&")) STOP 213
+ if (iachar(achar(39)) /= 39) STOP 214
+ if (iachar ("'")/= 39) STOP 215
+ if (achar (39) /= "'") STOP 216
+ if ("'" /= achar ( ichar ( "'"))) STOP 217
i = 39
c = "'"
- if (achar(i) /= "'") call abort
- if (iachar(c) /= iachar("'")) call abort
- if (iachar(achar(40)) /= 40) call abort
- if (iachar ("(")/= 40) call abort
- if (achar (40) /= "(") call abort
- if ("(" /= achar ( ichar ( "("))) call abort
+ if (achar(i) /= "'") STOP 218
+ if (iachar(c) /= iachar("'")) STOP 219
+ if (iachar(achar(40)) /= 40) STOP 220
+ if (iachar ("(")/= 40) STOP 221
+ if (achar (40) /= "(") STOP 222
+ if ("(" /= achar ( ichar ( "("))) STOP 223
i = 40
c = "("
- if (achar(i) /= "(") call abort
- if (iachar(c) /= iachar("(")) call abort
- if (iachar(achar(41)) /= 41) call abort
- if (iachar (")")/= 41) call abort
- if (achar (41) /= ")") call abort
- if (")" /= achar ( ichar ( ")"))) call abort
+ if (achar(i) /= "(") STOP 224
+ if (iachar(c) /= iachar("(")) STOP 225
+ if (iachar(achar(41)) /= 41) STOP 226
+ if (iachar (")")/= 41) STOP 227
+ if (achar (41) /= ")") STOP 228
+ if (")" /= achar ( ichar ( ")"))) STOP 229
i = 41
c = ")"
- if (achar(i) /= ")") call abort
- if (iachar(c) /= iachar(")")) call abort
- if (iachar(achar(42)) /= 42) call abort
- if (iachar ("*")/= 42) call abort
- if (achar (42) /= "*") call abort
- if ("*" /= achar ( ichar ( "*"))) call abort
+ if (achar(i) /= ")") STOP 230
+ if (iachar(c) /= iachar(")")) STOP 231
+ if (iachar(achar(42)) /= 42) STOP 232
+ if (iachar ("*")/= 42) STOP 233
+ if (achar (42) /= "*") STOP 234
+ if ("*" /= achar ( ichar ( "*"))) STOP 235
i = 42
c = "*"
- if (achar(i) /= "*") call abort
- if (iachar(c) /= iachar("*")) call abort
- if (iachar(achar(43)) /= 43) call abort
- if (iachar ("+")/= 43) call abort
- if (achar (43) /= "+") call abort
- if ("+" /= achar ( ichar ( "+"))) call abort
+ if (achar(i) /= "*") STOP 236
+ if (iachar(c) /= iachar("*")) STOP 237
+ if (iachar(achar(43)) /= 43) STOP 238
+ if (iachar ("+")/= 43) STOP 239
+ if (achar (43) /= "+") STOP 240
+ if ("+" /= achar ( ichar ( "+"))) STOP 241
i = 43
c = "+"
- if (achar(i) /= "+") call abort
- if (iachar(c) /= iachar("+")) call abort
- if (iachar(achar(44)) /= 44) call abort
- if (iachar (",")/= 44) call abort
- if (achar (44) /= ",") call abort
- if ("," /= achar ( ichar ( ","))) call abort
+ if (achar(i) /= "+") STOP 242
+ if (iachar(c) /= iachar("+")) STOP 243
+ if (iachar(achar(44)) /= 44) STOP 244
+ if (iachar (",")/= 44) STOP 245
+ if (achar (44) /= ",") STOP 246
+ if ("," /= achar ( ichar ( ","))) STOP 247
i = 44
c = ","
- if (achar(i) /= ",") call abort
- if (iachar(c) /= iachar(",")) call abort
- if (iachar(achar(45)) /= 45) call abort
- if (iachar ("-")/= 45) call abort
- if (achar (45) /= "-") call abort
- if ("-" /= achar ( ichar ( "-"))) call abort
+ if (achar(i) /= ",") STOP 248
+ if (iachar(c) /= iachar(",")) STOP 249
+ if (iachar(achar(45)) /= 45) STOP 250
+ if (iachar ("-")/= 45) STOP 251
+ if (achar (45) /= "-") STOP 252
+ if ("-" /= achar ( ichar ( "-"))) STOP 253
i = 45
c = "-"
- if (achar(i) /= "-") call abort
- if (iachar(c) /= iachar("-")) call abort
- if (iachar(achar(46)) /= 46) call abort
- if (iachar (".")/= 46) call abort
- if (achar (46) /= ".") call abort
- if ("." /= achar ( ichar ( "."))) call abort
+ if (achar(i) /= "-") STOP 254
+ if (iachar(c) /= iachar("-")) STOP 255
+ if (iachar(achar(46)) /= 46) STOP 256
+ if (iachar (".")/= 46) STOP 257
+ if (achar (46) /= ".") STOP 258
+ if ("." /= achar ( ichar ( "."))) STOP 259
i = 46
c = "."
- if (achar(i) /= ".") call abort
- if (iachar(c) /= iachar(".")) call abort
- if (iachar(achar(47)) /= 47) call abort
- if (iachar ("/")/= 47) call abort
- if (achar (47) /= "/") call abort
- if ("/" /= achar ( ichar ( "/"))) call abort
+ if (achar(i) /= ".") STOP 260
+ if (iachar(c) /= iachar(".")) STOP 261
+ if (iachar(achar(47)) /= 47) STOP 262
+ if (iachar ("/")/= 47) STOP 263
+ if (achar (47) /= "/") STOP 264
+ if ("/" /= achar ( ichar ( "/"))) STOP 265
i = 47
c = "/"
- if (achar(i) /= "/") call abort
- if (iachar(c) /= iachar("/")) call abort
- if (iachar(achar(48)) /= 48) call abort
- if (iachar ("0")/= 48) call abort
- if (achar (48) /= "0") call abort
- if ("0" /= achar ( ichar ( "0"))) call abort
+ if (achar(i) /= "/") STOP 266
+ if (iachar(c) /= iachar("/")) STOP 267
+ if (iachar(achar(48)) /= 48) STOP 268
+ if (iachar ("0")/= 48) STOP 269
+ if (achar (48) /= "0") STOP 270
+ if ("0" /= achar ( ichar ( "0"))) STOP 271
i = 48
c = "0"
- if (achar(i) /= "0") call abort
- if (iachar(c) /= iachar("0")) call abort
- if (iachar(achar(49)) /= 49) call abort
- if (iachar ("1")/= 49) call abort
- if (achar (49) /= "1") call abort
- if ("1" /= achar ( ichar ( "1"))) call abort
+ if (achar(i) /= "0") STOP 272
+ if (iachar(c) /= iachar("0")) STOP 273
+ if (iachar(achar(49)) /= 49) STOP 274
+ if (iachar ("1")/= 49) STOP 275
+ if (achar (49) /= "1") STOP 276
+ if ("1" /= achar ( ichar ( "1"))) STOP 277
i = 49
c = "1"
- if (achar(i) /= "1") call abort
- if (iachar(c) /= iachar("1")) call abort
- if (iachar(achar(50)) /= 50) call abort
- if (iachar ("2")/= 50) call abort
- if (achar (50) /= "2") call abort
- if ("2" /= achar ( ichar ( "2"))) call abort
+ if (achar(i) /= "1") STOP 278
+ if (iachar(c) /= iachar("1")) STOP 279
+ if (iachar(achar(50)) /= 50) STOP 280
+ if (iachar ("2")/= 50) STOP 281
+ if (achar (50) /= "2") STOP 282
+ if ("2" /= achar ( ichar ( "2"))) STOP 283
i = 50
c = "2"
- if (achar(i) /= "2") call abort
- if (iachar(c) /= iachar("2")) call abort
- if (iachar(achar(51)) /= 51) call abort
- if (iachar ("3")/= 51) call abort
- if (achar (51) /= "3") call abort
- if ("3" /= achar ( ichar ( "3"))) call abort
+ if (achar(i) /= "2") STOP 284
+ if (iachar(c) /= iachar("2")) STOP 285
+ if (iachar(achar(51)) /= 51) STOP 286
+ if (iachar ("3")/= 51) STOP 287
+ if (achar (51) /= "3") STOP 288
+ if ("3" /= achar ( ichar ( "3"))) STOP 289
i = 51
c = "3"
- if (achar(i) /= "3") call abort
- if (iachar(c) /= iachar("3")) call abort
- if (iachar(achar(52)) /= 52) call abort
- if (iachar ("4")/= 52) call abort
- if (achar (52) /= "4") call abort
- if ("4" /= achar ( ichar ( "4"))) call abort
+ if (achar(i) /= "3") STOP 290
+ if (iachar(c) /= iachar("3")) STOP 291
+ if (iachar(achar(52)) /= 52) STOP 292
+ if (iachar ("4")/= 52) STOP 293
+ if (achar (52) /= "4") STOP 294
+ if ("4" /= achar ( ichar ( "4"))) STOP 295
i = 52
c = "4"
- if (achar(i) /= "4") call abort
- if (iachar(c) /= iachar("4")) call abort
- if (iachar(achar(53)) /= 53) call abort
- if (iachar ("5")/= 53) call abort
- if (achar (53) /= "5") call abort
- if ("5" /= achar ( ichar ( "5"))) call abort
+ if (achar(i) /= "4") STOP 296
+ if (iachar(c) /= iachar("4")) STOP 297
+ if (iachar(achar(53)) /= 53) STOP 298
+ if (iachar ("5")/= 53) STOP 299
+ if (achar (53) /= "5") STOP 300
+ if ("5" /= achar ( ichar ( "5"))) STOP 301
i = 53
c = "5"
- if (achar(i) /= "5") call abort
- if (iachar(c) /= iachar("5")) call abort
- if (iachar(achar(54)) /= 54) call abort
- if (iachar ("6")/= 54) call abort
- if (achar (54) /= "6") call abort
- if ("6" /= achar ( ichar ( "6"))) call abort
+ if (achar(i) /= "5") STOP 302
+ if (iachar(c) /= iachar("5")) STOP 303
+ if (iachar(achar(54)) /= 54) STOP 304
+ if (iachar ("6")/= 54) STOP 305
+ if (achar (54) /= "6") STOP 306
+ if ("6" /= achar ( ichar ( "6"))) STOP 307
i = 54
c = "6"
- if (achar(i) /= "6") call abort
- if (iachar(c) /= iachar("6")) call abort
- if (iachar(achar(55)) /= 55) call abort
- if (iachar ("7")/= 55) call abort
- if (achar (55) /= "7") call abort
- if ("7" /= achar ( ichar ( "7"))) call abort
+ if (achar(i) /= "6") STOP 308
+ if (iachar(c) /= iachar("6")) STOP 309
+ if (iachar(achar(55)) /= 55) STOP 310
+ if (iachar ("7")/= 55) STOP 311
+ if (achar (55) /= "7") STOP 312
+ if ("7" /= achar ( ichar ( "7"))) STOP 313
i = 55
c = "7"
- if (achar(i) /= "7") call abort
- if (iachar(c) /= iachar("7")) call abort
- if (iachar(achar(56)) /= 56) call abort
- if (iachar ("8")/= 56) call abort
- if (achar (56) /= "8") call abort
- if ("8" /= achar ( ichar ( "8"))) call abort
+ if (achar(i) /= "7") STOP 314
+ if (iachar(c) /= iachar("7")) STOP 315
+ if (iachar(achar(56)) /= 56) STOP 316
+ if (iachar ("8")/= 56) STOP 317
+ if (achar (56) /= "8") STOP 318
+ if ("8" /= achar ( ichar ( "8"))) STOP 319
i = 56
c = "8"
- if (achar(i) /= "8") call abort
- if (iachar(c) /= iachar("8")) call abort
- if (iachar(achar(57)) /= 57) call abort
- if (iachar ("9")/= 57) call abort
- if (achar (57) /= "9") call abort
- if ("9" /= achar ( ichar ( "9"))) call abort
+ if (achar(i) /= "8") STOP 320
+ if (iachar(c) /= iachar("8")) STOP 321
+ if (iachar(achar(57)) /= 57) STOP 322
+ if (iachar ("9")/= 57) STOP 323
+ if (achar (57) /= "9") STOP 324
+ if ("9" /= achar ( ichar ( "9"))) STOP 325
i = 57
c = "9"
- if (achar(i) /= "9") call abort
- if (iachar(c) /= iachar("9")) call abort
- if (iachar(achar(58)) /= 58) call abort
- if (iachar (":")/= 58) call abort
- if (achar (58) /= ":") call abort
- if (":" /= achar ( ichar ( ":"))) call abort
+ if (achar(i) /= "9") STOP 326
+ if (iachar(c) /= iachar("9")) STOP 327
+ if (iachar(achar(58)) /= 58) STOP 328
+ if (iachar (":")/= 58) STOP 329
+ if (achar (58) /= ":") STOP 330
+ if (":" /= achar ( ichar ( ":"))) STOP 331
i = 58
c = ":"
- if (achar(i) /= ":") call abort
- if (iachar(c) /= iachar(":")) call abort
- if (iachar(achar(59)) /= 59) call abort
- if (iachar (";")/= 59) call abort
- if (achar (59) /= ";") call abort
- if (";" /= achar ( ichar ( ";"))) call abort
+ if (achar(i) /= ":") STOP 332
+ if (iachar(c) /= iachar(":")) STOP 333
+ if (iachar(achar(59)) /= 59) STOP 334
+ if (iachar (";")/= 59) STOP 335
+ if (achar (59) /= ";") STOP 336
+ if (";" /= achar ( ichar ( ";"))) STOP 337
i = 59
c = ";"
- if (achar(i) /= ";") call abort
- if (iachar(c) /= iachar(";")) call abort
- if (iachar(achar(60)) /= 60) call abort
- if (iachar ("<")/= 60) call abort
- if (achar (60) /= "<") call abort
- if ("<" /= achar ( ichar ( "<"))) call abort
+ if (achar(i) /= ";") STOP 338
+ if (iachar(c) /= iachar(";")) STOP 339
+ if (iachar(achar(60)) /= 60) STOP 340
+ if (iachar ("<")/= 60) STOP 341
+ if (achar (60) /= "<") STOP 342
+ if ("<" /= achar ( ichar ( "<"))) STOP 343
i = 60
c = "<"
- if (achar(i) /= "<") call abort
- if (iachar(c) /= iachar("<")) call abort
- if (iachar(achar(61)) /= 61) call abort
- if (iachar ("=")/= 61) call abort
- if (achar (61) /= "=") call abort
- if ("=" /= achar ( ichar ( "="))) call abort
+ if (achar(i) /= "<") STOP 344
+ if (iachar(c) /= iachar("<")) STOP 345
+ if (iachar(achar(61)) /= 61) STOP 346
+ if (iachar ("=")/= 61) STOP 347
+ if (achar (61) /= "=") STOP 348
+ if ("=" /= achar ( ichar ( "="))) STOP 349
i = 61
c = "="
- if (achar(i) /= "=") call abort
- if (iachar(c) /= iachar("=")) call abort
- if (iachar(achar(62)) /= 62) call abort
- if (iachar (">")/= 62) call abort
- if (achar (62) /= ">") call abort
- if (">" /= achar ( ichar ( ">"))) call abort
+ if (achar(i) /= "=") STOP 350
+ if (iachar(c) /= iachar("=")) STOP 351
+ if (iachar(achar(62)) /= 62) STOP 352
+ if (iachar (">")/= 62) STOP 353
+ if (achar (62) /= ">") STOP 354
+ if (">" /= achar ( ichar ( ">"))) STOP 355
i = 62
c = ">"
- if (achar(i) /= ">") call abort
- if (iachar(c) /= iachar(">")) call abort
- if (iachar(achar(63)) /= 63) call abort
- if (iachar ("?")/= 63) call abort
- if (achar (63) /= "?") call abort
- if ("?" /= achar ( ichar ( "?"))) call abort
+ if (achar(i) /= ">") STOP 356
+ if (iachar(c) /= iachar(">")) STOP 357
+ if (iachar(achar(63)) /= 63) STOP 358
+ if (iachar ("?")/= 63) STOP 359
+ if (achar (63) /= "?") STOP 360
+ if ("?" /= achar ( ichar ( "?"))) STOP 361
i = 63
c = "?"
- if (achar(i) /= "?") call abort
- if (iachar(c) /= iachar("?")) call abort
- if (iachar(achar(64)) /= 64) call abort
- if (iachar ("@")/= 64) call abort
- if (achar (64) /= "@") call abort
- if ("@" /= achar ( ichar ( "@"))) call abort
+ if (achar(i) /= "?") STOP 362
+ if (iachar(c) /= iachar("?")) STOP 363
+ if (iachar(achar(64)) /= 64) STOP 364
+ if (iachar ("@")/= 64) STOP 365
+ if (achar (64) /= "@") STOP 366
+ if ("@" /= achar ( ichar ( "@"))) STOP 367
i = 64
c = "@"
- if (achar(i) /= "@") call abort
- if (iachar(c) /= iachar("@")) call abort
- if (iachar(achar(65)) /= 65) call abort
- if (iachar ("A")/= 65) call abort
- if (achar (65) /= "A") call abort
- if ("A" /= achar ( ichar ( "A"))) call abort
+ if (achar(i) /= "@") STOP 368
+ if (iachar(c) /= iachar("@")) STOP 369
+ if (iachar(achar(65)) /= 65) STOP 370
+ if (iachar ("A")/= 65) STOP 371
+ if (achar (65) /= "A") STOP 372
+ if ("A" /= achar ( ichar ( "A"))) STOP 373
i = 65
c = "A"
- if (achar(i) /= "A") call abort
- if (iachar(c) /= iachar("A")) call abort
- if (iachar(achar(66)) /= 66) call abort
- if (iachar ("B")/= 66) call abort
- if (achar (66) /= "B") call abort
- if ("B" /= achar ( ichar ( "B"))) call abort
+ if (achar(i) /= "A") STOP 374
+ if (iachar(c) /= iachar("A")) STOP 375
+ if (iachar(achar(66)) /= 66) STOP 376
+ if (iachar ("B")/= 66) STOP 377
+ if (achar (66) /= "B") STOP 378
+ if ("B" /= achar ( ichar ( "B"))) STOP 379
i = 66
c = "B"
- if (achar(i) /= "B") call abort
- if (iachar(c) /= iachar("B")) call abort
- if (iachar(achar(67)) /= 67) call abort
- if (iachar ("C")/= 67) call abort
- if (achar (67) /= "C") call abort
- if ("C" /= achar ( ichar ( "C"))) call abort
+ if (achar(i) /= "B") STOP 380
+ if (iachar(c) /= iachar("B")) STOP 381
+ if (iachar(achar(67)) /= 67) STOP 382
+ if (iachar ("C")/= 67) STOP 383
+ if (achar (67) /= "C") STOP 384
+ if ("C" /= achar ( ichar ( "C"))) STOP 385
i = 67
c = "C"
- if (achar(i) /= "C") call abort
- if (iachar(c) /= iachar("C")) call abort
- if (iachar(achar(68)) /= 68) call abort
- if (iachar ("D")/= 68) call abort
- if (achar (68) /= "D") call abort
- if ("D" /= achar ( ichar ( "D"))) call abort
+ if (achar(i) /= "C") STOP 386
+ if (iachar(c) /= iachar("C")) STOP 387
+ if (iachar(achar(68)) /= 68) STOP 388
+ if (iachar ("D")/= 68) STOP 389
+ if (achar (68) /= "D") STOP 390
+ if ("D" /= achar ( ichar ( "D"))) STOP 391
i = 68
c = "D"
- if (achar(i) /= "D") call abort
- if (iachar(c) /= iachar("D")) call abort
- if (iachar(achar(69)) /= 69) call abort
- if (iachar ("E")/= 69) call abort
- if (achar (69) /= "E") call abort
- if ("E" /= achar ( ichar ( "E"))) call abort
+ if (achar(i) /= "D") STOP 392
+ if (iachar(c) /= iachar("D")) STOP 393
+ if (iachar(achar(69)) /= 69) STOP 394
+ if (iachar ("E")/= 69) STOP 395
+ if (achar (69) /= "E") STOP 396
+ if ("E" /= achar ( ichar ( "E"))) STOP 397
i = 69
c = "E"
- if (achar(i) /= "E") call abort
- if (iachar(c) /= iachar("E")) call abort
- if (iachar(achar(70)) /= 70) call abort
- if (iachar ("F")/= 70) call abort
- if (achar (70) /= "F") call abort
- if ("F" /= achar ( ichar ( "F"))) call abort
+ if (achar(i) /= "E") STOP 398
+ if (iachar(c) /= iachar("E")) STOP 399
+ if (iachar(achar(70)) /= 70) STOP 400
+ if (iachar ("F")/= 70) STOP 401
+ if (achar (70) /= "F") STOP 402
+ if ("F" /= achar ( ichar ( "F"))) STOP 403
i = 70
c = "F"
- if (achar(i) /= "F") call abort
- if (iachar(c) /= iachar("F")) call abort
- if (iachar(achar(71)) /= 71) call abort
- if (iachar ("G")/= 71) call abort
- if (achar (71) /= "G") call abort
- if ("G" /= achar ( ichar ( "G"))) call abort
+ if (achar(i) /= "F") STOP 404
+ if (iachar(c) /= iachar("F")) STOP 405
+ if (iachar(achar(71)) /= 71) STOP 406
+ if (iachar ("G")/= 71) STOP 407
+ if (achar (71) /= "G") STOP 408
+ if ("G" /= achar ( ichar ( "G"))) STOP 409
i = 71
c = "G"
- if (achar(i) /= "G") call abort
- if (iachar(c) /= iachar("G")) call abort
- if (iachar(achar(72)) /= 72) call abort
- if (iachar ("H")/= 72) call abort
- if (achar (72) /= "H") call abort
- if ("H" /= achar ( ichar ( "H"))) call abort
+ if (achar(i) /= "G") STOP 410
+ if (iachar(c) /= iachar("G")) STOP 411
+ if (iachar(achar(72)) /= 72) STOP 412
+ if (iachar ("H")/= 72) STOP 413
+ if (achar (72) /= "H") STOP 414
+ if ("H" /= achar ( ichar ( "H"))) STOP 415
i = 72
c = "H"
- if (achar(i) /= "H") call abort
- if (iachar(c) /= iachar("H")) call abort
- if (iachar(achar(73)) /= 73) call abort
- if (iachar ("I")/= 73) call abort
- if (achar (73) /= "I") call abort
- if ("I" /= achar ( ichar ( "I"))) call abort
+ if (achar(i) /= "H") STOP 416
+ if (iachar(c) /= iachar("H")) STOP 417
+ if (iachar(achar(73)) /= 73) STOP 418
+ if (iachar ("I")/= 73) STOP 419
+ if (achar (73) /= "I") STOP 420
+ if ("I" /= achar ( ichar ( "I"))) STOP 421
i = 73
c = "I"
- if (achar(i) /= "I") call abort
- if (iachar(c) /= iachar("I")) call abort
- if (iachar(achar(74)) /= 74) call abort
- if (iachar ("J")/= 74) call abort
- if (achar (74) /= "J") call abort
- if ("J" /= achar ( ichar ( "J"))) call abort
+ if (achar(i) /= "I") STOP 422
+ if (iachar(c) /= iachar("I")) STOP 423
+ if (iachar(achar(74)) /= 74) STOP 424
+ if (iachar ("J")/= 74) STOP 425
+ if (achar (74) /= "J") STOP 426
+ if ("J" /= achar ( ichar ( "J"))) STOP 427
i = 74
c = "J"
- if (achar(i) /= "J") call abort
- if (iachar(c) /= iachar("J")) call abort
- if (iachar(achar(75)) /= 75) call abort
- if (iachar ("K")/= 75) call abort
- if (achar (75) /= "K") call abort
- if ("K" /= achar ( ichar ( "K"))) call abort
+ if (achar(i) /= "J") STOP 428
+ if (iachar(c) /= iachar("J")) STOP 429
+ if (iachar(achar(75)) /= 75) STOP 430
+ if (iachar ("K")/= 75) STOP 431
+ if (achar (75) /= "K") STOP 432
+ if ("K" /= achar ( ichar ( "K"))) STOP 433
i = 75
c = "K"
- if (achar(i) /= "K") call abort
- if (iachar(c) /= iachar("K")) call abort
- if (iachar(achar(76)) /= 76) call abort
- if (iachar ("L")/= 76) call abort
- if (achar (76) /= "L") call abort
- if ("L" /= achar ( ichar ( "L"))) call abort
+ if (achar(i) /= "K") STOP 434
+ if (iachar(c) /= iachar("K")) STOP 435
+ if (iachar(achar(76)) /= 76) STOP 436
+ if (iachar ("L")/= 76) STOP 437
+ if (achar (76) /= "L") STOP 438
+ if ("L" /= achar ( ichar ( "L"))) STOP 439
i = 76
c = "L"
- if (achar(i) /= "L") call abort
- if (iachar(c) /= iachar("L")) call abort
- if (iachar(achar(77)) /= 77) call abort
- if (iachar ("M")/= 77) call abort
- if (achar (77) /= "M") call abort
- if ("M" /= achar ( ichar ( "M"))) call abort
+ if (achar(i) /= "L") STOP 440
+ if (iachar(c) /= iachar("L")) STOP 441
+ if (iachar(achar(77)) /= 77) STOP 442
+ if (iachar ("M")/= 77) STOP 443
+ if (achar (77) /= "M") STOP 444
+ if ("M" /= achar ( ichar ( "M"))) STOP 445
i = 77
c = "M"
- if (achar(i) /= "M") call abort
- if (iachar(c) /= iachar("M")) call abort
- if (iachar(achar(78)) /= 78) call abort
- if (iachar ("N")/= 78) call abort
- if (achar (78) /= "N") call abort
- if ("N" /= achar ( ichar ( "N"))) call abort
+ if (achar(i) /= "M") STOP 446
+ if (iachar(c) /= iachar("M")) STOP 447
+ if (iachar(achar(78)) /= 78) STOP 448
+ if (iachar ("N")/= 78) STOP 449
+ if (achar (78) /= "N") STOP 450
+ if ("N" /= achar ( ichar ( "N"))) STOP 451
i = 78
c = "N"
- if (achar(i) /= "N") call abort
- if (iachar(c) /= iachar("N")) call abort
- if (iachar(achar(79)) /= 79) call abort
- if (iachar ("O")/= 79) call abort
- if (achar (79) /= "O") call abort
- if ("O" /= achar ( ichar ( "O"))) call abort
+ if (achar(i) /= "N") STOP 452
+ if (iachar(c) /= iachar("N")) STOP 453
+ if (iachar(achar(79)) /= 79) STOP 454
+ if (iachar ("O")/= 79) STOP 455
+ if (achar (79) /= "O") STOP 456
+ if ("O" /= achar ( ichar ( "O"))) STOP 457
i = 79
c = "O"
- if (achar(i) /= "O") call abort
- if (iachar(c) /= iachar("O")) call abort
- if (iachar(achar(80)) /= 80) call abort
- if (iachar ("P")/= 80) call abort
- if (achar (80) /= "P") call abort
- if ("P" /= achar ( ichar ( "P"))) call abort
+ if (achar(i) /= "O") STOP 458
+ if (iachar(c) /= iachar("O")) STOP 459
+ if (iachar(achar(80)) /= 80) STOP 460
+ if (iachar ("P")/= 80) STOP 461
+ if (achar (80) /= "P") STOP 462
+ if ("P" /= achar ( ichar ( "P"))) STOP 463
i = 80
c = "P"
- if (achar(i) /= "P") call abort
- if (iachar(c) /= iachar("P")) call abort
- if (iachar(achar(81)) /= 81) call abort
- if (iachar ("Q")/= 81) call abort
- if (achar (81) /= "Q") call abort
- if ("Q" /= achar ( ichar ( "Q"))) call abort
+ if (achar(i) /= "P") STOP 464
+ if (iachar(c) /= iachar("P")) STOP 465
+ if (iachar(achar(81)) /= 81) STOP 466
+ if (iachar ("Q")/= 81) STOP 467
+ if (achar (81) /= "Q") STOP 468
+ if ("Q" /= achar ( ichar ( "Q"))) STOP 469
i = 81
c = "Q"
- if (achar(i) /= "Q") call abort
- if (iachar(c) /= iachar("Q")) call abort
- if (iachar(achar(82)) /= 82) call abort
- if (iachar ("R")/= 82) call abort
- if (achar (82) /= "R") call abort
- if ("R" /= achar ( ichar ( "R"))) call abort
+ if (achar(i) /= "Q") STOP 470
+ if (iachar(c) /= iachar("Q")) STOP 471
+ if (iachar(achar(82)) /= 82) STOP 472
+ if (iachar ("R")/= 82) STOP 473
+ if (achar (82) /= "R") STOP 474
+ if ("R" /= achar ( ichar ( "R"))) STOP 475
i = 82
c = "R"
- if (achar(i) /= "R") call abort
- if (iachar(c) /= iachar("R")) call abort
- if (iachar(achar(83)) /= 83) call abort
- if (iachar ("S")/= 83) call abort
- if (achar (83) /= "S") call abort
- if ("S" /= achar ( ichar ( "S"))) call abort
+ if (achar(i) /= "R") STOP 476
+ if (iachar(c) /= iachar("R")) STOP 477
+ if (iachar(achar(83)) /= 83) STOP 478
+ if (iachar ("S")/= 83) STOP 479
+ if (achar (83) /= "S") STOP 480
+ if ("S" /= achar ( ichar ( "S"))) STOP 481
i = 83
c = "S"
- if (achar(i) /= "S") call abort
- if (iachar(c) /= iachar("S")) call abort
- if (iachar(achar(84)) /= 84) call abort
- if (iachar ("T")/= 84) call abort
- if (achar (84) /= "T") call abort
- if ("T" /= achar ( ichar ( "T"))) call abort
+ if (achar(i) /= "S") STOP 482
+ if (iachar(c) /= iachar("S")) STOP 483
+ if (iachar(achar(84)) /= 84) STOP 484
+ if (iachar ("T")/= 84) STOP 485
+ if (achar (84) /= "T") STOP 486
+ if ("T" /= achar ( ichar ( "T"))) STOP 487
i = 84
c = "T"
- if (achar(i) /= "T") call abort
- if (iachar(c) /= iachar("T")) call abort
- if (iachar(achar(85)) /= 85) call abort
- if (iachar ("U")/= 85) call abort
- if (achar (85) /= "U") call abort
- if ("U" /= achar ( ichar ( "U"))) call abort
+ if (achar(i) /= "T") STOP 488
+ if (iachar(c) /= iachar("T")) STOP 489
+ if (iachar(achar(85)) /= 85) STOP 490
+ if (iachar ("U")/= 85) STOP 491
+ if (achar (85) /= "U") STOP 492
+ if ("U" /= achar ( ichar ( "U"))) STOP 493
i = 85
c = "U"
- if (achar(i) /= "U") call abort
- if (iachar(c) /= iachar("U")) call abort
- if (iachar(achar(86)) /= 86) call abort
- if (iachar ("V")/= 86) call abort
- if (achar (86) /= "V") call abort
- if ("V" /= achar ( ichar ( "V"))) call abort
+ if (achar(i) /= "U") STOP 494
+ if (iachar(c) /= iachar("U")) STOP 495
+ if (iachar(achar(86)) /= 86) STOP 496
+ if (iachar ("V")/= 86) STOP 497
+ if (achar (86) /= "V") STOP 498
+ if ("V" /= achar ( ichar ( "V"))) STOP 499
i = 86
c = "V"
- if (achar(i) /= "V") call abort
- if (iachar(c) /= iachar("V")) call abort
- if (iachar(achar(87)) /= 87) call abort
- if (iachar ("W")/= 87) call abort
- if (achar (87) /= "W") call abort
- if ("W" /= achar ( ichar ( "W"))) call abort
+ if (achar(i) /= "V") STOP 500
+ if (iachar(c) /= iachar("V")) STOP 501
+ if (iachar(achar(87)) /= 87) STOP 502
+ if (iachar ("W")/= 87) STOP 503
+ if (achar (87) /= "W") STOP 504
+ if ("W" /= achar ( ichar ( "W"))) STOP 505
i = 87
c = "W"
- if (achar(i) /= "W") call abort
- if (iachar(c) /= iachar("W")) call abort
- if (iachar(achar(88)) /= 88) call abort
- if (iachar ("X")/= 88) call abort
- if (achar (88) /= "X") call abort
- if ("X" /= achar ( ichar ( "X"))) call abort
+ if (achar(i) /= "W") STOP 506
+ if (iachar(c) /= iachar("W")) STOP 507
+ if (iachar(achar(88)) /= 88) STOP 508
+ if (iachar ("X")/= 88) STOP 509
+ if (achar (88) /= "X") STOP 510
+ if ("X" /= achar ( ichar ( "X"))) STOP 511
i = 88
c = "X"
- if (achar(i) /= "X") call abort
- if (iachar(c) /= iachar("X")) call abort
- if (iachar(achar(89)) /= 89) call abort
- if (iachar ("Y")/= 89) call abort
- if (achar (89) /= "Y") call abort
- if ("Y" /= achar ( ichar ( "Y"))) call abort
+ if (achar(i) /= "X") STOP 512
+ if (iachar(c) /= iachar("X")) STOP 513
+ if (iachar(achar(89)) /= 89) STOP 514
+ if (iachar ("Y")/= 89) STOP 515
+ if (achar (89) /= "Y") STOP 516
+ if ("Y" /= achar ( ichar ( "Y"))) STOP 517
i = 89
c = "Y"
- if (achar(i) /= "Y") call abort
- if (iachar(c) /= iachar("Y")) call abort
- if (iachar(achar(90)) /= 90) call abort
- if (iachar ("Z")/= 90) call abort
- if (achar (90) /= "Z") call abort
- if ("Z" /= achar ( ichar ( "Z"))) call abort
+ if (achar(i) /= "Y") STOP 518
+ if (iachar(c) /= iachar("Y")) STOP 519
+ if (iachar(achar(90)) /= 90) STOP 520
+ if (iachar ("Z")/= 90) STOP 521
+ if (achar (90) /= "Z") STOP 522
+ if ("Z" /= achar ( ichar ( "Z"))) STOP 523
i = 90
c = "Z"
- if (achar(i) /= "Z") call abort
- if (iachar(c) /= iachar("Z")) call abort
- if (iachar(achar(91)) /= 91) call abort
- if (iachar ("[")/= 91) call abort
- if (achar (91) /= "[") call abort
- if ("[" /= achar ( ichar ( "["))) call abort
+ if (achar(i) /= "Z") STOP 524
+ if (iachar(c) /= iachar("Z")) STOP 525
+ if (iachar(achar(91)) /= 91) STOP 526
+ if (iachar ("[")/= 91) STOP 527
+ if (achar (91) /= "[") STOP 528
+ if ("[" /= achar ( ichar ( "["))) STOP 529
i = 91
c = "["
- if (achar(i) /= "[") call abort
- if (iachar(c) /= iachar("[")) call abort
- if (iachar(achar(92)) /= 92) call abort
- if (iachar ("\")/= 92) call abort
- if (achar (92) /= "\") call abort
- if ("\" /= achar ( ichar ( "\"))) call abort
+ if (achar(i) /= "[") STOP 530
+ if (iachar(c) /= iachar("[")) STOP 531
+ if (iachar(achar(92)) /= 92) STOP 532
+ if (iachar ("\")/= 92) STOP 533
+ if (achar (92) /= "\") STOP 534
+ if ("\" /= achar ( ichar ( "\"))) STOP 535
i = 92
c = "\"
- if (achar(i) /= "\") call abort
- if (iachar(c) /= iachar("\")) call abort
- if (iachar(achar(93)) /= 93) call abort
- if (iachar ("]")/= 93) call abort
- if (achar (93) /= "]") call abort
- if ("]" /= achar ( ichar ( "]"))) call abort
+ if (achar(i) /= "\") STOP 536
+ if (iachar(c) /= iachar("\")) STOP 537
+ if (iachar(achar(93)) /= 93) STOP 538
+ if (iachar ("]")/= 93) STOP 539
+ if (achar (93) /= "]") STOP 540
+ if ("]" /= achar ( ichar ( "]"))) STOP 541
i = 93
c = "]"
- if (achar(i) /= "]") call abort
- if (iachar(c) /= iachar("]")) call abort
- if (iachar(achar(94)) /= 94) call abort
- if (iachar ("^")/= 94) call abort
- if (achar (94) /= "^") call abort
- if ("^" /= achar ( ichar ( "^"))) call abort
+ if (achar(i) /= "]") STOP 542
+ if (iachar(c) /= iachar("]")) STOP 543
+ if (iachar(achar(94)) /= 94) STOP 544
+ if (iachar ("^")/= 94) STOP 545
+ if (achar (94) /= "^") STOP 546
+ if ("^" /= achar ( ichar ( "^"))) STOP 547
i = 94
c = "^"
- if (achar(i) /= "^") call abort
- if (iachar(c) /= iachar("^")) call abort
- if (iachar(achar(95)) /= 95) call abort
- if (iachar ("_")/= 95) call abort
- if (achar (95) /= "_") call abort
- if ("_" /= achar ( ichar ( "_"))) call abort
+ if (achar(i) /= "^") STOP 548
+ if (iachar(c) /= iachar("^")) STOP 549
+ if (iachar(achar(95)) /= 95) STOP 550
+ if (iachar ("_")/= 95) STOP 551
+ if (achar (95) /= "_") STOP 552
+ if ("_" /= achar ( ichar ( "_"))) STOP 553
i = 95
c = "_"
- if (achar(i) /= "_") call abort
- if (iachar(c) /= iachar("_")) call abort
- if (iachar(achar(96)) /= 96) call abort
- if (iachar ("`")/= 96) call abort
- if (achar (96) /= "`") call abort
- if ("`" /= achar ( ichar ( "`"))) call abort
+ if (achar(i) /= "_") STOP 554
+ if (iachar(c) /= iachar("_")) STOP 555
+ if (iachar(achar(96)) /= 96) STOP 556
+ if (iachar ("`")/= 96) STOP 557
+ if (achar (96) /= "`") STOP 558
+ if ("`" /= achar ( ichar ( "`"))) STOP 559
i = 96
c = "`"
- if (achar(i) /= "`") call abort
- if (iachar(c) /= iachar("`")) call abort
- if (iachar(achar(97)) /= 97) call abort
- if (iachar ("a")/= 97) call abort
- if (achar (97) /= "a") call abort
- if ("a" /= achar ( ichar ( "a"))) call abort
+ if (achar(i) /= "`") STOP 560
+ if (iachar(c) /= iachar("`")) STOP 561
+ if (iachar(achar(97)) /= 97) STOP 562
+ if (iachar ("a")/= 97) STOP 563
+ if (achar (97) /= "a") STOP 564
+ if ("a" /= achar ( ichar ( "a"))) STOP 565
i = 97
c = "a"
- if (achar(i) /= "a") call abort
- if (iachar(c) /= iachar("a")) call abort
- if (iachar(achar(98)) /= 98) call abort
- if (iachar ("b")/= 98) call abort
- if (achar (98) /= "b") call abort
- if ("b" /= achar ( ichar ( "b"))) call abort
+ if (achar(i) /= "a") STOP 566
+ if (iachar(c) /= iachar("a")) STOP 567
+ if (iachar(achar(98)) /= 98) STOP 568
+ if (iachar ("b")/= 98) STOP 569
+ if (achar (98) /= "b") STOP 570
+ if ("b" /= achar ( ichar ( "b"))) STOP 571
i = 98
c = "b"
- if (achar(i) /= "b") call abort
- if (iachar(c) /= iachar("b")) call abort
- if (iachar(achar(99)) /= 99) call abort
- if (iachar ("c")/= 99) call abort
- if (achar (99) /= "c") call abort
- if ("c" /= achar ( ichar ( "c"))) call abort
+ if (achar(i) /= "b") STOP 572
+ if (iachar(c) /= iachar("b")) STOP 573
+ if (iachar(achar(99)) /= 99) STOP 574
+ if (iachar ("c")/= 99) STOP 575
+ if (achar (99) /= "c") STOP 576
+ if ("c" /= achar ( ichar ( "c"))) STOP 577
i = 99
c = "c"
- if (achar(i) /= "c") call abort
- if (iachar(c) /= iachar("c")) call abort
- if (iachar(achar(100)) /= 100) call abort
- if (iachar ("d")/= 100) call abort
- if (achar (100) /= "d") call abort
- if ("d" /= achar ( ichar ( "d"))) call abort
+ if (achar(i) /= "c") STOP 578
+ if (iachar(c) /= iachar("c")) STOP 579
+ if (iachar(achar(100)) /= 100) STOP 580
+ if (iachar ("d")/= 100) STOP 581
+ if (achar (100) /= "d") STOP 582
+ if ("d" /= achar ( ichar ( "d"))) STOP 583
i = 100
c = "d"
- if (achar(i) /= "d") call abort
- if (iachar(c) /= iachar("d")) call abort
- if (iachar(achar(101)) /= 101) call abort
- if (iachar ("e")/= 101) call abort
- if (achar (101) /= "e") call abort
- if ("e" /= achar ( ichar ( "e"))) call abort
+ if (achar(i) /= "d") STOP 584
+ if (iachar(c) /= iachar("d")) STOP 585
+ if (iachar(achar(101)) /= 101) STOP 586
+ if (iachar ("e")/= 101) STOP 587
+ if (achar (101) /= "e") STOP 588
+ if ("e" /= achar ( ichar ( "e"))) STOP 589
i = 101
c = "e"
- if (achar(i) /= "e") call abort
- if (iachar(c) /= iachar("e")) call abort
- if (iachar(achar(102)) /= 102) call abort
- if (iachar ("f")/= 102) call abort
- if (achar (102) /= "f") call abort
- if ("f" /= achar ( ichar ( "f"))) call abort
+ if (achar(i) /= "e") STOP 590
+ if (iachar(c) /= iachar("e")) STOP 591
+ if (iachar(achar(102)) /= 102) STOP 592
+ if (iachar ("f")/= 102) STOP 593
+ if (achar (102) /= "f") STOP 594
+ if ("f" /= achar ( ichar ( "f"))) STOP 595
i = 102
c = "f"
- if (achar(i) /= "f") call abort
- if (iachar(c) /= iachar("f")) call abort
- if (iachar(achar(103)) /= 103) call abort
- if (iachar ("g")/= 103) call abort
- if (achar (103) /= "g") call abort
- if ("g" /= achar ( ichar ( "g"))) call abort
+ if (achar(i) /= "f") STOP 596
+ if (iachar(c) /= iachar("f")) STOP 597
+ if (iachar(achar(103)) /= 103) STOP 598
+ if (iachar ("g")/= 103) STOP 599
+ if (achar (103) /= "g") STOP 600
+ if ("g" /= achar ( ichar ( "g"))) STOP 601
i = 103
c = "g"
- if (achar(i) /= "g") call abort
- if (iachar(c) /= iachar("g")) call abort
- if (iachar(achar(104)) /= 104) call abort
- if (iachar ("h")/= 104) call abort
- if (achar (104) /= "h") call abort
- if ("h" /= achar ( ichar ( "h"))) call abort
+ if (achar(i) /= "g") STOP 602
+ if (iachar(c) /= iachar("g")) STOP 603
+ if (iachar(achar(104)) /= 104) STOP 604
+ if (iachar ("h")/= 104) STOP 605
+ if (achar (104) /= "h") STOP 606
+ if ("h" /= achar ( ichar ( "h"))) STOP 607
i = 104
c = "h"
- if (achar(i) /= "h") call abort
- if (iachar(c) /= iachar("h")) call abort
- if (iachar(achar(105)) /= 105) call abort
- if (iachar ("i")/= 105) call abort
- if (achar (105) /= "i") call abort
- if ("i" /= achar ( ichar ( "i"))) call abort
+ if (achar(i) /= "h") STOP 608
+ if (iachar(c) /= iachar("h")) STOP 609
+ if (iachar(achar(105)) /= 105) STOP 610
+ if (iachar ("i")/= 105) STOP 611
+ if (achar (105) /= "i") STOP 612
+ if ("i" /= achar ( ichar ( "i"))) STOP 613
i = 105
c = "i"
- if (achar(i) /= "i") call abort
- if (iachar(c) /= iachar("i")) call abort
- if (iachar(achar(106)) /= 106) call abort
- if (iachar ("j")/= 106) call abort
- if (achar (106) /= "j") call abort
- if ("j" /= achar ( ichar ( "j"))) call abort
+ if (achar(i) /= "i") STOP 614
+ if (iachar(c) /= iachar("i")) STOP 615
+ if (iachar(achar(106)) /= 106) STOP 616
+ if (iachar ("j")/= 106) STOP 617
+ if (achar (106) /= "j") STOP 618
+ if ("j" /= achar ( ichar ( "j"))) STOP 619
i = 106
c = "j"
- if (achar(i) /= "j") call abort
- if (iachar(c) /= iachar("j")) call abort
- if (iachar(achar(107)) /= 107) call abort
- if (iachar ("k")/= 107) call abort
- if (achar (107) /= "k") call abort
- if ("k" /= achar ( ichar ( "k"))) call abort
+ if (achar(i) /= "j") STOP 620
+ if (iachar(c) /= iachar("j")) STOP 621
+ if (iachar(achar(107)) /= 107) STOP 622
+ if (iachar ("k")/= 107) STOP 623
+ if (achar (107) /= "k") STOP 624
+ if ("k" /= achar ( ichar ( "k"))) STOP 625
i = 107
c = "k"
- if (achar(i) /= "k") call abort
- if (iachar(c) /= iachar("k")) call abort
- if (iachar(achar(108)) /= 108) call abort
- if (iachar ("l")/= 108) call abort
- if (achar (108) /= "l") call abort
- if ("l" /= achar ( ichar ( "l"))) call abort
+ if (achar(i) /= "k") STOP 626
+ if (iachar(c) /= iachar("k")) STOP 627
+ if (iachar(achar(108)) /= 108) STOP 628
+ if (iachar ("l")/= 108) STOP 629
+ if (achar (108) /= "l") STOP 630
+ if ("l" /= achar ( ichar ( "l"))) STOP 631
i = 108
c = "l"
- if (achar(i) /= "l") call abort
- if (iachar(c) /= iachar("l")) call abort
- if (iachar(achar(109)) /= 109) call abort
- if (iachar ("m")/= 109) call abort
- if (achar (109) /= "m") call abort
- if ("m" /= achar ( ichar ( "m"))) call abort
+ if (achar(i) /= "l") STOP 632
+ if (iachar(c) /= iachar("l")) STOP 633
+ if (iachar(achar(109)) /= 109) STOP 634
+ if (iachar ("m")/= 109) STOP 635
+ if (achar (109) /= "m") STOP 636
+ if ("m" /= achar ( ichar ( "m"))) STOP 637
i = 109
c = "m"
- if (achar(i) /= "m") call abort
- if (iachar(c) /= iachar("m")) call abort
- if (iachar(achar(110)) /= 110) call abort
- if (iachar ("n")/= 110) call abort
- if (achar (110) /= "n") call abort
- if ("n" /= achar ( ichar ( "n"))) call abort
+ if (achar(i) /= "m") STOP 638
+ if (iachar(c) /= iachar("m")) STOP 639
+ if (iachar(achar(110)) /= 110) STOP 640
+ if (iachar ("n")/= 110) STOP 641
+ if (achar (110) /= "n") STOP 642
+ if ("n" /= achar ( ichar ( "n"))) STOP 643
i = 110
c = "n"
- if (achar(i) /= "n") call abort
- if (iachar(c) /= iachar("n")) call abort
- if (iachar(achar(111)) /= 111) call abort
- if (iachar ("o")/= 111) call abort
- if (achar (111) /= "o") call abort
- if ("o" /= achar ( ichar ( "o"))) call abort
+ if (achar(i) /= "n") STOP 644
+ if (iachar(c) /= iachar("n")) STOP 645
+ if (iachar(achar(111)) /= 111) STOP 646
+ if (iachar ("o")/= 111) STOP 647
+ if (achar (111) /= "o") STOP 648
+ if ("o" /= achar ( ichar ( "o"))) STOP 649
i = 111
c = "o"
- if (achar(i) /= "o") call abort
- if (iachar(c) /= iachar("o")) call abort
- if (iachar(achar(112)) /= 112) call abort
- if (iachar ("p")/= 112) call abort
- if (achar (112) /= "p") call abort
- if ("p" /= achar ( ichar ( "p"))) call abort
+ if (achar(i) /= "o") STOP 650
+ if (iachar(c) /= iachar("o")) STOP 651
+ if (iachar(achar(112)) /= 112) STOP 652
+ if (iachar ("p")/= 112) STOP 653
+ if (achar (112) /= "p") STOP 654
+ if ("p" /= achar ( ichar ( "p"))) STOP 655
i = 112
c = "p"
- if (achar(i) /= "p") call abort
- if (iachar(c) /= iachar("p")) call abort
- if (iachar(achar(113)) /= 113) call abort
- if (iachar ("q")/= 113) call abort
- if (achar (113) /= "q") call abort
- if ("q" /= achar ( ichar ( "q"))) call abort
+ if (achar(i) /= "p") STOP 656
+ if (iachar(c) /= iachar("p")) STOP 657
+ if (iachar(achar(113)) /= 113) STOP 658
+ if (iachar ("q")/= 113) STOP 659
+ if (achar (113) /= "q") STOP 660
+ if ("q" /= achar ( ichar ( "q"))) STOP 661
i = 113
c = "q"
- if (achar(i) /= "q") call abort
- if (iachar(c) /= iachar("q")) call abort
- if (iachar(achar(114)) /= 114) call abort
- if (iachar ("r")/= 114) call abort
- if (achar (114) /= "r") call abort
- if ("r" /= achar ( ichar ( "r"))) call abort
+ if (achar(i) /= "q") STOP 662
+ if (iachar(c) /= iachar("q")) STOP 663
+ if (iachar(achar(114)) /= 114) STOP 664
+ if (iachar ("r")/= 114) STOP 665
+ if (achar (114) /= "r") STOP 666
+ if ("r" /= achar ( ichar ( "r"))) STOP 667
i = 114
c = "r"
- if (achar(i) /= "r") call abort
- if (iachar(c) /= iachar("r")) call abort
- if (iachar(achar(115)) /= 115) call abort
- if (iachar ("s")/= 115) call abort
- if (achar (115) /= "s") call abort
- if ("s" /= achar ( ichar ( "s"))) call abort
+ if (achar(i) /= "r") STOP 668
+ if (iachar(c) /= iachar("r")) STOP 669
+ if (iachar(achar(115)) /= 115) STOP 670
+ if (iachar ("s")/= 115) STOP 671
+ if (achar (115) /= "s") STOP 672
+ if ("s" /= achar ( ichar ( "s"))) STOP 673
i = 115
c = "s"
- if (achar(i) /= "s") call abort
- if (iachar(c) /= iachar("s")) call abort
- if (iachar(achar(116)) /= 116) call abort
- if (iachar ("t")/= 116) call abort
- if (achar (116) /= "t") call abort
- if ("t" /= achar ( ichar ( "t"))) call abort
+ if (achar(i) /= "s") STOP 674
+ if (iachar(c) /= iachar("s")) STOP 675
+ if (iachar(achar(116)) /= 116) STOP 676
+ if (iachar ("t")/= 116) STOP 677
+ if (achar (116) /= "t") STOP 678
+ if ("t" /= achar ( ichar ( "t"))) STOP 679
i = 116
c = "t"
- if (achar(i) /= "t") call abort
- if (iachar(c) /= iachar("t")) call abort
- if (iachar(achar(117)) /= 117) call abort
- if (iachar ("u")/= 117) call abort
- if (achar (117) /= "u") call abort
- if ("u" /= achar ( ichar ( "u"))) call abort
+ if (achar(i) /= "t") STOP 680
+ if (iachar(c) /= iachar("t")) STOP 681
+ if (iachar(achar(117)) /= 117) STOP 682
+ if (iachar ("u")/= 117) STOP 683
+ if (achar (117) /= "u") STOP 684
+ if ("u" /= achar ( ichar ( "u"))) STOP 685
i = 117
c = "u"
- if (achar(i) /= "u") call abort
- if (iachar(c) /= iachar("u")) call abort
- if (iachar(achar(118)) /= 118) call abort
- if (iachar ("v")/= 118) call abort
- if (achar (118) /= "v") call abort
- if ("v" /= achar ( ichar ( "v"))) call abort
+ if (achar(i) /= "u") STOP 686
+ if (iachar(c) /= iachar("u")) STOP 687
+ if (iachar(achar(118)) /= 118) STOP 688
+ if (iachar ("v")/= 118) STOP 689
+ if (achar (118) /= "v") STOP 690
+ if ("v" /= achar ( ichar ( "v"))) STOP 691
i = 118
c = "v"
- if (achar(i) /= "v") call abort
- if (iachar(c) /= iachar("v")) call abort
- if (iachar(achar(119)) /= 119) call abort
- if (iachar ("w")/= 119) call abort
- if (achar (119) /= "w") call abort
- if ("w" /= achar ( ichar ( "w"))) call abort
+ if (achar(i) /= "v") STOP 692
+ if (iachar(c) /= iachar("v")) STOP 693
+ if (iachar(achar(119)) /= 119) STOP 694
+ if (iachar ("w")/= 119) STOP 695
+ if (achar (119) /= "w") STOP 696
+ if ("w" /= achar ( ichar ( "w"))) STOP 697
i = 119
c = "w"
- if (achar(i) /= "w") call abort
- if (iachar(c) /= iachar("w")) call abort
- if (iachar(achar(120)) /= 120) call abort
- if (iachar ("x")/= 120) call abort
- if (achar (120) /= "x") call abort
- if ("x" /= achar ( ichar ( "x"))) call abort
+ if (achar(i) /= "w") STOP 698
+ if (iachar(c) /= iachar("w")) STOP 699
+ if (iachar(achar(120)) /= 120) STOP 700
+ if (iachar ("x")/= 120) STOP 701
+ if (achar (120) /= "x") STOP 702
+ if ("x" /= achar ( ichar ( "x"))) STOP 703
i = 120
c = "x"
- if (achar(i) /= "x") call abort
- if (iachar(c) /= iachar("x")) call abort
- if (iachar(achar(121)) /= 121) call abort
- if (iachar ("y")/= 121) call abort
- if (achar (121) /= "y") call abort
- if ("y" /= achar ( ichar ( "y"))) call abort
+ if (achar(i) /= "x") STOP 704
+ if (iachar(c) /= iachar("x")) STOP 705
+ if (iachar(achar(121)) /= 121) STOP 706
+ if (iachar ("y")/= 121) STOP 707
+ if (achar (121) /= "y") STOP 708
+ if ("y" /= achar ( ichar ( "y"))) STOP 709
i = 121
c = "y"
- if (achar(i) /= "y") call abort
- if (iachar(c) /= iachar("y")) call abort
- if (iachar(achar(122)) /= 122) call abort
- if (iachar ("z")/= 122) call abort
- if (achar (122) /= "z") call abort
- if ("z" /= achar ( ichar ( "z"))) call abort
+ if (achar(i) /= "y") STOP 710
+ if (iachar(c) /= iachar("y")) STOP 711
+ if (iachar(achar(122)) /= 122) STOP 712
+ if (iachar ("z")/= 122) STOP 713
+ if (achar (122) /= "z") STOP 714
+ if ("z" /= achar ( ichar ( "z"))) STOP 715
i = 122
c = "z"
- if (achar(i) /= "z") call abort
- if (iachar(c) /= iachar("z")) call abort
- if (iachar(achar(123)) /= 123) call abort
- if (iachar ("{")/= 123) call abort
- if (achar (123) /= "{") call abort
- if ("{" /= achar ( ichar ( "{"))) call abort
+ if (achar(i) /= "z") STOP 716
+ if (iachar(c) /= iachar("z")) STOP 717
+ if (iachar(achar(123)) /= 123) STOP 718
+ if (iachar ("{")/= 123) STOP 719
+ if (achar (123) /= "{") STOP 720
+ if ("{" /= achar ( ichar ( "{"))) STOP 721
i = 123
c = "{"
- if (achar(i) /= "{") call abort
- if (iachar(c) /= iachar("{")) call abort
- if (iachar(achar(124)) /= 124) call abort
- if (iachar ("|")/= 124) call abort
- if (achar (124) /= "|") call abort
- if ("|" /= achar ( ichar ( "|"))) call abort
+ if (achar(i) /= "{") STOP 722
+ if (iachar(c) /= iachar("{")) STOP 723
+ if (iachar(achar(124)) /= 124) STOP 724
+ if (iachar ("|")/= 124) STOP 725
+ if (achar (124) /= "|") STOP 726
+ if ("|" /= achar ( ichar ( "|"))) STOP 727
i = 124
c = "|"
- if (achar(i) /= "|") call abort
- if (iachar(c) /= iachar("|")) call abort
- if (iachar(achar(125)) /= 125) call abort
- if (iachar ("}")/= 125) call abort
- if (achar (125) /= "}") call abort
- if ("}" /= achar ( ichar ( "}"))) call abort
+ if (achar(i) /= "|") STOP 728
+ if (iachar(c) /= iachar("|")) STOP 729
+ if (iachar(achar(125)) /= 125) STOP 730
+ if (iachar ("}")/= 125) STOP 731
+ if (achar (125) /= "}") STOP 732
+ if ("}" /= achar ( ichar ( "}"))) STOP 733
i = 125
c = "}"
- if (achar(i) /= "}") call abort
- if (iachar(c) /= iachar("}")) call abort
- if (iachar(achar(126)) /= 126) call abort
- if (iachar ("~")/= 126) call abort
- if (achar (126) /= "~") call abort
- if ("~" /= achar ( ichar ( "~"))) call abort
+ if (achar(i) /= "}") STOP 734
+ if (iachar(c) /= iachar("}")) STOP 735
+ if (iachar(achar(126)) /= 126) STOP 736
+ if (iachar ("~")/= 126) STOP 737
+ if (achar (126) /= "~") STOP 738
+ if ("~" /= achar ( ichar ( "~"))) STOP 739
i = 126
c = "~"
- if (achar(i) /= "~") call abort
- if (iachar(c) /= iachar("~")) call abort
- if (iachar(achar(127)) /= 127) call abort
- if (iachar ("\7f")/= 127) call abort
- if (achar (127) /= "\7f") call abort
- if ("\7f" /= achar ( ichar ( "\7f"))) call abort
+ if (achar(i) /= "~") STOP 740
+ if (iachar(c) /= iachar("~")) STOP 741
+ if (iachar(achar(127)) /= 127) STOP 742
+ if (iachar ("\7f")/= 127) STOP 743
+ if (achar (127) /= "\7f") STOP 744
+ if ("\7f" /= achar ( ichar ( "\7f"))) STOP 745
i = 127
c = "\7f"
- if (achar(i) /= "\7f") call abort
- if (iachar(c) /= iachar("\7f")) call abort
- if (iachar(achar(128)) /= 128) call abort
- if (iachar ("\80")/= 128) call abort
- if (achar (128) /= "\80") call abort
- if ("\80" /= achar ( ichar ( "\80"))) call abort
+ if (achar(i) /= "\7f") STOP 746
+ if (iachar(c) /= iachar("\7f")) STOP 747
+ if (iachar(achar(128)) /= 128) STOP 748
+ if (iachar ("\80")/= 128) STOP 749
+ if (achar (128) /= "\80") STOP 750
+ if ("\80" /= achar ( ichar ( "\80"))) STOP 751
i = 128
c = "\80"
- if (achar(i) /= "\80") call abort
- if (iachar(c) /= iachar("\80")) call abort
- if (iachar(achar(129)) /= 129) call abort
- if (iachar ("\81")/= 129) call abort
- if (achar (129) /= "\81") call abort
- if ("\81" /= achar ( ichar ( "\81"))) call abort
+ if (achar(i) /= "\80") STOP 752
+ if (iachar(c) /= iachar("\80")) STOP 753
+ if (iachar(achar(129)) /= 129) STOP 754
+ if (iachar ("\81")/= 129) STOP 755
+ if (achar (129) /= "\81") STOP 756
+ if ("\81" /= achar ( ichar ( "\81"))) STOP 757
i = 129
c = "\81"
- if (achar(i) /= "\81") call abort
- if (iachar(c) /= iachar("\81")) call abort
- if (iachar(achar(130)) /= 130) call abort
- if (iachar ("\82")/= 130) call abort
- if (achar (130) /= "\82") call abort
- if ("\82" /= achar ( ichar ( "\82"))) call abort
+ if (achar(i) /= "\81") STOP 758
+ if (iachar(c) /= iachar("\81")) STOP 759
+ if (iachar(achar(130)) /= 130) STOP 760
+ if (iachar ("\82")/= 130) STOP 761
+ if (achar (130) /= "\82") STOP 762
+ if ("\82" /= achar ( ichar ( "\82"))) STOP 763
i = 130
c = "\82"
- if (achar(i) /= "\82") call abort
- if (iachar(c) /= iachar("\82")) call abort
- if (iachar(achar(131)) /= 131) call abort
- if (iachar ("\83")/= 131) call abort
- if (achar (131) /= "\83") call abort
- if ("\83" /= achar ( ichar ( "\83"))) call abort
+ if (achar(i) /= "\82") STOP 764
+ if (iachar(c) /= iachar("\82")) STOP 765
+ if (iachar(achar(131)) /= 131) STOP 766
+ if (iachar ("\83")/= 131) STOP 767
+ if (achar (131) /= "\83") STOP 768
+ if ("\83" /= achar ( ichar ( "\83"))) STOP 769
i = 131
c = "\83"
- if (achar(i) /= "\83") call abort
- if (iachar(c) /= iachar("\83")) call abort
- if (iachar(achar(132)) /= 132) call abort
- if (iachar ("\84")/= 132) call abort
- if (achar (132) /= "\84") call abort
- if ("\84" /= achar ( ichar ( "\84"))) call abort
+ if (achar(i) /= "\83") STOP 770
+ if (iachar(c) /= iachar("\83")) STOP 771
+ if (iachar(achar(132)) /= 132) STOP 772
+ if (iachar ("\84")/= 132) STOP 773
+ if (achar (132) /= "\84") STOP 774
+ if ("\84" /= achar ( ichar ( "\84"))) STOP 775
i = 132
c = "\84"
- if (achar(i) /= "\84") call abort
- if (iachar(c) /= iachar("\84")) call abort
- if (iachar(achar(133)) /= 133) call abort
- if (iachar ("\85")/= 133) call abort
- if (achar (133) /= "\85") call abort
- if ("\85" /= achar ( ichar ( "\85"))) call abort
+ if (achar(i) /= "\84") STOP 776
+ if (iachar(c) /= iachar("\84")) STOP 777
+ if (iachar(achar(133)) /= 133) STOP 778
+ if (iachar ("\85")/= 133) STOP 779
+ if (achar (133) /= "\85") STOP 780
+ if ("\85" /= achar ( ichar ( "\85"))) STOP 781
i = 133
c = "\85"
- if (achar(i) /= "\85") call abort
- if (iachar(c) /= iachar("\85")) call abort
- if (iachar(achar(134)) /= 134) call abort
- if (iachar ("\86")/= 134) call abort
- if (achar (134) /= "\86") call abort
- if ("\86" /= achar ( ichar ( "\86"))) call abort
+ if (achar(i) /= "\85") STOP 782
+ if (iachar(c) /= iachar("\85")) STOP 783
+ if (iachar(achar(134)) /= 134) STOP 784
+ if (iachar ("\86")/= 134) STOP 785
+ if (achar (134) /= "\86") STOP 786
+ if ("\86" /= achar ( ichar ( "\86"))) STOP 787
i = 134
c = "\86"
- if (achar(i) /= "\86") call abort
- if (iachar(c) /= iachar("\86")) call abort
- if (iachar(achar(135)) /= 135) call abort
- if (iachar ("\87")/= 135) call abort
- if (achar (135) /= "\87") call abort
- if ("\87" /= achar ( ichar ( "\87"))) call abort
+ if (achar(i) /= "\86") STOP 788
+ if (iachar(c) /= iachar("\86")) STOP 789
+ if (iachar(achar(135)) /= 135) STOP 790
+ if (iachar ("\87")/= 135) STOP 791
+ if (achar (135) /= "\87") STOP 792
+ if ("\87" /= achar ( ichar ( "\87"))) STOP 793
i = 135
c = "\87"
- if (achar(i) /= "\87") call abort
- if (iachar(c) /= iachar("\87")) call abort
- if (iachar(achar(136)) /= 136) call abort
- if (iachar ("\88")/= 136) call abort
- if (achar (136) /= "\88") call abort
- if ("\88" /= achar ( ichar ( "\88"))) call abort
+ if (achar(i) /= "\87") STOP 794
+ if (iachar(c) /= iachar("\87")) STOP 795
+ if (iachar(achar(136)) /= 136) STOP 796
+ if (iachar ("\88")/= 136) STOP 797
+ if (achar (136) /= "\88") STOP 798
+ if ("\88" /= achar ( ichar ( "\88"))) STOP 799
i = 136
c = "\88"
- if (achar(i) /= "\88") call abort
- if (iachar(c) /= iachar("\88")) call abort
- if (iachar(achar(137)) /= 137) call abort
- if (iachar ("\89")/= 137) call abort
- if (achar (137) /= "\89") call abort
- if ("\89" /= achar ( ichar ( "\89"))) call abort
+ if (achar(i) /= "\88") STOP 800
+ if (iachar(c) /= iachar("\88")) STOP 801
+ if (iachar(achar(137)) /= 137) STOP 802
+ if (iachar ("\89")/= 137) STOP 803
+ if (achar (137) /= "\89") STOP 804
+ if ("\89" /= achar ( ichar ( "\89"))) STOP 805
i = 137
c = "\89"
- if (achar(i) /= "\89") call abort
- if (iachar(c) /= iachar("\89")) call abort
- if (iachar(achar(138)) /= 138) call abort
- if (iachar ("\8a")/= 138) call abort
- if (achar (138) /= "\8a") call abort
- if ("\8a" /= achar ( ichar ( "\8a"))) call abort
+ if (achar(i) /= "\89") STOP 806
+ if (iachar(c) /= iachar("\89")) STOP 807
+ if (iachar(achar(138)) /= 138) STOP 808
+ if (iachar ("\8a")/= 138) STOP 809
+ if (achar (138) /= "\8a") STOP 810
+ if ("\8a" /= achar ( ichar ( "\8a"))) STOP 811
i = 138
c = "\8a"
- if (achar(i) /= "\8a") call abort
- if (iachar(c) /= iachar("\8a")) call abort
- if (iachar(achar(139)) /= 139) call abort
- if (iachar ("\8b")/= 139) call abort
- if (achar (139) /= "\8b") call abort
- if ("\8b" /= achar ( ichar ( "\8b"))) call abort
+ if (achar(i) /= "\8a") STOP 812
+ if (iachar(c) /= iachar("\8a")) STOP 813
+ if (iachar(achar(139)) /= 139) STOP 814
+ if (iachar ("\8b")/= 139) STOP 815
+ if (achar (139) /= "\8b") STOP 816
+ if ("\8b" /= achar ( ichar ( "\8b"))) STOP 817
i = 139
c = "\8b"
- if (achar(i) /= "\8b") call abort
- if (iachar(c) /= iachar("\8b")) call abort
- if (iachar(achar(140)) /= 140) call abort
- if (iachar ("\8c")/= 140) call abort
- if (achar (140) /= "\8c") call abort
- if ("\8c" /= achar ( ichar ( "\8c"))) call abort
+ if (achar(i) /= "\8b") STOP 818
+ if (iachar(c) /= iachar("\8b")) STOP 819
+ if (iachar(achar(140)) /= 140) STOP 820
+ if (iachar ("\8c")/= 140) STOP 821
+ if (achar (140) /= "\8c") STOP 822
+ if ("\8c" /= achar ( ichar ( "\8c"))) STOP 823
i = 140
c = "\8c"
- if (achar(i) /= "\8c") call abort
- if (iachar(c) /= iachar("\8c")) call abort
- if (iachar(achar(141)) /= 141) call abort
- if (iachar ("\8d")/= 141) call abort
- if (achar (141) /= "\8d") call abort
- if ("\8d" /= achar ( ichar ( "\8d"))) call abort
+ if (achar(i) /= "\8c") STOP 824
+ if (iachar(c) /= iachar("\8c")) STOP 825
+ if (iachar(achar(141)) /= 141) STOP 826
+ if (iachar ("\8d")/= 141) STOP 827
+ if (achar (141) /= "\8d") STOP 828
+ if ("\8d" /= achar ( ichar ( "\8d"))) STOP 829
i = 141
c = "\8d"
- if (achar(i) /= "\8d") call abort
- if (iachar(c) /= iachar("\8d")) call abort
- if (iachar(achar(142)) /= 142) call abort
- if (iachar ("\8e")/= 142) call abort
- if (achar (142) /= "\8e") call abort
- if ("\8e" /= achar ( ichar ( "\8e"))) call abort
+ if (achar(i) /= "\8d") STOP 830
+ if (iachar(c) /= iachar("\8d")) STOP 831
+ if (iachar(achar(142)) /= 142) STOP 832
+ if (iachar ("\8e")/= 142) STOP 833
+ if (achar (142) /= "\8e") STOP 834
+ if ("\8e" /= achar ( ichar ( "\8e"))) STOP 835
i = 142
c = "\8e"
- if (achar(i) /= "\8e") call abort
- if (iachar(c) /= iachar("\8e")) call abort
- if (iachar(achar(143)) /= 143) call abort
- if (iachar ("\8f")/= 143) call abort
- if (achar (143) /= "\8f") call abort
- if ("\8f" /= achar ( ichar ( "\8f"))) call abort
+ if (achar(i) /= "\8e") STOP 836
+ if (iachar(c) /= iachar("\8e")) STOP 837
+ if (iachar(achar(143)) /= 143) STOP 838
+ if (iachar ("\8f")/= 143) STOP 839
+ if (achar (143) /= "\8f") STOP 840
+ if ("\8f" /= achar ( ichar ( "\8f"))) STOP 841
i = 143
c = "\8f"
- if (achar(i) /= "\8f") call abort
- if (iachar(c) /= iachar("\8f")) call abort
- if (iachar(achar(144)) /= 144) call abort
- if (iachar ("\90")/= 144) call abort
- if (achar (144) /= "\90") call abort
- if ("\90" /= achar ( ichar ( "\90"))) call abort
+ if (achar(i) /= "\8f") STOP 842
+ if (iachar(c) /= iachar("\8f")) STOP 843
+ if (iachar(achar(144)) /= 144) STOP 844
+ if (iachar ("\90")/= 144) STOP 845
+ if (achar (144) /= "\90") STOP 846
+ if ("\90" /= achar ( ichar ( "\90"))) STOP 847
i = 144
c = "\90"
- if (achar(i) /= "\90") call abort
- if (iachar(c) /= iachar("\90")) call abort
- if (iachar(achar(145)) /= 145) call abort
- if (iachar ("\91")/= 145) call abort
- if (achar (145) /= "\91") call abort
- if ("\91" /= achar ( ichar ( "\91"))) call abort
+ if (achar(i) /= "\90") STOP 848
+ if (iachar(c) /= iachar("\90")) STOP 849
+ if (iachar(achar(145)) /= 145) STOP 850
+ if (iachar ("\91")/= 145) STOP 851
+ if (achar (145) /= "\91") STOP 852
+ if ("\91" /= achar ( ichar ( "\91"))) STOP 853
i = 145
c = "\91"
- if (achar(i) /= "\91") call abort
- if (iachar(c) /= iachar("\91")) call abort
- if (iachar(achar(146)) /= 146) call abort
- if (iachar ("\92")/= 146) call abort
- if (achar (146) /= "\92") call abort
- if ("\92" /= achar ( ichar ( "\92"))) call abort
+ if (achar(i) /= "\91") STOP 854
+ if (iachar(c) /= iachar("\91")) STOP 855
+ if (iachar(achar(146)) /= 146) STOP 856
+ if (iachar ("\92")/= 146) STOP 857
+ if (achar (146) /= "\92") STOP 858
+ if ("\92" /= achar ( ichar ( "\92"))) STOP 859
i = 146
c = "\92"
- if (achar(i) /= "\92") call abort
- if (iachar(c) /= iachar("\92")) call abort
- if (iachar(achar(147)) /= 147) call abort
- if (iachar ("\93")/= 147) call abort
- if (achar (147) /= "\93") call abort
- if ("\93" /= achar ( ichar ( "\93"))) call abort
+ if (achar(i) /= "\92") STOP 860
+ if (iachar(c) /= iachar("\92")) STOP 861
+ if (iachar(achar(147)) /= 147) STOP 862
+ if (iachar ("\93")/= 147) STOP 863
+ if (achar (147) /= "\93") STOP 864
+ if ("\93" /= achar ( ichar ( "\93"))) STOP 865
i = 147
c = "\93"
- if (achar(i) /= "\93") call abort
- if (iachar(c) /= iachar("\93")) call abort
- if (iachar(achar(148)) /= 148) call abort
- if (iachar ("\94")/= 148) call abort
- if (achar (148) /= "\94") call abort
- if ("\94" /= achar ( ichar ( "\94"))) call abort
+ if (achar(i) /= "\93") STOP 866
+ if (iachar(c) /= iachar("\93")) STOP 867
+ if (iachar(achar(148)) /= 148) STOP 868
+ if (iachar ("\94")/= 148) STOP 869
+ if (achar (148) /= "\94") STOP 870
+ if ("\94" /= achar ( ichar ( "\94"))) STOP 871
i = 148
c = "\94"
- if (achar(i) /= "\94") call abort
- if (iachar(c) /= iachar("\94")) call abort
- if (iachar(achar(149)) /= 149) call abort
- if (iachar ("\95")/= 149) call abort
- if (achar (149) /= "\95") call abort
- if ("\95" /= achar ( ichar ( "\95"))) call abort
+ if (achar(i) /= "\94") STOP 872
+ if (iachar(c) /= iachar("\94")) STOP 873
+ if (iachar(achar(149)) /= 149) STOP 874
+ if (iachar ("\95")/= 149) STOP 875
+ if (achar (149) /= "\95") STOP 876
+ if ("\95" /= achar ( ichar ( "\95"))) STOP 877
i = 149
c = "\95"
- if (achar(i) /= "\95") call abort
- if (iachar(c) /= iachar("\95")) call abort
- if (iachar(achar(150)) /= 150) call abort
- if (iachar ("\96")/= 150) call abort
- if (achar (150) /= "\96") call abort
- if ("\96" /= achar ( ichar ( "\96"))) call abort
+ if (achar(i) /= "\95") STOP 878
+ if (iachar(c) /= iachar("\95")) STOP 879
+ if (iachar(achar(150)) /= 150) STOP 880
+ if (iachar ("\96")/= 150) STOP 881
+ if (achar (150) /= "\96") STOP 882
+ if ("\96" /= achar ( ichar ( "\96"))) STOP 883
i = 150
c = "\96"
- if (achar(i) /= "\96") call abort
- if (iachar(c) /= iachar("\96")) call abort
- if (iachar(achar(151)) /= 151) call abort
- if (iachar ("\97")/= 151) call abort
- if (achar (151) /= "\97") call abort
- if ("\97" /= achar ( ichar ( "\97"))) call abort
+ if (achar(i) /= "\96") STOP 884
+ if (iachar(c) /= iachar("\96")) STOP 885
+ if (iachar(achar(151)) /= 151) STOP 886
+ if (iachar ("\97")/= 151) STOP 887
+ if (achar (151) /= "\97") STOP 888
+ if ("\97" /= achar ( ichar ( "\97"))) STOP 889
i = 151
c = "\97"
- if (achar(i) /= "\97") call abort
- if (iachar(c) /= iachar("\97")) call abort
- if (iachar(achar(152)) /= 152) call abort
- if (iachar ("\98")/= 152) call abort
- if (achar (152) /= "\98") call abort
- if ("\98" /= achar ( ichar ( "\98"))) call abort
+ if (achar(i) /= "\97") STOP 890
+ if (iachar(c) /= iachar("\97")) STOP 891
+ if (iachar(achar(152)) /= 152) STOP 892
+ if (iachar ("\98")/= 152) STOP 893
+ if (achar (152) /= "\98") STOP 894
+ if ("\98" /= achar ( ichar ( "\98"))) STOP 895
i = 152
c = "\98"
- if (achar(i) /= "\98") call abort
- if (iachar(c) /= iachar("\98")) call abort
- if (iachar(achar(153)) /= 153) call abort
- if (iachar ("\99")/= 153) call abort
- if (achar (153) /= "\99") call abort
- if ("\99" /= achar ( ichar ( "\99"))) call abort
+ if (achar(i) /= "\98") STOP 896
+ if (iachar(c) /= iachar("\98")) STOP 897
+ if (iachar(achar(153)) /= 153) STOP 898
+ if (iachar ("\99")/= 153) STOP 899
+ if (achar (153) /= "\99") STOP 900
+ if ("\99" /= achar ( ichar ( "\99"))) STOP 901
i = 153
c = "\99"
- if (achar(i) /= "\99") call abort
- if (iachar(c) /= iachar("\99")) call abort
- if (iachar(achar(154)) /= 154) call abort
- if (iachar ("\9a")/= 154) call abort
- if (achar (154) /= "\9a") call abort
- if ("\9a" /= achar ( ichar ( "\9a"))) call abort
+ if (achar(i) /= "\99") STOP 902
+ if (iachar(c) /= iachar("\99")) STOP 903
+ if (iachar(achar(154)) /= 154) STOP 904
+ if (iachar ("\9a")/= 154) STOP 905
+ if (achar (154) /= "\9a") STOP 906
+ if ("\9a" /= achar ( ichar ( "\9a"))) STOP 907
i = 154
c = "\9a"
- if (achar(i) /= "\9a") call abort
- if (iachar(c) /= iachar("\9a")) call abort
- if (iachar(achar(155)) /= 155) call abort
- if (iachar ("\9b")/= 155) call abort
- if (achar (155) /= "\9b") call abort
- if ("\9b" /= achar ( ichar ( "\9b"))) call abort
+ if (achar(i) /= "\9a") STOP 908
+ if (iachar(c) /= iachar("\9a")) STOP 909
+ if (iachar(achar(155)) /= 155) STOP 910
+ if (iachar ("\9b")/= 155) STOP 911
+ if (achar (155) /= "\9b") STOP 912
+ if ("\9b" /= achar ( ichar ( "\9b"))) STOP 913
i = 155
c = "\9b"
- if (achar(i) /= "\9b") call abort
- if (iachar(c) /= iachar("\9b")) call abort
- if (iachar(achar(156)) /= 156) call abort
- if (iachar ("\9c")/= 156) call abort
- if (achar (156) /= "\9c") call abort
- if ("\9c" /= achar ( ichar ( "\9c"))) call abort
+ if (achar(i) /= "\9b") STOP 914
+ if (iachar(c) /= iachar("\9b")) STOP 915
+ if (iachar(achar(156)) /= 156) STOP 916
+ if (iachar ("\9c")/= 156) STOP 917
+ if (achar (156) /= "\9c") STOP 918
+ if ("\9c" /= achar ( ichar ( "\9c"))) STOP 919
i = 156
c = "\9c"
- if (achar(i) /= "\9c") call abort
- if (iachar(c) /= iachar("\9c")) call abort
- if (iachar(achar(157)) /= 157) call abort
- if (iachar ("\9d")/= 157) call abort
- if (achar (157) /= "\9d") call abort
- if ("\9d" /= achar ( ichar ( "\9d"))) call abort
+ if (achar(i) /= "\9c") STOP 920
+ if (iachar(c) /= iachar("\9c")) STOP 921
+ if (iachar(achar(157)) /= 157) STOP 922
+ if (iachar ("\9d")/= 157) STOP 923
+ if (achar (157) /= "\9d") STOP 924
+ if ("\9d" /= achar ( ichar ( "\9d"))) STOP 925
i = 157
c = "\9d"
- if (achar(i) /= "\9d") call abort
- if (iachar(c) /= iachar("\9d")) call abort
- if (iachar(achar(158)) /= 158) call abort
- if (iachar ("\9e")/= 158) call abort
- if (achar (158) /= "\9e") call abort
- if ("\9e" /= achar ( ichar ( "\9e"))) call abort
+ if (achar(i) /= "\9d") STOP 926
+ if (iachar(c) /= iachar("\9d")) STOP 927
+ if (iachar(achar(158)) /= 158) STOP 928
+ if (iachar ("\9e")/= 158) STOP 929
+ if (achar (158) /= "\9e") STOP 930
+ if ("\9e" /= achar ( ichar ( "\9e"))) STOP 931
i = 158
c = "\9e"
- if (achar(i) /= "\9e") call abort
- if (iachar(c) /= iachar("\9e")) call abort
- if (iachar(achar(159)) /= 159) call abort
- if (iachar ("\9f")/= 159) call abort
- if (achar (159) /= "\9f") call abort
- if ("\9f" /= achar ( ichar ( "\9f"))) call abort
+ if (achar(i) /= "\9e") STOP 932
+ if (iachar(c) /= iachar("\9e")) STOP 933
+ if (iachar(achar(159)) /= 159) STOP 934
+ if (iachar ("\9f")/= 159) STOP 935
+ if (achar (159) /= "\9f") STOP 936
+ if ("\9f" /= achar ( ichar ( "\9f"))) STOP 937
i = 159
c = "\9f"
- if (achar(i) /= "\9f") call abort
- if (iachar(c) /= iachar("\9f")) call abort
- if (iachar(achar(160)) /= 160) call abort
- if (iachar (" ")/= 160) call abort
- if (achar (160) /= " ") call abort
- if (" " /= achar ( ichar ( " "))) call abort
+ if (achar(i) /= "\9f") STOP 938
+ if (iachar(c) /= iachar("\9f")) STOP 939
+ if (iachar(achar(160)) /= 160) STOP 940
+ if (iachar (" ")/= 160) STOP 941
+ if (achar (160) /= " ") STOP 942
+ if (" " /= achar ( ichar ( " "))) STOP 943
i = 160
c = " "
- if (achar(i) /= " ") call abort
- if (iachar(c) /= iachar(" ")) call abort
- if (iachar(achar(161)) /= 161) call abort
- if (iachar ("¡")/= 161) call abort
- if (achar (161) /= "¡") call abort
- if ("¡" /= achar ( ichar ( "¡"))) call abort
+ if (achar(i) /= " ") STOP 944
+ if (iachar(c) /= iachar(" ")) STOP 945
+ if (iachar(achar(161)) /= 161) STOP 946
+ if (iachar ("¡")/= 161) STOP 947
+ if (achar (161) /= "¡") STOP 948
+ if ("¡" /= achar ( ichar ( "¡"))) STOP 949
i = 161
c = "¡"
- if (achar(i) /= "¡") call abort
- if (iachar(c) /= iachar("¡")) call abort
- if (iachar(achar(162)) /= 162) call abort
- if (iachar ("¢")/= 162) call abort
- if (achar (162) /= "¢") call abort
- if ("¢" /= achar ( ichar ( "¢"))) call abort
+ if (achar(i) /= "¡") STOP 950
+ if (iachar(c) /= iachar("¡")) STOP 951
+ if (iachar(achar(162)) /= 162) STOP 952
+ if (iachar ("¢")/= 162) STOP 953
+ if (achar (162) /= "¢") STOP 954
+ if ("¢" /= achar ( ichar ( "¢"))) STOP 955
i = 162
c = "¢"
- if (achar(i) /= "¢") call abort
- if (iachar(c) /= iachar("¢")) call abort
- if (iachar(achar(163)) /= 163) call abort
- if (iachar ("£")/= 163) call abort
- if (achar (163) /= "£") call abort
- if ("£" /= achar ( ichar ( "£"))) call abort
+ if (achar(i) /= "¢") STOP 956
+ if (iachar(c) /= iachar("¢")) STOP 957
+ if (iachar(achar(163)) /= 163) STOP 958
+ if (iachar ("£")/= 163) STOP 959
+ if (achar (163) /= "£") STOP 960
+ if ("£" /= achar ( ichar ( "£"))) STOP 961
i = 163
c = "£"
- if (achar(i) /= "£") call abort
- if (iachar(c) /= iachar("£")) call abort
- if (iachar(achar(164)) /= 164) call abort
- if (iachar ("¤")/= 164) call abort
- if (achar (164) /= "¤") call abort
- if ("¤" /= achar ( ichar ( "¤"))) call abort
+ if (achar(i) /= "£") STOP 962
+ if (iachar(c) /= iachar("£")) STOP 963
+ if (iachar(achar(164)) /= 164) STOP 964
+ if (iachar ("¤")/= 164) STOP 965
+ if (achar (164) /= "¤") STOP 966
+ if ("¤" /= achar ( ichar ( "¤"))) STOP 967
i = 164
c = "¤"
- if (achar(i) /= "¤") call abort
- if (iachar(c) /= iachar("¤")) call abort
- if (iachar(achar(165)) /= 165) call abort
- if (iachar ("¥")/= 165) call abort
- if (achar (165) /= "¥") call abort
- if ("¥" /= achar ( ichar ( "¥"))) call abort
+ if (achar(i) /= "¤") STOP 968
+ if (iachar(c) /= iachar("¤")) STOP 969
+ if (iachar(achar(165)) /= 165) STOP 970
+ if (iachar ("¥")/= 165) STOP 971
+ if (achar (165) /= "¥") STOP 972
+ if ("¥" /= achar ( ichar ( "¥"))) STOP 973
i = 165
c = "¥"
- if (achar(i) /= "¥") call abort
- if (iachar(c) /= iachar("¥")) call abort
- if (iachar(achar(166)) /= 166) call abort
- if (iachar ("¦")/= 166) call abort
- if (achar (166) /= "¦") call abort
- if ("¦" /= achar ( ichar ( "¦"))) call abort
+ if (achar(i) /= "¥") STOP 974
+ if (iachar(c) /= iachar("¥")) STOP 975
+ if (iachar(achar(166)) /= 166) STOP 976
+ if (iachar ("¦")/= 166) STOP 977
+ if (achar (166) /= "¦") STOP 978
+ if ("¦" /= achar ( ichar ( "¦"))) STOP 979
i = 166
c = "¦"
- if (achar(i) /= "¦") call abort
- if (iachar(c) /= iachar("¦")) call abort
- if (iachar(achar(167)) /= 167) call abort
- if (iachar ("§")/= 167) call abort
- if (achar (167) /= "§") call abort
- if ("§" /= achar ( ichar ( "§"))) call abort
+ if (achar(i) /= "¦") STOP 980
+ if (iachar(c) /= iachar("¦")) STOP 981
+ if (iachar(achar(167)) /= 167) STOP 982
+ if (iachar ("§")/= 167) STOP 983
+ if (achar (167) /= "§") STOP 984
+ if ("§" /= achar ( ichar ( "§"))) STOP 985
i = 167
c = "§"
- if (achar(i) /= "§") call abort
- if (iachar(c) /= iachar("§")) call abort
- if (iachar(achar(168)) /= 168) call abort
- if (iachar ("¨")/= 168) call abort
- if (achar (168) /= "¨") call abort
- if ("¨" /= achar ( ichar ( "¨"))) call abort
+ if (achar(i) /= "§") STOP 986
+ if (iachar(c) /= iachar("§")) STOP 987
+ if (iachar(achar(168)) /= 168) STOP 988
+ if (iachar ("¨")/= 168) STOP 989
+ if (achar (168) /= "¨") STOP 990
+ if ("¨" /= achar ( ichar ( "¨"))) STOP 991
i = 168
c = "¨"
- if (achar(i) /= "¨") call abort
- if (iachar(c) /= iachar("¨")) call abort
- if (iachar(achar(169)) /= 169) call abort
- if (iachar ("©")/= 169) call abort
- if (achar (169) /= "©") call abort
- if ("©" /= achar ( ichar ( "©"))) call abort
+ if (achar(i) /= "¨") STOP 992
+ if (iachar(c) /= iachar("¨")) STOP 993
+ if (iachar(achar(169)) /= 169) STOP 994
+ if (iachar ("©")/= 169) STOP 995
+ if (achar (169) /= "©") STOP 996
+ if ("©" /= achar ( ichar ( "©"))) STOP 997
i = 169
c = "©"
- if (achar(i) /= "©") call abort
- if (iachar(c) /= iachar("©")) call abort
- if (iachar(achar(170)) /= 170) call abort
- if (iachar ("ª")/= 170) call abort
- if (achar (170) /= "ª") call abort
- if ("ª" /= achar ( ichar ( "ª"))) call abort
+ if (achar(i) /= "©") STOP 998
+ if (iachar(c) /= iachar("©")) STOP 999
+ if (iachar(achar(170)) /= 170) STOP 1000
+ if (iachar ("ª")/= 170) STOP 1001
+ if (achar (170) /= "ª") STOP 1002
+ if ("ª" /= achar ( ichar ( "ª"))) STOP 1003
i = 170
c = "ª"
- if (achar(i) /= "ª") call abort
- if (iachar(c) /= iachar("ª")) call abort
- if (iachar(achar(171)) /= 171) call abort
- if (iachar ("«")/= 171) call abort
- if (achar (171) /= "«") call abort
- if ("«" /= achar ( ichar ( "«"))) call abort
+ if (achar(i) /= "ª") STOP 1004
+ if (iachar(c) /= iachar("ª")) STOP 1005
+ if (iachar(achar(171)) /= 171) STOP 1006
+ if (iachar ("«")/= 171) STOP 1007
+ if (achar (171) /= "«") STOP 1008
+ if ("«" /= achar ( ichar ( "«"))) STOP 1009
i = 171
c = "«"
- if (achar(i) /= "«") call abort
- if (iachar(c) /= iachar("«")) call abort
- if (iachar(achar(172)) /= 172) call abort
- if (iachar ("¬")/= 172) call abort
- if (achar (172) /= "¬") call abort
- if ("¬" /= achar ( ichar ( "¬"))) call abort
+ if (achar(i) /= "«") STOP 1010
+ if (iachar(c) /= iachar("«")) STOP 1011
+ if (iachar(achar(172)) /= 172) STOP 1012
+ if (iachar ("¬")/= 172) STOP 1013
+ if (achar (172) /= "¬") STOP 1014
+ if ("¬" /= achar ( ichar ( "¬"))) STOP 1015
i = 172
c = "¬"
- if (achar(i) /= "¬") call abort
- if (iachar(c) /= iachar("¬")) call abort
- if (iachar(achar(173)) /= 173) call abort
- if (iachar ("")/= 173) call abort
- if (achar (173) /= "") call abort
- if ("" /= achar ( ichar ( ""))) call abort
+ if (achar(i) /= "¬") STOP 1016
+ if (iachar(c) /= iachar("¬")) STOP 1017
+ if (iachar(achar(173)) /= 173) STOP 1018
+ if (iachar ("")/= 173) STOP 1019
+ if (achar (173) /= "") STOP 1020
+ if ("" /= achar ( ichar ( ""))) STOP 1021
i = 173
c = ""
- if (achar(i) /= "") call abort
- if (iachar(c) /= iachar("")) call abort
- if (iachar(achar(174)) /= 174) call abort
- if (iachar ("®")/= 174) call abort
- if (achar (174) /= "®") call abort
- if ("®" /= achar ( ichar ( "®"))) call abort
+ if (achar(i) /= "") STOP 1022
+ if (iachar(c) /= iachar("")) STOP 1023
+ if (iachar(achar(174)) /= 174) STOP 1024
+ if (iachar ("®")/= 174) STOP 1025
+ if (achar (174) /= "®") STOP 1026
+ if ("®" /= achar ( ichar ( "®"))) STOP 1027
i = 174
c = "®"
- if (achar(i) /= "®") call abort
- if (iachar(c) /= iachar("®")) call abort
- if (iachar(achar(175)) /= 175) call abort
- if (iachar ("¯")/= 175) call abort
- if (achar (175) /= "¯") call abort
- if ("¯" /= achar ( ichar ( "¯"))) call abort
+ if (achar(i) /= "®") STOP 1028
+ if (iachar(c) /= iachar("®")) STOP 1029
+ if (iachar(achar(175)) /= 175) STOP 1030
+ if (iachar ("¯")/= 175) STOP 1031
+ if (achar (175) /= "¯") STOP 1032
+ if ("¯" /= achar ( ichar ( "¯"))) STOP 1033
i = 175
c = "¯"
- if (achar(i) /= "¯") call abort
- if (iachar(c) /= iachar("¯")) call abort
- if (iachar(achar(176)) /= 176) call abort
- if (iachar ("°")/= 176) call abort
- if (achar (176) /= "°") call abort
- if ("°" /= achar ( ichar ( "°"))) call abort
+ if (achar(i) /= "¯") STOP 1034
+ if (iachar(c) /= iachar("¯")) STOP 1035
+ if (iachar(achar(176)) /= 176) STOP 1036
+ if (iachar ("°")/= 176) STOP 1037
+ if (achar (176) /= "°") STOP 1038
+ if ("°" /= achar ( ichar ( "°"))) STOP 1039
i = 176
c = "°"
- if (achar(i) /= "°") call abort
- if (iachar(c) /= iachar("°")) call abort
- if (iachar(achar(177)) /= 177) call abort
- if (iachar ("±")/= 177) call abort
- if (achar (177) /= "±") call abort
- if ("±" /= achar ( ichar ( "±"))) call abort
+ if (achar(i) /= "°") STOP 1040
+ if (iachar(c) /= iachar("°")) STOP 1041
+ if (iachar(achar(177)) /= 177) STOP 1042
+ if (iachar ("±")/= 177) STOP 1043
+ if (achar (177) /= "±") STOP 1044
+ if ("±" /= achar ( ichar ( "±"))) STOP 1045
i = 177
c = "±"
- if (achar(i) /= "±") call abort
- if (iachar(c) /= iachar("±")) call abort
- if (iachar(achar(178)) /= 178) call abort
- if (iachar ("²")/= 178) call abort
- if (achar (178) /= "²") call abort
- if ("²" /= achar ( ichar ( "²"))) call abort
+ if (achar(i) /= "±") STOP 1046
+ if (iachar(c) /= iachar("±")) STOP 1047
+ if (iachar(achar(178)) /= 178) STOP 1048
+ if (iachar ("²")/= 178) STOP 1049
+ if (achar (178) /= "²") STOP 1050
+ if ("²" /= achar ( ichar ( "²"))) STOP 1051
i = 178
c = "²"
- if (achar(i) /= "²") call abort
- if (iachar(c) /= iachar("²")) call abort
- if (iachar(achar(179)) /= 179) call abort
- if (iachar ("³")/= 179) call abort
- if (achar (179) /= "³") call abort
- if ("³" /= achar ( ichar ( "³"))) call abort
+ if (achar(i) /= "²") STOP 1052
+ if (iachar(c) /= iachar("²")) STOP 1053
+ if (iachar(achar(179)) /= 179) STOP 1054
+ if (iachar ("³")/= 179) STOP 1055
+ if (achar (179) /= "³") STOP 1056
+ if ("³" /= achar ( ichar ( "³"))) STOP 1057
i = 179
c = "³"
- if (achar(i) /= "³") call abort
- if (iachar(c) /= iachar("³")) call abort
- if (iachar(achar(180)) /= 180) call abort
- if (iachar ("´")/= 180) call abort
- if (achar (180) /= "´") call abort
- if ("´" /= achar ( ichar ( "´"))) call abort
+ if (achar(i) /= "³") STOP 1058
+ if (iachar(c) /= iachar("³")) STOP 1059
+ if (iachar(achar(180)) /= 180) STOP 1060
+ if (iachar ("´")/= 180) STOP 1061
+ if (achar (180) /= "´") STOP 1062
+ if ("´" /= achar ( ichar ( "´"))) STOP 1063
i = 180
c = "´"
- if (achar(i) /= "´") call abort
- if (iachar(c) /= iachar("´")) call abort
- if (iachar(achar(181)) /= 181) call abort
- if (iachar ("µ")/= 181) call abort
- if (achar (181) /= "µ") call abort
- if ("µ" /= achar ( ichar ( "µ"))) call abort
+ if (achar(i) /= "´") STOP 1064
+ if (iachar(c) /= iachar("´")) STOP 1065
+ if (iachar(achar(181)) /= 181) STOP 1066
+ if (iachar ("µ")/= 181) STOP 1067
+ if (achar (181) /= "µ") STOP 1068
+ if ("µ" /= achar ( ichar ( "µ"))) STOP 1069
i = 181
c = "µ"
- if (achar(i) /= "µ") call abort
- if (iachar(c) /= iachar("µ")) call abort
- if (iachar(achar(182)) /= 182) call abort
- if (iachar ("¶")/= 182) call abort
- if (achar (182) /= "¶") call abort
- if ("¶" /= achar ( ichar ( "¶"))) call abort
+ if (achar(i) /= "µ") STOP 1070
+ if (iachar(c) /= iachar("µ")) STOP 1071
+ if (iachar(achar(182)) /= 182) STOP 1072
+ if (iachar ("¶")/= 182) STOP 1073
+ if (achar (182) /= "¶") STOP 1074
+ if ("¶" /= achar ( ichar ( "¶"))) STOP 1075
i = 182
c = "¶"
- if (achar(i) /= "¶") call abort
- if (iachar(c) /= iachar("¶")) call abort
- if (iachar(achar(183)) /= 183) call abort
- if (iachar ("·")/= 183) call abort
- if (achar (183) /= "·") call abort
- if ("·" /= achar ( ichar ( "·"))) call abort
+ if (achar(i) /= "¶") STOP 1076
+ if (iachar(c) /= iachar("¶")) STOP 1077
+ if (iachar(achar(183)) /= 183) STOP 1078
+ if (iachar ("·")/= 183) STOP 1079
+ if (achar (183) /= "·") STOP 1080
+ if ("·" /= achar ( ichar ( "·"))) STOP 1081
i = 183
c = "·"
- if (achar(i) /= "·") call abort
- if (iachar(c) /= iachar("·")) call abort
- if (iachar(achar(184)) /= 184) call abort
- if (iachar ("¸")/= 184) call abort
- if (achar (184) /= "¸") call abort
- if ("¸" /= achar ( ichar ( "¸"))) call abort
+ if (achar(i) /= "·") STOP 1082
+ if (iachar(c) /= iachar("·")) STOP 1083
+ if (iachar(achar(184)) /= 184) STOP 1084
+ if (iachar ("¸")/= 184) STOP 1085
+ if (achar (184) /= "¸") STOP 1086
+ if ("¸" /= achar ( ichar ( "¸"))) STOP 1087
i = 184
c = "¸"
- if (achar(i) /= "¸") call abort
- if (iachar(c) /= iachar("¸")) call abort
- if (iachar(achar(185)) /= 185) call abort
- if (iachar ("¹")/= 185) call abort
- if (achar (185) /= "¹") call abort
- if ("¹" /= achar ( ichar ( "¹"))) call abort
+ if (achar(i) /= "¸") STOP 1088
+ if (iachar(c) /= iachar("¸")) STOP 1089
+ if (iachar(achar(185)) /= 185) STOP 1090
+ if (iachar ("¹")/= 185) STOP 1091
+ if (achar (185) /= "¹") STOP 1092
+ if ("¹" /= achar ( ichar ( "¹"))) STOP 1093
i = 185
c = "¹"
- if (achar(i) /= "¹") call abort
- if (iachar(c) /= iachar("¹")) call abort
- if (iachar(achar(186)) /= 186) call abort
- if (iachar ("º")/= 186) call abort
- if (achar (186) /= "º") call abort
- if ("º" /= achar ( ichar ( "º"))) call abort
+ if (achar(i) /= "¹") STOP 1094
+ if (iachar(c) /= iachar("¹")) STOP 1095
+ if (iachar(achar(186)) /= 186) STOP 1096
+ if (iachar ("º")/= 186) STOP 1097
+ if (achar (186) /= "º") STOP 1098
+ if ("º" /= achar ( ichar ( "º"))) STOP 1099
i = 186
c = "º"
- if (achar(i) /= "º") call abort
- if (iachar(c) /= iachar("º")) call abort
- if (iachar(achar(187)) /= 187) call abort
- if (iachar ("»")/= 187) call abort
- if (achar (187) /= "»") call abort
- if ("»" /= achar ( ichar ( "»"))) call abort
+ if (achar(i) /= "º") STOP 1100
+ if (iachar(c) /= iachar("º")) STOP 1101
+ if (iachar(achar(187)) /= 187) STOP 1102
+ if (iachar ("»")/= 187) STOP 1103
+ if (achar (187) /= "»") STOP 1104
+ if ("»" /= achar ( ichar ( "»"))) STOP 1105
i = 187
c = "»"
- if (achar(i) /= "»") call abort
- if (iachar(c) /= iachar("»")) call abort
- if (iachar(achar(188)) /= 188) call abort
- if (iachar ("¼")/= 188) call abort
- if (achar (188) /= "¼") call abort
- if ("¼" /= achar ( ichar ( "¼"))) call abort
+ if (achar(i) /= "»") STOP 1106
+ if (iachar(c) /= iachar("»")) STOP 1107
+ if (iachar(achar(188)) /= 188) STOP 1108
+ if (iachar ("¼")/= 188) STOP 1109
+ if (achar (188) /= "¼") STOP 1110
+ if ("¼" /= achar ( ichar ( "¼"))) STOP 1111
i = 188
c = "¼"
- if (achar(i) /= "¼") call abort
- if (iachar(c) /= iachar("¼")) call abort
- if (iachar(achar(189)) /= 189) call abort
- if (iachar ("½")/= 189) call abort
- if (achar (189) /= "½") call abort
- if ("½" /= achar ( ichar ( "½"))) call abort
+ if (achar(i) /= "¼") STOP 1112
+ if (iachar(c) /= iachar("¼")) STOP 1113
+ if (iachar(achar(189)) /= 189) STOP 1114
+ if (iachar ("½")/= 189) STOP 1115
+ if (achar (189) /= "½") STOP 1116
+ if ("½" /= achar ( ichar ( "½"))) STOP 1117
i = 189
c = "½"
- if (achar(i) /= "½") call abort
- if (iachar(c) /= iachar("½")) call abort
- if (iachar(achar(190)) /= 190) call abort
- if (iachar ("¾")/= 190) call abort
- if (achar (190) /= "¾") call abort
- if ("¾" /= achar ( ichar ( "¾"))) call abort
+ if (achar(i) /= "½") STOP 1118
+ if (iachar(c) /= iachar("½")) STOP 1119
+ if (iachar(achar(190)) /= 190) STOP 1120
+ if (iachar ("¾")/= 190) STOP 1121
+ if (achar (190) /= "¾") STOP 1122
+ if ("¾" /= achar ( ichar ( "¾"))) STOP 1123
i = 190
c = "¾"
- if (achar(i) /= "¾") call abort
- if (iachar(c) /= iachar("¾")) call abort
- if (iachar(achar(191)) /= 191) call abort
- if (iachar ("¿")/= 191) call abort
- if (achar (191) /= "¿") call abort
- if ("¿" /= achar ( ichar ( "¿"))) call abort
+ if (achar(i) /= "¾") STOP 1124
+ if (iachar(c) /= iachar("¾")) STOP 1125
+ if (iachar(achar(191)) /= 191) STOP 1126
+ if (iachar ("¿")/= 191) STOP 1127
+ if (achar (191) /= "¿") STOP 1128
+ if ("¿" /= achar ( ichar ( "¿"))) STOP 1129
i = 191
c = "¿"
- if (achar(i) /= "¿") call abort
- if (iachar(c) /= iachar("¿")) call abort
- if (iachar(achar(192)) /= 192) call abort
- if (iachar ("À")/= 192) call abort
- if (achar (192) /= "À") call abort
- if ("À" /= achar ( ichar ( "À"))) call abort
+ if (achar(i) /= "¿") STOP 1130
+ if (iachar(c) /= iachar("¿")) STOP 1131
+ if (iachar(achar(192)) /= 192) STOP 1132
+ if (iachar ("À")/= 192) STOP 1133
+ if (achar (192) /= "À") STOP 1134
+ if ("À" /= achar ( ichar ( "À"))) STOP 1135
i = 192
c = "À"
- if (achar(i) /= "À") call abort
- if (iachar(c) /= iachar("À")) call abort
- if (iachar(achar(193)) /= 193) call abort
- if (iachar ("Á")/= 193) call abort
- if (achar (193) /= "Á") call abort
- if ("Á" /= achar ( ichar ( "Á"))) call abort
+ if (achar(i) /= "À") STOP 1136
+ if (iachar(c) /= iachar("À")) STOP 1137
+ if (iachar(achar(193)) /= 193) STOP 1138
+ if (iachar ("Á")/= 193) STOP 1139
+ if (achar (193) /= "Á") STOP 1140
+ if ("Á" /= achar ( ichar ( "Á"))) STOP 1141
i = 193
c = "Á"
- if (achar(i) /= "Á") call abort
- if (iachar(c) /= iachar("Á")) call abort
- if (iachar(achar(194)) /= 194) call abort
- if (iachar ("Â")/= 194) call abort
- if (achar (194) /= "Â") call abort
- if ("Â" /= achar ( ichar ( "Â"))) call abort
+ if (achar(i) /= "Á") STOP 1142
+ if (iachar(c) /= iachar("Á")) STOP 1143
+ if (iachar(achar(194)) /= 194) STOP 1144
+ if (iachar ("Â")/= 194) STOP 1145
+ if (achar (194) /= "Â") STOP 1146
+ if ("Â" /= achar ( ichar ( "Â"))) STOP 1147
i = 194
c = "Â"
- if (achar(i) /= "Â") call abort
- if (iachar(c) /= iachar("Â")) call abort
- if (iachar(achar(195)) /= 195) call abort
- if (iachar ("Ã")/= 195) call abort
- if (achar (195) /= "Ã") call abort
- if ("Ã" /= achar ( ichar ( "Ã"))) call abort
+ if (achar(i) /= "Â") STOP 1148
+ if (iachar(c) /= iachar("Â")) STOP 1149
+ if (iachar(achar(195)) /= 195) STOP 1150
+ if (iachar ("Ã")/= 195) STOP 1151
+ if (achar (195) /= "Ã") STOP 1152
+ if ("Ã" /= achar ( ichar ( "Ã"))) STOP 1153
i = 195
c = "Ã"
- if (achar(i) /= "Ã") call abort
- if (iachar(c) /= iachar("Ã")) call abort
- if (iachar(achar(196)) /= 196) call abort
- if (iachar ("Ä")/= 196) call abort
- if (achar (196) /= "Ä") call abort
- if ("Ä" /= achar ( ichar ( "Ä"))) call abort
+ if (achar(i) /= "Ã") STOP 1154
+ if (iachar(c) /= iachar("Ã")) STOP 1155
+ if (iachar(achar(196)) /= 196) STOP 1156
+ if (iachar ("Ä")/= 196) STOP 1157
+ if (achar (196) /= "Ä") STOP 1158
+ if ("Ä" /= achar ( ichar ( "Ä"))) STOP 1159
i = 196
c = "Ä"
- if (achar(i) /= "Ä") call abort
- if (iachar(c) /= iachar("Ä")) call abort
- if (iachar(achar(197)) /= 197) call abort
- if (iachar ("Å")/= 197) call abort
- if (achar (197) /= "Å") call abort
- if ("Å" /= achar ( ichar ( "Å"))) call abort
+ if (achar(i) /= "Ä") STOP 1160
+ if (iachar(c) /= iachar("Ä")) STOP 1161
+ if (iachar(achar(197)) /= 197) STOP 1162
+ if (iachar ("Å")/= 197) STOP 1163
+ if (achar (197) /= "Å") STOP 1164
+ if ("Å" /= achar ( ichar ( "Å"))) STOP 1165
i = 197
c = "Å"
- if (achar(i) /= "Å") call abort
- if (iachar(c) /= iachar("Å")) call abort
- if (iachar(achar(198)) /= 198) call abort
- if (iachar ("Æ")/= 198) call abort
- if (achar (198) /= "Æ") call abort
- if ("Æ" /= achar ( ichar ( "Æ"))) call abort
+ if (achar(i) /= "Å") STOP 1166
+ if (iachar(c) /= iachar("Å")) STOP 1167
+ if (iachar(achar(198)) /= 198) STOP 1168
+ if (iachar ("Æ")/= 198) STOP 1169
+ if (achar (198) /= "Æ") STOP 1170
+ if ("Æ" /= achar ( ichar ( "Æ"))) STOP 1171
i = 198
c = "Æ"
- if (achar(i) /= "Æ") call abort
- if (iachar(c) /= iachar("Æ")) call abort
- if (iachar(achar(199)) /= 199) call abort
- if (iachar ("Ç")/= 199) call abort
- if (achar (199) /= "Ç") call abort
- if ("Ç" /= achar ( ichar ( "Ç"))) call abort
+ if (achar(i) /= "Æ") STOP 1172
+ if (iachar(c) /= iachar("Æ")) STOP 1173
+ if (iachar(achar(199)) /= 199) STOP 1174
+ if (iachar ("Ç")/= 199) STOP 1175
+ if (achar (199) /= "Ç") STOP 1176
+ if ("Ç" /= achar ( ichar ( "Ç"))) STOP 1177
i = 199
c = "Ç"
- if (achar(i) /= "Ç") call abort
- if (iachar(c) /= iachar("Ç")) call abort
- if (iachar(achar(200)) /= 200) call abort
- if (iachar ("È")/= 200) call abort
- if (achar (200) /= "È") call abort
- if ("È" /= achar ( ichar ( "È"))) call abort
+ if (achar(i) /= "Ç") STOP 1178
+ if (iachar(c) /= iachar("Ç")) STOP 1179
+ if (iachar(achar(200)) /= 200) STOP 1180
+ if (iachar ("È")/= 200) STOP 1181
+ if (achar (200) /= "È") STOP 1182
+ if ("È" /= achar ( ichar ( "È"))) STOP 1183
i = 200
c = "È"
- if (achar(i) /= "È") call abort
- if (iachar(c) /= iachar("È")) call abort
- if (iachar(achar(201)) /= 201) call abort
- if (iachar ("É")/= 201) call abort
- if (achar (201) /= "É") call abort
- if ("É" /= achar ( ichar ( "É"))) call abort
+ if (achar(i) /= "È") STOP 1184
+ if (iachar(c) /= iachar("È")) STOP 1185
+ if (iachar(achar(201)) /= 201) STOP 1186
+ if (iachar ("É")/= 201) STOP 1187
+ if (achar (201) /= "É") STOP 1188
+ if ("É" /= achar ( ichar ( "É"))) STOP 1189
i = 201
c = "É"
- if (achar(i) /= "É") call abort
- if (iachar(c) /= iachar("É")) call abort
- if (iachar(achar(202)) /= 202) call abort
- if (iachar ("Ê")/= 202) call abort
- if (achar (202) /= "Ê") call abort
- if ("Ê" /= achar ( ichar ( "Ê"))) call abort
+ if (achar(i) /= "É") STOP 1190
+ if (iachar(c) /= iachar("É")) STOP 1191
+ if (iachar(achar(202)) /= 202) STOP 1192
+ if (iachar ("Ê")/= 202) STOP 1193
+ if (achar (202) /= "Ê") STOP 1194
+ if ("Ê" /= achar ( ichar ( "Ê"))) STOP 1195
i = 202
c = "Ê"
- if (achar(i) /= "Ê") call abort
- if (iachar(c) /= iachar("Ê")) call abort
- if (iachar(achar(203)) /= 203) call abort
- if (iachar ("Ë")/= 203) call abort
- if (achar (203) /= "Ë") call abort
- if ("Ë" /= achar ( ichar ( "Ë"))) call abort
+ if (achar(i) /= "Ê") STOP 1196
+ if (iachar(c) /= iachar("Ê")) STOP 1197
+ if (iachar(achar(203)) /= 203) STOP 1198
+ if (iachar ("Ë")/= 203) STOP 1199
+ if (achar (203) /= "Ë") STOP 1200
+ if ("Ë" /= achar ( ichar ( "Ë"))) STOP 1201
i = 203
c = "Ë"
- if (achar(i) /= "Ë") call abort
- if (iachar(c) /= iachar("Ë")) call abort
- if (iachar(achar(204)) /= 204) call abort
- if (iachar ("Ì")/= 204) call abort
- if (achar (204) /= "Ì") call abort
- if ("Ì" /= achar ( ichar ( "Ì"))) call abort
+ if (achar(i) /= "Ë") STOP 1202
+ if (iachar(c) /= iachar("Ë")) STOP 1203
+ if (iachar(achar(204)) /= 204) STOP 1204
+ if (iachar ("Ì")/= 204) STOP 1205
+ if (achar (204) /= "Ì") STOP 1206
+ if ("Ì" /= achar ( ichar ( "Ì"))) STOP 1207
i = 204
c = "Ì"
- if (achar(i) /= "Ì") call abort
- if (iachar(c) /= iachar("Ì")) call abort
- if (iachar(achar(205)) /= 205) call abort
- if (iachar ("Í")/= 205) call abort
- if (achar (205) /= "Í") call abort
- if ("Í" /= achar ( ichar ( "Í"))) call abort
+ if (achar(i) /= "Ì") STOP 1208
+ if (iachar(c) /= iachar("Ì")) STOP 1209
+ if (iachar(achar(205)) /= 205) STOP 1210
+ if (iachar ("Í")/= 205) STOP 1211
+ if (achar (205) /= "Í") STOP 1212
+ if ("Í" /= achar ( ichar ( "Í"))) STOP 1213
i = 205
c = "Í"
- if (achar(i) /= "Í") call abort
- if (iachar(c) /= iachar("Í")) call abort
- if (iachar(achar(206)) /= 206) call abort
- if (iachar ("Î")/= 206) call abort
- if (achar (206) /= "Î") call abort
- if ("Î" /= achar ( ichar ( "Î"))) call abort
+ if (achar(i) /= "Í") STOP 1214
+ if (iachar(c) /= iachar("Í")) STOP 1215
+ if (iachar(achar(206)) /= 206) STOP 1216
+ if (iachar ("Î")/= 206) STOP 1217
+ if (achar (206) /= "Î") STOP 1218
+ if ("Î" /= achar ( ichar ( "Î"))) STOP 1219
i = 206
c = "Î"
- if (achar(i) /= "Î") call abort
- if (iachar(c) /= iachar("Î")) call abort
- if (iachar(achar(207)) /= 207) call abort
- if (iachar ("Ï")/= 207) call abort
- if (achar (207) /= "Ï") call abort
- if ("Ï" /= achar ( ichar ( "Ï"))) call abort
+ if (achar(i) /= "Î") STOP 1220
+ if (iachar(c) /= iachar("Î")) STOP 1221
+ if (iachar(achar(207)) /= 207) STOP 1222
+ if (iachar ("Ï")/= 207) STOP 1223
+ if (achar (207) /= "Ï") STOP 1224
+ if ("Ï" /= achar ( ichar ( "Ï"))) STOP 1225
i = 207
c = "Ï"
- if (achar(i) /= "Ï") call abort
- if (iachar(c) /= iachar("Ï")) call abort
- if (iachar(achar(208)) /= 208) call abort
- if (iachar ("Ð")/= 208) call abort
- if (achar (208) /= "Ð") call abort
- if ("Ð" /= achar ( ichar ( "Ð"))) call abort
+ if (achar(i) /= "Ï") STOP 1226
+ if (iachar(c) /= iachar("Ï")) STOP 1227
+ if (iachar(achar(208)) /= 208) STOP 1228
+ if (iachar ("Ð")/= 208) STOP 1229
+ if (achar (208) /= "Ð") STOP 1230
+ if ("Ð" /= achar ( ichar ( "Ð"))) STOP 1231
i = 208
c = "Ð"
- if (achar(i) /= "Ð") call abort
- if (iachar(c) /= iachar("Ð")) call abort
- if (iachar(achar(209)) /= 209) call abort
- if (iachar ("Ñ")/= 209) call abort
- if (achar (209) /= "Ñ") call abort
- if ("Ñ" /= achar ( ichar ( "Ñ"))) call abort
+ if (achar(i) /= "Ð") STOP 1232
+ if (iachar(c) /= iachar("Ð")) STOP 1233
+ if (iachar(achar(209)) /= 209) STOP 1234
+ if (iachar ("Ñ")/= 209) STOP 1235
+ if (achar (209) /= "Ñ") STOP 1236
+ if ("Ñ" /= achar ( ichar ( "Ñ"))) STOP 1237
i = 209
c = "Ñ"
- if (achar(i) /= "Ñ") call abort
- if (iachar(c) /= iachar("Ñ")) call abort
- if (iachar(achar(210)) /= 210) call abort
- if (iachar ("Ò")/= 210) call abort
- if (achar (210) /= "Ò") call abort
- if ("Ò" /= achar ( ichar ( "Ò"))) call abort
+ if (achar(i) /= "Ñ") STOP 1238
+ if (iachar(c) /= iachar("Ñ")) STOP 1239
+ if (iachar(achar(210)) /= 210) STOP 1240
+ if (iachar ("Ò")/= 210) STOP 1241
+ if (achar (210) /= "Ò") STOP 1242
+ if ("Ò" /= achar ( ichar ( "Ò"))) STOP 1243
i = 210
c = "Ò"
- if (achar(i) /= "Ò") call abort
- if (iachar(c) /= iachar("Ò")) call abort
- if (iachar(achar(211)) /= 211) call abort
- if (iachar ("Ó")/= 211) call abort
- if (achar (211) /= "Ó") call abort
- if ("Ó" /= achar ( ichar ( "Ó"))) call abort
+ if (achar(i) /= "Ò") STOP 1244
+ if (iachar(c) /= iachar("Ò")) STOP 1245
+ if (iachar(achar(211)) /= 211) STOP 1246
+ if (iachar ("Ó")/= 211) STOP 1247
+ if (achar (211) /= "Ó") STOP 1248
+ if ("Ó" /= achar ( ichar ( "Ó"))) STOP 1249
i = 211
c = "Ó"
- if (achar(i) /= "Ó") call abort
- if (iachar(c) /= iachar("Ó")) call abort
- if (iachar(achar(212)) /= 212) call abort
- if (iachar ("Ô")/= 212) call abort
- if (achar (212) /= "Ô") call abort
- if ("Ô" /= achar ( ichar ( "Ô"))) call abort
+ if (achar(i) /= "Ó") STOP 1250
+ if (iachar(c) /= iachar("Ó")) STOP 1251
+ if (iachar(achar(212)) /= 212) STOP 1252
+ if (iachar ("Ô")/= 212) STOP 1253
+ if (achar (212) /= "Ô") STOP 1254
+ if ("Ô" /= achar ( ichar ( "Ô"))) STOP 1255
i = 212
c = "Ô"
- if (achar(i) /= "Ô") call abort
- if (iachar(c) /= iachar("Ô")) call abort
- if (iachar(achar(213)) /= 213) call abort
- if (iachar ("Õ")/= 213) call abort
- if (achar (213) /= "Õ") call abort
- if ("Õ" /= achar ( ichar ( "Õ"))) call abort
+ if (achar(i) /= "Ô") STOP 1256
+ if (iachar(c) /= iachar("Ô")) STOP 1257
+ if (iachar(achar(213)) /= 213) STOP 1258
+ if (iachar ("Õ")/= 213) STOP 1259
+ if (achar (213) /= "Õ") STOP 1260
+ if ("Õ" /= achar ( ichar ( "Õ"))) STOP 1261
i = 213
c = "Õ"
- if (achar(i) /= "Õ") call abort
- if (iachar(c) /= iachar("Õ")) call abort
- if (iachar(achar(214)) /= 214) call abort
- if (iachar ("Ö")/= 214) call abort
- if (achar (214) /= "Ö") call abort
- if ("Ö" /= achar ( ichar ( "Ö"))) call abort
+ if (achar(i) /= "Õ") STOP 1262
+ if (iachar(c) /= iachar("Õ")) STOP 1263
+ if (iachar(achar(214)) /= 214) STOP 1264
+ if (iachar ("Ö")/= 214) STOP 1265
+ if (achar (214) /= "Ö") STOP 1266
+ if ("Ö" /= achar ( ichar ( "Ö"))) STOP 1267
i = 214
c = "Ö"
- if (achar(i) /= "Ö") call abort
- if (iachar(c) /= iachar("Ö")) call abort
- if (iachar(achar(215)) /= 215) call abort
- if (iachar ("×")/= 215) call abort
- if (achar (215) /= "×") call abort
- if ("×" /= achar ( ichar ( "×"))) call abort
+ if (achar(i) /= "Ö") STOP 1268
+ if (iachar(c) /= iachar("Ö")) STOP 1269
+ if (iachar(achar(215)) /= 215) STOP 1270
+ if (iachar ("×")/= 215) STOP 1271
+ if (achar (215) /= "×") STOP 1272
+ if ("×" /= achar ( ichar ( "×"))) STOP 1273
i = 215
c = "×"
- if (achar(i) /= "×") call abort
- if (iachar(c) /= iachar("×")) call abort
- if (iachar(achar(216)) /= 216) call abort
- if (iachar ("Ø")/= 216) call abort
- if (achar (216) /= "Ø") call abort
- if ("Ø" /= achar ( ichar ( "Ø"))) call abort
+ if (achar(i) /= "×") STOP 1274
+ if (iachar(c) /= iachar("×")) STOP 1275
+ if (iachar(achar(216)) /= 216) STOP 1276
+ if (iachar ("Ø")/= 216) STOP 1277
+ if (achar (216) /= "Ø") STOP 1278
+ if ("Ø" /= achar ( ichar ( "Ø"))) STOP 1279
i = 216
c = "Ø"
- if (achar(i) /= "Ø") call abort
- if (iachar(c) /= iachar("Ø")) call abort
- if (iachar(achar(217)) /= 217) call abort
- if (iachar ("Ù")/= 217) call abort
- if (achar (217) /= "Ù") call abort
- if ("Ù" /= achar ( ichar ( "Ù"))) call abort
+ if (achar(i) /= "Ø") STOP 1280
+ if (iachar(c) /= iachar("Ø")) STOP 1281
+ if (iachar(achar(217)) /= 217) STOP 1282
+ if (iachar ("Ù")/= 217) STOP 1283
+ if (achar (217) /= "Ù") STOP 1284
+ if ("Ù" /= achar ( ichar ( "Ù"))) STOP 1285
i = 217
c = "Ù"
- if (achar(i) /= "Ù") call abort
- if (iachar(c) /= iachar("Ù")) call abort
- if (iachar(achar(218)) /= 218) call abort
- if (iachar ("Ú")/= 218) call abort
- if (achar (218) /= "Ú") call abort
- if ("Ú" /= achar ( ichar ( "Ú"))) call abort
+ if (achar(i) /= "Ù") STOP 1286
+ if (iachar(c) /= iachar("Ù")) STOP 1287
+ if (iachar(achar(218)) /= 218) STOP 1288
+ if (iachar ("Ú")/= 218) STOP 1289
+ if (achar (218) /= "Ú") STOP 1290
+ if ("Ú" /= achar ( ichar ( "Ú"))) STOP 1291
i = 218
c = "Ú"
- if (achar(i) /= "Ú") call abort
- if (iachar(c) /= iachar("Ú")) call abort
- if (iachar(achar(219)) /= 219) call abort
- if (iachar ("Û")/= 219) call abort
- if (achar (219) /= "Û") call abort
- if ("Û" /= achar ( ichar ( "Û"))) call abort
+ if (achar(i) /= "Ú") STOP 1292
+ if (iachar(c) /= iachar("Ú")) STOP 1293
+ if (iachar(achar(219)) /= 219) STOP 1294
+ if (iachar ("Û")/= 219) STOP 1295
+ if (achar (219) /= "Û") STOP 1296
+ if ("Û" /= achar ( ichar ( "Û"))) STOP 1297
i = 219
c = "Û"
- if (achar(i) /= "Û") call abort
- if (iachar(c) /= iachar("Û")) call abort
- if (iachar(achar(220)) /= 220) call abort
- if (iachar ("Ü")/= 220) call abort
- if (achar (220) /= "Ü") call abort
- if ("Ü" /= achar ( ichar ( "Ü"))) call abort
+ if (achar(i) /= "Û") STOP 1298
+ if (iachar(c) /= iachar("Û")) STOP 1299
+ if (iachar(achar(220)) /= 220) STOP 1300
+ if (iachar ("Ü")/= 220) STOP 1301
+ if (achar (220) /= "Ü") STOP 1302
+ if ("Ü" /= achar ( ichar ( "Ü"))) STOP 1303
i = 220
c = "Ü"
- if (achar(i) /= "Ü") call abort
- if (iachar(c) /= iachar("Ü")) call abort
- if (iachar(achar(221)) /= 221) call abort
- if (iachar ("Ý")/= 221) call abort
- if (achar (221) /= "Ý") call abort
- if ("Ý" /= achar ( ichar ( "Ý"))) call abort
+ if (achar(i) /= "Ü") STOP 1304
+ if (iachar(c) /= iachar("Ü")) STOP 1305
+ if (iachar(achar(221)) /= 221) STOP 1306
+ if (iachar ("Ý")/= 221) STOP 1307
+ if (achar (221) /= "Ý") STOP 1308
+ if ("Ý" /= achar ( ichar ( "Ý"))) STOP 1309
i = 221
c = "Ý"
- if (achar(i) /= "Ý") call abort
- if (iachar(c) /= iachar("Ý")) call abort
- if (iachar(achar(222)) /= 222) call abort
- if (iachar ("Þ")/= 222) call abort
- if (achar (222) /= "Þ") call abort
- if ("Þ" /= achar ( ichar ( "Þ"))) call abort
+ if (achar(i) /= "Ý") STOP 1310
+ if (iachar(c) /= iachar("Ý")) STOP 1311
+ if (iachar(achar(222)) /= 222) STOP 1312
+ if (iachar ("Þ")/= 222) STOP 1313
+ if (achar (222) /= "Þ") STOP 1314
+ if ("Þ" /= achar ( ichar ( "Þ"))) STOP 1315
i = 222
c = "Þ"
- if (achar(i) /= "Þ") call abort
- if (iachar(c) /= iachar("Þ")) call abort
- if (iachar(achar(223)) /= 223) call abort
- if (iachar ("ß")/= 223) call abort
- if (achar (223) /= "ß") call abort
- if ("ß" /= achar ( ichar ( "ß"))) call abort
+ if (achar(i) /= "Þ") STOP 1316
+ if (iachar(c) /= iachar("Þ")) STOP 1317
+ if (iachar(achar(223)) /= 223) STOP 1318
+ if (iachar ("ß")/= 223) STOP 1319
+ if (achar (223) /= "ß") STOP 1320
+ if ("ß" /= achar ( ichar ( "ß"))) STOP 1321
i = 223
c = "ß"
- if (achar(i) /= "ß") call abort
- if (iachar(c) /= iachar("ß")) call abort
- if (iachar(achar(224)) /= 224) call abort
- if (iachar ("à")/= 224) call abort
- if (achar (224) /= "à") call abort
- if ("à" /= achar ( ichar ( "à"))) call abort
+ if (achar(i) /= "ß") STOP 1322
+ if (iachar(c) /= iachar("ß")) STOP 1323
+ if (iachar(achar(224)) /= 224) STOP 1324
+ if (iachar ("à")/= 224) STOP 1325
+ if (achar (224) /= "à") STOP 1326
+ if ("à" /= achar ( ichar ( "à"))) STOP 1327
i = 224
c = "à"
- if (achar(i) /= "à") call abort
- if (iachar(c) /= iachar("à")) call abort
- if (iachar(achar(225)) /= 225) call abort
- if (iachar ("á")/= 225) call abort
- if (achar (225) /= "á") call abort
- if ("á" /= achar ( ichar ( "á"))) call abort
+ if (achar(i) /= "à") STOP 1328
+ if (iachar(c) /= iachar("à")) STOP 1329
+ if (iachar(achar(225)) /= 225) STOP 1330
+ if (iachar ("á")/= 225) STOP 1331
+ if (achar (225) /= "á") STOP 1332
+ if ("á" /= achar ( ichar ( "á"))) STOP 1333
i = 225
c = "á"
- if (achar(i) /= "á") call abort
- if (iachar(c) /= iachar("á")) call abort
- if (iachar(achar(226)) /= 226) call abort
- if (iachar ("â")/= 226) call abort
- if (achar (226) /= "â") call abort
- if ("â" /= achar ( ichar ( "â"))) call abort
+ if (achar(i) /= "á") STOP 1334
+ if (iachar(c) /= iachar("á")) STOP 1335
+ if (iachar(achar(226)) /= 226) STOP 1336
+ if (iachar ("â")/= 226) STOP 1337
+ if (achar (226) /= "â") STOP 1338
+ if ("â" /= achar ( ichar ( "â"))) STOP 1339
i = 226
c = "â"
- if (achar(i) /= "â") call abort
- if (iachar(c) /= iachar("â")) call abort
- if (iachar(achar(227)) /= 227) call abort
- if (iachar ("ã")/= 227) call abort
- if (achar (227) /= "ã") call abort
- if ("ã" /= achar ( ichar ( "ã"))) call abort
+ if (achar(i) /= "â") STOP 1340
+ if (iachar(c) /= iachar("â")) STOP 1341
+ if (iachar(achar(227)) /= 227) STOP 1342
+ if (iachar ("ã")/= 227) STOP 1343
+ if (achar (227) /= "ã") STOP 1344
+ if ("ã" /= achar ( ichar ( "ã"))) STOP 1345
i = 227
c = "ã"
- if (achar(i) /= "ã") call abort
- if (iachar(c) /= iachar("ã")) call abort
- if (iachar(achar(228)) /= 228) call abort
- if (iachar ("ä")/= 228) call abort
- if (achar (228) /= "ä") call abort
- if ("ä" /= achar ( ichar ( "ä"))) call abort
+ if (achar(i) /= "ã") STOP 1346
+ if (iachar(c) /= iachar("ã")) STOP 1347
+ if (iachar(achar(228)) /= 228) STOP 1348
+ if (iachar ("ä")/= 228) STOP 1349
+ if (achar (228) /= "ä") STOP 1350
+ if ("ä" /= achar ( ichar ( "ä"))) STOP 1351
i = 228
c = "ä"
- if (achar(i) /= "ä") call abort
- if (iachar(c) /= iachar("ä")) call abort
- if (iachar(achar(229)) /= 229) call abort
- if (iachar ("å")/= 229) call abort
- if (achar (229) /= "å") call abort
- if ("å" /= achar ( ichar ( "å"))) call abort
+ if (achar(i) /= "ä") STOP 1352
+ if (iachar(c) /= iachar("ä")) STOP 1353
+ if (iachar(achar(229)) /= 229) STOP 1354
+ if (iachar ("å")/= 229) STOP 1355
+ if (achar (229) /= "å") STOP 1356
+ if ("å" /= achar ( ichar ( "å"))) STOP 1357
i = 229
c = "å"
- if (achar(i) /= "å") call abort
- if (iachar(c) /= iachar("å")) call abort
- if (iachar(achar(230)) /= 230) call abort
- if (iachar ("æ")/= 230) call abort
- if (achar (230) /= "æ") call abort
- if ("æ" /= achar ( ichar ( "æ"))) call abort
+ if (achar(i) /= "å") STOP 1358
+ if (iachar(c) /= iachar("å")) STOP 1359
+ if (iachar(achar(230)) /= 230) STOP 1360
+ if (iachar ("æ")/= 230) STOP 1361
+ if (achar (230) /= "æ") STOP 1362
+ if ("æ" /= achar ( ichar ( "æ"))) STOP 1363
i = 230
c = "æ"
- if (achar(i) /= "æ") call abort
- if (iachar(c) /= iachar("æ")) call abort
- if (iachar(achar(231)) /= 231) call abort
- if (iachar ("ç")/= 231) call abort
- if (achar (231) /= "ç") call abort
- if ("ç" /= achar ( ichar ( "ç"))) call abort
+ if (achar(i) /= "æ") STOP 1364
+ if (iachar(c) /= iachar("æ")) STOP 1365
+ if (iachar(achar(231)) /= 231) STOP 1366
+ if (iachar ("ç")/= 231) STOP 1367
+ if (achar (231) /= "ç") STOP 1368
+ if ("ç" /= achar ( ichar ( "ç"))) STOP 1369
i = 231
c = "ç"
- if (achar(i) /= "ç") call abort
- if (iachar(c) /= iachar("ç")) call abort
- if (iachar(achar(232)) /= 232) call abort
- if (iachar ("è")/= 232) call abort
- if (achar (232) /= "è") call abort
- if ("è" /= achar ( ichar ( "è"))) call abort
+ if (achar(i) /= "ç") STOP 1370
+ if (iachar(c) /= iachar("ç")) STOP 1371
+ if (iachar(achar(232)) /= 232) STOP 1372
+ if (iachar ("è")/= 232) STOP 1373
+ if (achar (232) /= "è") STOP 1374
+ if ("è" /= achar ( ichar ( "è"))) STOP 1375
i = 232
c = "è"
- if (achar(i) /= "è") call abort
- if (iachar(c) /= iachar("è")) call abort
- if (iachar(achar(233)) /= 233) call abort
- if (iachar ("é")/= 233) call abort
- if (achar (233) /= "é") call abort
- if ("é" /= achar ( ichar ( "é"))) call abort
+ if (achar(i) /= "è") STOP 1376
+ if (iachar(c) /= iachar("è")) STOP 1377
+ if (iachar(achar(233)) /= 233) STOP 1378
+ if (iachar ("é")/= 233) STOP 1379
+ if (achar (233) /= "é") STOP 1380
+ if ("é" /= achar ( ichar ( "é"))) STOP 1381
i = 233
c = "é"
- if (achar(i) /= "é") call abort
- if (iachar(c) /= iachar("é")) call abort
- if (iachar(achar(234)) /= 234) call abort
- if (iachar ("ê")/= 234) call abort
- if (achar (234) /= "ê") call abort
- if ("ê" /= achar ( ichar ( "ê"))) call abort
+ if (achar(i) /= "é") STOP 1382
+ if (iachar(c) /= iachar("é")) STOP 1383
+ if (iachar(achar(234)) /= 234) STOP 1384
+ if (iachar ("ê")/= 234) STOP 1385
+ if (achar (234) /= "ê") STOP 1386
+ if ("ê" /= achar ( ichar ( "ê"))) STOP 1387
i = 234
c = "ê"
- if (achar(i) /= "ê") call abort
- if (iachar(c) /= iachar("ê")) call abort
- if (iachar(achar(235)) /= 235) call abort
- if (iachar ("ë")/= 235) call abort
- if (achar (235) /= "ë") call abort
- if ("ë" /= achar ( ichar ( "ë"))) call abort
+ if (achar(i) /= "ê") STOP 1388
+ if (iachar(c) /= iachar("ê")) STOP 1389
+ if (iachar(achar(235)) /= 235) STOP 1390
+ if (iachar ("ë")/= 235) STOP 1391
+ if (achar (235) /= "ë") STOP 1392
+ if ("ë" /= achar ( ichar ( "ë"))) STOP 1393
i = 235
c = "ë"
- if (achar(i) /= "ë") call abort
- if (iachar(c) /= iachar("ë")) call abort
- if (iachar(achar(236)) /= 236) call abort
- if (iachar ("ì")/= 236) call abort
- if (achar (236) /= "ì") call abort
- if ("ì" /= achar ( ichar ( "ì"))) call abort
+ if (achar(i) /= "ë") STOP 1394
+ if (iachar(c) /= iachar("ë")) STOP 1395
+ if (iachar(achar(236)) /= 236) STOP 1396
+ if (iachar ("ì")/= 236) STOP 1397
+ if (achar (236) /= "ì") STOP 1398
+ if ("ì" /= achar ( ichar ( "ì"))) STOP 1399
i = 236
c = "ì"
- if (achar(i) /= "ì") call abort
- if (iachar(c) /= iachar("ì")) call abort
- if (iachar(achar(237)) /= 237) call abort
- if (iachar ("í")/= 237) call abort
- if (achar (237) /= "í") call abort
- if ("í" /= achar ( ichar ( "í"))) call abort
+ if (achar(i) /= "ì") STOP 1400
+ if (iachar(c) /= iachar("ì")) STOP 1401
+ if (iachar(achar(237)) /= 237) STOP 1402
+ if (iachar ("í")/= 237) STOP 1403
+ if (achar (237) /= "í") STOP 1404
+ if ("í" /= achar ( ichar ( "í"))) STOP 1405
i = 237
c = "í"
- if (achar(i) /= "í") call abort
- if (iachar(c) /= iachar("í")) call abort
- if (iachar(achar(238)) /= 238) call abort
- if (iachar ("î")/= 238) call abort
- if (achar (238) /= "î") call abort
- if ("î" /= achar ( ichar ( "î"))) call abort
+ if (achar(i) /= "í") STOP 1406
+ if (iachar(c) /= iachar("í")) STOP 1407
+ if (iachar(achar(238)) /= 238) STOP 1408
+ if (iachar ("î")/= 238) STOP 1409
+ if (achar (238) /= "î") STOP 1410
+ if ("î" /= achar ( ichar ( "î"))) STOP 1411
i = 238
c = "î"
- if (achar(i) /= "î") call abort
- if (iachar(c) /= iachar("î")) call abort
- if (iachar(achar(239)) /= 239) call abort
- if (iachar ("ï")/= 239) call abort
- if (achar (239) /= "ï") call abort
- if ("ï" /= achar ( ichar ( "ï"))) call abort
+ if (achar(i) /= "î") STOP 1412
+ if (iachar(c) /= iachar("î")) STOP 1413
+ if (iachar(achar(239)) /= 239) STOP 1414
+ if (iachar ("ï")/= 239) STOP 1415
+ if (achar (239) /= "ï") STOP 1416
+ if ("ï" /= achar ( ichar ( "ï"))) STOP 1417
i = 239
c = "ï"
- if (achar(i) /= "ï") call abort
- if (iachar(c) /= iachar("ï")) call abort
- if (iachar(achar(240)) /= 240) call abort
- if (iachar ("ð")/= 240) call abort
- if (achar (240) /= "ð") call abort
- if ("ð" /= achar ( ichar ( "ð"))) call abort
+ if (achar(i) /= "ï") STOP 1418
+ if (iachar(c) /= iachar("ï")) STOP 1419
+ if (iachar(achar(240)) /= 240) STOP 1420
+ if (iachar ("ð")/= 240) STOP 1421
+ if (achar (240) /= "ð") STOP 1422
+ if ("ð" /= achar ( ichar ( "ð"))) STOP 1423
i = 240
c = "ð"
- if (achar(i) /= "ð") call abort
- if (iachar(c) /= iachar("ð")) call abort
- if (iachar(achar(241)) /= 241) call abort
- if (iachar ("ñ")/= 241) call abort
- if (achar (241) /= "ñ") call abort
- if ("ñ" /= achar ( ichar ( "ñ"))) call abort
+ if (achar(i) /= "ð") STOP 1424
+ if (iachar(c) /= iachar("ð")) STOP 1425
+ if (iachar(achar(241)) /= 241) STOP 1426
+ if (iachar ("ñ")/= 241) STOP 1427
+ if (achar (241) /= "ñ") STOP 1428
+ if ("ñ" /= achar ( ichar ( "ñ"))) STOP 1429
i = 241
c = "ñ"
- if (achar(i) /= "ñ") call abort
- if (iachar(c) /= iachar("ñ")) call abort
- if (iachar(achar(242)) /= 242) call abort
- if (iachar ("ò")/= 242) call abort
- if (achar (242) /= "ò") call abort
- if ("ò" /= achar ( ichar ( "ò"))) call abort
+ if (achar(i) /= "ñ") STOP 1430
+ if (iachar(c) /= iachar("ñ")) STOP 1431
+ if (iachar(achar(242)) /= 242) STOP 1432
+ if (iachar ("ò")/= 242) STOP 1433
+ if (achar (242) /= "ò") STOP 1434
+ if ("ò" /= achar ( ichar ( "ò"))) STOP 1435
i = 242
c = "ò"
- if (achar(i) /= "ò") call abort
- if (iachar(c) /= iachar("ò")) call abort
- if (iachar(achar(243)) /= 243) call abort
- if (iachar ("ó")/= 243) call abort
- if (achar (243) /= "ó") call abort
- if ("ó" /= achar ( ichar ( "ó"))) call abort
+ if (achar(i) /= "ò") STOP 1436
+ if (iachar(c) /= iachar("ò")) STOP 1437
+ if (iachar(achar(243)) /= 243) STOP 1438
+ if (iachar ("ó")/= 243) STOP 1439
+ if (achar (243) /= "ó") STOP 1440
+ if ("ó" /= achar ( ichar ( "ó"))) STOP 1441
i = 243
c = "ó"
- if (achar(i) /= "ó") call abort
- if (iachar(c) /= iachar("ó")) call abort
- if (iachar(achar(244)) /= 244) call abort
- if (iachar ("ô")/= 244) call abort
- if (achar (244) /= "ô") call abort
- if ("ô" /= achar ( ichar ( "ô"))) call abort
+ if (achar(i) /= "ó") STOP 1442
+ if (iachar(c) /= iachar("ó")) STOP 1443
+ if (iachar(achar(244)) /= 244) STOP 1444
+ if (iachar ("ô")/= 244) STOP 1445
+ if (achar (244) /= "ô") STOP 1446
+ if ("ô" /= achar ( ichar ( "ô"))) STOP 1447
i = 244
c = "ô"
- if (achar(i) /= "ô") call abort
- if (iachar(c) /= iachar("ô")) call abort
- if (iachar(achar(245)) /= 245) call abort
- if (iachar ("õ")/= 245) call abort
- if (achar (245) /= "õ") call abort
- if ("õ" /= achar ( ichar ( "õ"))) call abort
+ if (achar(i) /= "ô") STOP 1448
+ if (iachar(c) /= iachar("ô")) STOP 1449
+ if (iachar(achar(245)) /= 245) STOP 1450
+ if (iachar ("õ")/= 245) STOP 1451
+ if (achar (245) /= "õ") STOP 1452
+ if ("õ" /= achar ( ichar ( "õ"))) STOP 1453
i = 245
c = "õ"
- if (achar(i) /= "õ") call abort
- if (iachar(c) /= iachar("õ")) call abort
- if (iachar(achar(246)) /= 246) call abort
- if (iachar ("ö")/= 246) call abort
- if (achar (246) /= "ö") call abort
- if ("ö" /= achar ( ichar ( "ö"))) call abort
+ if (achar(i) /= "õ") STOP 1454
+ if (iachar(c) /= iachar("õ")) STOP 1455
+ if (iachar(achar(246)) /= 246) STOP 1456
+ if (iachar ("ö")/= 246) STOP 1457
+ if (achar (246) /= "ö") STOP 1458
+ if ("ö" /= achar ( ichar ( "ö"))) STOP 1459
i = 246
c = "ö"
- if (achar(i) /= "ö") call abort
- if (iachar(c) /= iachar("ö")) call abort
- if (iachar(achar(247)) /= 247) call abort
- if (iachar ("÷")/= 247) call abort
- if (achar (247) /= "÷") call abort
- if ("÷" /= achar ( ichar ( "÷"))) call abort
+ if (achar(i) /= "ö") STOP 1460
+ if (iachar(c) /= iachar("ö")) STOP 1461
+ if (iachar(achar(247)) /= 247) STOP 1462
+ if (iachar ("÷")/= 247) STOP 1463
+ if (achar (247) /= "÷") STOP 1464
+ if ("÷" /= achar ( ichar ( "÷"))) STOP 1465
i = 247
c = "÷"
- if (achar(i) /= "÷") call abort
- if (iachar(c) /= iachar("÷")) call abort
- if (iachar(achar(248)) /= 248) call abort
- if (iachar ("ø")/= 248) call abort
- if (achar (248) /= "ø") call abort
- if ("ø" /= achar ( ichar ( "ø"))) call abort
+ if (achar(i) /= "÷") STOP 1466
+ if (iachar(c) /= iachar("÷")) STOP 1467
+ if (iachar(achar(248)) /= 248) STOP 1468
+ if (iachar ("ø")/= 248) STOP 1469
+ if (achar (248) /= "ø") STOP 1470
+ if ("ø" /= achar ( ichar ( "ø"))) STOP 1471
i = 248
c = "ø"
- if (achar(i) /= "ø") call abort
- if (iachar(c) /= iachar("ø")) call abort
- if (iachar(achar(249)) /= 249) call abort
- if (iachar ("ù")/= 249) call abort
- if (achar (249) /= "ù") call abort
- if ("ù" /= achar ( ichar ( "ù"))) call abort
+ if (achar(i) /= "ø") STOP 1472
+ if (iachar(c) /= iachar("ø")) STOP 1473
+ if (iachar(achar(249)) /= 249) STOP 1474
+ if (iachar ("ù")/= 249) STOP 1475
+ if (achar (249) /= "ù") STOP 1476
+ if ("ù" /= achar ( ichar ( "ù"))) STOP 1477
i = 249
c = "ù"
- if (achar(i) /= "ù") call abort
- if (iachar(c) /= iachar("ù")) call abort
- if (iachar(achar(250)) /= 250) call abort
- if (iachar ("ú")/= 250) call abort
- if (achar (250) /= "ú") call abort
- if ("ú" /= achar ( ichar ( "ú"))) call abort
+ if (achar(i) /= "ù") STOP 1478
+ if (iachar(c) /= iachar("ù")) STOP 1479
+ if (iachar(achar(250)) /= 250) STOP 1480
+ if (iachar ("ú")/= 250) STOP 1481
+ if (achar (250) /= "ú") STOP 1482
+ if ("ú" /= achar ( ichar ( "ú"))) STOP 1483
i = 250
c = "ú"
- if (achar(i) /= "ú") call abort
- if (iachar(c) /= iachar("ú")) call abort
- if (iachar(achar(251)) /= 251) call abort
- if (iachar ("û")/= 251) call abort
- if (achar (251) /= "û") call abort
- if ("û" /= achar ( ichar ( "û"))) call abort
+ if (achar(i) /= "ú") STOP 1484
+ if (iachar(c) /= iachar("ú")) STOP 1485
+ if (iachar(achar(251)) /= 251) STOP 1486
+ if (iachar ("û")/= 251) STOP 1487
+ if (achar (251) /= "û") STOP 1488
+ if ("û" /= achar ( ichar ( "û"))) STOP 1489
i = 251
c = "û"
- if (achar(i) /= "û") call abort
- if (iachar(c) /= iachar("û")) call abort
- if (iachar(achar(252)) /= 252) call abort
- if (iachar ("ü")/= 252) call abort
- if (achar (252) /= "ü") call abort
- if ("ü" /= achar ( ichar ( "ü"))) call abort
+ if (achar(i) /= "û") STOP 1490
+ if (iachar(c) /= iachar("û")) STOP 1491
+ if (iachar(achar(252)) /= 252) STOP 1492
+ if (iachar ("ü")/= 252) STOP 1493
+ if (achar (252) /= "ü") STOP 1494
+ if ("ü" /= achar ( ichar ( "ü"))) STOP 1495
i = 252
c = "ü"
- if (achar(i) /= "ü") call abort
- if (iachar(c) /= iachar("ü")) call abort
- if (iachar(achar(253)) /= 253) call abort
- if (iachar ("ý")/= 253) call abort
- if (achar (253) /= "ý") call abort
- if ("ý" /= achar ( ichar ( "ý"))) call abort
+ if (achar(i) /= "ü") STOP 1496
+ if (iachar(c) /= iachar("ü")) STOP 1497
+ if (iachar(achar(253)) /= 253) STOP 1498
+ if (iachar ("ý")/= 253) STOP 1499
+ if (achar (253) /= "ý") STOP 1500
+ if ("ý" /= achar ( ichar ( "ý"))) STOP 1501
i = 253
c = "ý"
- if (achar(i) /= "ý") call abort
- if (iachar(c) /= iachar("ý")) call abort
- if (iachar(achar(254)) /= 254) call abort
- if (iachar ("þ")/= 254) call abort
- if (achar (254) /= "þ") call abort
- if ("þ" /= achar ( ichar ( "þ"))) call abort
+ if (achar(i) /= "ý") STOP 1502
+ if (iachar(c) /= iachar("ý")) STOP 1503
+ if (iachar(achar(254)) /= 254) STOP 1504
+ if (iachar ("þ")/= 254) STOP 1505
+ if (achar (254) /= "þ") STOP 1506
+ if ("þ" /= achar ( ichar ( "þ"))) STOP 1507
i = 254
c = "þ"
- if (achar(i) /= "þ") call abort
- if (iachar(c) /= iachar("þ")) call abort
- if (iachar(achar(255)) /= 255) call abort
- if (iachar ("ÿ")/= 255) call abort
- if (achar (255) /= "ÿ") call abort
- if ("ÿ" /= achar ( ichar ( "ÿ"))) call abort
+ if (achar(i) /= "þ") STOP 1508
+ if (iachar(c) /= iachar("þ")) STOP 1509
+ if (iachar(achar(255)) /= 255) STOP 1510
+ if (iachar ("ÿ")/= 255) STOP 1511
+ if (achar (255) /= "ÿ") STOP 1512
+ if ("ÿ" /= achar ( ichar ( "ÿ"))) STOP 1513
i = 255
c = "ÿ"
- if (achar(i) /= "ÿ") call abort
- if (iachar(c) /= iachar("ÿ")) call abort
+ if (achar(i) /= "ÿ") STOP 1514
+ if (iachar(c) /= iachar("ÿ")) STOP 1515
end program main
! The code comes from http://www.star.le.ac.uk/~cgp/fortran.html (by Clive Page)
! Reported by Thomas Koenig <tkoenig@gcc.gnu.org>
!
- if (any (Up ("AbCdEfGhIjKlM") .ne. (/"ABCDEFGHIJKLM"/))) call abort ()
+ if (any (Up ("AbCdEfGhIjKlM") .ne. (/"ABCDEFGHIJKLM"/))) STOP 1
contains
Character (len=20) Function Up (string)
Character(len=*) string
character(kind=4,len=1) :: s4
integer :: i, i1, i2, i3, i4
- if (i /= i1) call abort
- if (i /= i2) call abort
- if (i /= i3) call abort
- if (i /= i4) call abort
+ if (i /= i1) STOP 1
+ if (i /= i2) STOP 2
+ if (i /= i3) STOP 3
+ if (i /= i4) STOP 4
- if (iachar (s1) /= i) call abort
- if (iachar (s4) /= i) call abort
+ if (iachar (s1) /= i) STOP 5
+ if (iachar (s4) /= i) STOP 6
- if (ichar (s1) /= i) call abort
- if (ichar (s4) /= i) call abort
+ if (ichar (s1) /= i) STOP 7
+ if (ichar (s4) /= i) STOP 8
- if (achar(i, kind=1) /= s1) call abort
- if (achar(i, kind=4) /= s4) call abort
+ if (achar(i, kind=1) /= s1) STOP 9
+ if (achar(i, kind=4) /= s4) STOP 10
- if (char(i, kind=1) /= s1) call abort
- if (char(i, kind=4) /= s4) call abort
+ if (char(i, kind=1) /= s1) STOP 11
+ if (char(i, kind=4) /= s4) STOP 12
- if (iachar(achar(i, kind=1)) /= i) call abort
- if (iachar(achar(i, kind=4)) /= i) call abort
+ if (iachar(achar(i, kind=1)) /= i) STOP 13
+ if (iachar(achar(i, kind=4)) /= i) STOP 14
- if (ichar(char(i, kind=1)) /= i) call abort
- if (ichar(char(i, kind=4)) /= i) call abort
+ if (ichar(char(i, kind=1)) /= i) STOP 15
+ if (ichar(char(i, kind=4)) /= i) STOP 16
end subroutine test
character(kind=4,len=1) :: s4
integer :: i, i2, i4
- if (i /= i2) call abort
- if (i /= i4) call abort
+ if (i /= i2) STOP 17
+ if (i /= i4) STOP 18
- if (iachar (s4) /= i) call abort
- if (ichar (s4) /= i) call abort
- if (achar(i, kind=4) /= s4) call abort
- if (char(i, kind=4) /= s4) call abort
- if (iachar(achar(i, kind=4)) /= i) call abort
- if (ichar(char(i, kind=4)) /= i) call abort
+ if (iachar (s4) /= i) STOP 19
+ if (ichar (s4) /= i) STOP 20
+ if (achar(i, kind=4) /= s4) STOP 21
+ if (char(i, kind=4) /= s4) STOP 22
+ if (iachar(achar(i, kind=4)) /= i) STOP 23
+ if (ichar(char(i, kind=4)) /= i) STOP 24
end subroutine test_bis
end subroutine
subroutine redirect_ (ch)
character(*) :: ch(:)
- if (ch(1) /= line) call abort ()
+ if (ch(1) /= line) STOP 1
end subroutine redirect_
end module global
use global
type(point), pointer :: ptr
character(128) :: io(:)
- if (associated (ptr)) call abort ()
- if (io(1) .ne. line) call abort ()
+ if (associated (ptr)) STOP 2
+ if (io(1) .ne. line) STOP 3
end subroutine r
end module my_module
end subroutine option_stopwatch_s
subroutine option_stopwatch_a (a)
character (*) :: a(:)
- if (any (a .ne. (/'hello ','hola! ','goddag'/))) call abort ()
+ if (any (a .ne. (/'hello ','hola! ','goddag'/))) STOP 4
end subroutine option_stopwatch_a
end program main
! Test the original problem
call foo ((/( 'abcd',i=1,m )/), c2)
if (any(c2(:) .ne. (/'abcd','abcd', &
- 'abcd','abcd'/))) call abort ()
+ 'abcd','abcd'/))) STOP 1
! Now get a bit smarter
call foo ((/"abcd", "efgh", "ijkl", "mnop"/), c1) ! worked previously
call foo ((/(c1(i), i = m,1,-1)/), c2) ! was broken
- if (any(c2(4:1:-1) .ne. c1)) call abort ()
+ if (any(c2(4:1:-1) .ne. c1)) STOP 2
! gfc_todo: Not Implemented: complex character array constructors
call foo ((/(c1(i)(i/2+1:i/2+2), i = 1,4)/), c2) ! Ha! take that..!
- if (any (c2 .ne. (/"ab ","fg ","jk ","op "/))) call abort ()
+ if (any (c2 .ne. (/"ab ","fg ","jk ","op "/))) STOP 3
! Check functions in the constructor
call foo ((/(achar(64+i)//achar(68+i)//achar(72+i)// &
achar(76+i),i=1,4 )/), c1) ! was broken
- if (any (c1 .ne. (/"AEIM","BFJN","CGKO","DHLP"/))) call abort ()
+ if (any (c1 .ne. (/"AEIM","BFJN","CGKO","DHLP"/))) STOP 4
contains
subroutine foo (chr1, chr2)
character(*), dimension(:) :: chr1, chr2
enddo
summation = abs(summation - 11303932.9138271_8)
- if (summation.gt.0.00001) call abort()
+ if (summation.gt.0.00001) STOP 1
end program pr28914
array%value = int (1000000 * values)
! It would be pretty perverse if this failed!
- if (check (array)) call abort
+ if (check (array)) STOP 1
call quicksort( array )
! Check the the array is correctly ordered
- if (.not.check (array)) call abort
+ if (.not.check (array)) STOP 2
contains
logical function check (arg)
type(mysortable), dimension(:) :: arg
use one
integer :: n
n = 3
- if(any (foo1(n) /= [ 1,2,3 ])) call abort()
- if(any (foo2(n) /= [ 1,2,3 ])) call abort()
+ if(any (foo1(n) /= [ 1,2,3 ])) STOP 1
+ if(any (foo2(n) /= [ 1,2,3 ])) STOP 2
flag = 1
- if(any (foo1(n) /= [ 1,2,3 ])) call abort()
- if(any (foo2(n) /= [ 1,2,3 ])) call abort()
+ if(any (foo1(n) /= [ 1,2,3 ])) STOP 3
+ if(any (foo2(n) /= [ 1,2,3 ])) STOP 4
n = 5
- if(any (foo3(n) /= [ 0,1,2,3,0 ])) call abort()
+ if(any (foo3(n) /= [ 0,1,2,3,0 ])) STOP 5
end program
contains
subroutine foo (chr)
character(7) :: chr(:)
- if (chr(1)//chr(2) .ne. "rstuvwxfghijkl") call abort ()
+ if (chr(1)//chr(2) .ne. "rstuvwxfghijkl") STOP 1
end subroutine foo\r
subroutine bar (chr)
character(*) :: chr(:)
- if (trim(chr(1))//trim(chr(2)) .ne. "ghijkstuvw") call abort ()
+ if (trim(chr(1))//trim(chr(2)) .ne. "ghijkstuvw") STOP 2
end subroutine bar\r
end program gfcbug33\r
! Make sure that variable substring references work.
call foo (a(:)(m:m+5), c(:)(n:m+2), d(:)(5:9))
- if (any (a .ne. teststring)) call abort ()
- if (any (b .ne. teststring)) call abort ()
+ if (any (a .ne. teststring)) STOP 1
+ if (any (b .ne. teststring)) STOP 2
if (any (c .ne. (/"ab456789#hij", &
- "kl7654321rst"/))) call abort ()
+ "kl7654321rst"/))) STOP 3
if (any (d .ne. (/"abc 23456hij", &
- "klm 98765rst"/))) call abort ()
+ "klm 98765rst"/))) STOP 4
contains
subroutine foo (w, x, y)
character(len=*), intent(in) :: w(:)
"$#9876543210"/)
! This next is not required by the standard but tests the
! functioning of the gfortran implementation.
-! if (all (x(:)(3:7) .eq. y)) call abort ()
+! if (all (x(:)(3:7) .eq. y)) STOP 5
x = foostring (:)(5 : 4 + len (x))
y = foostring (:)(3 : 2 + len (y))
end subroutine foo
INTEGER :: a\r
END TYPE cp_logger_type\r
\r
- if (cp_logger_log(cp_get_default_logger (0))) call abort ()\r
- if (.not. cp_logger_log(cp_get_default_logger (42))) call abort ()\r
+ if (cp_logger_log(cp_get_default_logger (0))) STOP 1\r
+ if (.not. cp_logger_log(cp_get_default_logger (42))) STOP 2\r
\r
CONTAINS\r
\r
end interface
! Check the passing of a module function
call foo (proc4, chr)
- if (trim (chr) .ne. "proc4") call abort
+ if (trim (chr) .ne. "proc4") STOP 1
! Check the passing of an external function
call foo (proc_ext, chr)
! Check the passing of a character function
- if (trim (chr) .ne. "proc_ext") call abort
+ if (trim (chr) .ne. "proc_ext") STOP 2
call bar (chr_proc)
contains
subroutine foo (p, chr)
end function
end interface
i = p (99, chr)
- if (any(i .ne. 99)) call abort
+ if (any(i .ne. 99)) STOP 3
end subroutine
subroutine bar (p)
interface
character(8):: p
end function
end interface
- if (p () .ne. "chr_proc") call abort
+ if (p () .ne. "chr_proc") STOP 4
end subroutine
end program
PROGRAM test
character(len=10) :: u
WRITE(unit=u,fmt='(3A)') PACK(ADJUSTL([" a", " b"]), [.TRUE., .FALSE.])
- if (u .ne. 'a ') call abort
+ if (u .ne. 'a ') STOP 1
END PROGRAM test
write (10,'(TL2,A)') 'c'
rewind (10)
read (10, '(a)') str
- if (str.ne.'abc') call abort()
+ if (str.ne.'abc') STOP 1
close (10, status='delete')
end
close (12)
read (12, '(6A)') answer
close (12, status="delete")
- if (answer /= "XABCDX") call abort()
+ if (answer /= "XABCDX") STOP 1
end program main
open(10,file="fort.10",position="rewind")
read(10,'(a)') b
close(10, status="delete")
-if (b.ne."abcxxx") call abort()
+if (b.ne."abcxxx") STOP 1
end
backspace 95
c = 'xxx'
read (95,'(A)') c
- if (c /= 'ab ') call abort
+ if (c /= 'ab ') STOP 1
close (95)
call check_end_record
rewind 95
c = 'xxx'
read (95,'(A)') c
- if (c /= 'ab ') call abort
+ if (c /= 'ab ') STOP 2
close (95)
call check_end_record
rewind 95
c = 'xxx'
read (95,'(A)') c
- if (c /= 'ab ') call abort
+ if (c /= 'ab ') STOP 3
close (95)
call check_end_record
character(len=1) :: x
open(2003, file=fname, status="old", access="stream", form="unformatted")
read(2003) x
- if (x /= 'a') call abort
+ if (x /= 'a') STOP 4
read(2003) x
- if (x /= 'b') call abort
+ if (x /= 'b') STOP 5
read(2003) x
if (x /= achar(10)) then
read(2003) x
if (x /= achar(13)) then
else
- call abort
+ STOP 6
end if
end if
close(2003,status="delete")
r1 = aint(r)
r2 = aint(r,kind=8)
- if (abs(r1 - r2) > 0.1) call abort()
+ if (abs(r1 - r2) > 0.1) STOP 1
r1 = anint(r)
r2 = anint(r,kind=8)
- if (abs(r1 - r2) > 0.1) call abort()
+ if (abs(r1 - r2) > 0.1) STOP 2
s1 = aint(s)
s2 = aint(s, kind=4)
- if (abs(s1 - s2) > 0.1) call abort()
+ if (abs(s1 - s2) > 0.1) STOP 3
s1 = anint(s)
s2 = anint(s, kind=4)
- if (abs(s1 - s2) > 0.1) call abort()
+ if (abs(s1 - s2) > 0.1) STOP 4
end program aint_anint_1
if (any (c .ne. check)) call myabort (7)
call aaa
call tobias
- if (abort_flag) call abort
+ if (abort_flag) STOP 1
contains
function f()
integer :: f(ONE)
! Test 1D with assumed shape (original bug) and assumed size.
call bar (table, 2, 4)
- if (any (table%list%word.ne.(/"one ","i= 2","three","i= 4"/))) call abort ()
+ if (any (table%list%word.ne.(/"one ","i= 2","three","i= 4"/))) STOP 1
elist = reshape (table%list, (/2,2/))
! Check 2D is OK with assumed shape and assumed size.
call foo3 (elist%word, 1)
call foo1 (elist%word, 3)
- if (any (elist%word.ne.reshape ((/"i= 1","i= 2","i= 3","i= 4"/), (/2,2/)))) call abort ()
+ if (any (elist%word.ne.reshape ((/"i= 1","i= 2","i= 3","i= 4"/), (/2,2/)))) STOP 2
contains
call test_sub(s%a(1, 1), 1000) ! Test the original problem.
- if ( any (s(1, 1)%a(:, :) /= reshape ([1111, 112, 121, 122], [2, 2]))) call abort ()
- if ( any (s(1, 2)%a(:, :) /= reshape ([1121, 122, 141, 142], [2, 2]))) call abort ()
- if ( any (s(2, 1)%a(:, :) /= reshape ([1112, 114, 122, 124], [2, 2]))) call abort ()
- if ( any (s(2, 2)%a(:, :) /= reshape ([1122, 124, 142, 144], [2, 2]))) call abort ()
+ if ( any (s(1, 1)%a(:, :) /= reshape ([1111, 112, 121, 122], [2, 2]))) STOP 1
+ if ( any (s(1, 2)%a(:, :) /= reshape ([1121, 122, 141, 142], [2, 2]))) STOP 2
+ if ( any (s(2, 1)%a(:, :) /= reshape ([1112, 114, 122, 124], [2, 2]))) STOP 3
+ if ( any (s(2, 2)%a(:, :) /= reshape ([1122, 124, 142, 144], [2, 2]))) STOP 4
call test_sub(s(1, 1)%a(:, :), 1000) ! Check "normal" references.
- if ( any (s(1, 1)%a(:, :) /= reshape ([2111,1112,1121,1122], [2, 2]))) call abort ()
- if ( any (s(1, 2)%a(:, :) /= reshape ([1121, 122, 141, 142], [2, 2]))) call abort ()
- if ( any (s(2, 1)%a(:, :) /= reshape ([1112, 114, 122, 124], [2, 2]))) call abort ()
- if ( any (s(2, 2)%a(:, :) /= reshape ([1122, 124, 142, 144], [2, 2]))) call abort ()
+ if ( any (s(1, 1)%a(:, :) /= reshape ([2111,1112,1121,1122], [2, 2]))) STOP 5
+ if ( any (s(1, 2)%a(:, :) /= reshape ([1121, 122, 141, 142], [2, 2]))) STOP 6
+ if ( any (s(2, 1)%a(:, :) /= reshape ([1112, 114, 122, 124], [2, 2]))) STOP 7
+ if ( any (s(2, 2)%a(:, :) /= reshape ([1122, 124, 142, 144], [2, 2]))) STOP 8
contains
subroutine test_sub(array, offset)
integer array(:, :), offset
IMPLICIT NONE
arr = (/ 1, 2, 3 /)
CALL bar(arr)
- if (any (arr /= (/ 1, 1, 2 /))) call abort()
+ if (any (arr /= (/ 1, 1, 2 /))) STOP 1
CALL test()
contains
subroutine bar(x)
INTEGER, TARGET :: arg(:)
arr(1) = 5
arg(1) = 6
- if (arr(1) == 5) call abort()
+ if (arr(1) == 5) STOP 2
END SUBROUTINE foobar
END MODULE m2
subroutine test
! An intrinsic assignment must deallocate the l-value and copy across
! the array from the r-value.
b = a
- if (any (b%chars .ne. (/"h","e","l","l","o"/))) call abort ()
- if (allocated (a%chars) .eqv. .false.) call abort ()
+ if (any (b%chars .ne. (/"h","e","l","l","o"/))) STOP 1
+ if (allocated (a%chars) .eqv. .false.) STOP 2
! Scalar to array needs to copy the derived type, to its ultimate components,
! to each of the l-value elements. */
x = b
x(2)%chars = (/"g","'","d","a","y"/)
- if (any (x(1)%chars .ne. (/"h","e","l","l","o"/))) call abort ()
- if (any (x(2)%chars .ne. (/"g","'","d","a","y"/))) call abort ()
- if (allocated (b%chars) .eqv. .false.) call abort ()
+ if (any (x(1)%chars .ne. (/"h","e","l","l","o"/))) STOP 3
+ if (any (x(2)%chars .ne. (/"g","'","d","a","y"/))) STOP 4
+ if (allocated (b%chars) .eqv. .false.) STOP 5
deallocate (x(1)%chars, x(2)%chars, x(3)%chars)
! Array intrinsic assignments are like their scalar counterpart and
x(2)%chars = (/"g","'","d","a","y"/)
x(3)%chars = (/"g","o","d","a","g"/)
y(2:1:-1) = x(1:2)
- if (any (y(1)%chars .ne. (/"g","'","d","a","y"/))) call abort ()
- if (any (y(2)%chars .ne. (/"h","e","l","l","o"/))) call abort ()
- if (any (x(3)%chars .ne. (/"g","o","d","a","g"/))) call abort ()
+ if (any (y(1)%chars .ne. (/"g","'","d","a","y"/))) STOP 6
+ if (any (y(2)%chars .ne. (/"h","e","l","l","o"/))) STOP 7
+ if (any (x(3)%chars .ne. (/"g","o","d","a","g"/))) STOP 8
! In the case of an assignment where there is a dependency, so that a
! temporary is necessary, each element must be copied to its
! destination after it has been deallocated.
y(2:3) = y(1:2)
- if (any (y(1)%chars .ne. (/"g","'","d","a","y"/))) call abort ()
- if (any (y(2)%chars .ne. (/"g","'","d","a","y"/))) call abort ()
- if (any (y(3)%chars .ne. (/"h","e","l","l","o"/))) call abort ()
+ if (any (y(1)%chars .ne. (/"g","'","d","a","y"/))) STOP 9
+ if (any (y(2)%chars .ne. (/"g","'","d","a","y"/))) STOP 10
+ if (any (y(3)%chars .ne. (/"h","e","l","l","o"/))) STOP 11
! An identity assignment must not do any deallocation....!
y = y
- if (any (y(1)%chars .ne. (/"g","'","d","a","y"/))) call abort ()
- if (any (y(2)%chars .ne. (/"g","'","d","a","y"/))) call abort ()
- if (any (y(3)%chars .ne. (/"h","e","l","l","o"/))) call abort ()
+ if (any (y(1)%chars .ne. (/"g","'","d","a","y"/))) STOP 12
+ if (any (y(2)%chars .ne. (/"g","'","d","a","y"/))) STOP 13
+ if (any (y(3)%chars .ne. (/"h","e","l","l","o"/))) STOP 14
end
u%design%bunch_params%n_live_particle = [(i, i = 0, n)]
u%model = u%design
u%model = u%design ! The double assignment was the cause of the ICE
- if (.not. allocated (u%model%bunch_params)) call abort
- if (any (u%model%bunch_params%n_live_particle .ne. [(i, i = 0, n)])) call abort
+ if (.not. allocated (u%model%bunch_params)) STOP 1
+ if (any (u%model%bunch_params%n_live_particle .ne. [(i, i = 0, n)])) STOP 2
Deallocate (u%model%bunch_params, u%design%bunch_params)
deallocate (u%design, u%model)
deallocate (s%u)
!print *, z(1)%a, z(2)%a, x%A, y%A
if (any (z(1)%a /= 11) .or. z(2)%a(1) /= 22 .or. any (x%A /= 11) &
.or. y%A(1) /= 22) &
- call abort()
+ STOP 1
x%A(:) = 444
y%A(:) = 555
!print *, z(1)%a, z(2)%a, x%A, y%A
if (any (z(1)%a /= 11) .or. z(2)%a(1) /= 22 .or. any (x%A /= 444) &
.or. y%A(1) /= 555) &
- call abort()
+ STOP 2
z(:) = [ x, y ]
!print *, z(1)%a, z(2)%a, x%A, y%A
if (any (z(1)%a /= 444) .or. z(2)%a(1) /= 555 .or. any (x%A /= 444) &
.or. y%A(1) /= 555) &
- call abort()
+ STOP 3
end
class(foo_t) :: this
real, intent(in) :: u(:)
this%u = u(int (u)) ! The failure to allocate occurred here.
- if (.not.allocated (this%u)) call abort
+ if (.not.allocated (this%u)) STOP 1
end subroutine make
function disp(this)
implicit none
real, allocatable :: u(:)
u=real ([3,2,1,4])
call o%make(u)
- if (any (int (o%disp()) .ne. [1,2,3,4])) call abort
+ if (any (int (o%disp()) .ne. [1,2,3,4])) STOP 2
u=real ([2,1])
call o%make(u)
- if (any (int (o%disp()) .ne. [1,2])) call abort
+ if (any (int (o%disp()) .ne. [1,2])) STOP 3
end program main2
Me= A(X= 1, Y= 2, C="correctly allocated")
- if (Me%X /= 1) call abort()
- if (.not. allocated(Me%y) .or. Me%y /= 2) call abort()
- if (.not. allocated(Me%c)) call abort()
- if (len(Me%c) /= 19) call abort()
- if (Me%c /= "correctly allocated") call abort()
+ if (Me%X /= 1) STOP 1
+ if (.not. allocated(Me%y) .or. Me%y /= 2) STOP 2
+ if (.not. allocated(Me%c)) STOP 3
+ if (len(Me%c) /= 19) STOP 4
+ if (Me%c /= "correctly allocated") STOP 5
! Now check explicitly allocated components.
Ea%X = 9
! Implicit allocate on assign in the next line
Ea%c = "13 characters"
- if (Ea%X /= 9) call abort()
- if (.not. allocated(Ea%y) .or. Ea%y /= 42) call abort()
- if (.not. allocated(Ea%c)) call abort()
- if (len(Ea%c) /= 13) call abort()
- if (Ea%c /= "13 characters") call abort()
+ if (Ea%X /= 9) STOP 6
+ if (.not. allocated(Ea%y) .or. Ea%y /= 42) STOP 7
+ if (.not. allocated(Ea%c)) STOP 8
+ if (len(Ea%c) /= 13) STOP 9
+ if (Ea%c /= "13 characters") STOP 10
deallocate(Ea%y)
deallocate(Ea%c)
- if (allocated(Ea%y)) call abort()
- if (allocated(Ea%c)) call abort()
+ if (allocated(Ea%y)) STOP 11
+ if (allocated(Ea%c)) STOP 12
end program
! vim:ts=4:sts=4:sw=4:
Me= A(X= 1, Y= 2, C="correctly allocated")
- if (Me%X /= 1) call abort()
- if (.not. allocated(Me%y) .or. Me%y /= 2) call abort()
- if (.not. allocated(Me%c)) call abort()
- if (len(Me%c) /= 19) call abort()
- if (Me%c /= "correctly allocated") call abort()
+ if (Me%X /= 1) STOP 1
+ if (.not. allocated(Me%y) .or. Me%y /= 2) STOP 2
+ if (.not. allocated(Me%c)) STOP 3
+ if (len(Me%c) /= 19) STOP 4
+ if (Me%c /= "correctly allocated") STOP 5
! Now check explicitly allocated components.
Ea%X = 9
! Implicit allocate on assign in the next line
Ea%c = "13 characters"
- if (Ea%X /= 9) call abort()
- if (.not. allocated(Ea%y) .or. Ea%y /= 42) call abort()
- if (.not. allocated(Ea%c)) call abort()
- if (len(Ea%c) /= 13) call abort()
- if (Ea%c /= "13 characters") call abort()
+ if (Ea%X /= 9) STOP 6
+ if (.not. allocated(Ea%y) .or. Ea%y /= 42) STOP 7
+ if (.not. allocated(Ea%c)) STOP 8
+ if (len(Ea%c) /= 13) STOP 9
+ if (Ea%c /= "13 characters") STOP 10
deallocate(Ea%y)
deallocate(Ea%c)
- if (allocated(Ea%y)) call abort()
- if (allocated(Ea%c)) call abort()
+ if (allocated(Ea%y)) STOP 11
+ if (allocated(Ea%c)) STOP 12
end program
allocate(X%P)
X%P%Source = 'test string'
- if (.not.allocated (X%P%Source)) call abort
- if (X%P%Source .ne. 'test string') call abort
+ if (.not.allocated (X%P%Source)) STOP 1
+ if (X%P%Source .ne. 'test string') STOP 2
end program Test1
x(2) = a ((/1, 2, 3, 4/) + 10)
forall (j = 1:2, i = 1:4, x(j)%i(i) > 2 + (j-1)*10) x(j)%i(i) = j*4-i
if (any ((/((x(i)%i(j), j = 1,4), i = 1,2)/) .ne. &
- (/1, 2, 1, 0, 11, 12, 5, 4/))) call abort ()
+ (/1, 2, 1, 0, 11, 12, 5, 4/))) STOP 1
y(1) = b ((/x(1),x(2)/))
y(2) = b ((/x(2),x(1)/))
y(k)%at(j)%i(i) = j*4-i+k
end forall
if (any ((/(((y(k)%at(i)%i(j), j = 1,4), i = 1,2), k = 1,2)/) .ne. &
- (/4,3,2,1,11,12,6,5,11,12,3,2,9,8,7,6/))) call abort ()
+ (/4,3,2,1,11,12,6,5,11,12,3,2,9,8,7,6/))) STOP 2
! Now simple assignments in WHERE.
where (y(1)%at(1)%i > 2) y(1)%at(1)%i = 0
if (any( (/(((y(k)%at(i)%i(j), j = 1,4), i = 1,2), k = 1,2)/) .ne. &
- (/0,0,2,1,11,12,6,5,11,12,3,2,9,8,7,6/))) call abort ()
+ (/0,0,2,1,11,12,6,5,11,12,3,2,9,8,7,6/))) STOP 3
! Check that temporaries and full array alloctable component assignments
! are correctly handled in FORALL.
forall (i=1:2) y(i) = y(3-i) ! This needs a temporary.
forall (i=1:2) z(i) = y(i)
if (any ((/(((z(k)%at(i)%i(j), j = 1,4), i = 1,1), k = 1,2)/) .ne. &
- (/(/5,6,7,8/),(/1,2,3,4/)/))) call abort ()
+ (/(/5,6,7,8/),(/1,2,3,4/)/))) STOP 4
end
y(2) = y(1)
forall (j=1:2,k=1:4, y(1)%at(j)%i(k) .ne. y(2)%at(j)%i(k)) &
y(1)%at(j)%i(k) = 999
- if (any ((/((y(1)%at(j)%i(k), k=1,4),j=1,2)/) .eq. 999)) call abort ()
+ if (any ((/((y(1)%at(j)%i(k), k=1,4),j=1,2)/) .eq. 999)) STOP 1
z = y
forall (i=1:2,j=1:2,k=1:4, z(i)%at(j)%i(k) .ne. y(i)%at(j)%i(k)) &
z(i)%at(j)%i(k) = 999
- if (any ((/(((z(i)%at(j)%i(k), k=1,4),j=1,2),i=1,2)/) .eq. 999)) call abort ()
+ if (any ((/(((z(i)%at(j)%i(k), k=1,4),j=1,2),i=1,2)/) .eq. 999)) STOP 2
end
y(2) = y(1)
if (any((/((y(2)%at(i)%ch(j),j=1,4),i=1,2)/) .ne. &
- (/chr1, chr2/))) call abort ()
+ (/chr1, chr2/))) STOP 1
call test_ab6 ()
p = c((/b(a((/"Mary","Lamb"/)))/))
bv = p%b(1)
- if (any ((bv%a%ch(:)) .ne. (/"Mary","Lamb"/))) call abort ()
+ if (any ((bv%a%ch(:)) .ne. (/"Mary","Lamb"/))) STOP 2
end subroutine test_ab6
x = f()
- if (ctr /= 1) call abort ()
+ if (ctr /= 1) STOP 1
contains
res = res//char_a(6:6)
if(size(res%chars) /= 2 .or. any(res%chars /= ['e','f'])) then
write(*,*) 'ERROR: should be ef, got: ', res%chars, size(res%chars)
- call abort ()
+ STOP 1
end if
end program VST28
p = path ([spline([x(1)]),spline([x(2)]),spline([x(3)])])
call scene_set_look_at_path(this,p)
do i = 1, 3
- if (this%look_at_path%r(i)%y2(1) .ne. x(i)) call abort
+ if (this%look_at_path%r(i)%y2(1) .ne. x(i)) STOP 1
end do
end
t1%b(1)=1d0
t1%b(2)=2d0
t2=-t1
- if (t2%a .ne. -0.5d0) call abort
- if (any(t2%b .ne. [-1d0, -2d0])) call abort
+ if (t2%a .ne. -0.5d0) STOP 1
+ if (any(t2%b .ne. [-1d0, -2d0])) STOP 2
t1=-t1
- if (t1%a .ne. -0.5d0) call abort
- if (any(t1%b .ne. [-1d0, -2d0])) call abort
+ if (t1%a .ne. -0.5d0) STOP 3
+ if (any(t1%b .ne. [-1d0, -2d0])) STOP 4
end
T1%A = 23
T2 = T1
T1%A = 42
- if (T2%A(1) .NE. 23) CALL ABORT
+ if (T2%A(1) .NE. 23) STOP 1
END PROGRAM X
SUBROUTINE extend_lists2
type(VARYING_STRING),DIMENSION(list_size) :: vocab_swap
allocate (vocab_swap(1)%chars(10))
- if (.not.allocated(vocab_swap(1)%chars)) call abort ()
- if (allocated(vocab_swap(10)%chars)) call abort ()
+ if (.not.allocated(vocab_swap(1)%chars)) STOP 1
+ if (allocated(vocab_swap(10)%chars)) STOP 2
ENDSUBROUTINE extend_lists2
ENDPROGRAM vocabulary_word_count
type(grid_index_region),allocatable :: iregion(:)
allocate (iregion(npiece + 1))
call read_iregion(npiece,iregion)
- if (size(iregion) .ne. npiece + 1) call abort
- if (.not.allocated (iregion(npiece)%lons)) call abort
- if (allocated (iregion(npiece+1)%lons)) call abort
- if (any (iregion(npiece)%lons .ne. [(i, i = 1, npiece)])) call abort
+ if (size(iregion) .ne. npiece + 1) STOP 1
+ if (.not.allocated (iregion(npiece)%lons)) STOP 2
+ if (allocated (iregion(npiece+1)%lons)) STOP 3
+ if (any (iregion(npiece)%lons .ne. [(i, i = 1, npiece)])) STOP 4
deallocate (iregion)
end subroutine read_grid_header
if (allocated(b%a2) .OR. allocated(b%a1)) then
write (0, *) 'main - 1'
- call abort()
+ STOP 1
end if
! 3 calls to _gfortran_deallocate (INTENT(OUT) dummy)
if (allocated(b%a2) .OR. allocated(b%a1)) then
write (0, *) 'allocate_alloc2 - 1'
- call abort()
+ STOP 2
end if
allocate (b%a2(3))
do i = 1, 3
if (allocated(b%a1(i)%x)) then
write (0, *) 'allocate_alloc2 - 2', i
- call abort()
+ STOP 3
end if
allocate (b%a1(i)%x(3))
b%a1(i)%x = i + [ 1.0, 2.0, 3.0 ]
type(alloc2) function return_alloc2() result(b)
if (allocated(b%a2) .OR. allocated(b%a1)) then
write (0, *) 'return_alloc2 - 1'
- call abort()
+ STOP 4
end if
allocate (b%a2(3))
do i = 1, 3
if (allocated(b%a1(i)%x)) then
write (0, *) 'return_alloc2 - 2', i
- call abort()
+ STOP 5
end if
allocate (b%a1(i)%x(3))
b%a1(i)%x = i + [ 1.0, 2.0, 3.0 ]
if (.NOT.(allocated(b%a2) .AND. allocated(b%a1))) then
write (0, *) 'check_alloc2 - 1'
- call abort()
+ STOP 6
end if
if (any(b%a2 /= [ 1, 2, 3 ])) then
write (0, *) 'check_alloc2 - 2'
- call abort()
+ STOP 7
end if
do i = 1, 3
if (.NOT.allocated(b%a1(i)%x)) then
write (0, *) 'check_alloc2 - 3', i
- call abort()
+ STOP 8
end if
if (any(b%a1(i)%x /= i + [ 1.0, 2.0, 3.0 ])) then
write (0, *) 'check_alloc2 - 4', i
- call abort()
+ STOP 9
end if
end do
end subroutine check_alloc2
allocate (mol(1))\r
allocate (mol(1), stat=i)\r
!print *, i ! /= 0\r
- if (i == 0) call abort()\r
+ if (i == 0) STOP 1\r
\r
allocate (mol(1)%array(5))\r
allocate (mol(1)%array(5),stat=i)\r
!print *, i ! /= 0\r
- if (i == 0) call abort()\r
+ if (i == 0) STOP 2\r
\r
allocate (molp(1))\r
allocate (molp(1), stat=i)\r
!print *, i ! == 0\r
- if (i /= 0) call abort()\r
+ if (i /= 0) STOP 3\r
\r
allocate (molp(1)%array(5))\r
allocate (molp(1)%array(5),stat=i)\r
!print *, i ! /= 0\r
- if (i == 0) call abort()\r
+ if (i == 0) STOP 4\r
\r
end program main\r
integer :: info
call bar_foo_ab(info)
- if (info .ne. 0) call abort ()
+ if (info .ne. 0) STOP 1
call bar_foo_ab(info)
- if (info .ne. 10) call abort ()
+ if (info .ne. 10) STOP 2
end program tsave
integer(ik4), allocatable :: ia(:)
type(struct) :: x
allocate(ia(from:to))
- if (any(lbound(ia) .ne. -1) .or. any(ubound(ia) .ne. 2)) call abort
- if (any(lbound(ia(:)) .ne. 1) .or. any(ubound(ia(:)) .ne. 4)) call abort
- if (any(lbound(ia(from:to)) .ne. 1) .or. any(ubound(ia(from:to)) .ne. 4)) call abort
+ if (any(lbound(ia) .ne. -1) .or. any(ubound(ia) .ne. 2)) STOP 1
+ if (any(lbound(ia(:)) .ne. 1) .or. any(ubound(ia(:)) .ne. 4)) STOP 2
+ if (any(lbound(ia(from:to)) .ne. 1) .or. any(ubound(ia(from:to)) .ne. 4)) STOP 3
x=struct(ia)
- if (any(lbound(x%ib) .ne. -1) .or. any(ubound(x%ib) .ne. 2)) call abort
+ if (any(lbound(x%ib) .ne. -1) .or. any(ubound(x%ib) .ne. 2)) STOP 4
x=struct(ia(:))
- if (any(lbound(x%ib) .ne. 1) .or. any(ubound(x%ib) .ne. 4)) call abort
+ if (any(lbound(x%ib) .ne. 1) .or. any(ubound(x%ib) .ne. 4)) STOP 5
x=struct(ia(from:to))
- if (any(lbound(x%ib) .ne. 1) .or. any(ubound(x%ib) .ne. 4)) call abort
+ if (any(lbound(x%ib) .ne. 1) .or. any(ubound(x%ib) .ne. 4)) STOP 6
deallocate(ia)
end subroutine
subroutine bar
integer(ik8), allocatable :: ia(:)
type(struct) :: x
allocate(ia(from:to))
- if (any(lbound(ia) .ne. -1) .or. any(ubound(ia) .ne. 2)) call abort
- if (any(lbound(ia(:)) .ne. 1) .or. any(ubound(ia(:)) .ne. 4)) call abort
- if (any(lbound(ia(from:to)) .ne. 1) .or. any(ubound(ia(from:to)) .ne. 4)) call abort
+ if (any(lbound(ia) .ne. -1) .or. any(ubound(ia) .ne. 2)) STOP 7
+ if (any(lbound(ia(:)) .ne. 1) .or. any(ubound(ia(:)) .ne. 4)) STOP 8
+ if (any(lbound(ia(from:to)) .ne. 1) .or. any(ubound(ia(from:to)) .ne. 4)) STOP 9
x=struct(ia)
- if (any(lbound(x%ib) .ne. -1) .or. any(ubound(x%ib) .ne. 2)) call abort
+ if (any(lbound(x%ib) .ne. -1) .or. any(ubound(x%ib) .ne. 2)) STOP 10
x=struct(ia(:))
- if (any(lbound(x%ib) .ne. 1) .or. any(ubound(x%ib) .ne. 4)) call abort
+ if (any(lbound(x%ib) .ne. 1) .or. any(ubound(x%ib) .ne. 4)) STOP 11
x=struct(ia(from:to))
- if (any(lbound(x%ib) .ne. 1) .or. any(ubound(x%ib) .ne. 4)) call abort
+ if (any(lbound(x%ib) .ne. 1) .or. any(ubound(x%ib) .ne. 4)) STOP 12
deallocate(ia)
end subroutine
end
allocate (b%a)
b%a%i = 42
call bug14 (b)
- if (allocated (b%a)) call abort
+ if (allocated (b%a)) STOP 1
contains
subroutine bug14(a)
implicit none
subroutine cdall(desc)
type(desc_type), intent(out) :: desc
- if (allocated(desc%indxmap)) call abort()
+ if (allocated(desc%indxmap)) STOP 1
end subroutine cdall
end program
call add_t(static_t_init())
! temp = t_init() ! <-- This derefs a null-pointer currently
! Filed as pr66775
- if (allocated (temp)) call abort()
+ if (allocated (temp)) STOP 1
allocate(od)
call add_c(od%init())
call add_item(a_list, [.true., .false.])
call add_item(a_list, ["foo", "bar", "baz"])
- if (size(a_list) /= 4) call abort()
+ if (size(a_list) /= 4) STOP 1
do i = 1, size(a_list)
call checkarr(a_list(i))
end do
if (allocated(c%items)) then
select type (x=>c%items)
type is (integer)
- if (any(x /= [1, 2])) call abort()
+ if (any(x /= [1, 2])) STOP 2
type is (real(kind=8))
- if (any(x /= [3.0_8, 4.0_8])) call abort()
+ if (any(x /= [3.0_8, 4.0_8])) STOP 3
type is (logical)
- if (any(x .neqv. [.true., .false.])) call abort()
+ if (any(x .neqv. [.true., .false.])) STOP 4
type is (character(len=*))
- if (len(x) /= 3) call abort()
- if (any(x /= ["foo", "bar", "baz"])) call abort()
+ if (len(x) /= 3) STOP 5
+ if (any(x /= ["foo", "bar", "baz"])) STOP 6
class default
- call abort()
+ STOP 7
end select
else
- call abort()
+ STOP 8
end if
end subroutine
end
\r
! Check that null() works\r
x = mytype(null(), null())\r
- if (allocated(x%a) .or. allocated(x%q)) call abort()\r
+ if (allocated(x%a) .or. allocated(x%q)) STOP 1\r
\r
! Check that unallocated allocatables work\r
x = mytype(yy, bar)\r
- if (allocated(x%a) .or. allocated(x%q)) call abort()\r
+ if (allocated(x%a) .or. allocated(x%q)) STOP 2\r
\r
! Check that non-allocatables work\r
x = mytype(y, [foo, foo])\r
- if (.not.allocated(x%a) .or. .not.allocated(x%q)) call abort()\r
- if (any(lbound(x%a) /= lbound(y))) call abort()\r
- if (any(ubound(x%a) /= ubound(y))) call abort()\r
- if (any(x%a /= y)) call abort()\r
- if (size(x%q) /= 2) call abort()\r
+ if (.not.allocated(x%a) .or. .not.allocated(x%q)) STOP 3\r
+ if (any(lbound(x%a) /= lbound(y))) STOP 4\r
+ if (any(ubound(x%a) /= ubound(y))) STOP 5\r
+ if (any(x%a /= y)) STOP 6\r
+ if (size(x%q) /= 2) STOP 7\r
do i = 1, 2\r
- if (any(x%q(i)%a /= foo%a)) call abort()\r
+ if (any(x%q(i)%a /= foo%a)) STOP 8\r
end do\r
\r
! Check that allocated allocatables work\r
allocate(bar(2))\r
bar = [foo, foo]\r
x = mytype(yy, bar)\r
- if (.not.allocated(x%a) .or. .not.allocated(x%q)) call abort()\r
- if (any(x%a /= y)) call abort()\r
- if (size(x%q) /= 2) call abort()\r
+ if (.not.allocated(x%a) .or. .not.allocated(x%q)) STOP 9\r
+ if (any(x%a /= y)) STOP 10\r
+ if (size(x%q) /= 2) STOP 11\r
do i = 1, 2\r
- if (any(x%q(i)%a /= foo%a)) call abort()\r
+ if (any(x%q(i)%a /= foo%a)) STOP 12\r
end do\r
\r
! Functions returning arrays\r
x = mytype(bluhu(), null())\r
- if (.not.allocated(x%a) .or. allocated(x%q)) call abort()\r
- if (any(x%a /= reshape ([41, 98, 54, 76], [2,2]))) call abort()\r
+ if (.not.allocated(x%a) .or. allocated(x%q)) STOP 13\r
+ if (any(x%a /= reshape ([41, 98, 54, 76], [2,2]))) STOP 14\r
\r
! Functions returning allocatable arrays\r
x = mytype(blaha(), null())\r
- if (.not.allocated(x%a) .or. allocated(x%q)) call abort()\r
- if (any(x%a /= reshape ([40, 97, 53, 75], [2,2]))) call abort()\r
+ if (.not.allocated(x%a) .or. allocated(x%q)) STOP 15\r
+ if (any(x%a /= reshape ([40, 97, 53, 75], [2,2]))) STOP 16\r
\r
! Check that passing the constructor to a procedure works\r
call check_mytype (mytype(y, [foo, foo]))\r
type(mytype), intent(in) :: x\r
integer :: i\r
\r
- if (.not.allocated(x%a) .or. .not.allocated(x%q)) call abort()\r
- if (any(lbound(x%a) /= lbound(y))) call abort()\r
- if (any(ubound(x%a) /= ubound(y))) call abort()\r
- if (any(x%a /= y)) call abort()\r
- if (size(x%q) /= 2) call abort()\r
+ if (.not.allocated(x%a) .or. .not.allocated(x%q)) STOP 17\r
+ if (any(lbound(x%a) /= lbound(y))) STOP 18\r
+ if (any(ubound(x%a) /= ubound(y))) STOP 19\r
+ if (any(x%a /= y)) STOP 20\r
+ if (size(x%q) /= 2) STOP 21\r
do i = 1, 2\r
- if (any(x%q(i)%a /= foo%a)) call abort()\r
+ if (any(x%q(i)%a /= foo%a)) STOP 22\r
end do\r
\r
end subroutine check_mytype\r
w = (/thytype(y), thytype (2*y)/)
x = mytype (w)
- if (any ((/((x%q(j)%h(i),j=1,2),i=1,2)/) .ne. (/1,2,2,4/))) call abort ()
+ if (any ((/((x%q(j)%h(i),j=1,2),i=1,2)/) .ne. (/1,2,2,4/))) STOP 1
x = mytype ((/thytype(3*y), thytype (4*y)/))
- if (any ((/((x%q(j)%h(i),j=1,2),i=1,2)/) .ne. (/3,4,6,8/))) call abort ()
+ if (any ((/((x%q(j)%h(i),j=1,2),i=1,2)/) .ne. (/3,4,6,8/))) STOP 2
end
a = x ((/ 1, 2, 3 /)) ! This is also pr31320.
a = x ((/ a%a, 4 /))
- if (any (a%a .ne. (/1,2,3,4/))) call abort ()
+ if (any (a%a .ne. (/1,2,3,4/))) STOP 1
end
type(a) :: x, y
x = a ([1, 2, 3])
y = a (x%i(:)) ! used to cause a memory leak and wrong result
- if (any (x%i .ne. [1, 2, 3])) call abort
+ if (any (x%i .ne. [1, 2, 3])) STOP 1
end
type (thytype), allocatable :: bar(:)
type (mytype) :: x, y
x = mytype(yy, bar)
- if (allocated (x%a) .or. allocated (x%q)) call abort
+ if (allocated (x%a) .or. allocated (x%q)) STOP 1
allocate (yy(2,2))
allocate (bar(2))
yy = reshape ([10,20,30,40],[2,2])
bar = thytype (reshape ([1,2,3,4],[2,2]))
! Check that unallocated allocatables work
y = mytype(yy, bar)
- if (.not.allocated (y%a) .or. .not.allocated (y%q)) call abort
+ if (.not.allocated (y%a) .or. .not.allocated (y%q)) STOP 2
end program test_constructor
subroutine non_alloc
type (mytype) :: x
x = mytype(yy, bar)
- if (allocated (x%a) .or. allocated (x%q)) call abort
+ if (allocated (x%a) .or. allocated (x%q)) STOP 1
end subroutine non_alloc
subroutine alloc
type (mytype) :: x
yy = reshape ([10,20,30,40],[2,2])
bar = thytype (reshape ([1,2,3,4],[2,2]))
x = mytype(yy, bar)
- if (.not.allocated (x%a) .or. .not.allocated (x%q)) call abort
+ if (.not.allocated (x%a) .or. .not.allocated (x%q)) STOP 2
end subroutine alloc
end program test_constructor
Type(A) :: Me = A(X=1)
-if (allocated(Me%y)) call abort
-if (allocated(Me%z)) call abort
+if (allocated(Me%y)) STOP 1
+if (allocated(Me%z)) STOP 2
end
o1%i = 42
call copyO(o1, o2)
- if (o2%i /= 42) call abort ()
- if (allocated(o2%a_i)) call abort()
- if (allocated(o2%it)) call abort()
- if (allocated(o2%vec)) call abort()
+ if (o2%i /= 42) STOP 1
+ if (allocated(o2%a_i)) STOP 2
+ if (allocated(o2%it)) STOP 3
+ if (allocated(o2%vec)) STOP 4
allocate (o1%a_i, source=2)
call copyO(o1, o2)
- if (o2%i /= 42) call abort ()
- if (.not. allocated(o2%a_i)) call abort()
- if (o2%a_i /= 2) call abort()
- if (allocated(o2%it)) call abort()
- if (allocated(o2%vec)) call abort()
+ if (o2%i /= 42) STOP 5
+ if (.not. allocated(o2%a_i)) STOP 6
+ if (o2%a_i /= 2) STOP 7
+ if (allocated(o2%it)) STOP 8
+ if (allocated(o2%vec)) STOP 9
allocate (o1%it)
o1%it%ii = 3
call copyO(o1, o2)
- if (o2%i /= 42) call abort ()
- if (.not. allocated(o2%a_i)) call abort()
- if (o2%a_i /= 2) call abort()
- if (.not. allocated(o2%it)) call abort()
- if (o2%it%ii /= 3) call abort()
- if (allocated(o2%it%ai)) call abort()
- if (allocated(o2%it%v)) call abort()
- if (allocated(o2%vec)) call abort()
+ if (o2%i /= 42) STOP 10
+ if (.not. allocated(o2%a_i)) STOP 11
+ if (o2%a_i /= 2) STOP 12
+ if (.not. allocated(o2%it)) STOP 13
+ if (o2%it%ii /= 3) STOP 14
+ if (allocated(o2%it%ai)) STOP 15
+ if (allocated(o2%it%v)) STOP 16
+ if (allocated(o2%vec)) STOP 17
allocate (o1%it%ai)
o1%it%ai = 4
call copyO(o1, o2)
- if (o2%i /= 42) call abort ()
- if (.not. allocated(o2%a_i)) call abort()
- if (o2%a_i /= 2) call abort()
- if (.not. allocated(o2%it)) call abort()
- if (o2%it%ii /= 3) call abort()
- if (.not. allocated(o2%it%ai)) call abort()
- if (o2%it%ai /= 4) call abort()
- if (allocated(o2%it%v)) call abort()
- if (allocated(o2%vec)) call abort()
+ if (o2%i /= 42) STOP 18
+ if (.not. allocated(o2%a_i)) STOP 19
+ if (o2%a_i /= 2) STOP 20
+ if (.not. allocated(o2%it)) STOP 21
+ if (o2%it%ii /= 3) STOP 22
+ if (.not. allocated(o2%it%ai)) STOP 23
+ if (o2%it%ai /= 4) STOP 24
+ if (allocated(o2%it%v)) STOP 25
+ if (allocated(o2%vec)) STOP 26
allocate (o1%it%v(3), source= 5)
call copyO(o1, o2)
- if (o2%i /= 42) call abort ()
- if (.not. allocated(o2%a_i)) call abort()
- if (o2%a_i /= 2) call abort()
- if (.not. allocated(o2%it)) call abort()
- if (o2%it%ii /= 3) call abort()
- if (.not. allocated(o2%it%ai)) call abort()
- if (o2%it%ai /= 4) call abort()
- if (.not. allocated(o2%it%v)) call abort()
- if (any (o2%it%v /= 5) .or. size (o2%it%v) /= 3) call abort()
- if (allocated(o2%vec)) call abort()
+ if (o2%i /= 42) STOP 27
+ if (.not. allocated(o2%a_i)) STOP 28
+ if (o2%a_i /= 2) STOP 29
+ if (.not. allocated(o2%it)) STOP 30
+ if (o2%it%ii /= 3) STOP 31
+ if (.not. allocated(o2%it%ai)) STOP 32
+ if (o2%it%ai /= 4) STOP 33
+ if (.not. allocated(o2%it%v)) STOP 34
+ if (any (o2%it%v /= 5) .or. size (o2%it%v) /= 3) STOP 35
+ if (allocated(o2%vec)) STOP 36
allocate (o1%vec(2))
o1%vec(:)%ii = 6
call copyO(o1, o2)
- if (o2%i /= 42) call abort ()
- if (.not. allocated(o2%a_i)) call abort()
- if (o2%a_i /= 2) call abort()
- if (.not. allocated(o2%it)) call abort()
- if (o2%it%ii /= 3) call abort()
- if (.not. allocated(o2%it%ai)) call abort()
- if (o2%it%ai /= 4) call abort()
- if (.not. allocated(o2%it%v)) call abort()
- if (size (o2%it%v) /= 3) call abort()
- if (any (o2%it%v /= 5)) call abort()
- if (.not. allocated(o2%vec)) call abort()
- if (size(o2%vec) /= 2) call abort()
- if (any(o2%vec(:)%ii /= 6)) call abort()
- if (allocated(o2%vec(1)%ai) .or. allocated(o2%vec(2)%ai)) call abort()
- if (allocated(o2%vec(1)%v) .or. allocated(o2%vec(2)%v)) call abort()
+ if (o2%i /= 42) STOP 37
+ if (.not. allocated(o2%a_i)) STOP 38
+ if (o2%a_i /= 2) STOP 39
+ if (.not. allocated(o2%it)) STOP 40
+ if (o2%it%ii /= 3) STOP 41
+ if (.not. allocated(o2%it%ai)) STOP 42
+ if (o2%it%ai /= 4) STOP 43
+ if (.not. allocated(o2%it%v)) STOP 44
+ if (size (o2%it%v) /= 3) STOP 45
+ if (any (o2%it%v /= 5)) STOP 46
+ if (.not. allocated(o2%vec)) STOP 47
+ if (size(o2%vec) /= 2) STOP 48
+ if (any(o2%vec(:)%ii /= 6)) STOP 49
+ if (allocated(o2%vec(1)%ai) .or. allocated(o2%vec(2)%ai)) STOP 50
+ if (allocated(o2%vec(1)%v) .or. allocated(o2%vec(2)%v)) STOP 51
allocate (o1%vec(2)%ai)
o1%vec(2)%ai = 7
call copyO(o1, o2)
- if (o2%i /= 42) call abort ()
- if (.not. allocated(o2%a_i)) call abort()
- if (o2%a_i /= 2) call abort()
- if (.not. allocated(o2%it)) call abort()
- if (o2%it%ii /= 3) call abort()
- if (.not. allocated(o2%it%ai)) call abort()
- if (o2%it%ai /= 4) call abort()
- if (.not. allocated(o2%it%v)) call abort()
- if (size (o2%it%v) /= 3) call abort()
- if (any (o2%it%v /= 5)) call abort()
- if (.not. allocated(o2%vec)) call abort()
- if (size(o2%vec) /= 2) call abort()
- if (any(o2%vec(:)%ii /= 6)) call abort()
- if (allocated(o2%vec(1)%ai)) call abort()
- if (.not. allocated(o2%vec(2)%ai)) call abort()
- if (o2%vec(2)%ai /= 7) call abort()
- if (allocated(o2%vec(1)%v) .or. allocated(o2%vec(2)%v)) call abort()
+ if (o2%i /= 42) STOP 52
+ if (.not. allocated(o2%a_i)) STOP 53
+ if (o2%a_i /= 2) STOP 54
+ if (.not. allocated(o2%it)) STOP 55
+ if (o2%it%ii /= 3) STOP 56
+ if (.not. allocated(o2%it%ai)) STOP 57
+ if (o2%it%ai /= 4) STOP 58
+ if (.not. allocated(o2%it%v)) STOP 59
+ if (size (o2%it%v) /= 3) STOP 60
+ if (any (o2%it%v /= 5)) STOP 61
+ if (.not. allocated(o2%vec)) STOP 62
+ if (size(o2%vec) /= 2) STOP 63
+ if (any(o2%vec(:)%ii /= 6)) STOP 64
+ if (allocated(o2%vec(1)%ai)) STOP 65
+ if (.not. allocated(o2%vec(2)%ai)) STOP 66
+ if (o2%vec(2)%ai /= 7) STOP 67
+ if (allocated(o2%vec(1)%v) .or. allocated(o2%vec(2)%v)) STOP 68
allocate (o1%vec(1)%v(3))
o1%vec(1)%v = [8, 9, 10]
call copyO(o1, o2)
- if (o2%i /= 42) call abort ()
- if (.not. allocated(o2%a_i)) call abort()
- if (o2%a_i /= 2) call abort()
- if (.not. allocated(o2%it)) call abort()
- if (o2%it%ii /= 3) call abort()
- if (.not. allocated(o2%it%ai)) call abort()
- if (o2%it%ai /= 4) call abort()
- if (.not. allocated(o2%it%v)) call abort()
- if (size (o2%it%v) /= 3) call abort()
- if (any (o2%it%v /= 5)) call abort()
- if (.not. allocated(o2%vec)) call abort()
- if (size(o2%vec) /= 2) call abort()
- if (any(o2%vec(:)%ii /= 6)) call abort()
- if (allocated(o2%vec(1)%ai)) call abort()
- if (.not. allocated(o2%vec(2)%ai)) call abort()
- if (o2%vec(2)%ai /= 7) call abort()
- if (.not. allocated(o2%vec(1)%v)) call abort()
- if (any (o2%vec(1)%v /= [8,9,10])) call abort()
- if (allocated(o2%vec(2)%v)) call abort()
+ if (o2%i /= 42) STOP 69
+ if (.not. allocated(o2%a_i)) STOP 70
+ if (o2%a_i /= 2) STOP 71
+ if (.not. allocated(o2%it)) STOP 72
+ if (o2%it%ii /= 3) STOP 73
+ if (.not. allocated(o2%it%ai)) STOP 74
+ if (o2%it%ai /= 4) STOP 75
+ if (.not. allocated(o2%it%v)) STOP 76
+ if (size (o2%it%v) /= 3) STOP 77
+ if (any (o2%it%v /= 5)) STOP 78
+ if (.not. allocated(o2%vec)) STOP 79
+ if (size(o2%vec) /= 2) STOP 80
+ if (any(o2%vec(:)%ii /= 6)) STOP 81
+ if (allocated(o2%vec(1)%ai)) STOP 82
+ if (.not. allocated(o2%vec(2)%ai)) STOP 83
+ if (o2%vec(2)%ai /= 7) STOP 84
+ if (.not. allocated(o2%vec(1)%v)) STOP 85
+ if (any (o2%vec(1)%v /= [8,9,10])) STOP 86
+ if (allocated(o2%vec(2)%v)) STOP 87
! Now all the above for class objects.
allocate (o3, o4)
o3%i = 42
call copyO(o3, o4)
- if (o4%i /= 42) call abort ()
- if (allocated(o4%a_i)) call abort()
- if (allocated(o4%it)) call abort()
- if (allocated(o4%vec)) call abort()
+ if (o4%i /= 42) STOP 88
+ if (allocated(o4%a_i)) STOP 89
+ if (allocated(o4%it)) STOP 90
+ if (allocated(o4%vec)) STOP 91
allocate (o3%a_i, source=2)
call copyO(o3, o4)
- if (o4%i /= 42) call abort ()
- if (.not. allocated(o4%a_i)) call abort()
- if (o4%a_i /= 2) call abort()
- if (allocated(o4%it)) call abort()
- if (allocated(o4%vec)) call abort()
+ if (o4%i /= 42) STOP 92
+ if (.not. allocated(o4%a_i)) STOP 93
+ if (o4%a_i /= 2) STOP 94
+ if (allocated(o4%it)) STOP 95
+ if (allocated(o4%vec)) STOP 96
allocate (o3%it)
o3%it%ii = 3
call copyO(o3, o4)
- if (o4%i /= 42) call abort ()
- if (.not. allocated(o4%a_i)) call abort()
- if (o4%a_i /= 2) call abort()
- if (.not. allocated(o4%it)) call abort()
- if (o4%it%ii /= 3) call abort()
- if (allocated(o4%it%ai)) call abort()
- if (allocated(o4%it%v)) call abort()
- if (allocated(o4%vec)) call abort()
+ if (o4%i /= 42) STOP 97
+ if (.not. allocated(o4%a_i)) STOP 98
+ if (o4%a_i /= 2) STOP 99
+ if (.not. allocated(o4%it)) STOP 100
+ if (o4%it%ii /= 3) STOP 101
+ if (allocated(o4%it%ai)) STOP 102
+ if (allocated(o4%it%v)) STOP 103
+ if (allocated(o4%vec)) STOP 104
allocate (o3%it%ai)
o3%it%ai = 4
call copyO(o3, o4)
- if (o4%i /= 42) call abort ()
- if (.not. allocated(o4%a_i)) call abort()
- if (o4%a_i /= 2) call abort()
- if (.not. allocated(o4%it)) call abort()
- if (o4%it%ii /= 3) call abort()
- if (.not. allocated(o4%it%ai)) call abort()
- if (o4%it%ai /= 4) call abort()
- if (allocated(o4%it%v)) call abort()
- if (allocated(o4%vec)) call abort()
+ if (o4%i /= 42) STOP 105
+ if (.not. allocated(o4%a_i)) STOP 106
+ if (o4%a_i /= 2) STOP 107
+ if (.not. allocated(o4%it)) STOP 108
+ if (o4%it%ii /= 3) STOP 109
+ if (.not. allocated(o4%it%ai)) STOP 110
+ if (o4%it%ai /= 4) STOP 111
+ if (allocated(o4%it%v)) STOP 112
+ if (allocated(o4%vec)) STOP 113
allocate (o3%it%v(3), source= 5)
call copyO(o3, o4)
- if (o4%i /= 42) call abort ()
- if (.not. allocated(o4%a_i)) call abort()
- if (o4%a_i /= 2) call abort()
- if (.not. allocated(o4%it)) call abort()
- if (o4%it%ii /= 3) call abort()
- if (.not. allocated(o4%it%ai)) call abort()
- if (o4%it%ai /= 4) call abort()
- if (.not. allocated(o4%it%v)) call abort()
- if (any (o4%it%v /= 5) .or. size (o4%it%v) /= 3) call abort()
- if (allocated(o4%vec)) call abort()
+ if (o4%i /= 42) STOP 114
+ if (.not. allocated(o4%a_i)) STOP 115
+ if (o4%a_i /= 2) STOP 116
+ if (.not. allocated(o4%it)) STOP 117
+ if (o4%it%ii /= 3) STOP 118
+ if (.not. allocated(o4%it%ai)) STOP 119
+ if (o4%it%ai /= 4) STOP 120
+ if (.not. allocated(o4%it%v)) STOP 121
+ if (any (o4%it%v /= 5) .or. size (o4%it%v) /= 3) STOP 122
+ if (allocated(o4%vec)) STOP 123
allocate (o3%vec(2))
o3%vec(:)%ii = 6
call copyO(o3, o4)
- if (o4%i /= 42) call abort ()
- if (.not. allocated(o4%a_i)) call abort()
- if (o4%a_i /= 2) call abort()
- if (.not. allocated(o4%it)) call abort()
- if (o4%it%ii /= 3) call abort()
- if (.not. allocated(o4%it%ai)) call abort()
- if (o4%it%ai /= 4) call abort()
- if (.not. allocated(o4%it%v)) call abort()
- if (size (o4%it%v) /= 3) call abort()
- if (any (o4%it%v /= 5)) call abort()
- if (.not. allocated(o4%vec)) call abort()
- if (size(o4%vec) /= 2) call abort()
- if (any(o4%vec(:)%ii /= 6)) call abort()
- if (allocated(o4%vec(1)%ai) .or. allocated(o4%vec(2)%ai)) call abort()
- if (allocated(o4%vec(1)%v) .or. allocated(o4%vec(2)%v)) call abort()
+ if (o4%i /= 42) STOP 124
+ if (.not. allocated(o4%a_i)) STOP 125
+ if (o4%a_i /= 2) STOP 126
+ if (.not. allocated(o4%it)) STOP 127
+ if (o4%it%ii /= 3) STOP 128
+ if (.not. allocated(o4%it%ai)) STOP 129
+ if (o4%it%ai /= 4) STOP 130
+ if (.not. allocated(o4%it%v)) STOP 131
+ if (size (o4%it%v) /= 3) STOP 132
+ if (any (o4%it%v /= 5)) STOP 133
+ if (.not. allocated(o4%vec)) STOP 134
+ if (size(o4%vec) /= 2) STOP 135
+ if (any(o4%vec(:)%ii /= 6)) STOP 136
+ if (allocated(o4%vec(1)%ai) .or. allocated(o4%vec(2)%ai)) STOP 137
+ if (allocated(o4%vec(1)%v) .or. allocated(o4%vec(2)%v)) STOP 138
allocate (o3%vec(2)%ai)
o3%vec(2)%ai = 7
call copyO(o3, o4)
- if (o4%i /= 42) call abort ()
- if (.not. allocated(o4%a_i)) call abort()
- if (o4%a_i /= 2) call abort()
- if (.not. allocated(o4%it)) call abort()
- if (o4%it%ii /= 3) call abort()
- if (.not. allocated(o4%it%ai)) call abort()
- if (o4%it%ai /= 4) call abort()
- if (.not. allocated(o4%it%v)) call abort()
- if (size (o4%it%v) /= 3) call abort()
- if (any (o4%it%v /= 5)) call abort()
- if (.not. allocated(o4%vec)) call abort()
- if (size(o4%vec) /= 2) call abort()
- if (any(o4%vec(:)%ii /= 6)) call abort()
- if (allocated(o4%vec(1)%ai)) call abort()
- if (.not. allocated(o4%vec(2)%ai)) call abort()
- if (o4%vec(2)%ai /= 7) call abort()
- if (allocated(o4%vec(1)%v) .or. allocated(o4%vec(2)%v)) call abort()
+ if (o4%i /= 42) STOP 139
+ if (.not. allocated(o4%a_i)) STOP 140
+ if (o4%a_i /= 2) STOP 141
+ if (.not. allocated(o4%it)) STOP 142
+ if (o4%it%ii /= 3) STOP 143
+ if (.not. allocated(o4%it%ai)) STOP 144
+ if (o4%it%ai /= 4) STOP 145
+ if (.not. allocated(o4%it%v)) STOP 146
+ if (size (o4%it%v) /= 3) STOP 147
+ if (any (o4%it%v /= 5)) STOP 148
+ if (.not. allocated(o4%vec)) STOP 149
+ if (size(o4%vec) /= 2) STOP 150
+ if (any(o4%vec(:)%ii /= 6)) STOP 151
+ if (allocated(o4%vec(1)%ai)) STOP 152
+ if (.not. allocated(o4%vec(2)%ai)) STOP 153
+ if (o4%vec(2)%ai /= 7) STOP 154
+ if (allocated(o4%vec(1)%v) .or. allocated(o4%vec(2)%v)) STOP 155
allocate (o3%vec(1)%v(3))
o3%vec(1)%v = [8, 9, 10]
call copyO(o3, o4)
- if (o4%i /= 42) call abort ()
- if (.not. allocated(o4%a_i)) call abort()
- if (o4%a_i /= 2) call abort()
- if (.not. allocated(o4%it)) call abort()
- if (o4%it%ii /= 3) call abort()
- if (.not. allocated(o4%it%ai)) call abort()
- if (o4%it%ai /= 4) call abort()
- if (.not. allocated(o4%it%v)) call abort()
- if (size (o4%it%v) /= 3) call abort()
- if (any (o4%it%v /= 5)) call abort()
- if (.not. allocated(o4%vec)) call abort()
- if (size(o4%vec) /= 2) call abort()
- if (any(o4%vec(:)%ii /= 6)) call abort()
- if (allocated(o4%vec(1)%ai)) call abort()
- if (.not. allocated(o4%vec(2)%ai)) call abort()
- if (o4%vec(2)%ai /= 7) call abort()
- if (.not. allocated(o4%vec(1)%v)) call abort()
- if (any (o4%vec(1)%v /= [8,9,10])) call abort()
- if (allocated(o4%vec(2)%v)) call abort()
+ if (o4%i /= 42) STOP 156
+ if (.not. allocated(o4%a_i)) STOP 157
+ if (o4%a_i /= 2) STOP 158
+ if (.not. allocated(o4%it)) STOP 159
+ if (o4%it%ii /= 3) STOP 160
+ if (.not. allocated(o4%it%ai)) STOP 161
+ if (o4%it%ai /= 4) STOP 162
+ if (.not. allocated(o4%it%v)) STOP 163
+ if (size (o4%it%v) /= 3) STOP 164
+ if (any (o4%it%v /= 5)) STOP 165
+ if (.not. allocated(o4%vec)) STOP 166
+ if (size(o4%vec) /= 2) STOP 167
+ if (any(o4%vec(:)%ii /= 6)) STOP 168
+ if (allocated(o4%vec(1)%ai)) STOP 169
+ if (.not. allocated(o4%vec(2)%ai)) STOP 170
+ if (o4%vec(2)%ai /= 7) STOP 171
+ if (.not. allocated(o4%vec(1)%v)) STOP 172
+ if (any (o4%vec(1)%v /= [8,9,10])) STOP 173
+ if (allocated(o4%vec(2)%v)) STOP 174
contains
c%g=a(1.)
d=c
- if (d%g%f /= 1.0) call abort()
+ if (d%g%f /= 1.0) STOP 1
d%g%f = 2.0
- if (d%g%f /= 2.0) call abort()
+ if (d%g%f /= 2.0) STOP 2
end program
v(3)%c2%c1 = 11
v(4)%c2%c1 = 13
- if (v(1)%c2%c1 /= 3) call abort
- if (v(2)%c2%c1 /= 7) call abort
- if (v(3)%c2%c1 /= 11) call abort
- if (v(4)%c2%c1 /= 13) call abort
+ if (v(1)%c2%c1 /= 3) STOP 1
+ if (v(2)%c2%c1 /= 7) STOP 2
+ if (v(3)%c2%c1 /= 11) STOP 3
+ if (v(4)%c2%c1 /= 13) STOP 4
end block
end program p
call mah (1, c2)\r
call mah (2, c3)\r
!
- if (c1 /= c2) call abort
- if (c1 /= c3) call abort\r
+ if (c1 /= c2) STOP 1
+ if (c1 /= c3) STOP 1
!\r
call mah0 (c4) ! These calls deal with PR34704\r
call mah1 (c5)\r
!
- if (c4 /= c5) call abort
+ if (c4 /= c5) STOP 2
!\r
end program boh\r
!\r
integer, save :: callnb = 0
type(t_type) :: this
allocate ( this % chars ( 4))
- if (.not.recursivefunc (this) .or. (callnb .ne. 10)) call abort ()
+ if (.not.recursivefunc (this) .or. (callnb .ne. 10)) STOP 1
contains
recursive function recursivefunc ( this ) result ( match )
type(t_type), intent(in) :: this
call p_bld (a, pre)
- if (associated (wee%ap) .or. wee%i /= 101) call abort ()
+ if (associated (wee%ap) .or. wee%i /= 101) STOP 1
wee%ap => a
- if (.not.associated (wee%ap) .or. allocated (wee%av)) call abort ()
+ if (.not.associated (wee%ap) .or. allocated (wee%av)) STOP 2
wee = basep_type ((/m_type ((/201, 202, 203/))/), null (), 99)
- if (.not.allocated (wee%av) .or. associated (wee%ap) .or. (wee%i .ne. 99)) call abort ()
+ if (.not.allocated (wee%av) .or. associated (wee%ap) .or. (wee%i .ne. 99)) STOP 3
contains
if (.not.allocated(p%basepv)) then
allocate(p%basepv(1),stat=ierr)
endif
- if (allocated (p%basepv) .neqv. .true.) call abort ()
- if (allocated (p%basepv(1)%av) .neqv. .false.) call abort
- if (p%basepv(1)%i .ne. 101) call abort ()
+ if (allocated (p%basepv) .neqv. .true.) STOP 4
+ if (allocated (p%basepv(1)%av) .neqv. .false.) STOP 1
+ if (p%basepv(1)%i .ne. 101) STOP 5
end subroutine test_ab8
use p_type_mod
type (m_type) :: a
type(p_type) :: p
- if (any (a%p .ne. (/101,102/))) call abort ()
- if (allocated (p%basepv) .or. (p%p2 .ne. 1)) call abort ()
+ if (any (a%p .ne. (/101,102/))) STOP 6
+ if (allocated (p%basepv) .or. (p%p2 .ne. 1)) STOP 7
end subroutine p_bld
end program foo
END TYPE
TYPE(test_typ) :: my_test_typ
my_test_typ = test_typ (a = 1.0)
- if (abs (my_test_typ%a - 1.0) .gt. 1e-6) call abort
+ if (abs (my_test_typ%a - 1.0) .gt. 1e-6) STOP 1
END PROGRAM main
type(ivs) :: v_str
integer :: i
call foo(v_str, i)
- if (v_str%chars(1) .ne. "a") call abort
- if (i .ne. 0) call abort
+ if (v_str%chars(1) .ne. "a") STOP 1
+ if (i .ne. 0) STOP 2
call foo(flag = i)
- if (i .ne. 1) call abort
+ if (i .ne. 1) STOP 3
contains
subroutine foo (arg, flag)
type(ivs), optional, intent(out) :: arg
implicit none
type(t_2) x(1)
x = a_fun(0)
- if (any (x(1)%mons%coeff .ne. 99)) call abort
+ if (any (x(1)%mons%coeff .ne. 99)) STOP 1
end program test
type(t), pointer :: func
type(t), target :: a
integer, save :: i = 0
- if (i /= 0) call abort ! multiple calls would cause this abort
+ if (i /= 0) STOP 1! multiple calls would cause this abort
i = i + 1
func => a
end function func
subroutine sub (a)
type(t), intent(IN), target :: a
- if (any (a%A .ne. [1,2,3])) call abort
+ if (any (a%A .ne. [1,2,3])) STOP 2
end subroutine sub
end
a2(1)%entry = 1
a1(1:1) = pack (a2(1:1), mask = [.true.])
deallocate (a2(1)%entry)
- if (a1(1)%entry .ne. 1) call abort
+ if (a1(1)%entry .ne. 1) STOP 1
end program main
end do
a1(1:2) = pack (a2, [.true., .false., .true., .false.])
do i = 1, 4
- if (.not.allocated (a1(i)%entry)) call abort
+ if (.not.allocated (a1(i)%entry)) STOP 1
if (i .gt. 2) then
- if (any (a1(i)%entry .ne. [1,2])) call abort
+ if (any (a1(i)%entry .ne. [1,2])) STOP 2
else
- if (any (a1(i)%entry .ne. [3,4])) call abort
+ if (any (a1(i)%entry .ne. [3,4])) STOP 3
end if
end do
!
! Now check unpack
!
a1 = unpack (a1, [.true., .true., .false., .false.], a3)
- if (any (a1%index .ne. [1,3,3,4])) call abort
+ if (any (a1%index .ne. [1,3,3,4])) STOP 4
do i = 1, 4
- if (.not.allocated (a1(i)%entry)) call abort
+ if (.not.allocated (a1(i)%entry)) STOP 5
if (i .gt. 2) then
- if (any (a1(i)%entry .ne. [4,5])) call abort
+ if (any (a1(i)%entry .ne. [4,5])) STOP 6
else
- if (any (a1(i)%entry .ne. [3,4])) call abort
+ if (any (a1(i)%entry .ne. [3,4])) STOP 7
end if
end do
end subroutine
a1 = transpose (a2)
do i = 1, 2
do j = 1, 2
- if (a1(i,j)%index .ne. i + (j - 1)*2) call abort
- if (any (a1(i,j)%entry .ne. [j,i])) call abort
+ if (a1(i,j)%index .ne. i + (j - 1)*2) STOP 8
+ if (any (a1(i,j)%entry .ne. [j,i])) STOP 9
end do
end do
end subroutine
integer, allocatable :: b(:)
call init(a)
- if (.NOT.allocated(a)) call abort()
- if (.NOT.all(a == [ 1, 2, 3 ])) call abort()
+ if (.NOT.allocated(a)) STOP 1
+ if (.NOT.all(a == [ 1, 2, 3 ])) STOP 2
call useit(a, b)
- if (.NOT.all(b == [ 1, 2, 3 ])) call abort()
+ if (.NOT.all(b == [ 1, 2, 3 ])) STOP 3
- if (.NOT.all(whatever(a) == [ 1, 2, 3 ])) call abort()
+ if (.NOT.all(whatever(a) == [ 1, 2, 3 ])) STOP 4
call kill(a)
- if (allocated(a)) call abort()
+ if (allocated(a)) STOP 5
call kill(b)
- if (allocated(b)) call abort()
+ if (allocated(b)) STOP 6
contains
subroutine useit(x, y)
integer, allocatable, intent(in) :: x(:)
integer, allocatable, intent(out) :: y(:)
- if (allocated(y)) call abort()
+ if (allocated(y)) STOP 7
call init(y)
y = x
end subroutine useit
end interface
call foo(a)
- if (any(a /= [ 1, 2, 3 ])) call abort()
+ if (any(a /= [ 1, 2, 3 ])) STOP 1
end program
subroutine moobar (a)
integer, intent(in) :: a(:)
- if (.not.all(a == [ 1, 2, 3 ])) call abort()
+ if (.not.all(a == [ 1, 2, 3 ])) STOP 1
end subroutine moobar
function foo2 (n)
end interface
! 2 _gfortran_internal_free's
- if (.not.all(foo1(3) == [ 1, 2, 3 ])) call abort()
+ if (.not.all(foo1(3) == [ 1, 2, 3 ])) STOP 2
a = foo1(size(a))
! 1 _gfortran_internal_free
- if (.not.all(a == [ 1, 2, 3 ])) call abort()
+ if (.not.all(a == [ 1, 2, 3 ])) STOP 3
call foobar(foo1(3))
! 1 _gfortran_internal_free
- if (.not.all(2*bar(size(a)) + 5 == [ 7, 9, 11 ])) call abort()
+ if (.not.all(2*bar(size(a)) + 5 == [ 7, 9, 11 ])) STOP 4
! Although the rhs determines the loop size, the lhs reference is
! evaluated, in case it has side-effects or is needed for bounds checking.
! 3 _gfortran_internal_free's
a(1:size (bar (3))) = 2*bar(size(a)) + 2 + a(size (bar (3)))
- if (.not.all(a == [ 7, 9, 11 ])) call abort()
+ if (.not.all(a == [ 7, 9, 11 ])) STOP 5
! 3 _gfortran_internal_free's
call moobar(foo1(3)) ! internal function
subroutine foobar (a)
integer, intent(in) :: a(:)
- if (.not.all(a == [ 1, 2, 3 ])) call abort()
+ if (.not.all(a == [ 1, 2, 3 ])) STOP 6
end subroutine foobar
function foo1 (n)
implicit none
type(t), dimension(2) :: c
c=tt(ts([99,199,1999]),ts([42,142]))
- if (any (c(1)%r .ne. [99,199,1999])) call abort
- if (any (c(2)%r .ne. [42,142])) call abort
+ if (any (c(1)%r .ne. [99,199,1999])) STOP 1
+ if (any (c(2)%r .ne. [42,142])) STOP 2
deallocate(c(1)%r)
deallocate(c(2)%r)
end program p
integer, allocatable :: spectral(:)
end function transform_to_spectral_from
end interface
- if (any (transform_to_spectral_from () .ne. (/1,2/))) call abort ()
+ if (any (transform_to_spectral_from () .ne. (/1,2/))) STOP 1
end
use m
character (:), allocatable :: lhs
lhs = foo ("foo calling ")
- if (lhs .ne. "foo") call abort
- if (len (lhs) .ne. 3) call abort
+ if (lhs .ne. "foo") STOP 1
+ if (len (lhs) .ne. 3) STOP 2
deallocate (lhs)
lhs = bar ("bar calling - baaaa!")
- if (lhs .ne. "bar calling") call abort
- if (len (lhs) .ne. 12) call abort
+ if (lhs .ne. "bar calling") STOP 3
+ if (len (lhs) .ne. 12) STOP 4
deallocate (lhs)
lhs = mfoo ("mfoo calling ")
- if (lhs .ne. "foo") call abort
- if (len (lhs) .ne. 3) call abort
+ if (lhs .ne. "foo") STOP 5
+ if (len (lhs) .ne. 3) STOP 6
deallocate (lhs)
lhs = mbar ("mbar calling - baaaa!")
- if (lhs .ne. "bar calling") call abort
- if (len (lhs) .ne. 12) call abort
+ if (lhs .ne. "bar calling") STOP 7
+ if (len (lhs) .ne. 12) STOP 8
contains
function foo (carg) result(res)
character (:), allocatable :: res
!
implicit none
CHARACTER(LEN=:),ALLOCATABLE :: str
-if (s_to_c("ABCdef") /= "ABCdef" .or. len(s_to_c("ABCdef")) /= 6) call abort()
+if (s_to_c("ABCdef") /= "ABCdef" .or. len(s_to_c("ABCdef")) /= 6) STOP 1
str = s_to_c("ABCdef")
-if (str /= "ABCdef" .or. len(str) /= 6) call abort()
+if (str /= "ABCdef" .or. len(str) /= 6) STOP 2
str(1:3) = s_to_c("123")
-if (str /= "123def" .or. len(str) /= 6) call abort()
+if (str /= "123def" .or. len(str) /= 6) STOP 3
contains
ENDFUNCTION s_to_c
end interface
CHARACTER(LEN=:),ALLOCATABLE :: str
-if (s_to_c("ABCdef") /= "ABCdef" .or. len(s_to_c("ABCdef")) /= 6) call abort()
+if (s_to_c("ABCdef") /= "ABCdef" .or. len(s_to_c("ABCdef")) /= 6) STOP 1
str = s_to_c("ABCdef")
-if (str /= "ABCdef" .or. len(str) /= 6) call abort()
+if (str /= "ABCdef" .or. len(str) /= 6) STOP 2
str(1:3) = s_to_c("123")
-if (str /= "123def" .or. len(str) /= 6) call abort()
+if (str /= "123def" .or. len(str) /= 6) STOP 3
end
real, dimension(2) :: x = 1.0, y
! PR61459
y = f_workaround (x)
- if (any (f_segfault (x) .ne. y)) call abort
- if (any (f_segfault_plus (x) .ne. y)) call abort
+ if (any (f_segfault (x) .ne. y)) STOP 1
+ if (any (f_segfault_plus (x) .ne. y)) STOP 2
! PR58883
- if (any (foo () .ne. reshape([1,2,3,4,5,6,7,8],[2,4]))) call abort
+ if (any (foo () .ne. reshape([1,2,3,4,5,6,7,8],[2,4]))) STOP 3
contains
function foo()
integer, allocatable :: foo(:,:)
allocate(scalar)
scalar = exp(1.)
print *,scalar
-if (.not. allocated(scalar)) call abort()
+if (.not. allocated(scalar)) STOP 1
deallocate(scalar)
-if (allocated(scalar)) call abort()
+if (allocated(scalar)) STOP 2
end
type(t), allocatable :: a
deallocate(a,stat=istat)
-if (istat == 0) call abort()
+if (istat == 0) STOP 1
end
character(len=5), allocatable :: str
allocate(str)
str = '1bcde'
-if(str /= '1bcde') call abort()
+if(str /= '1bcde') STOP 1
call sub(str,len(str))
-if(str /= '1bcde') call abort()
+if(str /= '1bcde') STOP 2
call subOUT(str,len(str))
-if (len(str) /= 5) call abort()
-if(allocated(str)) call abort()
+if (len(str) /= 5) STOP 3
+if(allocated(str)) STOP 4
contains
subroutine sub(x,n)
integer :: n
character(len=n), allocatable :: x
- if(len(x) /= 5) call abort()
- if(x /= '1bcde') call abort()
+ if(len(x) /= 5) STOP 5
+ if(x /= '1bcde') STOP 6
end subroutine sub
subroutine subOUT(x,n)
integer :: n
character(len=n), allocatable,intent(out) :: x
- if(allocated(x)) call abort()
- if(len(x) /= 5) call abort()
+ if(allocated(x)) STOP 7
+ if(len(x) /= 5) STOP 8
end subroutine subOUT
end
allocate(d,source=subdata(1)) ! memory was lost, now OK
allocate(e,source=d) ! OK
allocate(f,source=create (99)) ! memory was lost, now OK
- if (d%b .ne. 1) call abort
- if (e%b .ne. 1) call abort
- if (f%b .ne. 99) call abort
+ if (d%b .ne. 1) STOP 1
+ if (e%b .ne. 1) STOP 2
+ if (f%b .ne. 99) STOP 3
allocate (g, source = greeting1("good day"))
- if (g .ne. "good day") call abort
+ if (g .ne. "good day") STOP 4
allocate (h, source = greeting2("hello"))
- if (h .ne. "hello") call abort
+ if (h .ne. "hello") STOP 5
allocate (i, source = greeting3("hiya!"))
- if (i .ne. "hiya!") call abort
+ if (i .ne. "hiya!") STOP 6
call greeting4 (j, "Goodbye ") ! Test that dummy arguments are OK
- if (j .ne. "Goodbye ") call abort
+ if (j .ne. "Goodbye ") STOP 7
end subroutine
function create (arg) result(res)
character(5) :: arg
Character(5), allocatable :: res, res1
allocate(res, res1, source = arg) ! Caused an ICE
- if (res1 .ne. res) call abort
+ if (res1 .ne. res) STOP 8
end function
subroutine greeting4 (res, arg)
x%i = 13
print *,x%i
-if (.not. allocated(x%i)) call abort()
+if (.not. allocated(x%i)) STOP 1
deallocate(x%i)
-if (allocated(x%i)) call abort()
+if (allocated(x%i)) STOP 2
end
integer, allocatable :: b
allocate(a)
call foo(a)
- if(.not. allocated(a)) call abort()
- if (a /= 5) call abort()
+ if(.not. allocated(a)) STOP 1
+ if (a /= 5) STOP 2
call bar(a)
- if (a /= 7) call abort()
+ if (a /= 7) STOP 3
deallocate(a)
- if(allocated(a)) call abort()
+ if(allocated(a)) STOP 4
call check3(a)
- if(.not. allocated(a)) call abort()
- if(a /= 6874) call abort()
+ if(.not. allocated(a)) STOP 5
+ if(a /= 6874) STOP 6
call check4(a)
- if(.not. allocated(a)) call abort()
- if(a /= -478) call abort()
+ if(.not. allocated(a)) STOP 7
+ if(a /= -478) STOP 8
allocate(b)
b = 7482
call checkOptional(.false.,.true., 7482)
- if (b /= 7482) call abort()
+ if (b /= 7482) STOP 9
call checkOptional(.true., .true., 7482, b)
- if (b /= 46) call abort()
+ if (b /= 46) STOP 10
contains
subroutine foo(a)
integer, allocatable, intent(out) :: a
- if(allocated(a)) call abort()
+ if(allocated(a)) STOP 11
allocate(a)
a = 5
end subroutine foo
subroutine bar(a)
integer, allocatable, intent(inout) :: a
- if(.not. allocated(a)) call abort()
- if (a /= 5) call abort()
+ if(.not. allocated(a)) STOP 12
+ if (a /= 5) STOP 13
a = 7
end subroutine bar
subroutine check3(a)
integer, allocatable, intent(inout) :: a
- if(allocated(a)) call abort()
+ if(allocated(a)) STOP 14
allocate(a)
a = 6874
end subroutine check3
subroutine check4(a)
integer, allocatable, intent(inout) :: a
- if(.not.allocated(a)) call abort()
- if (a /= 6874) call abort
+ if(.not.allocated(a)) STOP 15
+ if (a /= 6874) STOP 1
deallocate(a)
- if(allocated(a)) call abort()
+ if(allocated(a)) STOP 16
allocate(a)
- if(.not.allocated(a)) call abort()
+ if(.not.allocated(a)) STOP 17
a = -478
end subroutine check4
logical, intent(in) :: prsnt, alloc
integer, allocatable, optional :: x
integer, intent(in) :: val
- if (present(x) .neqv. prsnt) call abort()
+ if (present(x) .neqv. prsnt) STOP 18
if (present(x)) then
- if (allocated(x) .neqv. alloc) call abort()
+ if (allocated(x) .neqv. alloc) STOP 19
end if
if (present(x)) then
if (allocated(x)) then
- if (x /= val) call abort()
+ if (x /= val) STOP 20
end if
end if
call checkOptional2(x)
if (present(x)) then
- if (.not. allocated(x)) call abort()
- if (x /= -6784) call abort()
+ if (.not. allocated(x)) STOP 21
+ if (x /= -6784) STOP 22
x = 46
end if
call checkOptional2()
subroutine checkOptional2(x)
integer, allocatable, optional, intent(out) :: x
if (present(x)) then
- if (allocated(x)) call abort()
+ if (allocated(x)) STOP 23
allocate(x)
x = -6784
end if
integer, allocatable :: a
integer :: b
- if (allocated (a)) call abort ()
+ if (allocated (a)) STOP 1
b = 7
b = func(.true.)
- if (b /= 5332) call abort ()
+ if (b /= 5332) STOP 2
b = 7
b = func(.true.) + 1
- if (b /= 5333) call abort ()
+ if (b /= 5333) STOP 3
call intout (a, .false.)
- if (allocated (a)) call abort ()
+ if (allocated (a)) STOP 4
call intout (a, .true.)
- if (.not.allocated (a)) call abort ()
- if (a /= 764) call abort ()
+ if (.not.allocated (a)) STOP 5
+ if (a /= 764) STOP 6
call intout2 (a)
- if (allocated (a)) call abort ()
+ if (allocated (a)) STOP 7
contains
function func (alloc)
integer, allocatable :: func
logical :: alloc
- if (allocated (func)) call abort ()
+ if (allocated (func)) STOP 8
if (alloc) then
allocate(func)
func = 5332
implicit none
integer, allocatable,intent(out) :: dum
logical :: alloc
- if (allocated (dum)) call abort()
+ if (allocated (dum)) STOP 9
if (alloc) then
allocate (dum)
dum = 764
integer :: stat
stat=99
allocate(a, stat=stat)
- if (stat /= 0) call abort ()
+ if (stat /= 0) STOP 1
allocate(a, stat=stat)
- if (stat == 0) call abort ()
+ if (stat == 0) STOP 2
allocate (b)
deallocate (b, stat=stat)
- if (stat /= 0) call abort ()
+ if (stat /= 0) STOP 3
deallocate (b, stat=stat)
- if (stat == 0) call abort ()
+ if (stat == 0) STOP 4
deallocate (c, stat=stat)
- if (stat == 0) call abort ()
+ if (stat == 0) STOP 5
end program test
integer, intent(in) :: no
integer, allocatable, save :: a
if (no == 0) then
- if (allocated (a)) call abort ()
+ if (allocated (a)) STOP 1
allocate (a)
else if (no == 1) then
- if (.not. allocated (a)) call abort ()
+ if (.not. allocated (a)) STOP 2
deallocate (a)
else
- if (allocated (a)) call abort ()
+ if (allocated (a)) STOP 3
end if
end subroutine sub
end program test
!
program test
implicit none
- if (func () /= 'abc') call abort ()
+ if (func () /= 'abc') STOP 1
contains
function func() result (str)
character(len=3), allocatable :: str
- if (allocated (str)) call abort ()
+ if (allocated (str)) STOP 2
allocate (str)
str = 'abc'
end function func
allocatable :: a1, a2, a3, a4, aa1, aa2, aa3,aa4
-if(allocated(a1)) call abort()
-if(allocated(a2)) call abort()
-if(allocated(a3)) call abort()
-if(allocated(a4)) call abort()
-if(allocated(aa1)) call abort()
-if(allocated(aa2)) call abort()
-if(allocated(aa3)) call abort()
-if(allocated(aa4)) call abort()
+if(allocated(a1)) STOP 1
+if(allocated(a2)) STOP 2
+if(allocated(a3)) STOP 3
+if(allocated(a4)) STOP 4
+if(allocated(aa1)) STOP 5
+if(allocated(aa2)) STOP 6
+if(allocated(aa3)) STOP 7
+if(allocated(aa4)) STOP 8
-if(allocated(na1%b1)) call abort()
-if(allocated(na2%b2)) call abort()
-if(allocated(na3%b3)) call abort()
-if(allocated(na4%b4)) call abort()
+if(allocated(na1%b1)) STOP 9
+if(allocated(na2%b2)) STOP 10
+if(allocated(na3%b3)) STOP 11
+if(allocated(na4%b4)) STOP 12
end block
end
select type (x)
type is (t2)
print *,x%j
- if (x%j/=4) call abort
+ if (x%j/=4) STOP 1
x%j = 5
class default
- call abort()
+ STOP 1
end select
select type (y)
type is (t2)
print *,y%j
- if (y%j/=4) call abort
+ if (y%j/=4) STOP 2
class default
- call abort()
+ STOP 2
end select
end
e1 = 'No error'
allocate(i(4), stat=n, errmsg=e1)
- if (trim(e1) /= 'No error') call abort
+ if (trim(e1) /= 'No error') STOP 1
deallocate(i)
e2 = 'No error'
allocate(i(4),stat=n, errmsg=e2)
- if (trim(e2) /= 'No error') call abort
+ if (trim(e2) /= 'No error') STOP 2
deallocate(i)
e1 = 'No error'
allocate(i(4), stat=n, errmsg=e1)
allocate(i(4), stat=n, errmsg=e1)
- if (trim(e1) /= 'Attempt to allocate an allocated object') call abort
+ if (trim(e1) /= 'Attempt to allocate an allocated object') STOP 3
deallocate(i)
e2 = 'No error'
allocate(i(4), stat=n, errmsg=e2)
allocate(i(4), stat=n, errmsg=e2)
- if (trim(e2) /= 'Attempt to allocate an allocat') call abort
+ if (trim(e2) /= 'Attempt to allocate an allocat') STOP 4
end program a
z = 99.
allocate(i(4), source=n)
- if (any(i /= 42)) call abort
+ if (any(i /= 42)) STOP 1
allocate(x(4), source=z)
- if (any(x /= 99.)) call abort
+ if (any(x /= 99.)) STOP 2
allocate(t, source=mytype(1.0,2))
- if (t%r /= 1. .or. t%i /= 2) call abort
+ if (t%r /= 1. .or. t%i /= 2) STOP 3
deallocate(i)
allocate(i(3), source=(/1, 2, 3/))
- if (i(1) /= 1 .or. i(2) /= 2 .or. i(3) /= 3) call abort
+ if (i(1) /= 1 .or. i(2) /= 2 .or. i(3) /= 3) STOP 4
call sub1(i)
integer, intent(in) :: j(*)
integer, allocatable :: k(:)
allocate(k(2), source=j(1:2))
- if (k(1) /= 1 .or. k(2) /= 2) call abort
+ if (k(1) /= 1 .or. k(2) /= 2) STOP 5
end subroutine sub1
call alloc( foo , foofoo)
- if (len(foo) .ne. 42) call abort
- if (len(foofoo) .ne. 22) call abort
+ if (len(foo) .ne. 42) STOP 1
+ if (len(foofoo) .ne. 22) STOP 2
contains
character(len=42), allocatable :: f
character(len=22), allocatable :: ff
call alloc(f, ff)
- if (len(f) .ne. 42) call abort
- if (len(ff) .ne. 22) call abort
+ if (len(f) .ne. 42) STOP 1
+ if (len(ff) .ne. 22) STOP 2
contains
subroutine alloc( a, b )
character(len=*), allocatable :: a
call AddArray1 (P, Pt)
select type (x => Pt%p)
type is (t)
- if (any (x%i .ne. [1,2])) call abort
+ if (any (x%i .ne. [1,2])) STOP 1
end select
deallocate (P)
deallocate (pt)
call AddArray2 (P, Pt)
select type (x => Pt%p)
type is (t)
- if (any (x%i .ne. [3,4,5])) call abort
+ if (any (x%i .ne. [3,4,5])) STOP 2
end select
deallocate (P)
deallocate (pt)
call AddArray3 (t(6), Pt)
select type (x => Pt%p)
type is (t)
- if (any (x%i .ne. [6,6,6,6])) call abort
+ if (any (x%i .ne. [6,6,6,6])) STOP 3
end select
deallocate (pt)
call AddArray4 ([t(7), t(8)], Pt)
select type (x => Pt%p)
type is (t)
- if (any (x%i .ne. [7,8])) call abort
+ if (any (x%i .ne. [7,8])) STOP 4
end select
deallocate (pt)
end
character(len=:), pointer :: str4, str5
nullify(str4)
str3 = 'AbCdEfGhIj'
- if(allocated(str)) call abort()
+ if(allocated(str)) STOP 1
allocate(str, source=str3)
- if(.not.allocated(str)) call abort()
- if(len(str) /= 8) call abort()
- if(str /= 'AbCdEfGh') call abort()
- if(associated(str4)) call abort()
+ if(.not.allocated(str)) STOP 2
+ if(len(str) /= 8) STOP 3
+ if(str /= 'AbCdEfGh') STOP 4
+ if(associated(str4)) STOP 5
str4 => str
- if(str4 /= str .or. len(str4)/=8) call abort()
- if(.not.associated(str4, str)) call abort()
+ if(str4 /= str .or. len(str4)/=8) STOP 6
+ if(.not.associated(str4, str)) STOP 7
str4 => null()
str = '12a56b78'
- if(str4 == '12a56b78') call abort()
+ if(str4 == '12a56b78') STOP 8
str4 = 'ABCDEFGH'
- if(str == 'ABCDEFGH') call abort()
+ if(str == 'ABCDEFGH') STOP 9
allocate(str5, source=str)
- if(associated(str5, str)) call abort()
- if(str5 /= '12a56b78' .or. len(str5)/=8) call abort()
+ if(associated(str5, str)) STOP 10
+ if(str5 /= '12a56b78' .or. len(str5)/=8) STOP 11
str = 'abcdef'
- if(str5 == 'abcdef') call abort()
+ if(str5 == 'abcdef') STOP 12
str5 = 'ABCDEF'
- if(str == 'ABCDEF') call abort()
+ if(str == 'ABCDEF') STOP 13
end subroutine source_check
subroutine source_check4()
character(kind=4,len=:), allocatable :: str, str2
character(kind=4,len=:), pointer :: str4, str5
nullify(str4)
str3 = 4_'AbCdEfGhIj'
- if(allocated(str)) call abort()
+ if(allocated(str)) STOP 14
allocate(str, source=str3)
- if(.not.allocated(str)) call abort()
- if(len(str) /= 8) call abort()
- if(str /= 4_'AbCdEfGh') call abort()
- if(associated(str4)) call abort()
+ if(.not.allocated(str)) STOP 15
+ if(len(str) /= 8) STOP 16
+ if(str /= 4_'AbCdEfGh') STOP 17
+ if(associated(str4)) STOP 18
str4 => str
- if(str4 /= str .or. len(str4)/=8) call abort()
- if(.not.associated(str4, str)) call abort()
+ if(str4 /= str .or. len(str4)/=8) STOP 19
+ if(.not.associated(str4, str)) STOP 20
str4 => null()
str = 4_'12a56b78'
- if(str4 == 4_'12a56b78') call abort()
+ if(str4 == 4_'12a56b78') STOP 21
str4 = 4_'ABCDEFGH'
- if(str == 4_'ABCDEFGH') call abort()
+ if(str == 4_'ABCDEFGH') STOP 22
allocate(str5, source=str)
- if(associated(str5, str)) call abort()
- if(str5 /= 4_'12a56b78' .or. len(str5)/=8) call abort()
+ if(associated(str5, str)) STOP 23
+ if(str5 /= 4_'12a56b78' .or. len(str5)/=8) STOP 24
str = 4_'abcdef'
- if(str5 == 4_'abcdef') call abort()
+ if(str5 == 4_'abcdef') STOP 25
str5 = 4_'ABCDEF'
- if(str == 4_'ABCDEF') call abort()
+ if(str == 4_'ABCDEF') STOP 26
end subroutine source_check4
subroutine mold_check()
character(len=:), allocatable :: str, str2
nullify(str4)
str2 = "ABCE"
ALLOCATE( str, MOLD=str3)
- if (len(str) /= 8) call abort()
+ if (len(str) /= 8) STOP 27
DEALLOCATE(str)
ALLOCATE( str, MOLD=str2)
- if (len(str) /= 4) call abort()
+ if (len(str) /= 4) STOP 28
- IF (associated(str4)) call abort()
+ IF (associated(str4)) STOP 29
ALLOCATE( str4, MOLD=str3)
- IF (.not.associated(str4)) call abort()
+ IF (.not.associated(str4)) STOP 30
str4 = '12345678'
- if (len(str4) /= 8) call abort()
- if(str4 /= '12345678') call abort()
+ if (len(str4) /= 8) STOP 31
+ if(str4 /= '12345678') STOP 32
DEALLOCATE(str4)
ALLOCATE( str4, MOLD=str2)
str4 = 'ABCD'
- if (len(str4) /= 4) call abort()
- if (str4 /= 'ABCD') call abort()
+ if (len(str4) /= 4) STOP 33
+ if (str4 /= 'ABCD') STOP 34
str5 => str4
- if(.not.associated(str4,str5)) call abort()
- if(len(str5) /= 4 .or. len(str4) /= len(str5)) call abort()
- if(str5 /= str4) call abort()
+ if(.not.associated(str4,str5)) STOP 35
+ if(len(str5) /= 4 .or. len(str4) /= len(str5)) STOP 36
+ if(str5 /= str4) STOP 37
deallocate(str4)
end subroutine mold_check
subroutine mold_check4()
nullify(str4)
str2 = 4_"ABCE"
ALLOCATE( str, MOLD=str3)
- if (len(str) /= 8) call abort()
+ if (len(str) /= 8) STOP 38
DEALLOCATE(str)
ALLOCATE( str, MOLD=str2)
- if (len(str) /= 4) call abort()
+ if (len(str) /= 4) STOP 39
- IF (associated(str4)) call abort()
+ IF (associated(str4)) STOP 40
ALLOCATE( str4, MOLD=str3)
- IF (.not.associated(str4)) call abort()
+ IF (.not.associated(str4)) STOP 41
str4 = 4_'12345678'
- if (len(str4) /= 8) call abort()
- if(str4 /= 4_'12345678') call abort()
+ if (len(str4) /= 8) STOP 42
+ if(str4 /= 4_'12345678') STOP 43
DEALLOCATE(str4)
ALLOCATE( str4, MOLD=str2)
str4 = 4_'ABCD'
- if (len(str4) /= 4) call abort()
- if (str4 /= 4_'ABCD') call abort()
+ if (len(str4) /= 4) STOP 44
+ if (str4 /= 4_'ABCD') STOP 45
str5 => str4
- if(.not.associated(str4,str5)) call abort()
- if(len(str5) /= 4 .or. len(str4) /= len(str5)) call abort()
- if(str5 /= str4) call abort()
+ if(.not.associated(str4,str5)) STOP 46
+ if(len(str5) /= 4 .or. len(str4) /= len(str5)) STOP 47
+ if(str5 /= str4) STOP 48
deallocate(str4)
end subroutine mold_check4
subroutine ftn_test()
character(len=:), pointer :: str_p
nullify(str_p)
call proc_test(str_a, str_p, .false.)
- if (str_p /= '123457890abcdef') call abort()
- if (len(str_p) /= 50) call abort()
- if (str_a(1:5) /= 'ABCDE ') call abort()
- if (len(str_a) /= 50) call abort()
+ if (str_p /= '123457890abcdef') STOP 49
+ if (len(str_p) /= 50) STOP 50
+ if (str_a(1:5) /= 'ABCDE ') STOP 51
+ if (len(str_a) /= 50) STOP 52
deallocate(str_p)
str_a = '1245'
- if(len(str_a) /= 4) call abort()
- if(str_a /= '1245') call abort()
+ if(len(str_a) /= 4) STOP 53
+ if(str_a /= '1245') STOP 54
allocate(character(len=6) :: str_p)
- if(len(str_p) /= 6) call abort()
+ if(len(str_p) /= 6) STOP 55
str_p = 'AbCdEf'
call proc_test(str_a, str_p, .true.)
- if (str_p /= '123457890abcdef') call abort()
- if (len(str_p) /= 50) call abort()
- if (str_a(1:5) /= 'ABCDE ') call abort()
- if (len(str_a) /= 50) call abort()
+ if (str_p /= '123457890abcdef') STOP 56
+ if (len(str_p) /= 50) STOP 57
+ if (str_a(1:5) /= 'ABCDE ') STOP 58
+ if (len(str_a) /= 50) STOP 59
deallocate(str_p)
end subroutine ftn_test
subroutine proc_test(a, p, alloc)
character(len=5), target :: loc
logical :: alloc
if (.not. alloc) then
- if(associated(p)) call abort()
- if(allocated(a)) call abort()
+ if(associated(p)) STOP 60
+ if(allocated(a)) STOP 61
else
- if(len(a) /= 4) call abort()
- if(a /= '1245') call abort()
- if(len(p) /= 6) call abort()
- if(p /= 'AbCdEf') call abort()
+ if(len(a) /= 4) STOP 62
+ if(a /= '1245') STOP 63
+ if(len(p) /= 6) STOP 64
+ if(p /= 'AbCdEf') STOP 65
deallocate(a)
nullify(p)
end if
allocate(character(len=50) :: a)
a(1:5) = 'ABCDE'
- if(len(a) /= 50) call abort()
- if(a(1:5) /= "ABCDE") call abort()
+ if(len(a) /= 50) STOP 66
+ if(a(1:5) /= "ABCDE") STOP 67
loc = '12345'
p => loc
- if (len(p) /= 5) call abort()
- if (p /= '12345') call abort()
+ if (len(p) /= 5) STOP 68
+ if (p /= '12345') STOP 69
p = '12345679'
- if (len(p) /= 5) call abort()
- if (p /= '12345') call abort()
+ if (len(p) /= 5) STOP 70
+ if (p /= '12345') STOP 71
p = 'ABC'
- if (loc /= 'ABC ') call abort()
+ if (loc /= 'ABC ') STOP 72
allocate(p, mold=a)
- if (.not.associated(p)) call abort()
+ if (.not.associated(p)) STOP 73
p = '123457890abcdef'
- if (p /= '123457890abcdef') call abort()
- if (len(p) /= 50) call abort()
+ if (p /= '123457890abcdef') STOP 74
+ if (len(p) /= 50) STOP 75
end subroutine proc_test
subroutine ftn_test4()
character(len=:,kind=4), allocatable :: str_a
character(len=:,kind=4), pointer :: str_p
nullify(str_p)
call proc_test4(str_a, str_p, .false.)
- if (str_p /= 4_'123457890abcdef') call abort()
- if (len(str_p) /= 50) call abort()
- if (str_a(1:5) /= 4_'ABCDE ') call abort()
- if (len(str_a) /= 50) call abort()
+ if (str_p /= 4_'123457890abcdef') STOP 76
+ if (len(str_p) /= 50) STOP 77
+ if (str_a(1:5) /= 4_'ABCDE ') STOP 78
+ if (len(str_a) /= 50) STOP 79
deallocate(str_p)
str_a = 4_'1245'
- if(len(str_a) /= 4) call abort()
- if(str_a /= 4_'1245') call abort()
+ if(len(str_a) /= 4) STOP 80
+ if(str_a /= 4_'1245') STOP 81
allocate(character(len=6, kind = 4) :: str_p)
- if(len(str_p) /= 6) call abort()
+ if(len(str_p) /= 6) STOP 82
str_p = 4_'AbCdEf'
call proc_test4(str_a, str_p, .true.)
- if (str_p /= 4_'123457890abcdef') call abort()
- if (len(str_p) /= 50) call abort()
- if (str_a(1:5) /= 4_'ABCDE ') call abort()
- if (len(str_a) /= 50) call abort()
+ if (str_p /= 4_'123457890abcdef') STOP 83
+ if (len(str_p) /= 50) STOP 84
+ if (str_a(1:5) /= 4_'ABCDE ') STOP 85
+ if (len(str_a) /= 50) STOP 86
deallocate(str_p)
end subroutine ftn_test4
subroutine proc_test4(a, p, alloc)
character(len=5,kind=4), target :: loc
logical :: alloc
if (.not. alloc) then
- if(associated(p)) call abort()
- if(allocated(a)) call abort()
+ if(associated(p)) STOP 87
+ if(allocated(a)) STOP 88
else
- if(len(a) /= 4) call abort()
- if(a /= 4_'1245') call abort()
- if(len(p) /= 6) call abort()
- if(p /= 4_'AbCdEf') call abort()
+ if(len(a) /= 4) STOP 89
+ if(a /= 4_'1245') STOP 90
+ if(len(p) /= 6) STOP 91
+ if(p /= 4_'AbCdEf') STOP 92
deallocate(a)
nullify(p)
end if
allocate(character(len=50,kind=4) :: a)
a(1:5) = 4_'ABCDE'
- if(len(a) /= 50) call abort()
- if(a(1:5) /= 4_"ABCDE") call abort()
+ if(len(a) /= 50) STOP 93
+ if(a(1:5) /= 4_"ABCDE") STOP 94
loc = '12345'
p => loc
- if (len(p) /= 5) call abort()
- if (p /= 4_'12345') call abort()
+ if (len(p) /= 5) STOP 95
+ if (p /= 4_'12345') STOP 96
p = 4_'12345679'
- if (len(p) /= 5) call abort()
- if (p /= 4_'12345') call abort()
+ if (len(p) /= 5) STOP 97
+ if (p /= 4_'12345') STOP 98
p = 4_'ABC'
- if (loc /= 4_'ABC ') call abort()
+ if (loc /= 4_'ABC ') STOP 99
allocate(p, mold=a)
- if (.not.associated(p)) call abort()
+ if (.not.associated(p)) STOP 100
p = 4_'123457890abcdef'
- if (p /= 4_'123457890abcdef') call abort()
- if (len(p) /= 50) call abort()
+ if (p /= 4_'123457890abcdef') STOP 101
+ if (len(p) /= 50) STOP 102
end subroutine proc_test4
subroutine source3()
character(len=:, kind=1), allocatable :: a1
character(len=:, kind=1), pointer :: p1
character(len=:, kind=4), pointer :: p4
allocate(a1, source='ABC') ! << ICE
- if(len(a1) /= 3 .or. a1 /= 'ABC') call abort()
+ if(len(a1) /= 3 .or. a1 /= 'ABC') STOP 103
allocate(a4, source=4_'12345') ! << ICE
- if(len(a4) /= 5 .or. a4 /= 4_'12345') call abort()
+ if(len(a4) /= 5 .or. a4 /= 4_'12345') STOP 104
allocate(p1, mold='AB') ! << ICE
- if(len(p1) /= 2) call abort()
+ if(len(p1) /= 2) STOP 105
allocate(p4, mold=4_'145') ! << ICE
- if(len(p4) /= 3) call abort()
+ if(len(p4) /= 3) STOP 106
end subroutine source3
end program test
! Spurious -Wstringop-overflow warning with -O1
integer n
n = 10
allocate(name, SOURCE=repeat('x',n))
- if (name .ne. 'xxxxxxxxxx') call abort
- if (len (name) .ne. 10 ) call abort
+ if (name .ne. 'xxxxxxxxxx') STOP 1
+ if (len (name) .ne. 10 ) STOP 2
deallocate(name)
src = 'xyxy'
allocate(name, SOURCE=repeat(src,n))
- if (name(37:40) .ne. 'xyxy') call abort
- if (len (name) .ne. 40 ) call abort
+ if (name(37:40) .ne. 'xyxy') STOP 3
+ if (len (name) .ne. 40 ) STOP 4
end program note7_35
type(b), allocatable :: c(:)
allocate(c(1))
- if (c(1) % acomp % i /= 5) call abort()
+ if (c(1) % acomp % i /= 5) STOP 1
end program fail1
USE mo_test
INTEGER, ALLOCATABLE :: query_buf(:)
ALLOCATE(query_buf(nquery()))
- if (n /= 1 .or. size(query_buf) /= n) call abort()
+ if (n /= 1 .or. size(query_buf) /= n) STOP 1
END PROGRAM example
! { dg-final { scan-tree-dump-times "nquery" 5 "original" } }
class default
i = 2
end select
- if (i .ne. 1) call abort
+ if (i .ne. 1) STOP 1
end subroutine
end module UnstructuredGridImages
integer n
n = 10
allocate(name, SOURCE=repeat('x',bar()))
- if (name .ne. 'xxxxxxxxxx') call abort
- if (len (name) .ne. 10 ) call abort
+ if (name .ne. 'xxxxxxxxxx') STOP 1
+ if (len (name) .ne. 10 ) STOP 2
end program note7_35
type(t1_t), dimension(:), allocatable :: p_born
allocate (p_born(1:size(t3%int_born%func ())), &
source = t3%int_born%func ())
- if (.not. allocated(p_born)) call abort()
- if (size(p_born) /= 5) call abort()
+ if (.not. allocated(p_born)) STOP 1
+ if (size(p_born) /= 5) STOP 2
end subroutine evaluate
end module processes
type(t1_t), dimension(:), allocatable :: p_born
allocate (p_born(1:size(t3%int_born%func ())), &
source = t3%int_born%func ())
- if (.not. allocated(p_born)) call abort()
- if (size(p_born) /= 5) call abort()
+ if (.not. allocated(p_born)) STOP 1
+ if (size(p_born) /= 5) STOP 2
end subroutine evaluate
end module processes
! write (*,*) tmp( 1, :)
allocate (d(DIM1_SIZE / 2, 2), source = tmp(1 : DIM1_SIZE / 2, :) , stat=errstat)
- if (any (d .ne. tmp(1:DIM1_SIZE/2,:))) call abort
+ if (any (d .ne. tmp(1:DIM1_SIZE/2,:))) STOP 1
deallocate (d)
allocate (d(DIM1_SIZE / 2, 2), source = foo (tmp(1 : DIM1_SIZE / 2, :)) , stat=errstat)
- if (any (d .ne. tmp(1 : DIM1_SIZE / 2, :))) call abort
+ if (any (d .ne. tmp(1 : DIM1_SIZE / 2, :))) STOP 2
deallocate (tmp , d)
end select
end do
! print "(10i6,/)", j
- if (any (j .ne. [(i, i = 1,20)])) call abort
+ if (any (j .ne. [(i, i = 1,20)])) STOP 1
! print "(10f6.2,/)", r
- if (any (r(1:10) .ne. [(real (2 * i), i = 1,10)])) call abort
- if (any (r(11:20) .ne. zero)) call abort
+ if (any (r(1:10) .ne. [(real (2 * i), i = 1,10)])) STOP 2
+ if (any (r(11:20) .ne. zero)) STOP 3
end subroutine Typeme
end module test_mod
c1%steps= 1
d=> c1%construct(prev)
- if (.not. associated(d) ) call abort()
+ if (.not. associated(d) ) STOP 1
select type (d)
class is (exttype)
- if (d%i2 /= 5) call abort()
+ if (d%i2 /= 5) STOP 2
class default
- call abort()
+ STOP 3
end select
- if (d%i /= 2) call abort()
+ if (d%i /= 2) STOP 4
deallocate(c1)
deallocate(prev)
deallocate(d)
subroutine check
select type (z => a%x)
type is (real(8))
- if (any (z .ne. r)) call abort
+ if (any (z .ne. r)) STOP 1
type is (character(kind = 1, len = *))
- if (any(z .ne. chr1)) call abort
+ if (any(z .ne. chr1)) STOP 2
type is (character(kind = 4, len = *))
- if (any(z .ne. chr4)) call abort
+ if (any(z .ne. chr4)) STOP 3
end select
deallocate (a%x)
end subroutine
select type (copyofvar)
type is (character(len=*))
! print*, len(copyofvar), copyofvar
- if (len(copyofvar) /= 11) call abort ()
- if (copyofvar /= "A test case") call abort ()
+ if (len(copyofvar) /= 11) STOP 1
+ if (copyofvar /= "A test case") STOP 2
end select
deallocate(copyofvar)
end subroutine
character(:),allocatable::string
real::rnd
call hello(5, string)
- if (string /= 'hello' .or. len(string) /= 5) call abort
+ if (string /= 'hello' .or. len(string) /= 5) STOP 1
contains
subroutine hello (n,string)
character(:),allocatable,intent(out)::string
character(3), parameter :: c = 'abc'
character(:), allocatable :: z
allocate (z, source=repeat(c(2:1), f()))
- if (len(z) /= 0) call abort()
- if (z /= "") call abort()
+ if (len(z) /= 0) STOP 1
+ if (z /= "") STOP 2
end
class(t), allocatable, dimension(:) :: a, b
allocate(tt::a(1:2))
a(:)%i = [ 1,2 ]
- if (size(a) /= 2) call abort()
- if (any(a(:)%i /= [ 1,2])) call abort()
+ if (size(a) /= 2) STOP 1
+ if (any(a(:)%i /= [ 1,2])) STOP 2
allocate(b(1:4), source=a)
! b is incorrectly initialized here. This only is diagnosed when compiled
! with -fcheck=bounds.
- if (size(b) /= 4) call abort()
- if (any(b(1:2)%i /= [ 1,2])) call abort()
+ if (size(b) /= 4) STOP 3
+ if (any(b(1:2)%i /= [ 1,2])) STOP 4
select type (b1 => b(1))
class is (tt)
continue
class default
- call abort()
+ STOP 5
end select
end subroutine
subroutine test_type()
type(t), allocatable, dimension(:) :: a, b
allocate(a(1:2))
- if (size(a) /= 2) call abort()
+ if (size(a) /= 2) STOP 6
allocate(b(1:4), source=a)
- if (size(b) /= 4) call abort()
+ if (size(b) /= 4) STOP 7
end subroutine
end program allocate_source
class(t), allocatable, dimension(:) :: a, b
allocate(tt::a(1:2))
a(:)%i = [ 1,2 ]
- if (size(a) /= 2) call abort()
- if (any(a(:)%i /= [ 1,2])) call abort()
+ if (size(a) /= 2) STOP 1
+ if (any(a(:)%i /= [ 1,2])) STOP 2
allocate(b(1:4), source=a(1))
- if (size(b) /= 4) call abort()
- if (any(b(:)%i /= [ 1,1,1,1])) call abort()
+ if (size(b) /= 4) STOP 3
+ if (any(b(:)%i /= [ 1,1,1,1])) STOP 4
select type (b1 => b(1))
class is (tt)
continue
class default
- call abort()
+ STOP 5
end select
end subroutine
class(t), allocatable, dimension(:) :: a, b
allocate(tt::a(1:2))
a(:)%i = [ 1,2 ]
- if (size(a) /= 2) call abort()
- if (any(a(:)%i /= [ 1,2])) call abort()
+ if (size(a) /= 2) STOP 6
+ if (any(a(:)%i /= [ 1,2])) STOP 7
allocate(b(1:4), source=a) ! Fail expected: sizes do not conform
- if (size(b) /= 4) call abort()
- if (any(b(1:2)%i /= [ 1,2])) call abort()
+ if (size(b) /= 4) STOP 8
+ if (any(b(1:2)%i /= [ 1,2])) STOP 9
select type (b1 => b(1))
class is (tt)
continue
class default
- call abort()
+ STOP 10
end select
end subroutine
subroutine test_type()
type(t), allocatable, dimension(:) :: a, b
allocate(a(1:2))
- if (size(a) /= 2) call abort()
+ if (size(a) /= 2) STOP 11
allocate(b(1:4), source=a)
- if (size(b) /= 4) call abort()
+ if (size(b) /= 4) STOP 12
end subroutine
end program allocate_source
type(field_data_t), intent(in) :: prt_src
integer :: i
if (allocated (prt_src%name)) then
- if (prt_src%name(1) /= "foo") call abort()
- if (prt_src%name(2) /= "bar") call abort()
+ if (prt_src%name(1) /= "foo") STOP 1
+ if (prt_src%name(2) /= "bar") STOP 2
if (allocated (prt%name)) deallocate (prt%name)
allocate (prt%name (size (prt_src%name)), source = prt_src%name)
! The issue was, that prt_src was empty after sourced-allocate.
- if (prt_src%name(1) /= "foo") call abort()
- if (prt_src%name(2) /= "bar") call abort()
- if (prt%name(1) /= "foo") call abort()
- if (prt%name(2) /= "bar") call abort()
+ if (prt_src%name(1) /= "foo") STOP 3
+ if (prt_src%name(2) /= "bar") STOP 4
+ if (prt%name(1) /= "foo") STOP 5
+ if (prt%name(2) /= "bar") STOP 6
end if
end subroutine copy
class(t2), intent(inout) :: this
character(32), dimension(:), allocatable :: md5
allocate (md5 (this%n), source=this%md5)
- if (md5(1) /= "tst ") call abort()
- if (md5(2) /= " ") call abort()
- if (md5(3) /= "fooblabar ") call abort()
+ if (md5(1) /= "tst ") STOP 1
+ if (md5(2) /= " ") STOP 2
+ if (md5(3) /= "fooblabar ") STOP 3
end subroutine t2_init
end module foo2
call sel%init([2., 0., 3., 0., 4.])
- if (any(sel%map /= [1, 3, 5])) call abort()
- if (any(abs(sel%weight - [2., 3., 4.] / 9.) > 1E-6)) call abort()
+ if (any(sel%map /= [1, 3, 5])) STOP 4
+ if (any(abs(sel%weight - [2., 3., 4.] / 9.) > 1E-6)) STOP 5
phs_config%n_in = 2
allocate (phs_config%flv (phs_config%n_in, 1))
call phs_base_init (phs, phs_config)
- if (any(abs(phs%m_in - [42.0, 42.0]) > 1E-6)) call abort()
+ if (any(abs(phs%m_in - [42.0, 42.0]) > 1E-6)) STOP 6
o%n = 2
allocate (o%val(0:1,4))
class(t2), intent(inout) :: this
character(32), dimension(:), allocatable :: md5
allocate (md5 (this%n), source=this%md5)
- if (md5(1) /= "tst ") call abort()
- if (md5(2) /= " ") call abort()
- if (md5(3) /= "fooblabar ") call abort()
+ if (md5(1) /= "tst ") STOP 1
+ if (md5(2) /= " ") STOP 2
+ if (md5(3) /= "fooblabar ") STOP 3
end subroutine t2_init
end module foo2
call sel%init([2., 0., 3., 0., 4.])
- if (any(sel%map /= [1, 3, 5])) call abort()
- if (any(abs(sel%weight - [2., 3., 4.] / 9.) > 1E-6)) call abort()
+ if (any(sel%map /= [1, 3, 5])) STOP 4
+ if (any(abs(sel%weight - [2., 3., 4.] / 9.) > 1E-6)) STOP 5
phs_config%n_in = 2
allocate (phs_config%flv (phs_config%n_in, 1))
call phs_base_init (phs, phs_config)
- if (any(abs(phs%m_in - [42.0, 42.0]) > 1E-6)) call abort()
+ if (any(abs(phs%m_in - [42.0, 42.0]) > 1E-6)) STOP 6
o%n = 2
allocate (o%val(0:1,4))
deallocate(a)
allocate(a, source=c)
allocate(m, source=[(I, I=1, num_params_used)])
- if (any(m /= [(I, I=1, num_params_used)])) call abort()
+ if (any(m /= [(I, I=1, num_params_used)])) STOP 1
deallocate(a,b,m)
call testArrays()
select type (R => Y%X)
type is (real)
if (any(reshape(R, [15]) /= [5,5,5,5,5, 5,5,5,5,5, 5,5,5,5,5])) &
- call abort()
+ STOP 2
class default
- call abort()
+ STOP 3
end select
deallocate(Y%X)
select type (R => Y%X)
type is (real)
if (any(reshape(R, [4]) /= [5,5,5,5])) &
- call abort()
+ STOP 4
class default
- call abort()
+ STOP 5
end select
deallocate(Y%X)
select type (R => o%v)
type is (real)
if (any(R /= [5,5])) &
- call abort()
+ STOP 6
class default
- call abort()
+ STOP 7
end select
deallocate(o%v)
allocate(v, source=arr(2,1:5))
- if (any(v /= [5,5,5,5,5])) call abort()
+ if (any(v /= [5,5,5,5,5])) STOP 8
deallocate(v)
end subroutine testArrays
end
integer, parameter :: lcim(2,10) = reshape([(i, i=1,10),(i,i=1,10)], [2,10])
allocate(iv, source= [ 1, 2, 3, 4])
- if (any(iv /= [ 1, 2, 3, 4])) call abort()
+ if (any(iv /= [ 1, 2, 3, 4])) STOP 1
deallocate(iv)
allocate(iv, source=(/(i, i=1,10)/))
- if (any(iv /= (/(i, i=1,10)/))) call abort()
+ if (any(iv /= (/(i, i=1,10)/))) STOP 2
! Now 2D
allocate(im, source= cim)
- if (any(im /= cim)) call abort()
+ if (any(im /= cim)) STOP 3
deallocate(im)
allocate(im, source= reshape([iv, iv], [2, size(iv, 1)]))
- if (any(im /= lcim)) call abort()
+ if (any(im /= lcim)) STOP 4
deallocate(im)
deallocate(iv)
allocate(u, source=[cstruct( 4, [1.1,2.2] )] )
- if (any(u(:)%i /= 4) .or. any(abs(u(1)%r(:) - [1.1,2.2]) > 1E-6)) call abort()
+ if (any(u(:)%i /= 4) .or. any(abs(u(1)%r(:) - [1.1,2.2]) > 1E-6)) STOP 5
deallocate (u)
allocate(iv, source= arrval())
- if (any(iv /= [ 1, 2, 4, 5, 6])) call abort()
+ if (any(iv /= [ 1, 2, 4, 5, 6])) STOP 6
! Check simple array assign
allocate(iv2, source=iv)
- if (any(iv2 /= [ 1, 2, 4, 5, 6])) call abort()
+ if (any(iv2 /= [ 1, 2, 4, 5, 6])) STOP 7
deallocate(iv, iv2)
! Now check for mold=
allocate(iv, mold= [ 1, 2, 3, 4])
- if (any(shape(iv) /= [4])) call abort()
+ if (any(shape(iv) /= [4])) STOP 8
deallocate(iv)
allocate(iv, mold=(/(i, i=1,10)/))
- if (any(shape(iv) /= [10])) call abort()
+ if (any(shape(iv) /= [10])) STOP 9
! Now 2D
allocate(im, mold= cim)
- if (any(shape(im) /= shape(cim))) call abort()
+ if (any(shape(im) /= shape(cim))) STOP 10
deallocate(im)
allocate(im, mold= reshape([iv, iv], [2, size(iv, 1)]))
- if (any(shape(im) /= shape(lcim))) call abort()
+ if (any(shape(im) /= shape(lcim))) STOP 11
deallocate(im)
deallocate(iv)
allocate(u, mold=[cstruct( 4, [1.1,2.2] )] )
- if (any(shape(u(1)%r(:)) /= 2)) call abort()
+ if (any(shape(u(1)%r(:)) /= 2)) STOP 12
deallocate (u)
allocate(iv, mold= arrval())
- if (any(shape(iv) /= [5])) call abort()
+ if (any(shape(iv) /= [5])) STOP 13
! Check simple array assign
allocate(iv2, mold=iv)
- if (any(shape(iv2) /= [5])) call abort()
+ if (any(shape(iv2) /= [5])) STOP 14
deallocate(iv, iv2)
call addData([4, 5])
allocate (cP, source= P)
select type (cP)
type is (integer)
- if (any(cP /= [4,5])) call abort()
+ if (any(cP /= [4,5])) STOP 15
type is (character(*))
- if (len(cP) /= 3) call abort()
- if (any(cP /= ["foo", "bar"])) call abort()
+ if (len(cP) /= 3) STOP 16
+ if (any(cP /= ["foo", "bar"])) STOP 17
class default
- call abort()
+ STOP 18
end select
deallocate (cP)
allocate (cP, mold= P)
select type (cP)
type is (integer)
- if (any(size(cP) /= [2])) call abort()
+ if (any(size(cP) /= [2])) STOP 19
type is (character(*))
- if (len(cP) /= 3) call abort()
- if (any(size(cP) /= [2])) call abort()
+ if (len(cP) /= 3) STOP 20
+ if (any(size(cP) /= [2])) STOP 21
class default
- call abort()
+ STOP 22
end select
deallocate (cP)
end subroutine
ub = lb + 2
allocate(o1%acc, source=vec)
allocate(o2%acc, source=o1%acc(lb:ub))
- if (any (o2%acc /= [7, 8, 9])) call abort()
+ if (any (o2%acc /= [7, 8, 9])) STOP 1
block
real, dimension(0:n) :: a
real, dimension(:), allocatable :: c
call random_number(a)
allocate(c,source=a(:))
- if (any (abs(a - c) > 1E-6)) call abort()
+ if (any (abs(a - c) > 1E-6)) STOP 2
end block
end program main
two = ' 2'
allocate (a(1:-1))
- if (size(a) /= 0) call abort
+ if (size(a) /= 0) STOP 1
deallocate (a)
allocate (b(1:-1,0:10))
- if (size(b) /= 0) call abort
+ if (size(b) /= 0) STOP 2
deallocate (b)
! Use variables for array bounds. The internal reads
read (unit=one, fmt='(I2)') n
allocate (a(n:-1))
- if (size(a) /= 0) call abort
+ if (size(a) /= 0) STOP 3
deallocate (a)
read (unit=two, fmt='(I2)') m
allocate (b(1:3, m:0))
- if (size(b) /= 0) call abort
+ if (size(b) /= 0) STOP 4
deallocate (b)
end program main
DO J1 = 1,7
IVAL = 3-J1
- IF (ILA1(J1) .NE. IVAL) call abort ()
+ IF (ILA1(J1) .NE. IVAL) STOP 1
100 ENDDO
DO J1 = 1,7
IVAL = 2+J1
- IF (ILA2(J1) .NE. IVAL) call abort ()
+ IF (ILA2(J1) .NE. IVAL) STOP 2
101 ENDDO
END SUBROUTINE
implicit none
integer :: i = 0
call gen (i, *10)
- if (i /= -2) call abort ()
+ if (i /= -2) STOP 1
i = 2
call gen (i, *20)
10 continue
- call abort()
+ STOP 2
20 continue
- if (i /= -1) call abort ()
+ if (i /= -1) STOP 3
end
EXTERNAL R\r
character(3) res\r
call PHLOAD (R, 1, res)\r
- if (res .ne. "one") call abort ()\r
+ if (res .ne. "one") STOP 1\r
CALL PHLOAD (R, 2, res)\r
- if (res .ne. "two") call abort ()\r
+ if (res .ne. "two") STOP 2\r
END\r
USE TT
CALL M(1,*2)
- CALL ABORT()
+ STOP 1
2 CONTINUE
END
! { dg-do run }
program L
- if (and(.TRUE._1, .TRUE._1) .neqv. .true.) call abort
- if (or(.TRUE._1, .TRUE._1) .neqv. .true.) call abort
- if (xor(.TRUE._1, .TRUE._1) .neqv. .false.) call abort
+ if (and(.TRUE._1, .TRUE._1) .neqv. .true.) STOP 1
+ if (or(.TRUE._1, .TRUE._1) .neqv. .true.) STOP 2
+ if (xor(.TRUE._1, .TRUE._1) .neqv. .false.) STOP 3
end program L
A = ANINT ( A , DP)
B = A
A = ANINT ( A)
- if (any (A .ne. B)) call abort ()
+ if (any (A .ne. B)) STOP 1
END PROGRAM Test
i = 16843009 ! Initialize i to put junk into b
b = any(a>0.5,dim=1)
- if (b(2) .or. .not. b(1)) call abort
+ if (b(2) .or. .not. b(1)) STOP 1
i = 16843009 ! Initialize i to put junk into b
b = all(a>0.5,dim=1)
- if (b(2) .or. .not. b(1)) call abort
+ if (b(2) .or. .not. b(1)) STOP 2
end program main
m8 = a > 0
write (unit=res,fmt=f) any(m1,dim=1)
- if (res /= 'FTT') call abort
+ if (res /= 'FTT') STOP 1
write (unit=res,fmt=f) any(m2,dim=1)
- if (res /= 'FTT') call abort
+ if (res /= 'FTT') STOP 2
write (unit=res,fmt=f) any(m4,dim=1)
- if (res /= 'FTT') call abort
+ if (res /= 'FTT') STOP 3
write (unit=res,fmt=f) any(m8,dim=1)
- if (res /= 'FTT') call abort
+ if (res /= 'FTT') STOP 4
write (unit=res,fmt=f) any(m1,dim=2)
- if (res /= 'TTT') call abort
+ if (res /= 'TTT') STOP 5
write (unit=res,fmt=f) any(m2,dim=2)
- if (res /= 'TTT') call abort
+ if (res /= 'TTT') STOP 6
write (unit=res,fmt=f) any(m4,dim=2)
- if (res /= 'TTT') call abort
+ if (res /= 'TTT') STOP 7
write (unit=res,fmt=f) any(m8,dim=2)
- if (res /= 'TTT') call abort
+ if (res /= 'TTT') STOP 8
write (unit=res,fmt=f) all(m1,dim=1)
- if (res /= 'FFT') call abort
+ if (res /= 'FFT') STOP 9
write (unit=res,fmt=f) all(m2,dim=1)
- if (res /= 'FFT') call abort
+ if (res /= 'FFT') STOP 10
write (unit=res,fmt=f) all(m4,dim=1)
- if (res /= 'FFT') call abort
+ if (res /= 'FFT') STOP 11
write (unit=res,fmt=f) all(m8,dim=1)
- if (res /= 'FFT') call abort
+ if (res /= 'FFT') STOP 12
write (unit=res,fmt=f) all(m1,dim=2)
- if (res /= 'FFF') call abort
+ if (res /= 'FFF') STOP 13
write (unit=res,fmt=f) all(m2,dim=2)
- if (res /= 'FFF') call abort
+ if (res /= 'FFF') STOP 14
write (unit=res,fmt=f) all(m4,dim=2)
- if (res /= 'FFF') call abort
+ if (res /= 'FFF') STOP 15
write (unit=res,fmt=f) all(m8,dim=2)
- if (res /= 'FFF') call abort
+ if (res /= 'FFF') STOP 16
write (unit=res,fmt=g) count(m1,dim=1)
- if (res /= '023') call abort
+ if (res /= '023') STOP 17
write (unit=res,fmt=g) count(m2,dim=1)
- if (res /= '023') call abort
+ if (res /= '023') STOP 18
write (unit=res,fmt=g) count(m4,dim=1)
- if (res /= '023') call abort
+ if (res /= '023') STOP 19
write (unit=res,fmt=g) count(m8,dim=1)
- if (res /= '023') call abort
+ if (res /= '023') STOP 20
write (unit=res,fmt=g) count(m1,dim=2)
- if (res /= '221') call abort
+ if (res /= '221') STOP 21
write (unit=res,fmt=g) count(m2,dim=2)
- if (res /= '221') call abort
+ if (res /= '221') STOP 22
write (unit=res,fmt=g) count(m4,dim=2)
- if (res /= '221') call abort
+ if (res /= '221') STOP 23
write (unit=res,fmt=g) count(m8,dim=2)
- if (res /= '221') call abort
+ if (res /= '221') STOP 24
end program main
! { dg-do run }
subroutine failed
close (10,status='delete')
- call abort
+ STOP 1
end subroutine failed
integer,parameter :: n = 13
character :: digit_arr(10)
call copy(digit_string, digit_arr)
call copy(digit_arr,str)
- if(str /= '123456789') call abort()
+ if(str /= '123456789') STOP 1
digit_string = 'qwertasdf'
call copy2(digit_string, digit_arr)
call copy2(digit_arr,str)
- if(str /= 'qwertasdf') call abort()
+ if(str /= 'qwertasdf') STOP 2
digit_string = '1qayxsw23e'
call copy3("1qayxsw23e", digit_arr)
call copy3(digit_arr,str)
- if(str /= '1qayxsw23e') call abort()
+ if(str /= '1qayxsw23e') STOP 3
contains
subroutine copy(in, out)
character, dimension(*) :: in
character :: digit_arr(10)
call copy(digit_string, digit_arr) ! { dg-error "Scalar CHARACTER actual argument with array dummy argument 'in'" }
call copy(digit_arr,str) ! { dg-error "Scalar CHARACTER actual argument with array dummy argument 'out'" }
- if(str /= '123456789') call abort()
+ if(str /= '123456789') STOP 1
digit_string = 'qwertasdf'
call copy2(digit_string, digit_arr) ! { dg-error "Scalar CHARACTER actual argument with array dummy argument 'in'" }
call copy2(digit_arr,str) ! { dg-error "Scalar CHARACTER actual argument with array dummy argument 'out'" }
- if(str /= 'qwertasdf') call abort()
+ if(str /= 'qwertasdf') STOP 2
digit_string = '1qayxsw23e'
call copy('1qayxsw23e', digit_arr) ! { dg-error "Scalar CHARACTER actual argument with array dummy argument 'in'" }
call copy(digit_arr,str) ! { dg-error "Scalar CHARACTER actual argument with array dummy argument 'out'" }
- if(str /= '1qayxsw23e') call abort()
+ if(str /= '1qayxsw23e') STOP 3
contains
subroutine copy(in, out)
character, dimension(*) :: in
character(10) astr
integer i
write(astr,'(a)') ouch('YOW! ','jerry ')
- if (astr(1:5) /= "3*%SY") call abort
+ if (astr(1:5) /= "3*%SY") STOP 1
do i=6,10
- if (astr(i:i) /= achar(0)) call abort
+ if (astr(i:i) /= achar(0)) STOP 2
end do
end program test
integer myfunc
if (myfunc(0)) 10, 20, 30 ! Should go to 30
-10 call abort
-20 call abort
+10 STOP 1
+20 STOP 2
30 if (myfunc(0)) 40, 50, 60 ! Should go to 50
-40 call abort
-60 call abort
+40 STOP 3
+60 STOP 4
50 if (myfunc(0)) 70, 80, 90 ! Should go to 70
-80 call abort
-90 call abort
+80 STOP 5
+90 STOP 6
70 continue
21, 22, 23, 24, 25, 26, &
31, 32, 33, 34, 35, 36, &
41, 42, 43, 44, 45, 46, &
- 51, 52, 53, 54, 55, 56 /))) call abort ()
+ 51, 52, 53, 54, 55, 56 /))) STOP 1
contains
pre = 3.0
call EOS(N, rho, pre, cs, gamma)
if (abs(CS(1) - sqrt(gamma*pre(1)/rho(1))) > epsilon(cs)) &
- call abort()
+ STOP 1
contains
SUBROUTINE EOS(NODES, DENS, PRES, CS, CGAMMA)
IMPLICIT NONE
integer, dimension (10) :: x
integer :: i
do i = 1, 10
- if (x (i) .ne. i * 100) call abort
+ if (x (i) .ne. i * 100) STOP 1
end do
end subroutine test
subroutine test (expected, x)
integer, dimension (:) :: x
integer :: i, expected
- if (size (x, 1) .ne. expected) call abort
+ if (size (x, 1) .ne. expected) STOP 1
do i = 1, expected
- if (x (i) .ne. i * 100) call abort
+ if (x (i) .ne. i * 100) STOP 2
end do
end subroutine test
integer, dimension (3) :: expected
integer :: i, i1, i2, i3
do i = 1, 3
- if (size (x, i) .ne. expected (i)) call abort
+ if (size (x, i) .ne. expected (i)) STOP 1
end do
do i1 = 1, expected (1)
do i2 = 1, expected (2)
do i3 = 1, expected (3)
- if (x (i1, i2, i3) .ne. i1 + i2 * 10 + i3 * 100) call abort
+ if (x (i1, i2, i3) .ne. i1 + i2 * 10 + i3 * 100) STOP 2
end do
end do
end do
! a temporary) match.
#define TST(b,c,d,e,f,g,r) a=init; a(b:c:d) = a(e:f:g); \
write(unit=line ,fmt="(9I1)") a;\
- if (line /= r) call abort ; \
+ if (line /= r) STOP 1; \
call mytst(b,c,d,e,f,g,r);
program main
a = (/(i,i=1,9)/)
a(b:c:d) = a(e:f:g)
write (unit=line,fmt='(9I1)') a
- if (line /= r) call abort
+ if (line /= r) STOP 2
end subroutine mytst
fileNames = (/ "file1", "file2" /)
fullNames = SPREAD(TRIM(pathName),1,2) // fileNames
if (fullNames(1) /= '/dir1/dir2/file1' .or. &
- & fullnames(2) /= '/dir1/dir2/file2') call abort
+ & fullnames(2) /= '/dir1/dir2/file2') STOP 1
END PROGRAM test
a = [ 1, 2, 3, 4 ]
do i = 1, size(a)
- if (a(i) /= i) call abort()
+ if (a(i) /= i) STOP 1
end do
a = [ (/ 1, 2, 3, 4 /) ]
do i = 1, size(a)
- if (a(i) /= i) call abort()
+ if (a(i) /= i) STOP 2
end do
end program bracket_array_constructor
integer, dimension (3:) :: values
integer :: order, i
- if (size (values, dim = 1) .ne. order * 3) call abort
+ if (size (values, dim = 1) .ne. order * 3) STOP 1
do i = 1, order
- if (values (i * 3) .ne. i) call abort
- if (values (i * 3 + 1) .ne. i) call abort
- if (values (i * 3 + 2) .ne. i * 2) call abort
+ if (values (i * 3) .ne. i) STOP 2
+ if (values (i * 3 + 1) .ne. i) STOP 3
+ if (values (i * 3 + 2) .ne. i * 2) STOP 4
end do
end subroutine test
end program main
last = 0
do i = from, to, step
last = last + 1
- if (values (last) .ne. i) call abort
+ if (values (last) .ne. i) STOP 1
end do
- if (size (values, dim = 1) .ne. last) call abort
+ if (size (values, dim = 1) .ne. last) STOP 2
end subroutine test
end program main
j = 1
do i = l, u, step
- if (a (j) .ne. i) call abort
+ if (a (j) .ne. i) STOP 1
j = j + 1
end do
- if (size (a, 1) .ne. j - 1) call abort
+ if (size (a, 1) .ne. j - 1) STOP 2
end subroutine test
end program main
! { dg-do compile }
! { dg-options "-O2 -fdump-tree-original" }
integer :: x(2,2)
- if (any(x(:,:) .ne. reshape ((/ 3, 1, 4, 1 /), (/ 2, 2 /)))) call abort ()
+ if (any(x(:,:) .ne. reshape ((/ 3, 1, 4, 1 /), (/ 2, 2 /)))) STOP 1
end
! { dg-final { scan-tree-dump-times "atmp" 0 "original" } }
ii = 0
iii = 0
CALL one
- IF (i .NE. 0) CALL ABORT ()
- IF (ii .NE. 99) CALL ABORT ()
- IF (iii .NE. 999) CALL ABORT ()
+ IF (i .NE. 0) STOP 1
+ IF (ii .NE. 99) STOP 2
+ IF (iii .NE. 999) STOP 3
END SUBROUTINE
END
CHARACTER(LEN = 8) :: str
J = 3
write (str,'(2A4)') (/( F(I, J), I = 1, 2)/)
- IF (str .NE. " ODD EVE") call abort ()
+ IF (str .NE. " ODD EVE") STOP 1
! Comment #1 from F-X Coudert (noted by T. Burnus) that
! actually exercises a different part of the bug.
end function
subroutine gee(a)
character(*),dimension(1) :: a
- if(len (a) /= 3) call abort ()
- if(a(1) /= '123') call abort ()
+ if(len (a) /= 3) STOP 2
+ if(a(1) /= '123') STOP 3
end subroutine gee
END
real, parameter :: x3(1) = -(/ x /)
real, parameter :: x4(2) = (/ x, 1. /) + (/ 2, (/3/) /)
- if (any (x1 /= (/43./))) call abort
- if (any (x2 /= (/43./))) call abort
- if (any (x3 /= (/-42./))) call abort
- if (any (x4 /= (/44., 4./))) call abort
+ if (any (x1 /= (/43./))) STOP 1
+ if (any (x2 /= (/43./))) STOP 2
+ if (any (x3 /= (/-42./))) STOP 3
+ if (any (x4 /= (/44., 4./))) STOP 4
end
DDA1 = ATAN2 ((/(REAL(J1,KV),J1=1,10)/),
$ REAL((/(J1,J1=nf10,nf1,mf1)/), KV)) !fails
DDA2 = ATAN2 (DDA, DDA(10:1:-1))
- if (any (DDA1 - DDA2 .gt. epsilon(dval))) call abort ()
+ if (any (DDA1 - DDA2 .gt. epsilon(dval))) STOP 1
END
subroutine FA6077 (nf10,nf1,mf1, ida)
IDA1 = IEOR((/1,2,3,4,5,6,7,8,9,10/),
$ (/(IDA(J1),J1=10,1,-1)/) )
IDA2 = IEOR ((/1,2,3,4,5,6,7,8,9,10/), (/10,9,8,7,6,5,4,3,2,1/) )
- if (any (ida1 .ne. ida2)) call abort ()
+ if (any (ida1 .ne. ida2)) STOP 2
END SUBROUTINE
subroutine fa2083
QDA1 = MOD ( 1.1_k*( QDA(1) -5.0_k), P=( QDA -2.5_k))
DO J1 = 1,10
QVAL = MOD(1.1_k*(QDA(1)-5.0_k),P=(QDA(J1)-2.5_k))
- if (qval - qda1(j1) .gt. epsilon(qval)) call abort ()
+ if (qval - qda1(j1) .gt. epsilon(qval)) STOP 3
ENDDO
END
DDA1 = ATAN2 ((/(REAL(J1,KV),J1=1,10)/),
$ REAL((/(J1,J1=nf10,nf1,mf1)/), KV)) !fails
DDA2 = ATAN2 (DDA, DDA(10:1:-1))
- if (any (abs(DDA1-DDA2) .gt. 1.0e-6)) call abort ()
+ if (any (abs(DDA1-DDA2) .gt. 1.0e-6)) STOP 1
END
subroutine FA6077 (nf10,nf1,mf1, ida)
IDA1 = IEOR((/1,2,3,4,5,6,7,8,9,10/),
$ (/(IDA(J1),J1=10,1,-1)/) )
IDA2 = IEOR ((/1,2,3,4,5,6,7,8,9,10/), (/10,9,8,7,6,5,4,3,2,1/) )
- if (any (ida1 .ne. ida2)) call abort ()
+ if (any (ida1 .ne. ida2)) STOP 2
END SUBROUTINE
subroutine fa2083
QDA1 = MOD ( 1.1_k*( QDA(1) -5.0_k), P=( QDA -2.5_k))
DO J1 = 1,10
QVAL = MOD(1.1_k*(QDA(1)-5.0_k),P=(QDA(J1)-2.5_k))
- if (qval .ne. qda1(j1)) call abort ()
+ if (qval .ne. qda1(j1)) STOP 3
ENDDO
END
data (b(i), i = 1, n) /a(d1), a(d2), a(d3)/
data (z(i), i = 1, n) / 1, 2, 3/
- if (any(z.ne.[1, 2, 3])) call abort
+ if (any(z.ne.[1, 2, 3])) STOP 1
if (any(b(1)%x.ne.[1, 2, 3]) .or. &
any(b(2)%x.ne.[4, 5, 6]) .or. &
- any(b(3)%x.ne.[7, 8, 9])) call abort
+ any(b(3)%x.ne.[7, 8, 9])) STOP 2
end
q = 'xy'
i = 2
write (buffer, fmt) (/ trim(q), 'ae' /)//'c'
- if (buffer .ne. test) Call abort
+ if (buffer .ne. test) STOP 1
write (buffer, FMT) (/ q(1:i), 'ae' /)//'c'
- if (buffer .ne. test) Call abort
+ if (buffer .ne. test) STOP 2
end program main
! Original testcase by Vittorio Zecca <zeccav@gmail.com>
!
I=5
- if (any((/(i,i=1,I)/) /= (/1,2,3,4,5/))) call abort ! { dg-warning "final expression references control variable" }
- if (I /= 5) call abort
+ if (any((/(i,i=1,I)/) /= (/1,2,3,4,5/))) STOP 1! { dg-warning "final expression references control variable" }
+ if (I /= 5) STOP 2
end
n = 5
i = (/ (m, m = n, 1, -1) /)
-if (any (i /= (/ 5, 4, 3, 2, 1 /))) call abort
+if (any (i /= (/ 5, 4, 3, 2, 1 /))) STOP 1
k = 1
i(5:1:-1) = (/ (m, m = n, k, -1) /)
-if (any (i /= (/ 1, 2, 3, 4, 5 /))) call abort
+if (any (i /= (/ 1, 2, 3, 4, 5 /))) STOP 2
l = -1
i = (/ (m, m = n, 1, l) /)
-if (any (i /= (/ 5, 4, 3, 2, 1 /))) call abort
+if (any (i /= (/ 5, 4, 3, 2, 1 /))) STOP 3
i(5:1:-1) = (/ (m, m = n, k, l) /)
-if (any (i /= (/ 1, 2, 3, 4, 5 /))) call abort
+if (any (i /= (/ 1, 2, 3, 4, 5 /))) STOP 4
end
lo = .false.
lo(3,3) = .true.
call bar(a,b,c,lo)
- if (c /= 1) call abort
+ if (c /= 1) STOP 1
call baz(a,b,res);
- if (abs(res - 8.1) > 1e-5) call abort
+ if (abs(res - 8.1) > 1e-5) STOP 2
end program main
! { dg-final { scan-tree-dump-times "while" 5 "original" } }
s = 2.0
m = 4
res = SUM([(s**(REAL(k-1)/REAL(m-1)),k=1,m)])
- if (abs(res - 5.84732246) > 1e-6) call abort
+ if (abs(res - 5.84732246) > 1e-6) STOP 1
end
s = 1000.
res = SUM([3.0,(s**(REAL(k-1)/REAL(m-1)),k=1,m),17.])
- if (abs(res - 1021.)>1e-4) call abort
+ if (abs(res - 1021.)>1e-4) STOP 1
end
data a /2._dp,3._dp,5._dp,7._dp/
thirteen = 13._dp
- if (abs (product([[11._dp, thirteen], a]) - 30030._dp) > 1e-8) call abort
+ if (abs (product([[11._dp, thirteen], a]) - 30030._dp) > 1e-8) STOP 1
end program main
! { dg-final { scan-tree-dump-times "while" 2 "original" } }
data a /2._dp,3._dp,5._dp,7._dp/
thirteen = 13._dp
- if (abs (product([[sum([eleven_ones()]), thirteen], a]) - 30030._dp) > 1e-8) call abort
+ if (abs (product([[sum([eleven_ones()]), thirteen], a]) - 30030._dp) > 1e-8) STOP 1
contains
function eleven_ones()
real(kind=dp) :: eleven_ones(11)
integer :: ndim=2, ndfp=4, i
character (len=8) :: line
write (unit=line,fmt='(4I2)') (/ ( i, i = 1, ndfp ) /) + ndim
- if (line /= ' 3 4 5 6') call abort
+ if (line /= ' 3 4 5 6') STOP 1
end program t
! { dg-final { scan-tree-dump-times "__var" 3 "original" } }
i = 6
a = (/ 1, 2, 3, 4, 5, i /)
do i = 1, 6
- if (a(i) /= i) call abort()
+ if (a(i) /= i) STOP 1
end do
end program array_constructor
a = 2
ra = (/ (any(a(i).eq.(/1,2,3/)) ,i=1,n) /)
- if (.not. all(ra)) call abort
+ if (.not. all(ra)) STOP 1
rs = any ( (/ (any(a(i).eq.(/1,2,3/)) ,i=1,n) /) )
- if (.not. rs) call abort
+ if (.not. rs) STOP 2
end program test
integer, dimension (:) :: values
integer :: order, i
- if (size (values, dim = 1) .ne. order) call abort
+ if (size (values, dim = 1) .ne. order) STOP 1
do i = 1, order
- if (values (i) .ne. i * 2) call abort
+ if (values (i) .ne. i * 2) STOP 2
end do
end subroutine test
end program main
integer, dimension (:) :: values
integer :: order, i, j
- if (size (values, dim = 1) .ne. order * (order + 1) / 2) call abort
+ if (size (values, dim = 1) .ne. order * (order + 1) / 2) STOP 1
do i = 1, order
do j = 1, i
- if (values (i * (i - 1) / 2 + j) .ne. (j + 100) * i) call abort
+ if (values (i * (i - 1) / 2 + j) .ne. (j + 100) * i) STOP 2
end do
end do
end subroutine test
integer, dimension (:) :: values
integer :: order, repeat, trail, i
- if (size (values, dim = 1) .ne. order * repeat + trail) call abort
+ if (size (values, dim = 1) .ne. order * repeat + trail) STOP 1
do i = 1, order * repeat
- if (values (i) .ne. mod (i - 1, repeat) + 1) call abort
+ if (values (i) .ne. mod (i - 1, repeat) + 1) STOP 2
end do
do i = 1, trail
- if (values (i + order * repeat) .ne. i * 100) call abort
+ if (values (i + order * repeat) .ne. i * 100) STOP 3
end do
end subroutine test
end program main
do i = 1, order
do j = 1, prefix
last = last + 1
- if (values (last) .ne. 1.5) call abort
+ if (values (last) .ne. 1.5) STOP 1
end do
do j = 1, i + 1
do k = 1, i
last = last + 1
- if (values (last) .ne. j + k * k) call abort
+ if (values (last) .ne. j + k * k) STOP 2
end do
end do
end do
- if (size (values, dim = 1) .ne. last) call abort
+ if (size (values, dim = 1) .ne. last) STOP 3
end subroutine test
end program main
IF (array(1) /= 18 .OR. array(2) /= 12 .OR. &
array(3) /= 31 .OR. array(4) /= 3 .OR. array(5) /= 42) THEN
- CALL abort()
+ STOP 1
END IF
END PROGRAM test
INTEGER :: n
arr = [ character(len=n) :: s, s ]
IF (arr(1) /= shouldBe .OR. arr(2) /= shouldBe) THEN
- CALL abort ()
+ STOP 1
END IF
END SUBROUTINE foo
END PROGRAM test
!
integer :: i(3)
i(3:2) = (/ integer :: /)
- if (len((/ character(5) :: /)) /= 5) call abort()
- if (kind((/ integer(8) :: /)) /= 8) call abort()
+ if (len((/ character(5) :: /)) /= 5) STOP 1
+ if (kind((/ integer(8) :: /)) /= 8) STOP 2
end
integer :: j(3)
a = (/ integer :: 1.4, 2.2, 3.33 /)
j = (/ 1.4, 2.2, 3.33 /)
-if( any(a /= j )) call abort()
+if( any(a /= j )) STOP 1
end
integer :: j(3)
a = (/ integer :: 1.4, 2.2, 3.33 /) ! { dg-error "Fortran 2003" }
j = (/ 1.4, 2.2, 3.33 /)
-if( any(a /= j )) call abort()
+if( any(a /= j )) STOP 1
end
arr = (/ foo :: x, foo(0, 1.) /)
IF (arr(1)%i /= 42 .OR. arr(1)%x /= 42. .OR. &
arr(2)%i /= 0 .OR. arr(2)%x /= 1.) THEN
- CALL abort()
+ STOP 1
END IF
END PROGRAM test
CHARACTER(len=6) :: carr(3)
arr = (/ INTEGER(KIND=8) :: 4, [ INTEGER(KIND=4) :: 42, 12 ] /)
- IF (arr(1) /= 4 .OR. arr(2) /= 42 .OR. arr(3) /= 12) CALL abort()
+ IF (arr(1) /= 4 .OR. arr(2) /= 42 .OR. arr(3) /= 12) STOP 1
arr = (/ INTEGER(KIND=8) :: [ INTEGER(KIND=4) :: 4, 42, 12 ] /)
- IF (arr(1) /= 4 .OR. arr(2) /= 42 .OR. arr(3) /= 12) CALL abort()
+ IF (arr(1) /= 4 .OR. arr(2) /= 42 .OR. arr(3) /= 12) STOP 2
arr = (/ INTEGER(KIND=8) :: [ INTEGER(KIND=4) :: 4, 42 ], 12 /)
- IF (arr(1) /= 4 .OR. arr(2) /= 42 .OR. arr(3) /= 12) CALL abort()
+ IF (arr(1) /= 4 .OR. arr(2) /= 42 .OR. arr(3) /= 12) STOP 3
arr = (/ INTEGER(KIND=8) :: [ INTEGER(KIND=4) :: ], 4, 42, 12 /)
- IF (arr(1) /= 4 .OR. arr(2) /= 42 .OR. arr(3) /= 12) CALL abort()
+ IF (arr(1) /= 4 .OR. arr(2) /= 42 .OR. arr(3) /= 12) STOP 4
carr = [ CHARACTER(len=6) :: "foo", [ CHARACTER(len=4) :: "foobar", "xyz" ] ]
IF (carr(1) /= "foo" .OR. carr(2) /= "foob" .OR. carr(3) /= "xyz") THEN
- CALL abort()
+ STOP 5
END IF
END PROGRAM test
implicit none
character(15) :: a(3)
a = (/ character(len=7) :: 'Takata', 'Tanaka', 'Hayashi' /)
- if ( len([ character(len=7) :: ]) /= 7) call abort()
- if ( size([ integer :: ]) /= 0) call abort()
+ if ( len([ character(len=7) :: ]) /= 7) STOP 1
+ if ( size([ integer :: ]) /= 0) STOP 2
if( a(1) /= 'Takata' .or. a(1)(7:7) /= achar(32) &
.or. a(1)(15:15) /= achar(32) &
.or. a(2) /= 'Tanaka' .or. a(2)(7:7) /= achar(32) &
.or. a(2)(15:15) /= achar(32) &
.or. a(3) /= 'Hayashi' .or. a(3)(8:8) /= achar(32) &
.or. a(3)(15:15) /= achar(32))&
- call abort()
+ STOP 3
end program test
p = [real(kind=4) :: x, y]
q = [real(kind=8) :: x, y]
- if (any(p .ne. r2)) call abort
- if (any(q .ne. r3)) call abort
+ if (any(p .ne. r2)) STOP 1
+ if (any(q .ne. r3)) STOP 2
end program foo
array = (/ 5, [INTEGER ::], 6 /)
IF (array(1) /= 5 .OR. array(2) /= 6) THEN
- CALL abort()
+ STOP 1
END IF
END PROGRAM test
array = [ INTEGER ]
IF (array(1) /= 42) THEN
- CALL abort()
+ STOP 1
END IF
END PROGRAM test
.or. a(2)(15:15) /= achar(32) &
.or. a(3) /= 'Hay' .or. a(3)(4:4) /= achar(32) &
.or. a(3)(15:15) /= achar(32))&
- call abort()
+ STOP 1
end program test
a = (/ character(len=7) :: trim(b(1)), trim(b(2)), trim(b(3)) /)
if (a(1) /= 'Takata' .or. a(2) /= 'Tanaka' .or. a(3) /= 'Hayashi') then
- call abort ()
+ STOP 1
end if
a = (/ character(len=2) :: trim(b(1)), trim(b(2)), trim(b(3)) /)
if (a(1) /= 'Ta' .or. a(2) /= 'Ta' .or. a(3) /= 'Ha') then
- call abort ()
+ STOP 2
end if
a = (/ character(len=8) :: trim(b(1)), trim(b(2)), trim(b(3)) /)
if (a(1) /= 'Takata' .or. a(2) /= 'Tanaka' .or. a(3) /= 'Hayashi') then
- call abort ()
+ STOP 3
end if
end program test
INTEGER :: n
arr = [ character(len=n) :: 'test', s ]
IF (arr(1) /= a1 .OR. arr(2) /= a2) THEN
- CALL abort ()
+ STOP 1
END IF
END SUBROUTINE foo
END PROGRAM test
a = (/ 1, 2, 3, 4, 5 /)
b = f(a(l:u) - 2)
- if (b /= 0) call abort
+ if (b /= 0) STOP 1
b = f(a(4:2) - 2)
- if (b /= 0) call abort
+ if (b /= 0) STOP 2
b = f(a(u:l) - 2)
- if (b /= 3) call abort
+ if (b /= 3) STOP 3
b = f(a(2:4) - 2)
- if (b /= 3) call abort
+ if (b /= 3) STOP 4
contains
integer function f(x)
matB=matmul(transpose(0.5*matA),matA)
matC = transpose(0.5*matA)
matC = matmul(matC, matA)
- if (any(matB.ne.matC)) call abort()
+ if (any(matB.ne.matC)) STOP 1
end program bug
character(4), parameter :: chrt(2) = (/chr(2:2)(2:3), chr(ii-1)(3:ii)/)\r
character(2), parameter :: chrx(2) = (/(chr(i)(i:i+1), i=2,3)/)\r
\r
- if (any (y .ne. (/5., 6., 15., 16./))) call abort ()\r
- if (any (z .ne. (/11., 12./))) call abort ()\r
- if (any (r .ne. (/1., 2., 6., 7., 11., 12./))) call abort ()\r
+ if (any (y .ne. (/5., 6., 15., 16./))) STOP 1\r
+ if (any (z .ne. (/11., 12./))) STOP 2\r
+ if (any (r .ne. (/1., 2., 6., 7., 11., 12./))) STOP 3\r
if (any (s .ne. (/11., 7., 3., 16., 12., 8., 4., &\r
- 11., 7., 16., 12., 8. /))) call abort ()\r
+ 11., 7., 16., 12., 8. /))) STOP 4\r
\r
- if (any (t .ne. (/11., 12., 8., 6., 11., 12., 27., 15. /))) call abort ()\r
+ if (any (t .ne. (/11., 12., 8., 6., 11., 12., 27., 15. /))) STOP 5\r
\r
- if (chrs .ne. "noef") call abort ()\r
- if (any (chrt .ne. (/"fg", "kl"/))) call abort ()\r
- if (any (chrx .ne. (/"fg", "kl"/))) call abort ()\r
+ if (chrs .ne. "noef") STOP 6\r
+ if (any (chrt .ne. (/"fg", "kl"/))) STOP 7\r
+ if (any (chrx .ne. (/"fg", "kl"/))) STOP 8\r
end\r
!
! PR28496
!
- if (any (b .ne. (/1,2,3/))) call abort ()
- if (any (reshape(d,(/6/)) .ne. (/3, 2, 6, 5, 9, 8/))) call abort ()
- if (any (reshape(f,(/6/)) .ne. (/2, 1, 5, 4, 8, 7/))) call abort ()
+ if (any (b .ne. (/1,2,3/))) STOP 1
+ if (any (reshape(d,(/6/)) .ne. (/3, 2, 6, 5, 9, 8/))) STOP 2
+ if (any (reshape(f,(/6/)) .ne. (/2, 1, 5, 4, 8, 7/))) STOP 3
!
! PR29975
!
- IF (all(h(2:2) /= g(3:4))) call abort ()
+ IF (all(h(2:2) /= g(3:4))) STOP 4
end
a%i = 0
print *, a
a%i = (/ 12, 2/)
- if (any (a%c .ne. (/"uvw", "xyz"/))) call abort ()
- if (any (a%i .ne. (/12, 2/))) call abort ()
+ if (any (a%c .ne. (/"uvw", "xyz"/))) STOP 1
+ if (any (a%i .ne. (/12, 2/))) STOP 2
a%i = b%i
- if (any (a%c .ne. (/"uvw", "xyz"/))) call abort ()
- if (any (a%i .ne. (/101, 102/))) call abort ()
+ if (any (a%c .ne. (/"uvw", "xyz"/))) STOP 3
+ if (any (a%i .ne. (/101, 102/))) STOP 4
end program main
d(:,1) = 0. ! This can't be otimized to a memset.
call bar(e)
- if (any(a /= reshape((/ 0.0, 1.0, 0.0, 1.0/), shape(a)))) call abort
- if (any(b /= 0.)) call abort
- if (any(c /= 0.)) call abort
- if (any(d /= reshape((/ 0.0, 0.0, 1.0, 1.0/), shape(d)))) call abort
- if (any(e /= reshape((/ 0.0, 1.0, 0.0, 1.0/), shape(e)))) call abort
+ if (any(a /= reshape((/ 0.0, 1.0, 0.0, 1.0/), shape(a)))) STOP 1
+ if (any(b /= 0.)) STOP 2
+ if (any(c /= 0.)) STOP 3
+ if (any(d /= reshape((/ 0.0, 0.0, 1.0, 1.0/), shape(d)))) STOP 4
+ if (any(e /= reshape((/ 0.0, 1.0, 0.0, 1.0/), shape(e)))) STOP 5
end program
b=conjg (transpose (a))\r
c=transpose (a)\r
c=conjg (c)\r
- if (any (b .ne. c)) call abort ()
+ if (any (b .ne. c)) STOP 1
end subroutine PR31994
subroutine PR31994_comment6
implicit none\r
b=int (transpose(a))
c = int (a)
c = transpose (c)
- if (any (b .ne. c)) call abort ()
+ if (any (b .ne. c)) STOP 2
end subroutine PR31994_comment6\r
END program main\r
INTEGER :: Array(2, 3) = reshape ((/1,4,2,5,3,6/),(/2,3/))
integer :: Brray(2, 3) = 0
Brray(1,:) = Function_Test (Array(1,:))
- if (any(reshape (Brray, (/6/)) .ne. (/11, 0, 12, 0, 13, 0/))) call abort ()
+ if (any(reshape (Brray, (/6/)) .ne. (/11, 0, 12, 0, 13, 0/))) STOP 1
Array(1,:) = Function_Test (Array(1,:))
- if (any(reshape (Array, (/6/)) .ne. (/11, 4, 12, 5, 13, 6/))) call abort ()
+ if (any(reshape (Array, (/6/)) .ne. (/11, 4, 12, 5, 13, 6/))) STOP 2
contains
FUNCTION Function_Test (Input)
! Check the lhs references
cnt = 0
a(bar(1):3) = b
- if (cnt /= 1) call abort ()
+ if (cnt /= 1) STOP 1
cnt = 0
a(1:bar(3)) = b
- if (cnt /= 1) call abort ()
+ if (cnt /= 1) STOP 2
cnt = 0
a(1:3:bar(1)) = b
- if (cnt /= 1) call abort ()
+ if (cnt /= 1) STOP 3
! Check the rhs references
cnt = 0
a(1:3) = b(bar(1):3)
- if (cnt /= 1) call abort ()
+ if (cnt /= 1) STOP 4
cnt = 0
a(1:3) = b(1:bar(3))
- if (cnt /= 1) call abort ()
+ if (cnt /= 1) STOP 5
cnt = 0
a(1:3) = b(1:3:bar(1))
- if (cnt /= 1) call abort ()
+ if (cnt /= 1) STOP 6
contains
integer function bar(n)
integer, intent(in) :: n
end module bar
use bar
call xmain
- if (c(1) .ne. "ab") call abort
+ if (c(1) .ne. "ab") STOP 1
end
write(r,'(3(2x,i4/)/3(3x,i6/))') i
i = 0
read(r,'(3(2x,i4/)/3(3x,i6/))') i
- if (any(i.ne.(/(j,j=1,6)/))) call abort()
+ if (any(i.ne.(/(j,j=1,6)/))) STOP 1
do j=1,12
do k=1,2
if ((j.gt.8.and.k.eq.1).or.(k.eq.2)) then
- if (r(j,k).ne.'0123456789AB') call abort()
+ if (r(j,k).ne.'0123456789AB') STOP 2
end if
end do
end do
! Write to a portion of a character array
r = '0123456789AB'
write(r(3:9,1),'(6(i12/))') i
- if (r(2,1).ne.'0123456789AB') call abort()
+ if (r(2,1).ne.'0123456789AB') STOP 3
do j=3,8
- if (iachar(trim(adjustl(r(j,1))))-46.ne.j) call abort()
+ if (iachar(trim(adjustl(r(j,1))))-46.ne.j) STOP 4
end do
- if (r(9,1).ne.' ') call abort()
+ if (r(9,1).ne.' ') STOP 5
end program arrayio_1
character(len=4), dimension(3)::arraydata = (/'1123',' 456','789 '/)
real(kind=8), dimension(3) :: tmp
read(arraydata,*,iostat=iostat)tmp
- if (tmp(1).ne.1123.0) call abort()
- if (tmp(2).ne.456.0) call abort()
- if (tmp(3).ne.789.0) call abort()
+ if (tmp(1).ne.1123.0) STOP 1
+ if (tmp(2).ne.456.0) STOP 2
+ if (tmp(3).ne.789.0) STOP 3
end program pr29563
\ No newline at end of file
'200812231200'/)
call date_to_year (FILE)
- if (any (time%year .ne. (/2006, 2007, 2008/))) call abort ()
+ if (any (time%year .ne. (/2006, 2007, 2008/))) STOP 1
call month_to_date ((/8, 9, 10/), FILE)
if ( any (file%date .ne. (/'200608231200', '200709231200', &
- '200810231200'/))) call abort ()
+ '200810231200'/))) STOP 2
contains
'200812231200'/)
call date_to_year (cdate)
- if (any (time%year .ne. (/2006, 2007, 2008/))) call abort ()
+ if (any (time%year .ne. (/2006, 2007, 2008/))) STOP 1
call month_to_date ((/8, 9, 10/), cdate)
if ( any (cdate .ne. (/'200608231200', '200709231200', &
- '200810231200'/))) call abort ()
+ '200810231200'/))) STOP 2
contains
ver(1) = '285 383'
ver(2) = '985'
read( ver, *) a, b, c
- if (a /= 285 .or. b /= 383 .or. c /= 985) call abort
+ if (a /= 285 .or. b /= 383 .or. c /= 985) STOP 1
!write ( *, *) a, b, c
end
call init_data
read(source,*) (x(i), i=1,6)
- if (any(x/=[1,1,1,4,4,4])) call abort
+ if (any(x/=[1,1,1,4,4,4])) STOP 1
end program read_internal
source=[4_" 1 1 -1",4_" 1 -1 1",4_" -1 1 1"]
!print *, (trim(source(i)), i=1,3)
read(source,*) (x(i), i=1,9) ! This read fails for KIND=4 character
- if (any(x /= y )) call abort
+ if (any(x /= y )) STOP 1
end program read_internal
r(1,2).ne.'HELLO ! ' .or. &
r(2,2).ne.'WORLD ' .or. &
r(3,2).ne.'0123456789ab' .or. &
- r(4,2).ne.'0123456789ab') call abort()
+ r(4,2).ne.'0123456789ab') STOP 1
end program arrayio_2
i = (/(j,j=1,6)/)
write(r,'(3(2x,i4/)/3(4x,i9/))', iostat=ierr) i
- if (ierr.ne.-2) call abort()
+ if (ierr.ne.-2) STOP 1
end program arrayio_3
character(12) :: r(2,3,4) = '0123456789AB'
write(r(::2,:,::1),'(i5)', iostat=ierr) 1,2,3,4,5
- if (ierr.ne.0) call abort()
+ if (ierr.ne.0) STOP 1
write(r(:,:,::2),'(i5)', iostat=ierr) 1,2,3,4,5
- if (ierr.ne.0) call abort()
+ if (ierr.ne.0) STOP 2
write(r(::1,::2,::1),'(i5)', iostat=ierr) 1,2,3,4,5
- if (ierr.ne.0) call abort()
+ if (ierr.ne.0) STOP 3
write(r(::1,::1,::1),'(i5)', iostat=ierr) 1,2,3,4,5
- if (ierr.ne.0) call abort()
+ if (ierr.ne.0) STOP 4
end program arrayio_4
character(12) :: r(10) = '0123456789AB'
write(r,'(i12)',iostat=ierr) 1,2,3,4,5,6,7,8,9,10,11
- if (ierr.ne.-1) call abort()
+ if (ierr.ne.-1) STOP 1
end program arrayio_5
i = (/(j,j=1,3)/)
write(r(1:4:2,2:4:1,3:4:2),'(3(2x,i4/)/3(3x,i6/))') i
- if (s(36).ne.'0123456789AB') call abort()
- if (s(37).ne.' 1 ') call abort()
- if (s(38).ne.'0123456789AB') call abort()
- if (s(39).ne.' 2 ') call abort()
- if (s(40).ne.'0123456789AB') call abort()
- if (s(41).ne.' 3 ') call abort()
- if (s(42).ne.'0123456789AB') call abort()
- if (s(43).ne.' ') call abort()
- if (s(44).ne.'0123456789AB') call abort()
- if (s(45).ne.' ') call abort()
- if (s(46).ne.'0123456789AB') call abort()
+ if (s(36).ne.'0123456789AB') STOP 1
+ if (s(37).ne.' 1 ') STOP 2
+ if (s(38).ne.'0123456789AB') STOP 3
+ if (s(39).ne.' 2 ') STOP 4
+ if (s(40).ne.'0123456789AB') STOP 5
+ if (s(41).ne.' 3 ') STOP 6
+ if (s(42).ne.'0123456789AB') STOP 7
+ if (s(43).ne.' ') STOP 8
+ if (s(44).ne.'0123456789AB') STOP 9
+ if (s(45).ne.' ') STOP 10
+ if (s(46).ne.'0123456789AB') STOP 11
k = i
i = 0
read(r(1:4:2,2:4:1,3:4:2),'(3(2x,i4/)/3(3x,i6/))') i
- if (any(i.ne.k)) call abort()
+ if (any(i.ne.k)) STOP 12
end program arrayio_6
character*8 :: a
equivalence (buf,abuf)
read(buf(2, 1:3:2), '(a8)') a
- if (a.ne."4567") call abort()
+ if (a.ne."4567") STOP 1
end program arrayio_7
character*8 rec(3)
rec = ""
write (rec,fmt=99999)
- if (rec(1).ne.'12345678') call abort()
- if (rec(2).ne.'record2') call abort()
- if (rec(3).ne.'record3') call abort()
+ if (rec(1).ne.'12345678') STOP 1
+ if (rec(2).ne.'record2') STOP 2
+ if (rec(3).ne.'record3') STOP 3
99999 format ('12345678',/'record2',/'record3')
end
real(kind=8), dimension(3,3) :: tmp
tmp = 0.0
read(arraydata,*,iostat=iostat)((tmp(i,j),j=1,3),i=1,3)
- if (tmp(3,3)-9.0.gt.0.0000001) call abort()
+ if (tmp(3,3)-9.0.gt.0.0000001) STOP 1
end program pr29563
\ No newline at end of file
read(a, *) b
do i = 1, 5
if (b(i) /= 256) then
- call abort ()
+ STOP 1
end if
end do
write(a, *) x ! Just test that the library doesn't abort.
read(a, *) b
do i = 1, 5
if (b(i) /= 256) then
- call abort ()
+ STOP 2
end if
end do
q4(q4) = (/(i, i = 1, 4)/)
p8(q8) = (/(i, i = 1, 4)/)
q8(q8) = (/(i, i = 1, 4)/)
- if (any(p4 .ne. q4)) call abort ()
- if (any(p8 .ne. q8)) call abort ()
+ if (any(p4 .ne. q4)) STOP 1
+ if (any(p8 .ne. q8)) STOP 2
end
! Whichever is the default length for array indices will yield
! parm 18 times, because a temporary is not necessary. The other
integer(8) :: q(4) = (/2,4,1,3/)
p(p) = (/(i, i = 1, 4)/)
q(q) = (/(i, i = 1, 4)/)
- if (any(p .ne. q)) call abort ()
+ if (any(p .ne. q)) STOP 1
end
z(:)%y = foo (b)
- if (any(z%x.ne.a).or.any(z%y.ne.b)) call abort ()
+ if (any(z%x.ne.a).or.any(z%y.ne.b)) STOP 1
! Make sure we did not break anything on the way.
w%x(:) = foo (b)
a = foo (b)
- if (any(w%x.ne.b).or.any(a.ne.b)) call abort ()
+ if (any(w%x.ne.b).or.any(a.ne.b)) STOP 2
contains
! We didn't dereference the pointer in the following line.
p = f() ! { dg-warning "POINTER-valued function" }
p = p+1
-if (p.ne.2) call abort()
-if (p.ne.s) call abort()
+if (p.ne.2) STOP 1
+if (p.ne.s) STOP 2
!!$! verify that we also dereference correctly the result of a function
!!$! which returns its result by reference
!!$c = "Hallo"
!!$d => e
!!$d = g() ! dg-warning "POINTER valued function" ""
-!!$if (d.ne."Hallo") call abort()
+!!$if (d.ne."Hallo") STOP 3
contains
function f()
! { dg-do run }
-! { dg-options "-std=f2003 -fall-intrinsics -cpp" }
+! { dg-options "-std=f2003 -cpp" }
! PR fortran/38936
! Check the basic semantics of the ASSOCIATE construct.
! Simple association to expressions.
ASSOCIATE (r => SQRT (a**2 + b**2 + c**2), t => a + b)
PRINT *, t, a, b
- IF (ABS (r - SQRT (4.0 + 9.0 + 16.0)) > 1.0e-3) CALL abort ()
- IF (ABS (t - a - b) > 1.0e-3) CALL abort ()
+ IF (ABS (r - SQRT (4.0 + 9.0 + 16.0)) > 1.0e-3) STOP 1
+ IF (ABS (t - a - b) > 1.0e-3) STOP 2
END ASSOCIATE
! Test association to arrays.
ALLOCATE (arr(3))
arr = (/ 1, 2, 3 /)
ASSOCIATE (doubled => 2 * arr, xyz => func ())
- IF (SIZE (doubled) /= SIZE (arr)) CALL abort ()
+ IF (SIZE (doubled) /= SIZE (arr)) STOP 3
IF (doubled(1) /= 2 .OR. doubled(2) /= 4 .OR. doubled(3) /= 6) &
- CALL abort ()
+ STOP 4
- IF (ANY (xyz /= (/ 1, 3, 5 /))) CALL abort ()
+ IF (ANY (xyz /= (/ 1, 3, 5 /))) STOP 5
END ASSOCIATE
! Target is vector-indexed.
ASSOCIATE (foo => arr((/ 3, 1 /)))
- IF (LBOUND (foo, 1) /= 1 .OR. UBOUND (foo, 1) /= 2) CALL abort ()
- IF (foo(1) /= 3 .OR. foo(2) /= 1) CALL abort ()
+ IF (LBOUND (foo, 1) /= 1 .OR. UBOUND (foo, 1) /= 2) STOP 6
+ IF (foo(1) /= 3 .OR. foo(2) /= 1) STOP 7
END ASSOCIATE
! Named and nested associate.
myname: ASSOCIATE (x => a - b * c)
ASSOCIATE (y => 2.0 * x)
- IF (ABS (y - 2.0 * (a - b * c)) > 1.0e-3) CALL abort ()
+ IF (ABS (y - 2.0 * (a - b * c)) > 1.0e-3) STOP 8
END ASSOCIATE
END ASSOCIATE myname ! Matching end-label.
! Correct behavior when shadowing already existing names.
ASSOCIATE (a => 1 * b, b => 1 * a, x => 1, y => 2)
- IF (ABS (a - 3.0) > 1.0e-3 .OR. ABS (b + 2.0) > 1.0e-3) CALL abort ()
+ IF (ABS (a - 3.0) > 1.0e-3 .OR. ABS (b + 2.0) > 1.0e-3) STOP 9
ASSOCIATE (x => 1 * y, y => 1 * x)
- IF (x /= 2 .OR. y /= 1) CALL abort ()
+ IF (x /= 2 .OR. y /= 1) STOP 10
END ASSOCIATE
END ASSOCIATE
mat = 0
mat(2, 2) = 5;
ASSOCIATE (x => arr(2), y => mat(2:3, 1:2))
- IF (x /= 2) CALL abort ()
+ IF (x /= 2) STOP 11
IF (ANY (LBOUND (y) /= (/ 1, 1 /) .OR. UBOUND (y) /= (/ 2, 2 /))) &
- CALL abort ()
- IF (y(1, 2) /= 5) CALL abort ()
+ STOP 12
+ IF (y(1, 2) /= 5) STOP 13
x = 7
y = 8
END ASSOCIATE
- IF (arr(2) /= 7 .OR. ANY (mat(2:3, 1:2) /= 8)) CALL abort ()
+ IF (arr(2) /= 7 .OR. ANY (mat(2:3, 1:2) /= 8)) STOP 14
! Association to derived type and component.
tp = myt (1)
ASSOCIATE (x => tp, y => tp%comp)
- IF (x%comp /= 1) CALL abort ()
- IF (y /= 1) CALL abort ()
+ IF (x%comp /= 1) STOP 15
+ IF (y /= 1) STOP 16
y = 5
- IF (x%comp /= 5) CALL abort ()
+ IF (x%comp /= 5) STOP 17
END ASSOCIATE
- IF (tp%comp /= 5) CALL abort ()
+ IF (tp%comp /= 5) STOP 18
! Association to character variables.
CALL test_char (5)
str = "foobar"
ASSOCIATE (my => str)
- IF (LEN (my) /= n) CALL abort ()
- IF (my /= "fooba") CALL abort ()
+ IF (LEN (my) /= n) STOP 19
+ IF (my /= "fooba") STOP 20
my = "abcdef"
END ASSOCIATE
- IF (str /= "abcde") CALL abort ()
+ IF (str /= "abcde") STOP 21
END SUBROUTINE test_char
END PROGRAM main
call foo(a)
end associate
! write(*,*) i
- if (i(1) /= 2) call abort
+ if (i(1) /= 2) STOP 1
contains
subroutine foo(v)
integer, dimension(*) :: v
associate (template => initial(1)%variant_def)
template%i = 77
end associate
- if (initial(1)%variant_def%i .ne. 77) call abort
+ if (initial(1)%variant_def%i .ne. 77) STOP 1
end
b = x(2)
write (line1, *) a, b
write (line2, *) x
- if (trim (line1) .ne. trim (line2)) call abort
+ if (trim (line1) .ne. trim (line2)) STOP 1
end associate
associate (x=>[1,2])
a = x(1)
b = x(2)
write (line1, *) a, b
write (line2, *) x
- if (trim (line1) .ne. trim (line2)) call abort
+ if (trim (line1) .ne. trim (line2)) STOP 2
end associate
associate (x=>bar(5)) ! make sure that we haven't broken function association
a = x(1)
c = x(3)
write (line1, *) a, b, c
write (line2, *) x
- if (trim (line1) .ne. trim (line2)) call abort
+ if (trim (line1) .ne. trim (line2)) STOP 3
end associate
end
real :: theta = 1.0
associate (n => [cos(theta), sin(theta)])
- if (abs (norm2(n) - 1.0) .gt. 1.0e-4) call abort
+ if (abs (norm2(n) - 1.0) .gt. 1.0e-4) STOP 1
end associate
end program test
associate(i => av(1))
i%map = 2
end associate
- if (any (av%map /= [2,1])) call abort()
+ if (any (av%map /= [2,1])) STOP 1
deallocate(av)
allocate(am(3,4))
pam%map = 7
pam(1,2)%map = 8
end associate
- if (any (reshape(am%map, [12]) /= [1,1,1, 1,7,7, 1,8,7, 1,1,1])) call abort()
+ if (any (reshape(am%map, [12]) /= [1,1,1, 1,7,7, 1,8,7, 1,1,1])) STOP 2
deallocate(am)
allocate(pv(2))
associate(i => pv(1))
i%map = 2
end associate
- if (any (pv%map /= [2,1])) call abort()
+ if (any (pv%map /= [2,1])) STOP 3
deallocate(pv)
allocate(pm(3,4))
ppm%map = 7
ppm(1,2)%map = 8
end associate
- if (any (reshape(pm%map, [12]) /= [1,1,1, 1,7,7, 1,8,7, 1,1,1])) call abort()
+ if (any (reshape(pm%map, [12]) /= [1,1,1, 1,7,7, 1,8,7, 1,1,1])) STOP 4
deallocate(pm)
associate(i => iv(1))
i = 7
end associate
- if (any (iv /= [7, 17, 17, 17, 17])) call abort()
+ if (any (iv /= [7, 17, 17, 17, 17])) STOP 5
associate(pam => im(2:3, 2:3))
pam = 9
end do
end associate
if (any (reshape(im, [20]) /= [23,23,23,23, 23,9,0,23, &
- 23,10,0,23, 23,23,23,23, 23,23,23,23])) call abort()
+ 23,10,0,23, 23,23,23,23, 23,23,23,23])) STOP 6
expect(2:3) = 9
do c = 1, 5
associate(pam => im(:, c))
pam(2:3) = 9
end associate
- if (any (reshape(im, [20]) /= expect)) call abort()
+ if (any (reshape(im, [20]) /= expect)) STOP 7
! Shift expect
expect = [expect(17:), expect(:16)]
end do
i(:,2) = (/ 4 , 5 , 6 /)
associate( ai => a(:,i(:,1)) )
- if (any(shape(ai) /= [2, 3])) call abort()
- if (any(reshape(ai, [6]) /= [1 , -10, 3, -30, 5, -50])) call abort()
+ if (any(shape(ai) /= [2, 3])) STOP 1
+ if (any(reshape(ai, [6]) /= [1 , -10, 3, -30, 5, -50])) STOP 2
end associate
end program p
i(:,2) = (/ 4 , 5 , 6 /)
associate( ai => a(:,i(:,1))%i )
- if (any(shape(ai) /= [2, 3])) call abort()
- if (any(reshape(ai, [6]) /= [1 , -10, 3, -30, 5, -50])) call abort()
+ if (any(shape(ai) /= [2, 3])) STOP 1
+ if (any(reshape(ai, [6]) /= [1 , -10, 3, -30, 5, -50])) STOP 2
end associate
deallocate(a)
! This works.
s = 'abc'
associate(t => s)
- if (trim(t) /= 'abc') call abort
+ if (trim(t) /= 'abc') STOP 1
end associate
! This failed.
associate(u => 'abc')
- if (trim(u) /= 'abc') call abort
+ if (trim(u) /= 'abc') STOP 2
end associate
! This failed.
a = s // 'abc'
associate(v => s // 'abc')
- if (trim(v) /= trim(a)) call abort
+ if (trim(v) /= trim(a)) STOP 3
end associate
! This failed.
! This still doesn't work correctly, see PR 83344
! a = trim(s) // 'abc'
! associate(w => trim(s) // 'abc')
-! if (trim(w) /= trim(a)) call abort
+! if (trim(w) /= trim(a)) STOP 4
! end associate
! This failed.
associate(x => trim('abc'))
- if (trim(x) /= 'abc') call abort
+ if (trim(x) /= 'abc') STOP 5
end associate
end program foo
write (buffer, *) should_work(5:14)
END ASSOCIATE
- if (trim (buffer) .ne. " succesful") call abort
+ if (trim (buffer) .ne. " succesful") STOP 1
! Found to be failing during debugging
ASSOCIATE(should_work=>char_var_dim)
write (buffer, *) should_work(:)(5:14)
END ASSOCIATE
- if (trim (buffer) .ne. " SUCCESFUL_SUCCESFUL.SUCCESFUL") call abort
+ if (trim (buffer) .ne. " SUCCESFUL_SUCCESFUL.SUCCESFUL") STOP 2
! Found to be failing during debugging
ASSOCIATE(should_work=>char_var_dim(1:2))
write (buffer, *) should_work(:)(5:14)
END ASSOCIATE
- if (trim (buffer) .ne. " SUCCESFUL_SUCCESFUL") call abort
+ if (trim (buffer) .ne. " SUCCESFUL_SUCCESFUL") STOP 3
end program
contains
subroutine check (lbnd, ubnd, lower, upper)
integer :: lbnd, ubnd, lower, upper
- if (lbnd .ne. lower) call abort
- if (ubnd .ne. upper) call abort
+ if (lbnd .ne. lower) STOP 1
+ if (ubnd .ne. upper) STOP 2
end subroutine
END PROGRAM X
end associate
! This should now be 4 but the finalization is not happening.
! TODO put it right!
- if (final_flag .ne. 2) call abort
+ if (final_flag .ne. 2) STOP 1
end subroutine Testf
end module
x%text(2) = "defgh"
associate( c => x%text )
- if (c(1)(:maxval(len_trim(c))) .ne. trim (x%text(1))) call abort
- if (c(2)(:maxval(len_trim(c))) .ne. trim (x%text(2))) call abort
+ if (c(1)(:maxval(len_trim(c))) .ne. trim (x%text(1))) STOP 1
+ if (c(2)(:maxval(len_trim(c))) .ne. trim (x%text(2))) STOP 2
end associate
end program p
End Do
end associate
End block outer
- if (sum_a .ne. 30) call abort
+ if (sum_a .ne. 30) STOP 1
End Procedure
End Submodule SetPt
Program Test
s = 'ab'
associate(ss => s)
- if (ss .ne. 'ab') call abort ! This is the original bug.
+ if (ss .ne. 'ab') STOP 1! This is the original bug.
ss = 'c'
end associate
- if (s .ne. 'c ') call abort ! No reallocation within ASSOCIATE block!
+ if (s .ne. 'c ') STOP 2! No reallocation within ASSOCIATE block!
sf = 'c'
associate(ss => sf)
- if (ss .ne. 'c ') call abort ! This the bug in comment #2 of the PR.
+ if (ss .ne. 'c ') STOP 3! This the bug in comment #2 of the PR.
ss = 'cd'
end associate
sd = [s, sf]
associate(ss => sd)
- if (any (ss .ne. ['c ','cd'])) call abort
+ if (any (ss .ne. ['c ','cd'])) STOP 4
end associate
sfd = [sd,'ef']
associate(ss => sfd)
- if (any (ss .ne. ['c ','cd','ef'])) call abort
+ if (any (ss .ne. ['c ','cd','ef'])) STOP 5
ss = ['gh']
end associate
- if (any (sfd .ne. ['gh','cd','ef'])) call abort ! No reallocation!
+ if (any (sfd .ne. ['gh','cd','ef'])) STOP 6! No reallocation!
string%str = 'xyz'
associate(ss => string%str)
- if (ss .ne. 'xyz') call abort
+ if (ss .ne. 'xyz') STOP 7
ss = 'c'
end associate
- if (string%str .ne. 'c ') call abort ! No reallocation!
+ if (string%str .ne. 'c ') STOP 8! No reallocation!
str = "foobar"
call test_char (5 , str)
- IF (str /= "abcder") call abort
+ IF (str /= "abcder") STOP 9
associate(ss => foo())
- if (ss .ne. 'pqrst') call abort
+ if (ss .ne. 'pqrst') STOP 10
end associate
associate(ss => bar())
- if (ss(2) .ne. 'uvwxy') call abort
+ if (ss(2) .ne. 'uvwxy') STOP 11
end associate
! The deallocation is not strictly necessary but it does allow
CHARACTER(LEN=n) :: str
ASSOCIATE (my => str)
- IF (LEN (my) /= n) call abort
- IF (my /= "fooba") call abort
+ IF (LEN (my) /= n) STOP 12
+ IF (my /= "fooba") STOP 13
my = "abcde"
END ASSOCIATE
- IF (str /= "abcde") call abort
+ IF (str /= "abcde") STOP 14
END SUBROUTINE test_char
function foo() result(res)
!
program p
associate (x => ['1','2'])
- if (any (x .ne. ['1','2'])) call abort
+ if (any (x .ne. ['1','2'])) STOP 1
end associate
end
character(:), allocatable :: x
character(*) :: carg
associate (y => x)
- if (y .ne. carg) call abort
+ if (y .ne. carg) STOP 1
end associate
end
end
ASSOCIATE (arr => func (4))
! func should only be called once here, not again for the bounds!
- IF (LBOUND (arr, 1) /= 1 .OR. UBOUND (arr, 1) /= 4) CALL abort ()
- IF (arr(1) /= 1 .OR. arr(4) /= 4) CALL abort ()
+ IF (LBOUND (arr, 1) /= 1 .OR. UBOUND (arr, 1) /= 4) STOP 1
+ IF (arr(1) /= 1 .OR. arr(4) /= 4) STOP 2
END ASSOCIATE
END PROGRAM main
! { dg-final { scan-tree-dump-times "func" 2 "original" } }
! { dg-do run }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003 " }
! PR fortran/38936
! Check association and pointers.
tgt = 1
ASSOCIATE (x => tgt)
ptr => x
- IF (ptr /= 1) CALL abort ()
+ IF (ptr /= 1) STOP 1
ptr = 2
END ASSOCIATE
- IF (tgt /= 2) CALL abort ()
+ IF (tgt /= 2) STOP 2
END PROGRAM main
! { dg-do run }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003 " }
! PR fortran/38936
! Check associate to polymorphic entities.
associate ( one => a, two => b)
select type(two)
type is (t)
- call abort ()
+ STOP 1
type is (t2)
print *, 'OK', two
class default
- call abort ()
+ STOP 2
end select
select type(one)
type is (t2)
- call abort ()
+ STOP 3
type is (t)
print *, 'OK', one
class default
- call abort ()
+ STOP 4
end select
end associate
end
! { dg-do run }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003 " }
! PR fortran/38936
a = mynum (5)
ASSOCIATE (x => add (a, a))
- IF (x%comp /= 10) CALL abort ()
+ IF (x%comp /= 10) STOP 1
END ASSOCIATE
ASSOCIATE (x => a + a)
- IF (x%comp /= 10) CALL abort ()
+ IF (x%comp /= 10) STOP 2
END ASSOCIATE
END PROGRAM main
real, pointer :: a, b
nullify(a,b)
- if(associated(a,b).or.associated(a,a)) call abort()
+ if(associated(a,b).or.associated(a,a)) STOP 1
allocate(a)
- if(associated(b,a)) call abort()
- if (.not.associated(x(a))) call abort ()
- if (.not.associated(a, x(a))) call abort ()
+ if(associated(b,a)) STOP 2
+ if (.not.associated(x(a))) STOP 3
+ if (.not.associated(a, x(a))) STOP 4
nullify(b)
- if (associated(x(b))) call abort ()
+ if (associated(x(b))) STOP 5
allocate(b)
- if (associated(x(b), x(a))) call abort ()
+ if (associated(x(b), x(a))) STOP 6
contains
b => a
! Even though b is zero length, associated returns true because
! the target argument is not present (case (i))
- if (.not. associated (b)) call abort ()
+ if (.not. associated (b)) STOP 1
deallocate (a)
nullify(a)
- if(associated(a,a)) call abort()
+ if(associated(a,a)) STOP 2
allocate (a(2,1,2))
b => a
- if (.not.associated (b)) call abort ()
+ if (.not.associated (b)) STOP 3
deallocate (a)
end subroutine test1
subroutine test2 ()
allocate (a(2,0,2))
b => a
! Associated returns false because target is present (case(iii)).
- if (associated (b, a)) call abort ()
+ if (associated (b, a)) STOP 4
deallocate (a)
allocate (a(2,1,2))
b => a
- if (.not.associated (b, a)) call abort ()
+ if (.not.associated (b, a)) STOP 5
deallocate (a)
end subroutine test2
subroutine test3 (n)
b => a
! Again, with zero character length associated returns false
! if target is present.
- if (associated (b, a) .and. (n .eq. 0)) call abort ()
+ if (associated (b, a) .and. (n .eq. 0)) STOP 6
!
- if ((.not.associated (b, a)) .and. (n .ne. 0)) call abort ()
+ if ((.not.associated (b, a)) .and. (n .ne. 0)) STOP 7
deallocate (a)
end subroutine test3
end
ptr => ILA1
- if (ASSOCIATED (ptr, ILA1(NF1:NF2,NF4:NF3) ) ) call abort
- if ( .not. ASSOCIATED(ptr) ) call abort
+ if (ASSOCIATED (ptr, ILA1(NF1:NF2,NF4:NF3) ) ) STOP 1
+ if ( .not. ASSOCIATED(ptr) ) STOP 2
END SUBROUTINE
\r
type(treeNode) :: n\r
\r
- if (associated(RightOf(n))) call abort()\r
+ if (associated(RightOf(n))) STOP 1\r
allocate(n%right)\r
- if (.not.associated(RightOf(n))) call abort()\r
+ if (.not.associated(RightOf(n))) STOP 2\r
deallocate(n%right)\r
\r
contains\r
implicit none
type(t2), pointer :: a
allocate(a)
-if (.not. associated(a,f(a))) call abort()
+if (.not. associated(a,f(a))) STOP 1
call cmpPtr(a,f2(a))
call cmpPtr(a,f(a))
deallocate(a)
subroutine cmpPtr(a,b)
type(t2), pointer :: a,b
! print *, associated(a,b)
- if (.not. associated (a, b)) call abort()
+ if (.not. associated (a, b)) STOP 2
end subroutine cmpPtr
end
root%child%id=2
print *,root%child%id," is child of ",root%id,":"
print *,root%child%parent%id,root%id
- if (.not. associated(root%child%parent,root)) call abort()
+ if (.not. associated(root%child%parent,root)) STOP 1
end program rte1
associate (a => t%a)
! Test 'a' is OK on lhs and/or rhs of assignments
c = a - 1
- if (any (c .ne. [-1,0,1,2])) call abort
+ if (any (c .ne. [-1,0,1,2])) STOP 1
a = a + 1
- if (any (a .ne. [1,2,3,4])) call abort
+ if (any (a .ne. [1,2,3,4])) STOP 2
a = t%b
- if (any (a .ne. t%b)) call abort
+ if (any (a .ne. t%b)) STOP 3
! Test 'a' is OK as an actual argument
c = foo(a)
- if (any (c .ne. t%b + 10)) call abort
+ if (any (c .ne. t%b + 10)) STOP 4
end associate
! Make sure that the fix works for multi-dimensional arrays...
associate (a => u%a)
- if (any (a .ne. reshape ([1,1,1,1],[2,2]))) call abort
+ if (any (a .ne. reshape ([1,1,1,1],[2,2]))) STOP 5
end associate
! ...and sections
associate (a => t(2:3)%b)
- if (any (a .ne. [5,6])) call abort
+ if (any (a .ne. [5,6])) STOP 6
end associate
contains
function foo(arg) result(res)
!.. create i with some value
allocate (i, source=42)
call foo%setptr (i)
- if (.not.associated (i, foo%iptr())) call abort () ! Gave bad result.
- if (.not.associated (foo%iptr(), i)) call abort () ! Was OK.
+ if (.not.associated (i, foo%iptr())) STOP 1 ! Gave bad result.
+ if (.not.associated (foo%iptr(), i)) STOP 2 ! Was OK.
j => foo%iptr()
- if (.not.associated (i, j)) call abort ! Was OK.
+ if (.not.associated (i, j)) STOP 1! Was OK.
end program p
call foo (y, j)
call goo (y, j)
call roo (y, j)
- if (any(y.ne.(/21.0, 99.0, 42.0/))) call abort ()
+ if (any(y.ne.(/21.0, 99.0, 42.0/))) STOP 1
contains
SUBROUTINE roo (x, i)
REAL, DIMENSION(i:) :: x
allocate(z(1:4, -2:5, 4, 10:11))
-if (rank(x) /= 2) call abort ()
+if (rank(x) /= 2) STOP 1
val = [(2*i+3, i = 1, size(x))]
x = reshape (val, shape(x))
call foo(x, rank(x), lbound(x), ubound(x), val)
call bar(x,x,.true.)
call bar(x,prsnt=.false.)
-if (rank(y) /= 1) call abort ()
+if (rank(y) /= 1) STOP 2
val = [(2*i+7, i = 1, size(y))]
y = reshape (val, shape(y))
call foo(y, rank(y), lbound(y), ubound(y), val)
call bar(y,y,.true.)
call bar(y,prsnt=.false.)
-if (rank(z) /= 4) call abort ()
+if (rank(z) /= 4) STOP 3
val = [(2*i+5, i = 1, size(z))]
z(:,:,:,:) = reshape (val, shape(z))
call foo(z, rank(z), lbound(z), ubound(z), val)
subroutine bar(a,b, prsnt)
integer, pointer, optional, intent(in) :: a(..),b(..)
logical, value :: prsnt
- if (.not. associated(a)) call abort()
+ if (.not. associated(a)) STOP 4
if (present(b)) then
! The following is not valid.
! Technically, it could be allowed and might be in Fortran 2015:
- ! if (.not. associated(a,b)) call abort()
+ ! if (.not. associated(a,b)) STOP 5
else
- if (.not. associated(a)) call abort()
+ if (.not. associated(a)) STOP 6
end if
- if (.not. present(a)) call abort()
- if (prsnt .neqv. present(b)) call abort()
+ if (.not. present(a)) STOP 7
+ if (prsnt .neqv. present(b)) STOP 8
end subroutine
! POINTER argument - bounds as specified before
- if (rank(a) /= rnk) call abort()
- if (size(low) /= rnk .or. size(high) /= rnk) call abort()
- if (size(a) /= product (high - low +1)) call abort()
+ if (rank(a) /= rnk) STOP 9
+ if (size(low) /= rnk .or. size(high) /= rnk) STOP 10
+ if (size(a) /= product (high - low +1)) STOP 11
if (rnk > 0) then
- if (low(1) /= lbound(a,1)) call abort()
- if (high(1) /= ubound(a,1)) call abort()
- if (size (a,1) /= high(1)-low(1)+1) call abort()
+ if (low(1) /= lbound(a,1)) STOP 12
+ if (high(1) /= ubound(a,1)) STOP 13
+ if (size (a,1) /= high(1)-low(1)+1) STOP 14
end if
do i = 1, rnk
- if (low(i) /= lbound(a,i)) call abort()
- if (high(i) /= ubound(a,i)) call abort()
- if (size (a,i) /= high(i)-low(i)+1) call abort()
+ if (low(i) /= lbound(a,i)) STOP 15
+ if (high(i) /= ubound(a,i)) STOP 16
+ if (size (a,i) /= high(i)-low(i)+1) STOP 17
end do
call check_value (a, rnk, val)
call foo2(a, rnk, low, high, val)
integer, intent(in) :: low(:), high(:), val(:)
integer :: i
- if (rank(a) /= rnk) call abort()
- if (size(low) /= rnk .or. size(high) /= rnk) call abort()
- if (size(a) /= product (high - low +1)) call abort()
+ if (rank(a) /= rnk) STOP 18
+ if (size(low) /= rnk .or. size(high) /= rnk) STOP 19
+ if (size(a) /= product (high - low +1)) STOP 20
if (rnk > 0) then
- if (1 /= lbound(a,1)) call abort()
- if (high(1)-low(1)+1 /= ubound(a,1)) call abort()
- if (size (a,1) /= high(1)-low(1)+1) call abort()
+ if (1 /= lbound(a,1)) STOP 21
+ if (high(1)-low(1)+1 /= ubound(a,1)) STOP 22
+ if (size (a,1) /= high(1)-low(1)+1) STOP 23
end if
do i = 1, rnk
- if (1 /= lbound(a,i)) call abort()
- if (high(i)-low(i)+1 /= ubound(a,i)) call abort()
- if (size (a,i) /= high(i)-low(i)+1) call abort()
+ if (1 /= lbound(a,i)) STOP 24
+ if (high(i)-low(i)+1 /= ubound(a,i)) STOP 25
+ if (size (a,i) /= high(i)-low(i)+1) STOP 26
end do
call check_value (a, rnk, val)
end subroutine foo2
integer, intent(in) :: low(:), high(:), val(:)
integer :: i
- if (rank(a) /= rnk) call abort()
- if (size(low) /= rnk .or. size(high) /= rnk) call abort()
- if (size(a) /= product (high - low +1)) call abort()
+ if (rank(a) /= rnk) STOP 27
+ if (size(low) /= rnk .or. size(high) /= rnk) STOP 28
+ if (size(a) /= product (high - low +1)) STOP 29
if (rnk > 0) then
- if (low(1) /= lbound(a,1)) call abort()
- if (high(1) /= ubound(a,1)) call abort()
- if (size (a,1) /= high(1)-low(1)+1) call abort()
+ if (low(1) /= lbound(a,1)) STOP 30
+ if (high(1) /= ubound(a,1)) STOP 31
+ if (size (a,1) /= high(1)-low(1)+1) STOP 32
end if
do i = 1, rnk
- if (low(i) /= lbound(a,i)) call abort()
- if (high(i) /= ubound(a,i)) call abort()
- if (size (a,i) /= high(i)-low(i)+1) call abort()
+ if (low(i) /= lbound(a,i)) STOP 33
+ if (high(i) /= ubound(a,i)) STOP 34
+ if (size (a,i) /= high(i)-low(i)+1) STOP 35
end do
call check_value (a, rnk, val)
call foo(a, rnk, low, high, val)
jjp = t(88)
call faa(iia, jja) ! Copy back
- if (iia /= 7 .and. jja%aa /= 88) call abort ()
+ if (iia /= 7 .and. jja%aa /= 88) STOP 1
call fai(iia, jja) ! No copy back
- if (iia /= 7 .and. jja%aa /= 88) call abort ()
+ if (iia /= 7 .and. jja%aa /= 88) STOP 2
call fpa(iip, jjp) ! Copy back
- if (iip /= 7 .and. jjp%aa /= 88) call abort ()
+ if (iip /= 7 .and. jjp%aa /= 88) STOP 3
call fpi(iip, jjp) ! No copy back
- if (iip /= 7 .and. jjp%aa /= 88) call abort ()
+ if (iip /= 7 .and. jjp%aa /= 88) STOP 4
call fnn(iia, jja) ! No copy back
- if (iia /= 7 .and. jja%aa /= 88) call abort ()
+ if (iia /= 7 .and. jja%aa /= 88) STOP 5
call fno(iia, jja) ! No copy back
- if (iia /= 7 .and. jja%aa /= 88) call abort ()
+ if (iia /= 7 .and. jja%aa /= 88) STOP 6
call fnn(iip, jjp) ! No copy back
- if (iip /= 7 .and. jjp%aa /= 88) call abort ()
+ if (iip /= 7 .and. jjp%aa /= 88) STOP 7
call fno(iip, jjp) ! No copy back
- if (iip /= 7 .and. jjp%aa /= 88) call abort ()
+ if (iip /= 7 .and. jjp%aa /= 88) STOP 8
is_present = .false.
subroutine faa (xx1, yy1)
integer, allocatable :: xx1(..)
type(t), allocatable :: yy1(..)
- if (.not. allocated (xx1)) call abort ()
- if (.not. allocated (yy1)) call abort ()
+ if (.not. allocated (xx1)) STOP 9
+ if (.not. allocated (yy1)) STOP 10
end subroutine faa
subroutine fai (xx1, yy1)
integer, allocatable, intent(in) :: xx1(..)
type(t), allocatable, intent(in) :: yy1(..)
- if (.not. allocated (xx1)) call abort ()
- if (.not. allocated (yy1)) call abort ()
+ if (.not. allocated (xx1)) STOP 11
+ if (.not. allocated (yy1)) STOP 12
end subroutine fai
subroutine fpa (xx1, yy1)
integer, pointer :: xx1(..)
type(t), pointer :: yy1(..)
- if (is_present .neqv. associated (xx1)) call abort ()
- if (is_present .neqv. associated (yy1)) call abort ()
+ if (is_present .neqv. associated (xx1)) STOP 13
+ if (is_present .neqv. associated (yy1)) STOP 14
end subroutine fpa
subroutine fpi (xx1, yy1)
integer, pointer, intent(in) :: xx1(..)
type(t), pointer, intent(in) :: yy1(..)
- if (is_present .neqv. associated (xx1)) call abort ()
- if (is_present .neqv. associated (yy1)) call abort ()
+ if (is_present .neqv. associated (xx1)) STOP 15
+ if (is_present .neqv. associated (yy1)) STOP 16
end subroutine fpi
subroutine fnn(xx2,yy2)
subroutine fno(xx2,yy2)
integer, optional :: xx2(..)
type(t), optional :: yy2(..)
- if (is_present .neqv. present (xx2)) call abort ()
- if (is_present .neqv. present (yy2)) call abort ()
+ if (is_present .neqv. present (xx2)) STOP 17
+ if (is_present .neqv. present (yy2)) STOP 18
end subroutine fno
end program test
allocate(z(1:4, -2:5, 4, 10:11))
-if (rank(x) /= 2) call abort ()
+if (rank(x) /= 2) STOP 1
val = [(2*i+3, i = 1, size(x))]
x = reshape (val, shape(x))
call foo(x, rank(x), lbound(x), ubound(x), val)
call bar(x,x,.true.)
call bar(x,prsnt=.false.)
-if (rank(y) /= 1) call abort ()
+if (rank(y) /= 1) STOP 2
val = [(2*i+7, i = 1, size(y))]
y = reshape (val, shape(y))
call foo(y, rank(y), lbound(y), ubound(y), val)
call bar(y,y,.true.)
call bar(y,prsnt=.false.)
-if (rank(z) /= 4) call abort ()
+if (rank(z) /= 4) STOP 3
val = [(2*i+5, i = 1, size(z))]
z(:,:,:,:) = reshape (val, shape(z))
call foo(z, rank(z), lbound(z), ubound(z), val)
subroutine bar(a,b, prsnt)
integer, pointer, optional, intent(in) :: a(..),b(..)
logical, value :: prsnt
- if (.not. associated(a)) call abort()
+ if (.not. associated(a)) STOP 4
if (present(b)) then
! The following is not valid
! Technically, it could be allowed and might be in Fortran 2015:
- ! if (.not. associated(a,b)) call abort()
+ ! if (.not. associated(a,b)) STOP 5
else
- if (.not. associated(a)) call abort()
+ if (.not. associated(a)) STOP 6
end if
- if (.not. present(a)) call abort()
- if (prsnt .neqv. present(b)) call abort()
+ if (.not. present(a)) STOP 7
+ if (prsnt .neqv. present(b)) STOP 8
end subroutine
! POINTER argument - bounds as specified before
- if (rank(a) /= rnk) call abort()
- if (size(low) /= rnk .or. size(high) /= rnk) call abort()
- if (size(a) /= product (high - low +1)) call abort()
+ if (rank(a) /= rnk) STOP 9
+ if (size(low) /= rnk .or. size(high) /= rnk) STOP 10
+ if (size(a) /= product (high - low +1)) STOP 11
if (rnk > 0) then
- if (low(1) /= lbound(a,1)) call abort()
- if (high(1) /= ubound(a,1)) call abort()
- if (size (a,1) /= high(1)-low(1)+1) call abort()
+ if (low(1) /= lbound(a,1)) STOP 12
+ if (high(1) /= ubound(a,1)) STOP 13
+ if (size (a,1) /= high(1)-low(1)+1) STOP 14
end if
do i = 1, rnk
- if (low(i) /= lbound(a,i)) call abort()
- if (high(i) /= ubound(a,i)) call abort()
- if (size (a,i) /= high(i)-low(i)+1) call abort()
+ if (low(i) /= lbound(a,i)) STOP 15
+ if (high(i) /= ubound(a,i)) STOP 16
+ if (size (a,i) /= high(i)-low(i)+1) STOP 17
end do
call foo2(a, rnk, low, high, val)
end subroutine
integer, intent(in) :: low(:), high(:), val(:)
integer :: i
- if (rank(a) /= rnk) call abort()
- if (size(low) /= rnk .or. size(high) /= rnk) call abort()
- if (size(a) /= product (high - low +1)) call abort()
+ if (rank(a) /= rnk) STOP 18
+ if (size(low) /= rnk .or. size(high) /= rnk) STOP 19
+ if (size(a) /= product (high - low +1)) STOP 20
if (rnk > 0) then
- if (1 /= lbound(a,1)) call abort()
- if (high(1)-low(1)+1 /= ubound(a,1)) call abort()
- if (size (a,1) /= high(1)-low(1)+1) call abort()
+ if (1 /= lbound(a,1)) STOP 21
+ if (high(1)-low(1)+1 /= ubound(a,1)) STOP 22
+ if (size (a,1) /= high(1)-low(1)+1) STOP 23
end if
do i = 1, rnk
- if (1 /= lbound(a,i)) call abort()
- if (high(i)-low(i)+1 /= ubound(a,i)) call abort()
- if (size (a,i) /= high(i)-low(i)+1) call abort()
+ if (1 /= lbound(a,i)) STOP 24
+ if (high(i)-low(i)+1 /= ubound(a,i)) STOP 25
+ if (size (a,i) /= high(i)-low(i)+1) STOP 26
end do
end subroutine foo2
integer, intent(in) :: low(:), high(:), val(:)
integer :: i
- if (rank(a) /= rnk) call abort()
- if (size(low) /= rnk .or. size(high) /= rnk) call abort()
- if (size(a) /= product (high - low +1)) call abort()
+ if (rank(a) /= rnk) STOP 27
+ if (size(low) /= rnk .or. size(high) /= rnk) STOP 28
+ if (size(a) /= product (high - low +1)) STOP 29
if (rnk > 0) then
- if (low(1) /= lbound(a,1)) call abort()
- if (high(1) /= ubound(a,1)) call abort()
- if (size (a,1) /= high(1)-low(1)+1) call abort()
+ if (low(1) /= lbound(a,1)) STOP 30
+ if (high(1) /= ubound(a,1)) STOP 31
+ if (size (a,1) /= high(1)-low(1)+1) STOP 32
end if
do i = 1, rnk
- if (low(i) /= lbound(a,i)) call abort()
- if (high(i) /= ubound(a,i)) call abort()
- if (size (a,i) /= high(i)-low(i)+1) call abort()
+ if (low(i) /= lbound(a,i)) STOP 33
+ if (high(i) /= ubound(a,i)) STOP 34
+ if (size (a,i) /= high(i)-low(i)+1) STOP 35
end do
call foo(a, rnk, low, high, val)
end subroutine
call foo(at)
call bar(ac)
call bar(at)
-if (i /= 12) call abort()
+if (i /= 12) STOP 1
contains
subroutine bar(x)
type(t) :: x(..)
- if (lbound(x,1) /= 1 .or. lbound(x,2) /= 1) call abort()
- if (size(x) /= 6) call abort()
- if (size(x,1) /= 2 .or. size(x,2) /= 3) call abort()
- if (ubound(x,1) /= 2 .or. ubound(x,2) /= 3) call abort()
+ if (lbound(x,1) /= 1 .or. lbound(x,2) /= 1) STOP 2
+ if (size(x) /= 6) STOP 3
+ if (size(x,1) /= 2 .or. size(x,2) /= 3) STOP 4
+ if (ubound(x,1) /= 2 .or. ubound(x,2) /= 3) STOP 5
i = i + 1
call foo(x)
call bar2(x)
end subroutine
subroutine bar2(x)
type(t) :: x(..)
- if (lbound(x,1) /= 1 .or. lbound(x,2) /= 1) call abort()
- if (size(x) /= 6) call abort()
- if (size(x,1) /= 2 .or. size(x,2) /= 3) call abort()
- if (ubound(x,1) /= 2 .or. ubound(x,2) /= 3) call abort()
+ if (lbound(x,1) /= 1 .or. lbound(x,2) /= 1) STOP 6
+ if (size(x) /= 6) STOP 7
+ if (size(x,1) /= 2 .or. size(x,2) /= 3) STOP 8
+ if (ubound(x,1) /= 2 .or. ubound(x,2) /= 3) STOP 9
i = i + 1
end subroutine
subroutine foo(x)
class(t) :: x(..)
- if (lbound(x,1) /= 1 .or. lbound(x,2) /= 1) call abort()
- if (size(x) /= 6) call abort()
- if (size(x,1) /= 2 .or. size(x,2) /= 3) call abort()
- if (ubound(x,1) /= 2 .or. ubound(x,2) /= 3) call abort()
+ if (lbound(x,1) /= 1 .or. lbound(x,2) /= 1) STOP 10
+ if (size(x) /= 6) STOP 11
+ if (size(x,1) /= 2 .or. size(x,2) /= 3) STOP 12
+ if (ubound(x,1) /= 2 .or. ubound(x,2) /= 3) STOP 13
i = i + 1
call foo2(x)
! call bar2(x) ! Passing a CLASS to a TYPE does not yet work
end subroutine
subroutine foo2(x)
class(t) :: x(..)
- if (lbound(x,1) /= 1 .or. lbound(x,2) /= 1) call abort()
- if (size(x) /= 6) call abort()
- if (size(x,1) /= 2 .or. size(x,2) /= 3) call abort()
- if (ubound(x,1) /= 2 .or. ubound(x,2) /= 3) call abort()
+ if (lbound(x,1) /= 1 .or. lbound(x,2) /= 1) STOP 14
+ if (size(x) /= 6) STOP 15
+ if (size(x,1) /= 2 .or. size(x,2) /= 3) STOP 16
+ if (ubound(x,1) /= 2 .or. ubound(x,2) /= 3) STOP 17
i = i + 1
end subroutine
end
call f ()
call f (null())
call f (kk)
- if (j /= 2) call abort()
+ if (j /= 2) STOP 1
j = 0
nullify (ll)
call g (null())
call g (ll)
call g (ii)
- if (j /= 1) call abort()
+ if (j /= 1) STOP 2
j = 0
call h (kk)
kk = 489
call h (kk)
- if (j /= 1) call abort()
+ if (j /= 1) STOP 3
contains
integer, optional :: x(..)
if (.not. present (x)) return
- if (rank (x) /= 0) call abort
+ if (rank (x) /= 0) STOP 1
call check (x)
j = j + 1
end subroutine
integer, pointer, intent(in) :: x(..)
if (.not. associated (x)) return
- if (rank (x) /= 0) call abort ()
+ if (rank (x) /= 0) STOP 4
call check (x)
j = j + 1
end subroutine
integer, allocatable :: x(..)
if (.not. allocated (x)) return
- if (rank (x) /= 0) call abort
+ if (rank (x) /= 0) STOP 2
call check (x)
j = j + 1
end subroutine
call fc(null())
call fc(y)
call fc(yac)
- if (j /= 2) call abort ()
+ if (j /= 2) STOP 1
j = 0
call gc(null())
call gc(yac)
deallocate (yac)
call gc(yac)
- if (j /= 2) call abort ()
+ if (j /= 2) STOP 2
j = 0
call hc(yac)
allocate (yac)
yac%i = 489
call hc(yac)
- if (j /= 1) call abort ()
+ if (j /= 1) STOP 3
j = 0
call ft()
call ft(null())
call ft(y)
call ft(yac)
- if (j /= 2) call abort ()
+ if (j /= 2) STOP 4
j = 0
call gt(null())
call gt(yac)
deallocate (yac)
call gt(yac)
- if (j /= 2) call abort ()
+ if (j /= 2) STOP 5
j = 0
call ht(yac)
allocate (yac)
yac%i = 489
call ht(yac)
- if (j /= 1) call abort ()
+ if (j /= 1) STOP 6
contains
class(t), optional :: x(..)
if (.not. present (x)) return
- if (.not. SAME_TYPE_AS (x, yac)) call abort ()
- if (rank (x) /= 0) call abort
+ if (.not. SAME_TYPE_AS (x, yac)) STOP 7
+ if (rank (x) /= 0) STOP 1
call check2 (x)
j = j + 1
end subroutine
class(t), pointer, intent(in) :: x(..)
if (.not. associated (x)) return
- if (.not. SAME_TYPE_AS (x, yac)) call abort ()
- if (rank (x) /= 0) call abort ()
+ if (.not. SAME_TYPE_AS (x, yac)) STOP 8
+ if (rank (x) /= 0) STOP 9
call check2 (x)
j = j + 1
end subroutine
class(t), allocatable :: x(..)
if (.not. allocated (x)) return
- if (.not. SAME_TYPE_AS (x, yac)) call abort ()
- if (rank (x) /= 0) call abort
+ if (.not. SAME_TYPE_AS (x, yac)) STOP 10
+ if (rank (x) /= 0) STOP 2
call check2 (x)
j = j + 1
end subroutine
type(t), optional :: x(..)
if (.not. present (x)) return
- if (.not. SAME_TYPE_AS (x, yac)) call abort ()
- if (rank (x) /= 0) call abort
+ if (.not. SAME_TYPE_AS (x, yac)) STOP 11
+ if (rank (x) /= 0) STOP 3
call check2 (x)
j = j + 1
end subroutine
type(t), pointer, intent(in) :: x(..)
if (.not. associated (x)) return
- if (.not. SAME_TYPE_AS (x, yac)) call abort ()
- if (rank (x) /= 0) call abort ()
+ if (.not. SAME_TYPE_AS (x, yac)) STOP 12
+ if (rank (x) /= 0) STOP 13
call check2 (x)
j = j + 1
end subroutine
type(t), allocatable :: x(..)
if (.not. allocated (x)) return
- if (.not. SAME_TYPE_AS (x, yac)) call abort ()
- if (rank (x) /= 0) call abort
+ if (.not. SAME_TYPE_AS (x, yac)) STOP 14
+ if (rank (x) /= 0) STOP 4
call check2 (x)
j = j + 1
end subroutine
!print *, lbound(arg)
!print *, id(lbound(arg))
- if (any(lbound(arg) /= [1, 1])) call abort
- if (any(id(lbound(arg)) /= [1, 1])) call abort
+ if (any(lbound(arg) /= [1, 1])) STOP 1
+ if (any(id(lbound(arg)) /= [1, 1])) STOP 2
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) lbound(arg)
- if (buffer /= ' 1 1') call abort
+ if (buffer /= ' 1 1') STOP 3
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) id(lbound(arg))
- if (buffer /= ' 1 1') call abort
+ if (buffer /= ' 1 1') STOP 4
!print *, ubound(arg)
!print *, id(ubound(arg))
- if (any(ubound(arg) /= [3, 8])) call abort
- if (any(id(ubound(arg)) /= [3, 8])) call abort
+ if (any(ubound(arg) /= [3, 8])) STOP 5
+ if (any(id(ubound(arg)) /= [3, 8])) STOP 6
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) ubound(arg)
- if (buffer /= ' 3 8') call abort
+ if (buffer /= ' 3 8') STOP 7
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) id(ubound(arg))
- if (buffer /= ' 3 8') call abort
+ if (buffer /= ' 3 8') STOP 8
!print *, shape(arg)
!print *, id(shape(arg))
- if (any(shape(arg) /= [3, 8])) call abort
- if (any(id(shape(arg)) /= [3, 8])) call abort
+ if (any(shape(arg) /= [3, 8])) STOP 9
+ if (any(id(shape(arg)) /= [3, 8])) STOP 10
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) shape(arg)
- if (buffer /= ' 3 8') call abort
+ if (buffer /= ' 3 8') STOP 11
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) id(shape(arg))
- if (buffer /= ' 3 8') call abort
+ if (buffer /= ' 3 8') STOP 12
end subroutine foo
subroutine bar(arg)
!print *, lbound(arg)
!print *, id(lbound(arg))
- if (any(lbound(arg) /= [2, -2])) call abort
- if (any(id(lbound(arg)) /= [2, -2])) call abort
+ if (any(lbound(arg) /= [2, -2])) STOP 13
+ if (any(id(lbound(arg)) /= [2, -2])) STOP 14
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) lbound(arg)
- if (buffer /= ' 2 -2') call abort
+ if (buffer /= ' 2 -2') STOP 15
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) id(lbound(arg))
- if (buffer /= ' 2 -2') call abort
+ if (buffer /= ' 2 -2') STOP 16
!print *, ubound(arg)
!print *, id(ubound(arg))
- if (any(ubound(arg) /= [4, 5])) call abort
- if (any(id(ubound(arg)) /= [4, 5])) call abort
+ if (any(ubound(arg) /= [4, 5])) STOP 17
+ if (any(id(ubound(arg)) /= [4, 5])) STOP 18
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) ubound(arg)
- if (buffer /= ' 4 5') call abort
+ if (buffer /= ' 4 5') STOP 19
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) id(ubound(arg))
- if (buffer /= ' 4 5') call abort
+ if (buffer /= ' 4 5') STOP 20
!print *, shape(arg)
!print *, id(shape(arg))
- if (any(shape(arg) /= [3, 8])) call abort
- if (any(id(shape(arg)) /= [3, 8])) call abort
+ if (any(shape(arg) /= [3, 8])) STOP 21
+ if (any(id(shape(arg)) /= [3, 8])) STOP 22
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) shape(arg)
- if (buffer /= ' 3 8') call abort
+ if (buffer /= ' 3 8') STOP 23
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) id(shape(arg))
- if (buffer /= ' 3 8') call abort
+ if (buffer /= ' 3 8') STOP 24
end subroutine bar
subroutine baz(arg)
!print *, lbound(arg)
!print *, id(lbound(arg))
- if (any(lbound(arg) /= [2, -2])) call abort
- if (any(id(lbound(arg)) /= [2, -2])) call abort
+ if (any(lbound(arg) /= [2, -2])) STOP 25
+ if (any(id(lbound(arg)) /= [2, -2])) STOP 26
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) lbound(arg)
- if (buffer /= ' 2 -2') call abort
+ if (buffer /= ' 2 -2') STOP 27
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) id(lbound(arg))
- if (buffer /= ' 2 -2') call abort
+ if (buffer /= ' 2 -2') STOP 28
!print *, ubound(arg)
!print *, id(ubound(arg))
- if (any(ubound(arg) /= [4, 5])) call abort
- if (any(id(ubound(arg)) /= [4, 5])) call abort
+ if (any(ubound(arg) /= [4, 5])) STOP 29
+ if (any(id(ubound(arg)) /= [4, 5])) STOP 30
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) ubound(arg)
- if (buffer /= ' 4 5') call abort
+ if (buffer /= ' 4 5') STOP 31
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) id(ubound(arg))
- if (buffer /= ' 4 5') call abort
+ if (buffer /= ' 4 5') STOP 32
!print *, shape(arg)
!print *, id(shape(arg))
- if (any(shape(arg) /= [3, 8])) call abort
- if (any(id(shape(arg)) /= [3, 8])) call abort
+ if (any(shape(arg) /= [3, 8])) STOP 33
+ if (any(id(shape(arg)) /= [3, 8])) STOP 34
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) shape(arg)
- if (buffer /= ' 3 8') call abort
+ if (buffer /= ' 3 8') STOP 35
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) id(shape(arg))
- if (buffer /= ' 3 8') call abort
+ if (buffer /= ' 3 8') STOP 36
end subroutine baz
elemental function id(arg)
b = foo(a)
!print *,b(:,1)
- if (any(b(:,1) /= [11, 101])) call abort
+ if (any(b(:,1) /= [11, 101])) STOP 1
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) b(:,1)
- if (buffer /= ' 11 101') call abort
+ if (buffer /= ' 11 101') STOP 2
!print *,b(:,2)
- if (any(b(:,2) /= [3, 8])) call abort
+ if (any(b(:,2) /= [3, 8])) STOP 3
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) b(:,2)
- if (buffer /= ' 3 8') call abort
+ if (buffer /= ' 3 8') STOP 4
!print *,b(:,3)
- if (any(b(:,3) /= [13, 108])) call abort
+ if (any(b(:,3) /= [13, 108])) STOP 5
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) b(:,3)
- if (buffer /= ' 13 108') call abort
+ if (buffer /= ' 13 108') STOP 6
allocate(c(1:2,-3:6))
b = bar(c)
!print *,b(:,1)
- if (any(b(:,1) /= [11, 97])) call abort
+ if (any(b(:,1) /= [11, 97])) STOP 7
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) b(:,1)
- if (buffer /= ' 11 97') call abort
+ if (buffer /= ' 11 97') STOP 8
!print *,b(:,2)
- if (any(b(:,2) /= [12, 106])) call abort
+ if (any(b(:,2) /= [12, 106])) STOP 9
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) b(:,2)
- if (buffer /= ' 12 106') call abort
+ if (buffer /= ' 12 106') STOP 10
!print *,b(:,3)
- if (any(b(:,3) /= [2, 10])) call abort
+ if (any(b(:,3) /= [2, 10])) STOP 11
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) b(:,3)
- if (buffer /= ' 2 10') call abort
+ if (buffer /= ' 2 10') STOP 12
allocate(d(3:5,-1:10))
b = baz(d)
!print *,b(:,1)
- if (any(b(:,1) /= [3, -1])) call abort
+ if (any(b(:,1) /= [3, -1])) STOP 13
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) b(:,1)
- if (buffer /= ' 3 -1') call abort
+ if (buffer /= ' 3 -1') STOP 14
!print *,b(:,2)
- if (any(b(:,2) /= [15, 110])) call abort
+ if (any(b(:,2) /= [15, 110])) STOP 15
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) b(:,2)
- if (buffer /= ' 15 110') call abort
+ if (buffer /= ' 15 110') STOP 16
!print *,b(:,3)
- if (any(b(:,3) /= [13, 112])) call abort
+ if (any(b(:,3) /= [13, 112])) STOP 17
buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
write(buffer,*) b(:,3)
- if (buffer /= ' 13 112') call abort
+ if (buffer /= ' 13 112') STOP 18
contains
i = 0
call foo (1e0, i)
- if (i .ne. 1) call abort ()
+ if (i .ne. 1) STOP 1
i = 0
call foo (bar(1), i)
- if (i .ne. 1) call abort ()
+ if (i .ne. 1) STOP 2
i = 0
call foo (bar, i)
- if (i .ne. 2) call abort ()
+ if (i .ne. 2) STOP 3
end
type(*), target, optional :: arg1
logical :: presnt
type(c_ptr) :: cpt
- if (presnt .neqv. present (arg1)) call abort ()
+ if (presnt .neqv. present (arg1)) STOP 1
cpt = c_loc (arg1)
end subroutine sub_scalar
type(*), target :: arg2(:,:)
type(c_ptr) :: cpt
integer :: lbounds(2), ubounds(2)
- if (any (lbound(arg2) /= lbounds)) call abort ()
- if (any (ubound(arg2) /= ubounds)) call abort ()
- if (any (shape(arg2) /= ubounds-lbounds+1)) call abort ()
- if (size(arg2) /= product (ubounds-lbounds+1)) call abort ()
- if (rank (arg2) /= 2) call abort ()
-! if (.not. is_continuous (arg2)) call abort () !<< Not yet implemented
+ if (any (lbound(arg2) /= lbounds)) STOP 2
+ if (any (ubound(arg2) /= ubounds)) STOP 3
+ if (any (shape(arg2) /= ubounds-lbounds+1)) STOP 4
+ if (size(arg2) /= product (ubounds-lbounds+1)) STOP 5
+ if (rank (arg2) /= 2) STOP 6
+! if (.not. is_continuous (arg2)) STOP 7 !<< Not yet implemented
! cpt = c_loc (arg2) ! << FIXME: Valid since TS29113
call sub_array_assumed (arg2)
end subroutine sub_array_shape
real, parameter :: pi4 = 2*acos(0.0)
real, parameter :: pi8 = 2*acos(0.0d0)
do i = 1, 10
- if(atan(1.0, i/10.0) -atan2(1.0, i/10.) /= 0.0) call abort()
- if(atan(1.0d0,i/10.0d0)-atan2(1.0d0,i/10.0d0) /= 0.0d0) call abort()
+ if(atan(1.0, i/10.0) -atan2(1.0, i/10.) /= 0.0) STOP 1
+ if(atan(1.0d0,i/10.0d0)-atan2(1.0d0,i/10.0d0) /= 0.0d0) STOP 2
end do
! Atan(1,1) = Pi/4
-if (abs(atan(1.0,1.0) -pi4/4.0) > epsilon(pi4)) call abort()
-if (abs(atan(1.0d0,1.0d0)-pi8/4.0d0) > epsilon(pi8)) call abort()
+if (abs(atan(1.0,1.0) -pi4/4.0) > epsilon(pi4)) STOP 3
+if (abs(atan(1.0d0,1.0d0)-pi8/4.0d0) > epsilon(pi8)) STOP 4
! Atan(-1,1) = -Pi/4
-if (abs(atan(-1.0,1.0) +pi4/4.0) > epsilon(pi4)) call abort()
-if (abs(atan(-1.0d0,1.0d0)+pi8/4.0d0) > epsilon(pi8)) call abort()
+if (abs(atan(-1.0,1.0) +pi4/4.0) > epsilon(pi4)) STOP 5
+if (abs(atan(-1.0d0,1.0d0)+pi8/4.0d0) > epsilon(pi8)) STOP 6
! Atan(1,-1) = 3/4*Pi
-if (abs(atan(1.0,-1.0) -3.0*pi4/4.0) > epsilon(pi4)) call abort()
-if (abs(atan(1.0d0,-1.0d0)-3.0d0*pi8/4.0d0) > epsilon(pi8)) call abort()
+if (abs(atan(1.0,-1.0) -3.0*pi4/4.0) > epsilon(pi4)) STOP 7
+if (abs(atan(1.0d0,-1.0d0)-3.0d0*pi8/4.0d0) > epsilon(pi8)) STOP 8
! Atan(-1,-1) = -3/4*Pi
-if (abs(atan(-1.0,-1.0) +3.0*pi4/4.0) > epsilon(pi4)) call abort()
-if (abs(atan(-1.0d0,-1.0d0)+3.0d0*pi8/4.0d0) > epsilon(pi8)) call abort()
+if (abs(atan(-1.0,-1.0) +3.0*pi4/4.0) > epsilon(pi4)) STOP 9
+if (abs(atan(-1.0d0,-1.0d0)+3.0d0*pi8/4.0d0) > epsilon(pi8)) STOP 10
! Atan(3,-5) = 2.60117315331920908301906501867... = Pi - 3/2 atan(3/5)
-if (abs(atan(3.0,-5.0) -2.60117315331920908301906501867) > epsilon(pi4)) call abort()
-if (abs(atan(3.0d0,-5.0d0)-2.60117315331920908301906501867d0) > epsilon(pi8)) call abort()
+if (abs(atan(3.0,-5.0) -2.60117315331920908301906501867) > epsilon(pi4)) STOP 11
+if (abs(atan(3.0d0,-5.0d0)-2.60117315331920908301906501867d0) > epsilon(pi8)) STOP 12
end
! Check it worked.
if (any (z .ne. reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/)))) &
- call abort
+ STOP 1
end subroutine foo
subroutine foo1(n,x)
nullify(ptr)
call a (ptr, 12)
- if (.not.associated (ptr) ) call abort ()
- if (any (ptr.ne."abc")) call abort ()
+ if (.not.associated (ptr) ) STOP 1
+ if (any (ptr.ne."abc")) STOP 2
ptr => null () ! ptr points to 't' here.
allocate (ptr(3))
ptr = "xyz"
call a (ptr, 12)
- if (.not.associated (ptr)) call abort ()
- if (any (ptr.ne."lmn")) call abort ()
+ if (.not.associated (ptr)) STOP 3
+ if (any (ptr.ne."lmn")) STOP 4
call a (ptr, 0)
- if (associated (ptr)) call abort ()
+ if (associated (ptr)) STOP 5
contains
t = "abc"
p => t
else
- if (size (p,1).ne.3) call abort ()
- if (any (p.ne."xyz")) call abort ()
+ if (size (p,1).ne.3) STOP 6
+ if (any (p.ne."xyz")) STOP 7
p = s
end if
end subroutine a
CHARACTER(MAX (80, nb)) :: bad_rec(1)
bad_rec(1)(1:2) = 'abc'
- IF (bad_rec(1)(1:2) /= 'ab') CALL abort ()
+ IF (bad_rec(1)(1:2) /= 'ab') STOP 1
END SUBROUTINE s
END PROGRAM main
(/(char(i+64),char(i+96), i = 1,26)/)
txt = chararray2string(chararr)
if (txt .ne. "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz") &
- call abort ()
+ STOP 1
end program TestStringTools
character(10), dimension (2) :: source
source = "abcdefghij"
explicit_result = join_1(source)
- if (any (explicit_result .ne. source)) call abort ()
+ if (any (explicit_result .ne. source)) STOP 1
implicit_result = reallocate_hnv (source, size(source, 1), LEN (source))
- if (any (implicit_result .ne. source)) call abort ()
+ if (any (implicit_result .ne. source)) STOP 2
contains
!
character (6) :: c
c = f1 ()
- if (c .ne. 'abcdef') call abort
+ if (c .ne. 'abcdef') STOP 1
contains
function f1 () ! { dg-error "must not be assumed length" }
character (*) :: f1
character(10), dimension (2) :: source
source = "abcdefghij"
explicit_result = join_1(source)
- if (any (explicit_result .ne. source)) call abort ()
+ if (any (explicit_result .ne. source)) STOP 1
implicit_result = reallocate_hnv (source, size(source, 1), LEN (source))
- if (any (implicit_result .ne. source)) call abort ()
+ if (any (implicit_result .ne. source)) STOP 2
contains
integer f, f2, g, g2
! Should return static value of a; accumulates y
-if ( f(3) .ne. 3 ) call abort ()
-if ( f(4) .ne. 7 ) call abort ()
-if ( f(2) .ne. 9 ) call abort ()
+if ( f(3) .ne. 3 ) STOP 1
+if ( f(4) .ne. 7 ) STOP 2
+if ( f(2) .ne. 9 ) STOP 3
-if ( f2(3) .ne. 3 ) call abort ()
-if ( f2(4) .ne. 7 ) call abort ()
-if ( f2(2) .ne. 9 ) call abort ()
+if ( f2(3) .ne. 3 ) STOP 4
+if ( f2(4) .ne. 7 ) STOP 5
+if ( f2(2) .ne. 9 ) STOP 6
! Should return automatic value of a; equal to y each time
-if ( g(3) .ne. 3 ) call abort ()
-if ( g(4) .ne. 4 ) call abort ()
-if ( g(2) .ne. 2 ) call abort ()
+if ( g(3) .ne. 3 ) STOP 7
+if ( g(4) .ne. 4 ) STOP 8
+if ( g(2) .ne. 2 ) STOP 9
-if ( g2(3) .ne. 3 ) call abort ()
-if ( g2(4) .ne. 4 ) call abort ()
-if ( g2(2) .ne. 2 ) call abort ()
+if ( g2(3) .ne. 3 ) STOP 10
+if ( g2(4) .ne. 4 ) STOP 11
+if ( g2(2) .ne. 2 ) STOP 12
end
SUBROUTINE S1(I)
INTEGER, INTENT(IN) :: I
TYPE(T1) :: D(1:I)
- IF (any (D(:)%I.NE.7)) CALL ABORT()
+ IF (any (D(:)%I.NE.7)) STOP 1
END SUBROUTINE S1
END MODULE M1
USE M1
write (10,'(A)') '1\n2'
rewind (10)
read (10,'(A)') a
- if (a /= '1\n2') call abort
+ if (a /= '1\n2') STOP 1
end
write (10,'(A)') '1\n2'
rewind (10)
read (10,*,iostat=e) i
- if (e /= 0 .or. i /= 1) call abort
+ if (e /= 0 .or. i /= 1) STOP 1
read (10,*,iostat=e) i
- if (e /= 0 .or. i /= 2) call abort
+ if (e /= 0 .or. i /= 2) STOP 2
end
rewind(10)
read(10,'(A34)') str1
str2 = 'Does ' // c1 // 'ackslash result in ' // c1 // 'ackslash'
- if (str1 .ne. str2) call abort
+ if (str1 .ne. str2) STOP 1
rewind(10)
write (10, 200)
rewind(10)
read(10,'(A37)') str3
str4 = 'Does ' //c2// 'backslash result in ' //c2// 'backslash'
- if (str3 .ne. str4) call abort
+ if (str3 .ne. str4) STOP 2
stop
100 format ('Does \backslash result in \backslash')
write (20,*) 3
rewind (20)
read (20,*) i
- if (i .ne. 1) call abort
+ if (i .ne. 1) STOP 1
write (*,*) ' '
backspace (20)
read (20,*) i
- if (i .ne. 1) call abort
+ if (i .ne. 1) STOP 2
close (20)
! PR libfortran/20125
write (20,*) 7
backspace (20)
read (20,*) i
- if (i .ne. 7) call abort
+ if (i .ne. 7) STOP 3
close (20)
open (20, status='scratch', form='unformatted')
write (20) 8
backspace (20)
read (20) i
- if (i .ne. 8) call abort
+ if (i .ne. 8) STOP 4
close (20)
! PR libfortran/20471
read (3) (y(n),n=1,10)
do n = 1, 10
- if (abs(x(n)-y(n)) > 0.00001) call abort
+ if (abs(x(n)-y(n)) > 0.00001) STOP 5
end do
close (3)
nr = nr + 1
goto 20
30 continue
- if (nr .ne. 5) call abort
+ if (nr .ne. 5) STOP 6
do i = 1, nr+1
backspace (3)
do i = 1, nr
read(3,end=70,err=90) n, (x(n),n=1,10)
- if (abs(x(1) - i) .gt. 0.001) call abort
+ if (abs(x(1) - i) .gt. 0.001) STOP 7
end do
close (3)
stop
70 continue
- call abort
+ STOP 8
90 continue
- call abort
+ STOP 9
end
open (iunit, action="read", status="old")
read (iunit,'(a)',iostat=ios) line
- if (ios /= 0) call abort
+ if (ios /= 0) STOP 1
read (iunit,'(a)',iostat=ios) line
- if (ios /= 0) call abort
+ if (ios /= 0) STOP 2
read (iunit,'(a)',iostat=ios) line
- if (ios /= 0) call abort
+ if (ios /= 0) STOP 3
read (iunit,'(a)',iostat=ios) line
if (ios /= 0) backspace (iunit)
rewind (iunit)
read (iunit,'(a)',iostat=ios) line
- if (ios /= 0) call abort
+ if (ios /= 0) STOP 4
read (iunit,'(a)',iostat=ios) line
- if (ios /= 0) call abort
+ if (ios /= 0) STOP 5
read (iunit,'(a)',iostat=ios) line
- if (ios /= 0) call abort
+ if (ios /= 0) STOP 6
read (iunit,'(a)',iostat=ios) line
- if (ios /= -1) call abort
+ if (ios /= -1) STOP 7
close (iunit, status="delete")
end program gfcbug69b
!the file pointer is now at EOF
read(10,*,end=2) str
- call abort
+ STOP 1
2 backspace 10
!the file pointer is now at EOF
read(10,'(A)',end=3) str
- call abort
+ STOP 2
3 continue
end program backspace_11
rewind 11
write(11) dat
read(11,end=1008) dat
- call abort()
+ STOP 1
1008 continue
backspace 11
write(11) dat
read(11,end=1011) dat
- call abort()
+ STOP 2
1011 continue
backspace 11
backspace 11
open(unit=11,status='scratch',form='unformatted')
write(11)data
read(11,end= 1000 )data
- call abort()
+ STOP 1
1000 continue
backspace 11
backspace 11
backspace 11
read(11,end= 1001 )data
1001 continue
- if (data.ne.-1) call abort
+ if (data.ne.-1) STOP 1
close(11)
end
open(unit=11,status='scratch',form='unformatted')
write(11)data
read(11,end= 1000 )data
- call abort()
+ STOP 1
1000 continue
backspace 11
backspace 11
read(11,end= 1001 )data
1001 continue
- if (data.ne.-1) call abort
+ if (data.ne.-1) STOP 1
close(11)
end
idata( datasize) = -5
write(11)idata
read(11,end= 1000 )idata
- call abort()
+ STOP 1
1000 continue
backspace 11
backspace 11
backspace 11
read(11,end= 1001 )idata
- if(idata(1).ne.-3 .or. idata(datasize).ne.-4) call abort()
+ if(idata(1).ne.-3 .or. idata(datasize).ne.-4) STOP 2
stop
1001 continue
- call abort()
+ STOP 3
1010 stop
end
idata(datasize) = -3
write(11)idata
read(11,end= 1003 )idata
- call abort()
+ STOP 1
1003 continue
backspace 11
backspace 11
read(11,end= 1004 )idata
- if(idata(1).ne.-2 .or.idata(datasize).ne.-3) call abort()
+ if(idata(1).ne.-2 .or.idata(datasize).ne.-3) STOP 2
stop
1004 continue
end
backspace(10)
backspace(10)
read(10,*)I
- if (I.NE.199) call abort
+ if (I.NE.199) STOP 1
end
rewind (21)
read (21) i,j
read (21,err=100,end=100) i,j,k
- call abort
+ STOP 1
100 continue
backspace 21
read (21) i,j
- if (i .ne. 4711 .or. j .ne. 4712) call abort
+ if (i .ne. 4711 .or. j .ne. 4712) STOP 2
close (21,status="delete")
end
call inlist(ncards)
read(input,1000)a
- if (a.ne."Three") call abort
+ if (a.ne."Three") STOP 1
close(10,status="delete")
stop
1000 format(a10)
30 read(input,1000,end=60) data
40 kard=kard + 1
50 continue
- if ((kard .eq. 1) .and. (DATA(1) .ne. "One")) call abort
- if ((kard .eq. 2) .and. (DATA(1) .ne. "Two")) call abort
- if ((kard .eq. 3) .and. (DATA(1) .ne. "Thre")) call abort
+ if ((kard .eq. 1) .and. (DATA(1) .ne. "One")) STOP 2
+ if ((kard .eq. 2) .and. (DATA(1) .ne. "Two")) STOP 3
+ if ((kard .eq. 3) .and. (DATA(1) .ne. "Thre")) STOP 4
go to 30
60 continue
contains
subroutine check_r4 (a, b)
real(kind=4), intent(in) :: a, b
- if (abs(a - b) > 1.e-5 * abs(b)) call abort
+ if (abs(a - b) > 1.e-5 * abs(b)) STOP 1
end subroutine
subroutine check_r8 (a, b)
real(kind=8), intent(in) :: a, b
- if (abs(a - b) > 1.e-7 * abs(b)) call abort
+ if (abs(a - b) > 1.e-7 * abs(b)) STOP 2
end subroutine
end program test
integer, parameter :: kind_if_real = &
(1-is_int)*k2+is_int*kind(1.0)
complex :: z = cmplx(0,1,kind_if_real) ! FAILS
- if (kind_if_real /= kind(Qarg1)) call abort ()
+ if (kind_if_real /= kind(Qarg1)) STOP 1
end program bug3
if (any (abs (BESSEL_JN(2, 5, 2.457) - [(BESSEL_JN(i, 2.457), i = 2, 5)]) &
> epsilon(0.0))) then
print *, 'FAIL 1'
- call abort()
+ STOP 1
end if
if (any (abs (BESSEL_YN(2, 5, 2.457) - [(BESSEL_YN(i, 2.457), i = 2, 5)]) &
> epsilon(0.0)*4)) then
- call abort()
+ STOP 2
end if
if (any (abs (BESSEL_JN(0, 10, 4.457) &
- [ (BESSEL_JN(i, 4.457), i = 0, 10) ]) &
> epsilon(0.0))) then
- call abort()
+ STOP 3
end if
if (any (abs (BESSEL_YN(0, 10, 4.457) &
- [ (BESSEL_YN(i, 4.457), i = 0, 10) ]) &
> epsilon(0.0)*192)) then
- call abort()
+ STOP 4
end if
if (any (BESSEL_JN(0, 10, 0.0) /= [ (BESSEL_JN(i, 0.0), i = 0, 10) ])) &
then
- call abort()
+ STOP 5
end if
if (any (BESSEL_YN(0, 10, 0.0) /= [ (BESSEL_YN(i, 0.0), i = 0, 10) ])) &
then
- call abort()
+ STOP 6
end if
if (any (abs (BESSEL_JN(0, 10, 1.0) &
- [ (BESSEL_JN(i, 1.0), i = 0, 10) ]) &
> epsilon(0.0)*1)) then
- call abort()
+ STOP 7
end if
! Difference to mpfr_yn <= 32 epsilon
if (any (abs (BESSEL_YN(0, 10, 1.0) &
- [ (BESSEL_YN(i, 1.0), i = 0, 10) ]) &
> epsilon(0.0)*32)) then
- call abort()
+ STOP 8
end if
end
! rec(i) == lib(i), abs((rec(i)-lib(i))/rec(i)) < myeps
if (rec(i) == lib(i)) CYCLE
if (abs((rec(i)-lib(i))/rec(i)) > myeps) &
- call abort()
+ STOP 1
end do
end
! rec(i) == lib(i) .or. abs((rec(i)-lib(i))/rec(i)) < myeps
if (.not. (i > nit .or. rec(i) == lib(i) &
.or. abs((rec(i)-lib(i))/rec(i)) < myeps2)) &
- call abort ()
+ STOP 1
if (.not. (rec(i) == lib(i) .or. abs((rec(i)-lib(i))/rec(i)) < myeps)) &
- call abort ()
+ STOP 2
end do
end
integer(c_int), value :: expected_j
if (my_type%my_nested_type%i .ne. expected_i) then
- call abort ()
+ STOP 1
end if
if (.not. c_associated(my_type%my_nested_type%nested_c_address, &
expected_nested_c_address)) then
- call abort ()
+ STOP 2
end if
if (my_type%my_nested_type%array(1) .ne. expected_array_1) then
- call abort ()
+ STOP 3
end if
if (my_type%my_nested_type%array(2) .ne. expected_array_2) then
- call abort ()
+ STOP 4
end if
if (my_type%my_nested_type%array(3) .ne. expected_array_3) then
- call abort ()
+ STOP 5
end if
if (.not. c_associated(my_type%c_address, expected_c_address)) then
- call abort ()
+ STOP 6
end if
if (my_type%j .ne. expected_j) then
- call abort ()
+ STOP 7
end if
end subroutine sub0
end module bind_c_dts_2
integer(c_int), value :: expected_value
if (my_type%my_nested_type%i .ne. expected_value) then
- call abort ()
+ STOP 1
end if
end subroutine sub0
end module bind_c_dts_3
integer(c_int) :: x
x = -44
call gen(x)
- if(x /= 17) call abort()
+ if(x /= 17) STOP 1
end program main
d = 'uuuuu'
a = bar('x')
- if (a /= 'A') call abort()
+ if (a /= 'A') STOP 1
b = bar('y')
- if (b /= 'A' .or. iachar(b(2:2))/=32 .or. iachar(b(3:3))/=32) call abort()
+ if (b /= 'A' .or. iachar(b(2:2))/=32 .or. iachar(b(3:3))/=32) STOP 2
c = bar('x')
- if (any(c /= 'A')) call abort()
+ if (any(c /= 'A')) STOP 3
d = bar('y')
- if (any(d /= 'A')) call abort()
+ if (any(d /= 'A')) STOP 4
a = foo()
- if (a /= 'B') call abort()
+ if (a /= 'B') STOP 5
b = foo()
- if (b /= 'B') call abort()
+ if (b /= 'B') STOP 6
c = foo()
- if (any(c /= 'B')) call abort()
+ if (any(c /= 'B')) STOP 7
d = foo()
- if (any(d /= 'B')) call abort()
+ if (any(d /= 'B')) STOP 8
do i = 1,3
- if(iachar(d(i)(2:2)) /=32 .or. iachar(d(i)(3:3)) /= 32) call abort()
+ if(iachar(d(i)(2:2)) /=32 .or. iachar(d(i)(3:3)) /= 32) STOP 9
end do
end subroutine
str1 = 'x'
str4 = 'xyzz'
str1 = cdir()
- if(str1 /= '/') call abort()
+ if(str1 /= '/') STOP 1
str4 = cdir()
- if(str4 /= '/' .or. ichar(str4(2:2)) /= 32) call abort()
+ if(str4 /= '/' .or. ichar(str4(2:2)) /= 32) STOP 2
i = ICHAR(cdir())
- if (i /= 47) call abort()
+ if (i /= 47) STOP 3
str4 = 'xyzz'
WRITE(str4,'(a)') cdir()
- if(str4 /= '/' .or. ichar(str4(2:2)) /= 32) call abort()
+ if(str4 /= '/' .or. ichar(str4(2:2)) /= 32) STOP 4
str4 = 'xyzz'
WRITE(str4,'(i0)') ICHAR(cdir())
- if(str4 /= '47' .or. ichar(str4(3:3)) /= 32) call abort()
+ if(str4 /= '47' .or. ichar(str4(3:3)) /= 32) STOP 5
END PROGRAM
logical(c_bool), intent(in), value :: is_present
integer(c_int), intent(inout), optional :: var
if (is_present) then
- if (.not. present (var)) call abort ()
- if (var /= 43) call abort ()
+ if (.not. present (var)) STOP 1
+ if (var /= 43) STOP 2
var = -45
else
- if (present (var)) call abort ()
+ if (present (var)) STOP 3
end if
end subroutine subtest
end module m
val = 4
call c_proc (.false._c_bool)
call c_proc (.true._c_bool, val)
- if (val /= 7) call abort ()
+ if (val /= 7) STOP 4
end program test
program a
use, intrinsic :: iso_c_binding
implicit none
- if (C_NULL_CHAR /= CHAR(0) ) call abort
- if (C_ALERT /= ACHAR(7) ) call abort
- if (C_BACKSPACE /= ACHAR(8) ) call abort
- if (C_FORM_FEED /= ACHAR(12)) call abort
- if (C_NEW_LINE /= ACHAR(10)) call abort
- if (C_CARRIAGE_RETURN /= ACHAR(13)) call abort
- if (C_HORIZONTAL_TAB /= ACHAR(9) ) call abort
- if (C_VERTICAL_TAB /= ACHAR(11)) call abort
+ if (C_NULL_CHAR /= CHAR(0) ) STOP 1
+ if (C_ALERT /= ACHAR(7) ) STOP 2
+ if (C_BACKSPACE /= ACHAR(8) ) STOP 3
+ if (C_FORM_FEED /= ACHAR(12)) STOP 4
+ if (C_NEW_LINE /= ACHAR(10)) STOP 5
+ if (C_CARRIAGE_RETURN /= ACHAR(13)) STOP 6
+ if (C_HORIZONTAL_TAB /= ACHAR(9) ) STOP 7
+ if (C_VERTICAL_TAB /= ACHAR(11)) STOP 8
end program a
use n, b=>a
implicit none
print *, a, b
- if (a /= 5 .or. b /= -5) call abort()
+ if (a /= 5 .or. b /= -5) STOP 1
end program prog
!
integer function foo(x)
integer :: x
- call abort()
+ STOP 1
foo = 99
end function foo
integer function foo() bind(C, name="bar")
end function foo
end interface
- if (foo() /= 42) call abort() ! Ensure that the binding name is all what counts
+ if (foo() /= 42) STOP 2 ! Ensure that the binding name is all what counts
end program test
end interface
#define CHECK(I,J,RES) \
- if (bge(I,J) .neqv. RES) call abort ; \
- if (run_bge(I,J) .neqv. RES) call abort ; \
- if (bgt(I,J) .neqv. (RES .and. (I/=J))) call abort ; \
- if (run_bgt(I,J) .neqv. (RES .and. (I/=J))) call abort ; \
- if (ble(J,I) .neqv. RES) call abort ; \
- if (run_ble(J,I) .neqv. RES) call abort ; \
- if (blt(J,I) .neqv. (RES .and. (I/=J))) call abort ; \
- if (run_blt(J,I) .neqv. (RES .and. (I/=J))) call abort
+ if (bge(I,J) .neqv. RES) STOP 1; \
+ if (run_bge(I,J) .neqv. RES) STOP 2; \
+ if (bgt(I,J) .neqv. (RES .and. (I/=J))) STOP 3; \
+ if (run_bgt(I,J) .neqv. (RES .and. (I/=J))) STOP 4; \
+ if (ble(J,I) .neqv. RES) STOP 5; \
+ if (run_ble(J,I) .neqv. RES) STOP 6; \
+ if (blt(J,I) .neqv. (RES .and. (I/=J))) STOP 7; \
+ if (run_blt(J,I) .neqv. (RES .and. (I/=J))) STOP 8
#define T .true.
#define F .false.
! { dg-require-effective-target fortran_integer_16 }
#define CHECK(I,J,RES) \
- if (bge(I,J) .neqv. RES) call abort ; \
- if (run_bge(I,J) .neqv. RES) call abort ; \
- if (bgt(I,J) .neqv. (RES .and. (I/=J))) call abort ; \
- if (run_bgt(I,J) .neqv. (RES .and. (I/=J))) call abort ; \
- if (ble(J,I) .neqv. RES) call abort ; \
- if (run_ble(J,I) .neqv. RES) call abort ; \
- if (blt(J,I) .neqv. (RES .and. (I/=J))) call abort ; \
- if (run_blt(J,I) .neqv. (RES .and. (I/=J))) call abort
+ if (bge(I,J) .neqv. RES) STOP 1; \
+ if (run_bge(I,J) .neqv. RES) STOP 2; \
+ if (bgt(I,J) .neqv. (RES .and. (I/=J))) STOP 3; \
+ if (run_bgt(I,J) .neqv. (RES .and. (I/=J))) STOP 4; \
+ if (ble(J,I) .neqv. RES) STOP 5; \
+ if (run_ble(J,I) .neqv. RES) STOP 6; \
+ if (blt(J,I) .neqv. (RES .and. (I/=J))) STOP 7; \
+ if (run_blt(J,I) .neqv. (RES .and. (I/=J))) STOP 8
#define T .true.
#define F .false.
! { dg-do run }
-! { dg-options "-std=f2008 -fall-intrinsics" }
+! { dg-options "-std=f2008 " }
! Basic Fortran 2008 BLOCK construct test.
! Block without local variables but name.
BLOCK
- IF (i /= 42) CALL abort ()
+ IF (i /= 42) STOP 1
i = 5
END BLOCK
- IF (i /= 5) CALL abort ()
+ IF (i /= 5) STOP 2
! Named block with local variable and nested block.
myblock: BLOCK
INTEGER :: i
i = -1
BLOCK
- IF (i /= -1) CALL abort ()
+ IF (i /= -1) STOP 3
i = -2
END BLOCK
- IF (i /= -2) CALL abort ()
+ IF (i /= -2) STOP 4
END BLOCK myblock ! Matching end-label.
- IF (i /= 5) CALL abort ()
+ IF (i /= 5) STOP 5
END PROGRAM main
contains
subroutine check (arg1, arg2)
real :: arg1, arg2
- if (arg1 .ne. arg2) call abort ()
+ if (arg1 .ne. arg2) STOP 1
end subroutine
subroutine check_chr (arg1, arg2)
character(*) :: arg1, arg2
- if (len (arg1) .ne. len (arg2)) call abort
- if (arg1 .ne. arg2) call abort
+ if (len (arg1) .ne. len (arg2)) STOP 1
+ if (arg1 .ne. arg2) STOP 2
end subroutine
type(type1) function foo (arg)
end block
end block
end block
- if (s /= 9) call abort
+ if (s /= 9) STOP 1
end program main
! { dg-do run }
-! { dg-options "-std=f2008 -fall-intrinsics -fdump-tree-original" }
+! { dg-options "-std=f2008 -fdump-tree-original" }
! More sophisticated BLOCK runtime checks for correct initialization/clean-up.
myblock: BLOCK
INTEGER :: arr(n)
- IF (SIZE (arr) /= 5) CALL abort ()
+ IF (SIZE (arr) /= 5) STOP 1
BLOCK
INTEGER :: arr(2*n)
- IF (SIZE (arr) /= 10) CALL abort ()
+ IF (SIZE (arr) /= 10) STOP 2
END BLOCK
- IF (SIZE (arr) /= 5) CALL abort ()
+ IF (SIZE (arr) /= 5) STOP 3
END BLOCK myblock
BLOCK
INTEGER, ALLOCATABLE :: alloc_arr(:)
- IF (ALLOCATED (alloc_arr)) CALL abort ()
+ IF (ALLOCATED (alloc_arr)) STOP 4
ALLOCATE (alloc_arr(n))
- IF (SIZE (alloc_arr) /= 5) CALL abort ()
+ IF (SIZE (alloc_arr) /= 5) STOP 5
! Should be free'ed here (but at least somewhere), this is checked
! with pattern below.
END BLOCK
BLOCK
CHARACTER(LEN=n) :: str
- IF (LEN (str) /= 5) CALL abort ()
+ IF (LEN (str) /= 5) STOP 6
str = "123456789"
- IF (str /= "12345") CALL abort ()
+ IF (str /= "12345") STOP 7
END BLOCK
END PROGRAM main
! { dg-final { scan-tree-dump-times "free \\(\\(void \\*\\) alloc_arr\\.data" 1 "original" } }
! { dg-do run { xfail *-*-* } }
-! { dg-options "-std=f2008 -fall-intrinsics" }
+! { dg-options "-std=f2008 " }
! Check for correct scope of variables that are implicit typed within a BLOCK.
! This is not yet implemented, thus XFAIL'ed the test.
END BLOCK
! Here, we should still access the same a that was set above.
- IF (a /= 42) CALL abort ()
+ IF (a /= 42) STOP 1
END PROGRAM main
! { dg-do run }
-! { dg-options "-std=f2008 -fall-intrinsics" }
+! { dg-options "-std=f2008 " }
! Check for correct placement (on the stack) of local variables with BLOCK
! and recursive container procedures.
INTEGER :: x
x = i
IF (i > 0) CALL myproc (i - 1)
- IF (x /= i) CALL abort ()
+ IF (x /= i) STOP 1
END BLOCK
EXIT
END DO
! { dg-do run }
-! { dg-options "-std=f2008 -fall-intrinsics" }
+! { dg-options "-std=f2008 " }
! Check BLOCK with SAVE'ed variables.
BLOCK
INTEGER, SAVE :: summed = 0
summed = summed + i
- IF (i == 100 .AND. summed /= 5050) CALL abort ()
+ IF (i == 100 .AND. summed /= 5050) STOP 1
END BLOCK
END DO
END PROGRAM main
common /b/ y
common i
-if (any(x /= 1.)) call abort ()
-if (y /= 1. .or. i /= 1) call abort ()
+if (any(x /= 1.)) STOP 1
+if (y /= 1. .or. i /= 1) STOP 2
end
integer i
i = ubound(tt(1)%a, 1)
- if (i/=5) call abort()
+ if (i/=5) STOP 1
i = lbound(tt(1)%a, 1)
- if (i/=1) call abort()
+ if (i/=1) STOP 2
i = ubound(tt, 1)
- if (i/=2) call abort()
+ if (i/=2) STOP 3
i = lbound(tt, 1)
- if (i/=1) call abort()
+ if (i/=1) STOP 4
end
call jackal(-1,-8)
call jackal(-1,8)
- if (any(lbound(i(-1:1,-1:1)) /= 1)) call abort
- if (lbound(i(-1:1,-1:1), 1) /= 1) call abort
- if (lbound(i(-1:1,-1:1), 2) /= 1) call abort
+ if (any(lbound(i(-1:1,-1:1)) /= 1)) STOP 1
+ if (lbound(i(-1:1,-1:1), 1) /= 1) STOP 2
+ if (lbound(i(-1:1,-1:1), 2) /= 1) STOP 3
- if (any(ubound(i(-1:1,-1:1)) /= 3)) call abort
- if (ubound(i(-1:1,-1:1), 1) /= 3) call abort
- if (ubound(i(-1:1,-1:1), 2) /= 3) call abort
+ if (any(ubound(i(-1:1,-1:1)) /= 3)) STOP 4
+ if (ubound(i(-1:1,-1:1), 1) /= 3) STOP 5
+ if (ubound(i(-1:1,-1:1), 2) /= 3) STOP 6
- if (any(lbound(i(:,:)) /= 1)) call abort
- if (lbound(i(:,:), 1) /= 1) call abort
- if (lbound(i(:,:), 2) /= 1) call abort
+ if (any(lbound(i(:,:)) /= 1)) STOP 7
+ if (lbound(i(:,:), 1) /= 1) STOP 8
+ if (lbound(i(:,:), 2) /= 1) STOP 9
- if (any(ubound(i(:,:)) /= 3)) call abort
- if (ubound(i(:,:), 1) /= 3) call abort
- if (ubound(i(:,:), 2) /= 3) call abort
+ if (any(ubound(i(:,:)) /= 3)) STOP 10
+ if (ubound(i(:,:), 1) /= 3) STOP 11
+ if (ubound(i(:,:), 2) /= 3) STOP 12
- if (any(lbound(i(0:,-1:)) /= 1)) call abort
- if (lbound(i(0:,-1:), 1) /= 1) call abort
- if (lbound(i(0:,-1:), 2) /= 1) call abort
+ if (any(lbound(i(0:,-1:)) /= 1)) STOP 13
+ if (lbound(i(0:,-1:), 1) /= 1) STOP 14
+ if (lbound(i(0:,-1:), 2) /= 1) STOP 15
- if (any(ubound(i(0:,-1:)) /= [2,3])) call abort
- if (ubound(i(0:,-1:), 1) /= 2) call abort
- if (ubound(i(0:,-1:), 2) /= 3) call abort
+ if (any(ubound(i(0:,-1:)) /= [2,3])) STOP 16
+ if (ubound(i(0:,-1:), 1) /= 2) STOP 17
+ if (ubound(i(0:,-1:), 2) /= 3) STOP 18
- if (any(lbound(i(:0,:0)) /= 1)) call abort
- if (lbound(i(:0,:0), 1) /= 1) call abort
- if (lbound(i(:0,:0), 2) /= 1) call abort
+ if (any(lbound(i(:0,:0)) /= 1)) STOP 19
+ if (lbound(i(:0,:0), 1) /= 1) STOP 20
+ if (lbound(i(:0,:0), 2) /= 1) STOP 21
- if (any(ubound(i(:0,:0)) /= 2)) call abort
- if (ubound(i(:0,:0), 1) /= 2) call abort
- if (ubound(i(:0,:0), 2) /= 2) call abort
+ if (any(ubound(i(:0,:0)) /= 2)) STOP 22
+ if (ubound(i(:0,:0), 1) /= 2) STOP 23
+ if (ubound(i(:0,:0), 2) /= 2) STOP 24
- if (any(lbound(transpose(i)) /= 1)) call abort
- if (lbound(transpose(i), 1) /= 1) call abort
- if (lbound(transpose(i), 2) /= 1) call abort
+ if (any(lbound(transpose(i)) /= 1)) STOP 25
+ if (lbound(transpose(i), 1) /= 1) STOP 26
+ if (lbound(transpose(i), 2) /= 1) STOP 27
- if (any(ubound(transpose(i)) /= 3)) call abort
- if (ubound(transpose(i), 1) /= 3) call abort
- if (ubound(transpose(i), 2) /= 3) call abort
+ if (any(ubound(transpose(i)) /= 3)) STOP 28
+ if (ubound(transpose(i), 1) /= 3) STOP 29
+ if (ubound(transpose(i), 2) /= 3) STOP 30
- if (any(lbound(reshape(i,[2,2])) /= 1)) call abort
- if (lbound(reshape(i,[2,2]), 1) /= 1) call abort
- if (lbound(reshape(i,[2,2]), 2) /= 1) call abort
+ if (any(lbound(reshape(i,[2,2])) /= 1)) STOP 31
+ if (lbound(reshape(i,[2,2]), 1) /= 1) STOP 32
+ if (lbound(reshape(i,[2,2]), 2) /= 1) STOP 33
- if (any(ubound(reshape(i,[2,2])) /= 2)) call abort
- if (ubound(reshape(i,[2,2]), 1) /= 2) call abort
- if (ubound(reshape(i,[2,2]), 2) /= 2) call abort
+ if (any(ubound(reshape(i,[2,2])) /= 2)) STOP 34
+ if (ubound(reshape(i,[2,2]), 1) /= 2) STOP 35
+ if (ubound(reshape(i,[2,2]), 2) /= 2) STOP 36
- if (any(lbound(cshift(i,-1)) /= 1)) call abort
- if (lbound(cshift(i,-1), 1) /= 1) call abort
- if (lbound(cshift(i,-1), 2) /= 1) call abort
+ if (any(lbound(cshift(i,-1)) /= 1)) STOP 37
+ if (lbound(cshift(i,-1), 1) /= 1) STOP 38
+ if (lbound(cshift(i,-1), 2) /= 1) STOP 39
- if (any(ubound(cshift(i,-1)) /= 3)) call abort
- if (ubound(cshift(i,-1), 1) /= 3) call abort
- if (ubound(cshift(i,-1), 2) /= 3) call abort
+ if (any(ubound(cshift(i,-1)) /= 3)) STOP 40
+ if (ubound(cshift(i,-1), 1) /= 3) STOP 41
+ if (ubound(cshift(i,-1), 2) /= 3) STOP 42
- if (any(lbound(eoshift(i,-1)) /= 1)) call abort
- if (lbound(eoshift(i,-1), 1) /= 1) call abort
- if (lbound(eoshift(i,-1), 2) /= 1) call abort
+ if (any(lbound(eoshift(i,-1)) /= 1)) STOP 43
+ if (lbound(eoshift(i,-1), 1) /= 1) STOP 44
+ if (lbound(eoshift(i,-1), 2) /= 1) STOP 45
- if (any(ubound(eoshift(i,-1)) /= 3)) call abort
- if (ubound(eoshift(i,-1), 1) /= 3) call abort
- if (ubound(eoshift(i,-1), 2) /= 3) call abort
+ if (any(ubound(eoshift(i,-1)) /= 3)) STOP 46
+ if (ubound(eoshift(i,-1), 1) /= 3) STOP 47
+ if (ubound(eoshift(i,-1), 2) /= 3) STOP 48
- if (any(lbound(spread(i,1,2)) /= 1)) call abort
- if (lbound(spread(i,1,2), 1) /= 1) call abort
- if (lbound(spread(i,1,2), 2) /= 1) call abort
+ if (any(lbound(spread(i,1,2)) /= 1)) STOP 49
+ if (lbound(spread(i,1,2), 1) /= 1) STOP 50
+ if (lbound(spread(i,1,2), 2) /= 1) STOP 51
- if (any(ubound(spread(i,1,2)) /= [2,3,3])) call abort
- if (ubound(spread(i,1,2), 1) /= 2) call abort
- if (ubound(spread(i,1,2), 2) /= 3) call abort
- if (ubound(spread(i,1,2), 3) /= 3) call abort
+ if (any(ubound(spread(i,1,2)) /= [2,3,3])) STOP 52
+ if (ubound(spread(i,1,2), 1) /= 2) STOP 53
+ if (ubound(spread(i,1,2), 2) /= 3) STOP 54
+ if (ubound(spread(i,1,2), 3) /= 3) STOP 55
- if (any(lbound(maxloc(i)) /= 1)) call abort
- if (lbound(maxloc(i), 1) /= 1) call abort
+ if (any(lbound(maxloc(i)) /= 1)) STOP 56
+ if (lbound(maxloc(i), 1) /= 1) STOP 57
- if (any(ubound(maxloc(i)) /= 2)) call abort
- if (ubound(maxloc(i), 1) /= 2) call abort
+ if (any(ubound(maxloc(i)) /= 2)) STOP 58
+ if (ubound(maxloc(i), 1) /= 2) STOP 59
- if (any(lbound(minloc(i)) /= 1)) call abort
- if (lbound(minloc(i), 1) /= 1) call abort
+ if (any(lbound(minloc(i)) /= 1)) STOP 60
+ if (lbound(minloc(i), 1) /= 1) STOP 61
- if (any(ubound(minloc(i)) /= 2)) call abort
- if (ubound(minloc(i), 1) /= 2) call abort
+ if (any(ubound(minloc(i)) /= 2)) STOP 62
+ if (ubound(minloc(i), 1) /= 2) STOP 63
- if (any(lbound(maxval(i,2)) /= 1)) call abort
- if (lbound(maxval(i,2), 1) /= 1) call abort
+ if (any(lbound(maxval(i,2)) /= 1)) STOP 64
+ if (lbound(maxval(i,2), 1) /= 1) STOP 65
- if (any(ubound(maxval(i,2)) /= 3)) call abort
- if (ubound(maxval(i,2), 1) /= 3) call abort
+ if (any(ubound(maxval(i,2)) /= 3)) STOP 66
+ if (ubound(maxval(i,2), 1) /= 3) STOP 67
- if (any(lbound(minval(i,2)) /= 1)) call abort
- if (lbound(minval(i,2), 1) /= 1) call abort
+ if (any(lbound(minval(i,2)) /= 1)) STOP 68
+ if (lbound(minval(i,2), 1) /= 1) STOP 69
- if (any(ubound(minval(i,2)) /= 3)) call abort
- if (ubound(minval(i,2), 1) /= 3) call abort
+ if (any(ubound(minval(i,2)) /= 3)) STOP 70
+ if (ubound(minval(i,2), 1) /= 3) STOP 71
- if (any(lbound(any(i==1,2)) /= 1)) call abort
- if (lbound(any(i==1,2), 1) /= 1) call abort
+ if (any(lbound(any(i==1,2)) /= 1)) STOP 72
+ if (lbound(any(i==1,2), 1) /= 1) STOP 73
- if (any(ubound(any(i==1,2)) /= 3)) call abort
- if (ubound(any(i==1,2), 1) /= 3) call abort
+ if (any(ubound(any(i==1,2)) /= 3)) STOP 74
+ if (ubound(any(i==1,2), 1) /= 3) STOP 75
- if (any(lbound(count(i==1,2)) /= 1)) call abort
- if (lbound(count(i==1,2), 1) /= 1) call abort
+ if (any(lbound(count(i==1,2)) /= 1)) STOP 76
+ if (lbound(count(i==1,2), 1) /= 1) STOP 77
- if (any(ubound(count(i==1,2)) /= 3)) call abort
- if (ubound(count(i==1,2), 1) /= 3) call abort
+ if (any(ubound(count(i==1,2)) /= 3)) STOP 78
+ if (ubound(count(i==1,2), 1) /= 3) STOP 79
- if (any(lbound(merge(i,i,.true.)) /= 1)) call abort
- if (lbound(merge(i,i,.true.), 1) /= 1) call abort
- if (lbound(merge(i,i,.true.), 2) /= 1) call abort
+ if (any(lbound(merge(i,i,.true.)) /= 1)) STOP 80
+ if (lbound(merge(i,i,.true.), 1) /= 1) STOP 81
+ if (lbound(merge(i,i,.true.), 2) /= 1) STOP 82
- if (any(ubound(merge(i,i,.true.)) /= 3)) call abort
- if (ubound(merge(i,i,.true.), 1) /= 3) call abort
- if (ubound(merge(i,i,.true.), 2) /= 3) call abort
+ if (any(ubound(merge(i,i,.true.)) /= 3)) STOP 83
+ if (ubound(merge(i,i,.true.), 1) /= 3) STOP 84
+ if (ubound(merge(i,i,.true.), 2) /= 3) STOP 85
- if (any(lbound(lbound(i)) /= 1)) call abort
- if (lbound(lbound(i), 1) /= 1) call abort
+ if (any(lbound(lbound(i)) /= 1)) STOP 86
+ if (lbound(lbound(i), 1) /= 1) STOP 87
- if (any(ubound(lbound(i)) /= 2)) call abort
- if (ubound(lbound(i), 1) /= 2) call abort
+ if (any(ubound(lbound(i)) /= 2)) STOP 88
+ if (ubound(lbound(i), 1) /= 2) STOP 89
- if (any(lbound(ubound(i)) /= 1)) call abort
- if (lbound(ubound(i), 1) /= 1) call abort
+ if (any(lbound(ubound(i)) /= 1)) STOP 90
+ if (lbound(ubound(i), 1) /= 1) STOP 91
- if (any(ubound(ubound(i)) /= 2)) call abort
- if (ubound(ubound(i), 1) /= 2) call abort
+ if (any(ubound(ubound(i)) /= 2)) STOP 92
+ if (ubound(ubound(i), 1) /= 2) STOP 93
- if (any(lbound(shape(i)) /= 1)) call abort
- if (lbound(shape(i), 1) /= 1) call abort
+ if (any(lbound(shape(i)) /= 1)) STOP 94
+ if (lbound(shape(i), 1) /= 1) STOP 95
- if (any(ubound(shape(i)) /= 2)) call abort
- if (ubound(shape(i), 1) /= 2) call abort
+ if (any(ubound(shape(i)) /= 2)) STOP 96
+ if (ubound(shape(i), 1) /= 2) STOP 97
- if (any(lbound(product(i,2)) /= 1)) call abort
- if (any(ubound(product(i,2)) /= 3)) call abort
- if (any(lbound(sum(i,2)) /= 1)) call abort
- if (any(ubound(sum(i,2)) /= 3)) call abort
- if (any(lbound(matmul(i,i)) /= 1)) call abort
- if (any(ubound(matmul(i,i)) /= 3)) call abort
- if (any(lbound(pack(i,.true.)) /= 1)) call abort
- if (any(ubound(pack(i,.true.)) /= 9)) call abort
- if (any(lbound(unpack(j,[.true.],[2])) /= 1)) call abort
- if (any(ubound(unpack(j,[.true.],[2])) /= 1)) call abort
+ if (any(lbound(product(i,2)) /= 1)) STOP 98
+ if (any(ubound(product(i,2)) /= 3)) STOP 99
+ if (any(lbound(sum(i,2)) /= 1)) STOP 100
+ if (any(ubound(sum(i,2)) /= 3)) STOP 101
+ if (any(lbound(matmul(i,i)) /= 1)) STOP 102
+ if (any(ubound(matmul(i,i)) /= 3)) STOP 103
+ if (any(lbound(pack(i,.true.)) /= 1)) STOP 104
+ if (any(ubound(pack(i,.true.)) /= 9)) STOP 105
+ if (any(lbound(unpack(j,[.true.],[2])) /= 1)) STOP 106
+ if (any(ubound(unpack(j,[.true.],[2])) /= 1)) STOP 107
call sub1(i,3)
call sub1(reshape([7,9,4,6,7,9],[3,2]),3)
subroutine sub1(a,n)
integer :: n, a(2:n+1,4:*)
- if (any([lbound(a,1), lbound(a,2)] /= [2, 4])) call abort
- if (any(lbound(a) /= [2, 4])) call abort
+ if (any([lbound(a,1), lbound(a,2)] /= [2, 4])) STOP 108
+ if (any(lbound(a) /= [2, 4])) STOP 109
end subroutine sub1
subroutine sub2
integer :: x(3:2, 1:2)
- if (size(x) /= 0) call abort
- if (lbound (x, 1) /= 1 .or. lbound(x, 2) /= 1) call abort
- if (any (lbound (x) /= [1, 1])) call abort
- if (ubound (x, 1) /= 0 .or. ubound(x, 2) /= 2) call abort
- if (any (ubound (x) /= [0, 2])) call abort
+ if (size(x) /= 0) STOP 110
+ if (lbound (x, 1) /= 1 .or. lbound(x, 2) /= 1) STOP 111
+ if (any (lbound (x) /= [1, 1])) STOP 112
+ if (ubound (x, 1) /= 0 .or. ubound(x, 2) /= 2) STOP 113
+ if (any (ubound (x) /= [0, 2])) STOP 114
end subroutine sub2
subroutine sub3
integer :: x(4:5, 1:2)
- if (size(x) /= 0) call abort
- if (lbound (x, 1) /= 4 .or. lbound(x, 2) /= 1) call abort
- if (any (lbound (x) /= [4, 1])) call abort
- if (ubound (x, 1) /= 4 .or. ubound(x, 2) /= 2) call abort
- if (any (ubound (x) /= [4, 2])) call abort
+ if (size(x) /= 0) STOP 115
+ if (lbound (x, 1) /= 4 .or. lbound(x, 2) /= 1) STOP 116
+ if (any (lbound (x) /= [4, 1])) STOP 117
+ if (ubound (x, 1) /= 4 .or. ubound(x, 2) /= 2) STOP 118
+ if (any (ubound (x) /= [4, 2])) STOP 119
end subroutine sub3
subroutine foo (x,n)
integer :: n
integer :: x(7,n,2,*)
- if (ubound(x,1) /= 7 .or. ubound(x,2) /= 4 .or. ubound(x,3) /= 2) call abort
+ if (ubound(x,1) /= 7 .or. ubound(x,2) /= 4 .or. ubound(x,3) /= 2) STOP 120
end subroutine foo
subroutine jackal (b, c)
integer :: soda(b:c, 3:4)
if (b > c) then
- if (size(soda) /= 0) call abort
- if (lbound (soda, 1) /= 1 .or. ubound (soda, 1) /= 0) call abort
+ if (size(soda) /= 0) STOP 121
+ if (lbound (soda, 1) /= 1 .or. ubound (soda, 1) /= 0) STOP 122
else
- if (size(soda) /= 2*(c-b+1)) call abort
- if (lbound (soda, 1) /= b .or. ubound (soda, 1) /= c) call abort
+ if (size(soda) /= 2*(c-b+1)) STOP 123
+ if (lbound (soda, 1) /= b .or. ubound (soda, 1) /= c) STOP 124
end if
- if (lbound (soda, 2) /= 3 .or. ubound (soda, 2) /= 4) call abort
- if (any (lbound (soda) /= [lbound(soda,1), lbound(soda,2)])) call abort
- if (any (ubound (soda) /= [ubound(soda,1), ubound(soda,2)])) call abort
+ if (lbound (soda, 2) /= 3 .or. ubound (soda, 2) /= 4) STOP 125
+ if (any (lbound (soda) /= [lbound(soda,1), lbound(soda,2)])) STOP 126
+ if (any (ubound (soda) /= [ubound(soda,1), ubound(soda,2)])) STOP 127
end subroutine jackal
implicit none
integer n, m
real x(10)
- if (any (lbound(x(5:n)) /= 1)) call abort
- if (lbound(x(5:n),1) /= 1) call abort
- if (any (ubound(x(5:n)) /= m)) call abort
- if (ubound(x(5:n),1) /= m) call abort
+ if (any (lbound(x(5:n)) /= 1)) STOP 1
+ if (lbound(x(5:n),1) /= 1) STOP 2
+ if (any (ubound(x(5:n)) /= m)) STOP 3
+ if (ubound(x(5:n),1) /= m) STOP 4
end subroutine
end program
integer x(20)
integer, volatile :: n
n = 1
- if (size(x(n:2:-3)) /= 0) call abort
+ if (size(x(n:2:-3)) /= 0) STOP 1
call ha0020(-3)
call ha0020(-1)
xca(1:2:-1) = xda(1:2:mf3)
- if (any (xca /= 1)) call abort
- if (any(xda(1:2:mf3) /= xda(1:0))) call abort
- if (size(xda(1:2:mf3)) /= 0) call abort
- if (any(shape(xda(1:2:mf3)) /= 0)) call abort
- if (any(ubound(xda(1:2:mf3)) /= 0)) call abort
- if (ubound(xda(1:2:mf3),1) /= 0) call abort
- if (lbound(xda(1:2:mf3),1) /= 1) call abort
+ if (any (xca /= 1)) STOP 2
+ if (any(xda(1:2:mf3) /= xda(1:0))) STOP 3
+ if (size(xda(1:2:mf3)) /= 0) STOP 4
+ if (any(shape(xda(1:2:mf3)) /= 0)) STOP 5
+ if (any(ubound(xda(1:2:mf3)) /= 0)) STOP 6
+ if (ubound(xda(1:2:mf3),1) /= 0) STOP 7
+ if (lbound(xda(1:2:mf3),1) /= 1) STOP 8
end subroutine
integer ida(2)
ida = lbound(a)
- if (any(ida /= (/0,2/))) call abort
+ if (any(ida /= (/0,2/))) STOP 1
ida = lbound(a%i)
- if (any(ida /= (/1,1/))) call abort
+ if (any(ida /= (/1,1/))) STOP 2
ida = ubound(a)
- if (any(ida /= (/5,8/))) call abort
+ if (any(ida /= (/5,8/))) STOP 3
ida = ubound(a%i)
- if (any(ida /= (/6,7/))) call abort
+ if (any(ida /= (/6,7/))) STOP 4
end
integer, intent(in) :: array1(:,:), array2(:,:)\r
integer :: j\r
do j = 1, ubound(array2,2)\r
- if (any (array1(:,j) .ne. array2(:,4-j))) call abort\r
+ if (any (array1(:,j) .ne. array2(:,4-j))) STOP 1
end do\r
end subroutine\r
end \r
TARGET DDA\r
DLA => DDA(2:3, 1:3:2, 5:4:-1, NF2, NF5:NF2:MF2)\r
IDA = UBOUND(DLA)\r
- if (any(ida /= 2)) call abort\r
+ if (any(ida /= 2)) STOP 1
DLA => DDA(2:3, 1:3:2, 5:4:-1, 2, 5:2:-2)\r
IDA = UBOUND(DLA)\r
- if (any(ida /= 2)) call abort\r
+ if (any(ida /= 2)) STOP 1
!\r
! These worked.\r
!\r
DLA => DDA(2:3, 1:3:2, 5:4:-1, 2, 5:2:-2)\r
IDA = shape(DLA)\r
- if (any(ida /= 2)) call abort\r
+ if (any(ida /= 2)) STOP 1
DLA => DDA(2:3, 1:3:2, 5:4:-1, 2, 5:2:-2)\r
IDA = LBOUND(DLA)\r
- if (any(ida /= 1)) call abort\r
+ if (any(ida /= 1)) STOP 1
END SUBROUTINE\r
\r
subroutine mikael\r
subroutine test (a, b, expect)\r
integer :: a, b, expect\r
integer :: c(a:b)\r
- if (ubound (c, 1) .ne. expect) call abort\r
+ if (ubound (c, 1) .ne. expect) STOP 1
end subroutine test\r
end subroutine\r
call jackal(-1,-8)
call jackal(-1,8)
- if (any(lbound(i(-1:1,-1:1)) /= 1)) call abort
- if (lbound(i(-1:1,-1:1), 1) /= 1) call abort
- if (lbound(i(-1:1,-1:1), 2) /= 1) call abort
+ if (any(lbound(i(-1:1,-1:1)) /= 1)) STOP 1
+ if (lbound(i(-1:1,-1:1), 1) /= 1) STOP 2
+ if (lbound(i(-1:1,-1:1), 2) /= 1) STOP 3
- if (any(ubound(i(-1:1,-1:1)) /= 3)) call abort
- if (ubound(i(-1:1,-1:1), 1) /= 3) call abort
- if (ubound(i(-1:1,-1:1), 2) /= 3) call abort
+ if (any(ubound(i(-1:1,-1:1)) /= 3)) STOP 4
+ if (ubound(i(-1:1,-1:1), 1) /= 3) STOP 5
+ if (ubound(i(-1:1,-1:1), 2) /= 3) STOP 6
- if (any(lbound(i(:,:)) /= 1)) call abort
- if (lbound(i(:,:), 1) /= 1) call abort
- if (lbound(i(:,:), 2) /= 1) call abort
+ if (any(lbound(i(:,:)) /= 1)) STOP 7
+ if (lbound(i(:,:), 1) /= 1) STOP 8
+ if (lbound(i(:,:), 2) /= 1) STOP 9
- if (any(ubound(i(:,:)) /= 3)) call abort
- if (ubound(i(:,:), 1) /= 3) call abort
- if (ubound(i(:,:), 2) /= 3) call abort
+ if (any(ubound(i(:,:)) /= 3)) STOP 10
+ if (ubound(i(:,:), 1) /= 3) STOP 11
+ if (ubound(i(:,:), 2) /= 3) STOP 12
- if (any(lbound(i(0:,-1:)) /= 1)) call abort
- if (lbound(i(0:,-1:), 1) /= 1) call abort
- if (lbound(i(0:,-1:), 2) /= 1) call abort
+ if (any(lbound(i(0:,-1:)) /= 1)) STOP 13
+ if (lbound(i(0:,-1:), 1) /= 1) STOP 14
+ if (lbound(i(0:,-1:), 2) /= 1) STOP 15
- if (any(ubound(i(0:,-1:)) /= [2,3])) call abort
- if (ubound(i(0:,-1:), 1) /= 2) call abort
- if (ubound(i(0:,-1:), 2) /= 3) call abort
+ if (any(ubound(i(0:,-1:)) /= [2,3])) STOP 16
+ if (ubound(i(0:,-1:), 1) /= 2) STOP 17
+ if (ubound(i(0:,-1:), 2) /= 3) STOP 18
- if (any(lbound(i(:0,:0)) /= 1)) call abort
- if (lbound(i(:0,:0), 1) /= 1) call abort
- if (lbound(i(:0,:0), 2) /= 1) call abort
+ if (any(lbound(i(:0,:0)) /= 1)) STOP 19
+ if (lbound(i(:0,:0), 1) /= 1) STOP 20
+ if (lbound(i(:0,:0), 2) /= 1) STOP 21
- if (any(ubound(i(:0,:0)) /= 2)) call abort
- if (ubound(i(:0,:0), 1) /= 2) call abort
- if (ubound(i(:0,:0), 2) /= 2) call abort
+ if (any(ubound(i(:0,:0)) /= 2)) STOP 22
+ if (ubound(i(:0,:0), 1) /= 2) STOP 23
+ if (ubound(i(:0,:0), 2) /= 2) STOP 24
- if (any(lbound(transpose(i)) /= 1)) call abort
- if (lbound(transpose(i), 1) /= 1) call abort
- if (lbound(transpose(i), 2) /= 1) call abort
+ if (any(lbound(transpose(i)) /= 1)) STOP 25
+ if (lbound(transpose(i), 1) /= 1) STOP 26
+ if (lbound(transpose(i), 2) /= 1) STOP 27
- if (any(ubound(transpose(i)) /= 3)) call abort
- if (ubound(transpose(i), 1) /= 3) call abort
- if (ubound(transpose(i), 2) /= 3) call abort
+ if (any(ubound(transpose(i)) /= 3)) STOP 28
+ if (ubound(transpose(i), 1) /= 3) STOP 29
+ if (ubound(transpose(i), 2) /= 3) STOP 30
- if (any(lbound(reshape(i,[2,2])) /= 1)) call abort
- if (lbound(reshape(i,[2,2]), 1) /= 1) call abort
- if (lbound(reshape(i,[2,2]), 2) /= 1) call abort
+ if (any(lbound(reshape(i,[2,2])) /= 1)) STOP 31
+ if (lbound(reshape(i,[2,2]), 1) /= 1) STOP 32
+ if (lbound(reshape(i,[2,2]), 2) /= 1) STOP 33
- if (any(ubound(reshape(i,[2,2])) /= 2)) call abort
- if (ubound(reshape(i,[2,2]), 1) /= 2) call abort
- if (ubound(reshape(i,[2,2]), 2) /= 2) call abort
+ if (any(ubound(reshape(i,[2,2])) /= 2)) STOP 34
+ if (ubound(reshape(i,[2,2]), 1) /= 2) STOP 35
+ if (ubound(reshape(i,[2,2]), 2) /= 2) STOP 36
- if (any(lbound(cshift(i,-1)) /= 1)) call abort
- if (lbound(cshift(i,-1), 1) /= 1) call abort
- if (lbound(cshift(i,-1), 2) /= 1) call abort
+ if (any(lbound(cshift(i,-1)) /= 1)) STOP 37
+ if (lbound(cshift(i,-1), 1) /= 1) STOP 38
+ if (lbound(cshift(i,-1), 2) /= 1) STOP 39
- if (any(ubound(cshift(i,-1)) /= 3)) call abort
- if (ubound(cshift(i,-1), 1) /= 3) call abort
- if (ubound(cshift(i,-1), 2) /= 3) call abort
+ if (any(ubound(cshift(i,-1)) /= 3)) STOP 40
+ if (ubound(cshift(i,-1), 1) /= 3) STOP 41
+ if (ubound(cshift(i,-1), 2) /= 3) STOP 42
- if (any(lbound(eoshift(i,-1)) /= 1)) call abort
- if (lbound(eoshift(i,-1), 1) /= 1) call abort
- if (lbound(eoshift(i,-1), 2) /= 1) call abort
+ if (any(lbound(eoshift(i,-1)) /= 1)) STOP 43
+ if (lbound(eoshift(i,-1), 1) /= 1) STOP 44
+ if (lbound(eoshift(i,-1), 2) /= 1) STOP 45
- if (any(ubound(eoshift(i,-1)) /= 3)) call abort
- if (ubound(eoshift(i,-1), 1) /= 3) call abort
- if (ubound(eoshift(i,-1), 2) /= 3) call abort
+ if (any(ubound(eoshift(i,-1)) /= 3)) STOP 46
+ if (ubound(eoshift(i,-1), 1) /= 3) STOP 47
+ if (ubound(eoshift(i,-1), 2) /= 3) STOP 48
- if (any(lbound(spread(i,1,2)) /= 1)) call abort
- if (lbound(spread(i,1,2), 1) /= 1) call abort
- if (lbound(spread(i,1,2), 2) /= 1) call abort
+ if (any(lbound(spread(i,1,2)) /= 1)) STOP 49
+ if (lbound(spread(i,1,2), 1) /= 1) STOP 50
+ if (lbound(spread(i,1,2), 2) /= 1) STOP 51
- if (any(ubound(spread(i,1,2)) /= [2,3,3])) call abort
- if (ubound(spread(i,1,2), 1) /= 2) call abort
- if (ubound(spread(i,1,2), 2) /= 3) call abort
- if (ubound(spread(i,1,2), 3) /= 3) call abort
+ if (any(ubound(spread(i,1,2)) /= [2,3,3])) STOP 52
+ if (ubound(spread(i,1,2), 1) /= 2) STOP 53
+ if (ubound(spread(i,1,2), 2) /= 3) STOP 54
+ if (ubound(spread(i,1,2), 3) /= 3) STOP 55
- if (any(lbound(maxloc(i)) /= 1)) call abort
- if (lbound(maxloc(i), 1) /= 1) call abort
+ if (any(lbound(maxloc(i)) /= 1)) STOP 56
+ if (lbound(maxloc(i), 1) /= 1) STOP 57
- if (any(ubound(maxloc(i)) /= 2)) call abort
- if (ubound(maxloc(i), 1) /= 2) call abort
+ if (any(ubound(maxloc(i)) /= 2)) STOP 58
+ if (ubound(maxloc(i), 1) /= 2) STOP 59
- if (any(lbound(minloc(i)) /= 1)) call abort
- if (lbound(minloc(i), 1) /= 1) call abort
+ if (any(lbound(minloc(i)) /= 1)) STOP 60
+ if (lbound(minloc(i), 1) /= 1) STOP 61
- if (any(ubound(minloc(i)) /= 2)) call abort
- if (ubound(minloc(i), 1) /= 2) call abort
+ if (any(ubound(minloc(i)) /= 2)) STOP 62
+ if (ubound(minloc(i), 1) /= 2) STOP 63
- if (any(lbound(maxval(i,2)) /= 1)) call abort
- if (lbound(maxval(i,2), 1) /= 1) call abort
+ if (any(lbound(maxval(i,2)) /= 1)) STOP 64
+ if (lbound(maxval(i,2), 1) /= 1) STOP 65
- if (any(ubound(maxval(i,2)) /= 3)) call abort
- if (ubound(maxval(i,2), 1) /= 3) call abort
+ if (any(ubound(maxval(i,2)) /= 3)) STOP 66
+ if (ubound(maxval(i,2), 1) /= 3) STOP 67
- if (any(lbound(minval(i,2)) /= 1)) call abort
- if (lbound(minval(i,2), 1) /= 1) call abort
+ if (any(lbound(minval(i,2)) /= 1)) STOP 68
+ if (lbound(minval(i,2), 1) /= 1) STOP 69
- if (any(ubound(minval(i,2)) /= 3)) call abort
- if (ubound(minval(i,2), 1) /= 3) call abort
+ if (any(ubound(minval(i,2)) /= 3)) STOP 70
+ if (ubound(minval(i,2), 1) /= 3) STOP 71
- if (any(lbound(any(i==1,2)) /= 1)) call abort
- if (lbound(any(i==1,2), 1) /= 1) call abort
+ if (any(lbound(any(i==1,2)) /= 1)) STOP 72
+ if (lbound(any(i==1,2), 1) /= 1) STOP 73
- if (any(ubound(any(i==1,2)) /= 3)) call abort
- if (ubound(any(i==1,2), 1) /= 3) call abort
+ if (any(ubound(any(i==1,2)) /= 3)) STOP 74
+ if (ubound(any(i==1,2), 1) /= 3) STOP 75
- if (any(lbound(count(i==1,2)) /= 1)) call abort
- if (lbound(count(i==1,2), 1) /= 1) call abort
+ if (any(lbound(count(i==1,2)) /= 1)) STOP 76
+ if (lbound(count(i==1,2), 1) /= 1) STOP 77
- if (any(ubound(count(i==1,2)) /= 3)) call abort
- if (ubound(count(i==1,2), 1) /= 3) call abort
+ if (any(ubound(count(i==1,2)) /= 3)) STOP 78
+ if (ubound(count(i==1,2), 1) /= 3) STOP 79
- if (any(lbound(merge(i,i,.true.)) /= 1)) call abort
- if (lbound(merge(i,i,.true.), 1) /= 1) call abort
- if (lbound(merge(i,i,.true.), 2) /= 1) call abort
+ if (any(lbound(merge(i,i,.true.)) /= 1)) STOP 80
+ if (lbound(merge(i,i,.true.), 1) /= 1) STOP 81
+ if (lbound(merge(i,i,.true.), 2) /= 1) STOP 82
- if (any(ubound(merge(i,i,.true.)) /= 3)) call abort
- if (ubound(merge(i,i,.true.), 1) /= 3) call abort
- if (ubound(merge(i,i,.true.), 2) /= 3) call abort
+ if (any(ubound(merge(i,i,.true.)) /= 3)) STOP 83
+ if (ubound(merge(i,i,.true.), 1) /= 3) STOP 84
+ if (ubound(merge(i,i,.true.), 2) /= 3) STOP 85
- if (any(lbound(lbound(i)) /= 1)) call abort
- if (lbound(lbound(i), 1) /= 1) call abort
+ if (any(lbound(lbound(i)) /= 1)) STOP 86
+ if (lbound(lbound(i), 1) /= 1) STOP 87
- if (any(ubound(lbound(i)) /= 2)) call abort
- if (ubound(lbound(i), 1) /= 2) call abort
+ if (any(ubound(lbound(i)) /= 2)) STOP 88
+ if (ubound(lbound(i), 1) /= 2) STOP 89
- if (any(lbound(ubound(i)) /= 1)) call abort
- if (lbound(ubound(i), 1) /= 1) call abort
+ if (any(lbound(ubound(i)) /= 1)) STOP 90
+ if (lbound(ubound(i), 1) /= 1) STOP 91
- if (any(ubound(ubound(i)) /= 2)) call abort
- if (ubound(ubound(i), 1) /= 2) call abort
+ if (any(ubound(ubound(i)) /= 2)) STOP 92
+ if (ubound(ubound(i), 1) /= 2) STOP 93
- if (any(lbound(shape(i)) /= 1)) call abort
- if (lbound(shape(i), 1) /= 1) call abort
+ if (any(lbound(shape(i)) /= 1)) STOP 94
+ if (lbound(shape(i), 1) /= 1) STOP 95
- if (any(ubound(shape(i)) /= 2)) call abort
- if (ubound(shape(i), 1) /= 2) call abort
+ if (any(ubound(shape(i)) /= 2)) STOP 96
+ if (ubound(shape(i), 1) /= 2) STOP 97
- if (any(lbound(product(i,2)) /= 1)) call abort
- if (any(ubound(product(i,2)) /= 3)) call abort
- if (any(lbound(sum(i,2)) /= 1)) call abort
- if (any(ubound(sum(i,2)) /= 3)) call abort
- if (any(lbound(matmul(i,i)) /= 1)) call abort
- if (any(ubound(matmul(i,i)) /= 3)) call abort
- if (any(lbound(pack(i,.true.)) /= 1)) call abort
- if (any(ubound(pack(i,.true.)) /= 9)) call abort
- if (any(lbound(unpack(j,[.true.],[2])) /= 1)) call abort
- if (any(ubound(unpack(j,[.true.],[2])) /= 1)) call abort
+ if (any(lbound(product(i,2)) /= 1)) STOP 98
+ if (any(ubound(product(i,2)) /= 3)) STOP 99
+ if (any(lbound(sum(i,2)) /= 1)) STOP 100
+ if (any(ubound(sum(i,2)) /= 3)) STOP 101
+ if (any(lbound(matmul(i,i)) /= 1)) STOP 102
+ if (any(ubound(matmul(i,i)) /= 3)) STOP 103
+ if (any(lbound(pack(i,.true.)) /= 1)) STOP 104
+ if (any(ubound(pack(i,.true.)) /= 9)) STOP 105
+ if (any(lbound(unpack(j,[.true.],[2])) /= 1)) STOP 106
+ if (any(ubound(unpack(j,[.true.],[2])) /= 1)) STOP 107
call sub1(i,3)
call sub1(reshape([7,9,4,6,7,9],[3,2]),3)
subroutine sub1(a,n)
integer :: n, a(2:n+1,4:*)
- if (any([lbound(a,1), lbound(a,2)] /= [2, 4])) call abort
- if (any(lbound(a) /= [2, 4])) call abort
+ if (any([lbound(a,1), lbound(a,2)] /= [2, 4])) STOP 108
+ if (any(lbound(a) /= [2, 4])) STOP 109
end subroutine sub1
subroutine sub2
integer :: x(3:2, 1:2)
- if (size(x) /= 0) call abort
- if (lbound (x, 1) /= 1 .or. lbound(x, 2) /= 1) call abort
- if (any (lbound (x) /= [1, 1])) call abort
- if (ubound (x, 1) /= 0 .or. ubound(x, 2) /= 2) call abort
- if (any (ubound (x) /= [0, 2])) call abort
+ if (size(x) /= 0) STOP 110
+ if (lbound (x, 1) /= 1 .or. lbound(x, 2) /= 1) STOP 111
+ if (any (lbound (x) /= [1, 1])) STOP 112
+ if (ubound (x, 1) /= 0 .or. ubound(x, 2) /= 2) STOP 113
+ if (any (ubound (x) /= [0, 2])) STOP 114
end subroutine sub2
subroutine sub3
integer :: x(4:5, 1:2)
- if (size(x) /= 0) call abort
- if (lbound (x, 1) /= 4 .or. lbound(x, 2) /= 1) call abort
- if (any (lbound (x) /= [4, 1])) call abort
- if (ubound (x, 1) /= 4 .or. ubound(x, 2) /= 2) call abort
- if (any (ubound (x) /= [4, 2])) call abort
+ if (size(x) /= 0) STOP 115
+ if (lbound (x, 1) /= 4 .or. lbound(x, 2) /= 1) STOP 116
+ if (any (lbound (x) /= [4, 1])) STOP 117
+ if (ubound (x, 1) /= 4 .or. ubound(x, 2) /= 2) STOP 118
+ if (any (ubound (x) /= [4, 2])) STOP 119
end subroutine sub3
subroutine foo (x,n)
integer :: x(7,n,2,*), n
- if (ubound(x,1) /= 7 .or. ubound(x,2) /= 4 .or. ubound(x,3) /= 2) call abort
+ if (ubound(x,1) /= 7 .or. ubound(x,2) /= 4 .or. ubound(x,3) /= 2) STOP 120
end subroutine foo
subroutine jackal (b, c)
integer :: soda(b:c, 3:4)
if (b > c) then
- if (size(soda) /= 0) call abort
- if (lbound (soda, 1) /= 1 .or. ubound (soda, 1) /= 0) call abort
+ if (size(soda) /= 0) STOP 121
+ if (lbound (soda, 1) /= 1 .or. ubound (soda, 1) /= 0) STOP 122
else
- if (size(soda) /= 2*(c-b+1)) call abort
- if (lbound (soda, 1) /= b .or. ubound (soda, 1) /= c) call abort
+ if (size(soda) /= 2*(c-b+1)) STOP 123
+ if (lbound (soda, 1) /= b .or. ubound (soda, 1) /= c) STOP 124
end if
- if (lbound (soda, 2) /= 3 .or. ubound (soda, 2) /= 4) call abort
- if (any (lbound (soda) /= [lbound(soda,1), lbound(soda,2)])) call abort
- if (any (ubound (soda) /= [ubound(soda,1), ubound(soda,2)])) call abort
+ if (lbound (soda, 2) /= 3 .or. ubound (soda, 2) /= 4) STOP 125
+ if (any (lbound (soda) /= [lbound(soda,1), lbound(soda,2)])) STOP 126
+ if (any (ubound (soda) /= [ubound(soda,1), ubound(soda,2)])) STOP 127
end subroutine jackal
! { dg-do run }
-! { dg-options "-Warray-temporaries -fall-intrinsics" }
+! { dg-options "-Warray-temporaries " }
! Check that LBOUND/UBOUND/SIZE/SHAPE of array-expressions get simplified
! in certain cases.
! and additionally correct (of course).
! Shape of expressions known at compile-time.
- IF (ANY (LBOUND (a + b) /= 1)) CALL abort ()
- IF (ANY (UBOUND (2 * b) /= (/ 2, 3 /))) CALL abort ()
- IF (ANY (SHAPE (- b) /= (/ 2, 3 /))) CALL abort ()
- IF (SIZE (a ** 2) /= 6) CALL abort
+ IF (ANY (LBOUND (a + b) /= 1)) STOP 1
+ IF (ANY (UBOUND (2 * b) /= (/ 2, 3 /))) STOP 2
+ IF (ANY (SHAPE (- b) /= (/ 2, 3 /))) STOP 3
+ IF (SIZE (a ** 2) /= 6) STOP 1
! Shape unknown at compile-time.
- IF (ANY (LBOUND (x + y) /= 1)) CALL abort ()
- IF (SIZE (x ** 2) /= 6) CALL abort ()
+ IF (ANY (LBOUND (x + y) /= 1)) STOP 4
+ IF (SIZE (x ** 2) /= 6) STOP 5
! Unfortunately, the array-version of UBOUND and SHAPE keep generating
! temporary arrays for their results (not for the operation). Thus we
! can not check SHAPE in this case and do UBOUND in the single-dimension
! version.
- IF (UBOUND (2 * y, 1) /= 2 .OR. UBOUND (2 * y, 2) /= 3) CALL abort ()
- !IF (ANY (SHAPE (- y) /= (/ 2, 3 /))) CALL abort ()
+ IF (UBOUND (2 * y, 1) /= 2 .OR. UBOUND (2 * y, 2) /= 3) STOP 6
+ !IF (ANY (SHAPE (- y) /= (/ 2, 3 /))) STOP 7
END PROGRAM main
call foo(a,b,n,m)
- if (n .ne. 1 .or. m .ne. -2) call abort
+ if (n .ne. 1 .or. m .ne. -2) STOP 1
call foo(a(2:0), empty, n, m)
- if (n .ne. 1 .or. m .ne. 1) call abort
+ if (n .ne. 1 .or. m .ne. 1) STOP 2
call foo(empty, a(2:0), n, m)
- if (n .ne. 1 .or. m .ne. 1) call abort
+ if (n .ne. 1 .or. m .ne. 1) STOP 3
allocate (x(0))
y => a(3:2)
call bar (x, y, n, m)
- if (n .ne. 1 .or. m .ne. 1) call abort
+ if (n .ne. 1 .or. m .ne. 1) STOP 4
call baz(a,3,2,n)
- if (n .ne. 1) call abort
+ if (n .ne. 1) STOP 5
call baz(a,2,3,n)
- if (n .ne. 2) call abort
+ if (n .ne. 2) STOP 6
call qux(a, -3, n)
- if (n .ne. 1) call abort
+ if (n .ne. 1) STOP 7
end program main
! { dg-final { scan-tree-dump-times "\\*one = 1" 2 "original" } }
varu(:) = ubound(f)
varl(:) = lbound(f)
- if (any (varu /= upper)) call abort
- if (any (varl /= lower)) call abort
+ if (any (varu /= upper)) STOP 1
+ if (any (varl /= lower)) STOP 2
call check (f, upper, lower)
call check (f, ubound(f), lbound(f))
integer :: upper(5), lower(5)
real :: f(:,:,:,:,:)
- if (any (ubound(f) /= upper)) call abort
- if (any (lbound(f) /= lower)) call abort
+ if (any (ubound(f) /= upper)) STOP 3
+ if (any (lbound(f) /= lower)) STOP 4
end subroutine check
end
integer, parameter :: i=lbound(arr,1)
integer, parameter :: j=ubound(arr,1)
! write(6,*) i, j
- if (i /= 0) call abort
- if (j /= 2) call abort
+ if (i /= 0) STOP 1
+ if (j /= 2) STOP 2
end program testit
! { dg-final { scan-tree-dump-times "bound" 0 "original" } }
type(t) :: d(3:8) = t(7)
type(t) :: e[5:9,-1:*]
- if (lbound(d, 1) /= 3) call abort
- if (lbound(d(3:5), 1) /= 1) call abort
- if (lbound(d%c, 1) /= 1) call abort
- if (ubound(d, 1) /= 8) call abort
- if (ubound(d(3:5), 1) /= 3) call abort
- if (ubound(d%c, 1) /= 6) call abort
+ if (lbound(d, 1) /= 3) STOP 1
+ if (lbound(d(3:5), 1) /= 1) STOP 2
+ if (lbound(d%c, 1) /= 1) STOP 3
+ if (ubound(d, 1) /= 8) STOP 4
+ if (ubound(d(3:5), 1) /= 3) STOP 5
+ if (ubound(d%c, 1) /= 6) STOP 6
- if (lcobound(e, 1) /= 5) call abort
- if (lcobound(e%c, 1) /= 5) call abort
- if (lcobound(e, 2) /= -1) call abort
- if (lcobound(e%c, 2) /= -1) call abort
- if (ucobound(e, 1) /= 9) call abort
- if (ucobound(e%c, 1) /= 9) call abort
+ if (lcobound(e, 1) /= 5) STOP 7
+ if (lcobound(e%c, 1) /= 5) STOP 8
+ if (lcobound(e, 2) /= -1) STOP 9
+ if (lcobound(e%c, 2) /= -1) STOP 10
+ if (ucobound(e, 1) /= 9) STOP 11
+ if (ucobound(e%c, 1) /= 9) STOP 12
! no simplification for ucobound(e{,%c}, dim=2)
end
! { dg-final { scan-tree-dump-not "bound" "original" } }
type(t) :: h(3), j(4), k(0)
!Test full arrays vs subarrays
- if (lbound(d, 1) /= 3) call abort
- if (lbound(d(3:5), 1) /= 1) call abort
- if (lbound(d%c, 1) /= 1) call abort
- if (ubound(d, 1) /= 8) call abort
- if (ubound(d(3:5), 1) /= 3) call abort
- if (ubound(d%c, 1) /= 6) call abort
+ if (lbound(d, 1) /= 3) STOP 1
+ if (lbound(d(3:5), 1) /= 1) STOP 2
+ if (lbound(d%c, 1) /= 1) STOP 3
+ if (ubound(d, 1) /= 8) STOP 4
+ if (ubound(d(3:5), 1) /= 3) STOP 5
+ if (ubound(d%c, 1) /= 6) STOP 6
- if (lcobound(e, 1) /= 5) call abort
- if (lcobound(e%c, 1) /= 5) call abort
- if (lcobound(e, 2) /= -1) call abort
- if (lcobound(e%c, 2) /= -1) call abort
- if (ucobound(e, 1) /= 9) call abort
- if (ucobound(e%c, 1) /= 9) call abort
+ if (lcobound(e, 1) /= 5) STOP 7
+ if (lcobound(e%c, 1) /= 5) STOP 8
+ if (lcobound(e, 2) /= -1) STOP 9
+ if (lcobound(e%c, 2) /= -1) STOP 10
+ if (ucobound(e, 1) /= 9) STOP 11
+ if (ucobound(e%c, 1) /= 9) STOP 12
! no simplification for ucobound(e{,%c}, dim=2)
- if (any(lbound(d ) /= [3])) call abort
- if (any(lbound(d(3:5)) /= [1])) call abort
- if (any(lbound(d%c ) /= [1])) call abort
- if (any(ubound(d ) /= [8])) call abort
- if (any(ubound(d(3:5)) /= [3])) call abort
- if (any(ubound(d%c ) /= [6])) call abort
+ if (any(lbound(d ) /= [3])) STOP 13
+ if (any(lbound(d(3:5)) /= [1])) STOP 14
+ if (any(lbound(d%c ) /= [1])) STOP 15
+ if (any(ubound(d ) /= [8])) STOP 16
+ if (any(ubound(d(3:5)) /= [3])) STOP 17
+ if (any(ubound(d%c ) /= [6])) STOP 18
- if (any(lcobound(e ) /= [5, -1])) call abort
- if (any(lcobound(e%c) /= [5, -1])) call abort
+ if (any(lcobound(e ) /= [5, -1])) STOP 19
+ if (any(lcobound(e%c) /= [5, -1])) STOP 20
! no simplification for ucobound(e{,%c})
call test_empty_arrays(h, j, k)
type(t) :: a(:), c(-3:0), d(3:1)
type(t) :: f(4:2), g(0:6)
- if (lbound(a, 1) /= 1) call abort
- if (lbound(c, 1) /= -3) call abort
- if (lbound(d, 1) /= 1) call abort
- if (lbound(f, 1) /= 1) call abort
- if (lbound(g, 1) /= 0) call abort
+ if (lbound(a, 1) /= 1) STOP 21
+ if (lbound(c, 1) /= -3) STOP 22
+ if (lbound(d, 1) /= 1) STOP 23
+ if (lbound(f, 1) /= 1) STOP 24
+ if (lbound(g, 1) /= 0) STOP 25
- if (ubound(c, 1) /= 0) call abort
- if (ubound(d, 1) /= 0) call abort
- if (ubound(f, 1) /= 0) call abort
- if (ubound(g, 1) /= 6) call abort
+ if (ubound(c, 1) /= 0) STOP 26
+ if (ubound(d, 1) /= 0) STOP 27
+ if (ubound(f, 1) /= 0) STOP 28
+ if (ubound(g, 1) /= 6) STOP 29
- if (any(lbound(a) /= [ 1])) call abort
- if (any(lbound(c) /= [-3])) call abort
- if (any(lbound(d) /= [ 1])) call abort
- if (any(lbound(f) /= [ 1])) call abort
- if (any(lbound(g) /= [ 0])) call abort
+ if (any(lbound(a) /= [ 1])) STOP 30
+ if (any(lbound(c) /= [-3])) STOP 31
+ if (any(lbound(d) /= [ 1])) STOP 32
+ if (any(lbound(f) /= [ 1])) STOP 33
+ if (any(lbound(g) /= [ 0])) STOP 34
- if (any(ubound(c) /= [0])) call abort
- if (any(ubound(d) /= [0])) call abort
- if (any(ubound(f) /= [0])) call abort
- if (any(ubound(g) /= [6])) call abort
+ if (any(ubound(c) /= [0])) STOP 35
+ if (any(ubound(d) /= [0])) STOP 36
+ if (any(ubound(f) /= [0])) STOP 37
+ if (any(ubound(g) /= [6])) STOP 38
end subroutine
end
SUBROUTINE integrate_general_opt()
REAL(KIND=dp) :: gp(3)
INTEGER :: ng
- if (any(lbound(cell%h_inv) /= 1)) call abort
- if (any(ubound(cell%h_inv) /= 3)) call abort
+ if (any(lbound(cell%h_inv) /= 1)) STOP 1
+ if (any(ubound(cell%h_inv) /= 3)) STOP 2
END SUBROUTINE integrate_general_opt
END MODULE qs_integrate_potential_low
! { dg-final { scan-tree-dump-not "bound" "original" } }
! PR fortran/27524
integer :: res(1)
res = F()
- if (res(1) /= 1) call abort
+ if (res(1) /= 1) STOP 1
contains
function F()
integer :: F(1)
z = ""
z = (/y(1: len (trim(y))), x(1: len (trim(x)))/)
j = ichar ([(z(1)(i:i), i=1,5)])
- if (any (j .ne. (/99,100,32,32,32/))) call abort ()
+ if (any (j .ne. (/99,100,32,32,32/))) STOP 1
j = ichar ([(z(2)(i:i), i=1,5)])
- if (any (j .ne. (/97,98,32,32,32/))) call abort ()
+ if (any (j .ne. (/97,98,32,32,32/))) STOP 2
x = "a "
z = (/y(1: len (trim(y))), x(1: len (trim(x)))/)
end program array_char
integer x(20)
integer, volatile :: n
n = 1
- if (size(x(n:2:-3)) /= 0) call abort
+ if (size(x(n:2:-3)) /= 0) STOP 1
call ha0020(-3)
call ha0020(-1)
xca(1:2:-1) = xda(1:2:mf3)
- if (any (xca /= 1)) call abort
- if (any(xda(1:2:mf3) /= xda(1:0))) call abort
- if (size(xda(1:2:mf3)) /= 0) call abort
- if (any(shape(xda(1:2:mf3)) /= 0)) call abort
- if (any(ubound(xda(1:2:mf3)) /= 0)) call abort
- if (ubound(xda(1:2:mf3),1) /= 0) call abort
- if (lbound(xda(1:2:mf3),1) /= 1) call abort
+ if (any (xca /= 1)) STOP 2
+ if (any(xda(1:2:mf3) /= xda(1:0))) STOP 3
+ if (size(xda(1:2:mf3)) /= 0) STOP 4
+ if (any(shape(xda(1:2:mf3)) /= 0)) STOP 5
+ if (any(ubound(xda(1:2:mf3)) /= 0)) STOP 6
+ if (ubound(xda(1:2:mf3),1) /= 0) STOP 7
+ if (lbound(xda(1:2:mf3),1) /= 1) STOP 8
end subroutine
do i = 1, size (mnem_list)
if (mnem_list(i) /= "") then
j = j + 1
- if (j > len (ml)/8) call abort ()
+ if (j > len (ml)/8) STOP 1
ml((j-1)*8+1:(j-1)*8+8) = mnem_list(i)
end if
end do
a = b ! Implicit conversion
- if (lbound (a, 1) .ne. lbound(b, 1)) call abort
- if (ubound (a, 1) .ne. ubound(b, 1)) call abort
+ if (lbound (a, 1) .ne. lbound(b, 1)) STOP 1
+ if (ubound (a, 1) .ne. ubound(b, 1)) STOP 2
c = sin(real(b(9:11))/100_8) ! Elemental intrinsic
- if ((ubound(c, 1) - lbound(c, 1)) .ne. 2) call abort
- if (any (nint(asin(c)*100.0) .ne. b(9:11))) call abort
+ if ((ubound(c, 1) - lbound(c, 1)) .ne. 2) STOP 3
+ if (any (nint(asin(c)*100.0) .ne. b(9:11))) STOP 4
deallocate (a, b, c)
end
xyz(3)%x = 0
write(s,*) xyz(bar())
- if (trim(adjustl(s)) /= "11111") call abort
+ if (trim(adjustl(s)) /= "11111") STOP 1
a(1)%field = 0
a(2)%field = 0
calls = 0
- if (sum(a(foo(calls))%field) /= 0) call abort
- if (calls .ne. 1) call abort
+ if (sum(a(foo(calls))%field) /= 0) STOP 2
+ if (calls .ne. 1) STOP 3
contains
integer, intent(in), optional :: ivec(:)
integer :: ivec_(2)
call set_optional(ivec_,(/1,2/))
- if (any (ivec_ /= (/1, 2/))) call abort
+ if (any (ivec_ /= (/1, 2/))) STOP 1
call set_optional(ivec_,(/1,2/),ivec)
if (present (ivec)) then
- if (any (ivec_ /= ivec)) call abort
+ if (any (ivec_ /= ivec)) STOP 2
else
- if (any (ivec_ /= (/1, 2/))) call abort
+ if (any (ivec_ /= (/1, 2/))) STOP 3
end if
end subroutine sub
end module sub_mod
integer , intent(in), optional :: ivec(:)
integer :: ivec_(2)
call set_optional(ivec_,(/1,2/))
- if (any (ivec_ /= (/1,2/))) call abort
+ if (any (ivec_ /= (/1,2/))) STOP 1
call set_optional(ivec_,(/1,2/),ivec)
if (present (ivec)) then
- if (any (ivec_ /= ivec)) call abort
+ if (any (ivec_ /= ivec)) STOP 2
else
- if (any (ivec_ /= (/1,2/))) call abort
+ if (any (ivec_ /= (/1,2/))) STOP 3
end if
end subroutine sub
end module sub_mod
m = -3
n = -2
x(7:1:m) = x(6:2:n)
- if (any(x /= (/ 2, 2, 3, 4, 5, 6, 6, 8, 9, 10 /))) call abort()
+ if (any(x /= (/ 2, 2, 3, 4, 5, 6, 6, 8, 9, 10 /))) STOP 1
x(8:1:m) = x(5:2:n)
end
! { dg-output "line 10 .* bound mismatch .* dimension 1 .* array \'x\' \\\(3/2\\\)" }
m = -3
n = -2
x(7:1:m) = x(1:3) + x(6:2:n)
- if (any(x /= (/ 5, 2, 3, 6, 5, 6, 7, 8, 9, 10 /))) call abort()
+ if (any(x /= (/ 5, 2, 3, 6, 5, 6, 7, 8, 9, 10 /))) STOP 1
x(8:1:m) = x(1:3) + x(5:2:n)
end
! { dg-output "line 10 .* bound mismatch .* dimension 1 .* array \'x\' \\\(2/3\\\)" }
integer(4), parameter :: z4 = z'dead'
integer(8), parameter :: z8 = z'deadbeef'
- if (z1 /= 10_1) call abort
- if (z2 /= 171_2) call abort
- if (z4 /= 57005_4) call abort
- if (z8 /= 3735928559_8) call abort
-
- if (b1 /= 1_1) call abort
- if (b2 /= 21930_2) call abort
- if (b4 /= 1894838512_4) call abort
- if (b8 /= 8138269444283625712_8) call abort
-
- if (o1 /= 10_1) call abort
- if (o2 /= 2257_2) call abort
- if (o4 /= 9245173_4) call abort
- if (o8 /= 45954958542472_8) call abort
+ if (z1 /= 10_1) STOP 1
+ if (z2 /= 171_2) STOP 2
+ if (z4 /= 57005_4) STOP 3
+ if (z8 /= 3735928559_8) STOP 4
+
+ if (b1 /= 1_1) STOP 5
+ if (b2 /= 21930_2) STOP 6
+ if (b4 /= 1894838512_4) STOP 7
+ if (b8 /= 8138269444283625712_8) STOP 8
+
+ if (o1 /= 10_1) STOP 9
+ if (o2 /= 2257_2) STOP 10
+ if (o4 /= 9245173_4) STOP 11
+ if (o8 /= 45954958542472_8) STOP 12
end program boz
complex(kind=8), parameter :: zd = (0._8, 1._8) * rd
integer :: x = 0
- if (cmplx(b'01000000001010010101001111111101',x,4) /= r) call abort
- if (cmplx(x,b'01000000001010010101001111111101',4) /= z) call abort
- if (complex(b'01000000001010010101001111111101',0) /= r) call abort
- if (complex(0,b'01000000001010010101001111111101') /= z) call abort
+ if (cmplx(b'01000000001010010101001111111101',x,4) /= r) STOP 1
+ if (cmplx(x,b'01000000001010010101001111111101',4) /= z) STOP 2
+ if (complex(b'01000000001010010101001111111101',0) /= r) STOP 3
+ if (complex(0,b'01000000001010010101001111111101') /= z) STOP 4
!if (cmplx(b'00000000000000000000000000000000&
- ! &01000000001010010101001111111101',x,8) /= rd) call abort
+ ! &01000000001010010101001111111101',x,8) /= rd) STOP 5
!if (cmplx(x,b'00000000000000000000000000000000&
- ! &01000000001010010101001111111101',8) /= zd) call abort
+ ! &01000000001010010101001111111101',8) /= zd) STOP 6
!if (dcmplx(b'00000000000000000000000000000000&
- ! &01000000001010010101001111111101',x) /= rd) call abort
+ ! &01000000001010010101001111111101',x) /= rd) STOP 7
!if (dcmplx(x,b'00000000000000000000000000000000&
- ! &01000000001010010101001111111101') /= zd) call abort
+ ! &01000000001010010101001111111101') /= zd) STOP 8
end program test0
&402953FD', 8)
if (real (z'00000000&
- &402953FD', 8) /= rd) call abort
+ &402953FD', 8) /= rd) STOP 1
end
cmplx(b'00000000000000000000000000000000&
&01000000001010010101001111111101',0,8)
r = 0.
- if (z /= rd) call abort
+ if (z /= rd) STOP 1
end
! Real B(OZ)
write(str,'(b128)') r1
read (str,'(b128)') r2
-if(r2 /= r1) call abort()
+if(r2 /= r1) STOP 1
! Real (B)O(Z)
r2 = 5.0_xp
write(str,'(o126)') r1
read (str,'(o126)') r2
-if(r2 /= r1) call abort()
+if(r2 /= r1) STOP 2
! Real (BO)Z
r2 = 5.0_xp
write(str,'(z126)') r1
read (str,'(z126)') r2
-if(r2 /= r1) call abort()
+if(r2 /= r1) STOP 3
z2 = cmplx(5.0_xp,7.0_xp)
z1 = cmplx(2.0_xp,3.0_xp)
! Complex B(OZ)
write(str,'(2b128)') z1
read (str,'(2b128)') z2
-if(z2 /= z1) call abort()
+if(z2 /= z1) STOP 4
! Complex (B)O(Z)
z2 = cmplx(5.0_xp,7.0_xp)
write(str,'(2o126)') z1
read (str,'(2o126)') z2
-if(z2 /= z1) call abort()
+if(z2 /= z1) STOP 5
! Complex (BO)Z
z2 = cmplx(5.0_xp,7.0_xp)
write(str,'(2z126)') z1
read (str,'(2z126)') z2
-if(z2 /= z1) call abort()
+if(z2 /= z1) STOP 6
end
integer(2), parameter :: z2 = z'00ab'
integer(4), parameter :: z4 = z'0000dead'
- if (b1 /= 15_1) call abort
- if (b2 /= 28912_2) call abort
- if (b4 /= 1894838512_4) call abort
+ if (b1 /= 15_1) STOP 1
+ if (b2 /= 28912_2) STOP 2
+ if (b4 /= 1894838512_4) STOP 3
- if (o1 /= 10_1) call abort
- if (o2 /= 2257_2) call abort
- if (o4 /= 9245173_4) call abort
+ if (o1 /= 10_1) STOP 4
+ if (o2 /= 2257_2) STOP 5
+ if (o4 /= 9245173_4) STOP 6
- if (z1 /= 10_1) call abort
- if (z2 /= 171_2) call abort
- if (z4 /= 57005_4) call abort
+ if (z1 /= 10_1) STOP 7
+ if (z2 /= 171_2) STOP 8
+ if (z4 /= 57005_4) STOP 9
end program boz
data io, jo /o'234', '234'o/
data iz, jz /z'abc', 'abc'z/
data ix, jx /x'abc', 'abc'x/
- if (ib /= jb) call abort
- if (io /= jo) call abort
- if (iz /= jz) call abort
- if (ix /= jx) call abort
+ if (ib /= jb) STOP 1
+ if (io /= jo) STOP 2
+ if (iz /= jz) STOP 3
+ if (ix /= jx) STOP 4
end program test
complex :: z1 = cmplx(b'11000001010001101101110110000011', 3.049426e-10)
complex :: z2 = cmplx(4.160326e16, o'6503667306')
-if (r2c /= 13107.0) call abort()
-if (rc /= 2.732958e10) call abort()
-if (dc /= 0.30102999566398120d0) call abort()
-if (real(z1c) /= -1.242908e1 .or. aimag(z1c) /= 3.049426e-10) call abort()
-if (real(z2c) /= 4.160326e16 .or. aimag(z2c) /= 5.343285e-7) call abort()
-
-if (r2 /= 13107.0) call abort()
-if (r /= 2.732958e10) call abort()
-if (d /= 0.30102999566398120d0) call abort()
-if (real(z1) /= -1.242908e1 .or. aimag(z1) /= 3.049426e-10) call abort()
-if (real(z2) /= 4.160326e16 .or. aimag(z2) /= 5.343285e-7) call abort()
+if (r2c /= 13107.0) STOP 1
+if (rc /= 2.732958e10) STOP 2
+if (dc /= 0.30102999566398120d0) STOP 3
+if (real(z1c) /= -1.242908e1 .or. aimag(z1c) /= 3.049426e-10) STOP 4
+if (real(z2c) /= 4.160326e16 .or. aimag(z2c) /= 5.343285e-7) STOP 5
+
+if (r2 /= 13107.0) STOP 6
+if (r /= 2.732958e10) STOP 7
+if (d /= 0.30102999566398120d0) STOP 8
+if (real(z1) /= -1.242908e1 .or. aimag(z1) /= 3.049426e-10) STOP 9
+if (real(z2) /= 4.160326e16 .or. aimag(z2) /= 5.343285e-7) STOP 10
r2 = dble(int(z'3333'))
r = real(z'50CB9F09')
z1 = cmplx(b'11000001010001101101110110000011', 3.049426e-10)
z2 = cmplx(4.160326e16, o'6503667306')
-if (r2 /= 13107d0) call abort()
-if (r /= 2.732958e10) call abort()
-if (d /= 0.30102999566398120d0) call abort()
-if (real(z1) /= -1.242908e1 .or. aimag(z1) /= 3.049426e-10) call abort()
-if (real(z2) /= 4.160326e16 .or. aimag(z2) /= 5.343285e-7) call abort()
+if (r2 /= 13107d0) STOP 11
+if (r /= 2.732958e10) STOP 12
+if (d /= 0.30102999566398120d0) STOP 13
+if (real(z1) /= -1.242908e1 .or. aimag(z1) /= 3.049426e-10) STOP 14
+if (real(z2) /= 4.160326e16 .or. aimag(z2) /= 5.343285e-7) STOP 15
call test4()
call test8()
complex :: z1 = cmplx(b'11000001010001101101110110000011', 3.049426e-10, kind=4)
complex :: z2 = cmplx(4.160326e16, o'6503667306', kind=4)
-if (r2c /= 13107.0) call abort()
-if (rc /= 2.732958e10) call abort()
-if (real(z1) /= -1.242908e1 .or. aimag(z1) /= 3.049426e-10) call abort()
-if (real(z2) /= 4.160326e16 .or. aimag(z2) /= 5.343285e-7) call abort()
+if (r2c /= 13107.0) STOP 16
+if (rc /= 2.732958e10) STOP 17
+if (real(z1) /= -1.242908e1 .or. aimag(z1) /= 3.049426e-10) STOP 18
+if (real(z2) /= 4.160326e16 .or. aimag(z2) /= 5.343285e-7) STOP 19
-if (r2 /= 13107.0) call abort()
-if (r /= 2.732958e10) call abort()
-if (real(z1) /= -1.242908e1 .or. aimag(z1) /= 3.049426e-10) call abort()
-if (real(z2) /= 4.160326e16 .or. aimag(z2) /= 5.343285e-7) call abort()
+if (r2 /= 13107.0) STOP 20
+if (r /= 2.732958e10) STOP 21
+if (real(z1) /= -1.242908e1 .or. aimag(z1) /= 3.049426e-10) STOP 22
+if (real(z2) /= 4.160326e16 .or. aimag(z2) /= 5.343285e-7) STOP 23
r2 = real(int(z'3333'), kind=4)
r = real(z'50CB9F09', kind=4)
z1 = cmplx(b'11000001010001101101110110000011', 3.049426e-10, kind=4)
z2 = cmplx(4.160326e16, o'6503667306', kind=4)
-if (r2 /= 13107.0) call abort()
-if (r /= 2.732958e10) call abort()
-if (real(z1) /= -1.242908e1 .or. aimag(z1) /= 3.049426e-10) call abort()
-if (real(z2) /= 4.160326e16 .or. aimag(z2) /= 5.343285e-7) call abort()
+if (r2 /= 13107.0) STOP 24
+if (r /= 2.732958e10) STOP 25
+if (real(z1) /= -1.242908e1 .or. aimag(z1) /= 3.049426e-10) STOP 26
+if (real(z2) /= 4.160326e16 .or. aimag(z2) /= 5.343285e-7) STOP 27
end subroutine test4
complex(8) :: z1 = cmplx(b'11111011111111111111111111111111111111111111111111111111110101',-4.0, kind=8)
complex(8) :: z2 = cmplx(5.0, o'442222222222233301245', kind=8)
-if (r2c /= 1099511575347.0d0) call abort()
-if (rc /= -3.72356884822177915d-103) call abort()
-if (real(z1c) /= 3.05175781249999627d-5 .or. aimag(z1c) /= -4.0) call abort()
-if (real(z2c) /= 5.0 .or. aimag(z2c) /= 3.98227593015308981d41) call abort()
+if (r2c /= 1099511575347.0d0) STOP 28
+if (rc /= -3.72356884822177915d-103) STOP 29
+if (real(z1c) /= 3.05175781249999627d-5 .or. aimag(z1c) /= -4.0) STOP 30
+if (real(z2c) /= 5.0 .or. aimag(z2c) /= 3.98227593015308981d41) STOP 31
-if (r2 /= 1099511575347.0d0) call abort()
-if (r /= -3.72356884822177915d-103) call abort()
-if (real(z1) /= 3.05175781249999627d-5 .or. aimag(z1) /= -4.0) call abort()
-if (real(z2) /= 5.0 .or. aimag(z2) /= 3.98227593015308981d41) call abort()
+if (r2 /= 1099511575347.0d0) STOP 32
+if (r /= -3.72356884822177915d-103) STOP 33
+if (real(z1) /= 3.05175781249999627d-5 .or. aimag(z1) /= -4.0) STOP 34
+if (real(z2) /= 5.0 .or. aimag(z2) /= 3.98227593015308981d41) STOP 35
r2 = real(int(z'FFFFFF3333',kind=8),kind=8)
r = real(z'AAAAAFFFFFFF3333', kind=8)
z1 = cmplx(b'11111011111111111111111111111111111111111111111111111111110101',-4.0, kind=8)
z2 = cmplx(5.0, o'442222222222233301245', kind=8)
-if (r2 /= 1099511575347.0d0) call abort()
-if (r /= -3.72356884822177915d-103) call abort()
-if (real(z1) /= 3.05175781249999627d-5 .or. aimag(z1) /= -4.0) call abort()
-if (real(z2) /= 5.0 .or. aimag(z2) /= 3.98227593015308981d41) call abort()
+if (r2 /= 1099511575347.0d0) STOP 36
+if (r /= -3.72356884822177915d-103) STOP 37
+if (real(z1) /= 3.05175781249999627d-5 .or. aimag(z1) /= -4.0) STOP 38
+if (real(z2) /= 5.0 .or. aimag(z2) /= 3.98227593015308981d41) STOP 39
end subroutine test8
! { dg-do compile }
-! { dg-options "-fall-intrinsics -std=f95" }
+! { dg-options " -std=f95" }
program testbyte
integer(1) :: ii = 7
call foo(ii)
byte b ! { dg-error "BYTE type" }
if (b.ne.ii) then
! print *,"Failed"
- call abort
+ STOP 1
end if
end subroutine bar
byte b
if (b.ne.ii) then
! print *,"Failed"
- call abort
+ STOP 1
end if
end subroutine bar
type(c_ptr), value :: my_c_ptr_2
if(.not. c_associated(my_c_ptr_1)) then
- call abort()
+ STOP 1
else if(.not. c_associated(my_c_ptr_2)) then
- call abort()
+ STOP 2
else if(.not. c_associated(my_c_ptr_1, my_c_ptr_2)) then
- call abort()
+ STOP 3
endif
end subroutine verify_assoc
integer :: my_integer
if(.not. c_associated(my_c_ptr)) then
- call abort()
+ STOP 1
end if
if(.not. c_associated(my_c_ptr, my_c_ptr)) then
- call abort()
+ STOP 2
end if
if(.not. c_associated(my_c_ptr, my_c_ptr, my_c_ptr)) then ! { dg-error "Too many arguments in call" }
- call abort()
+ STOP 3
end if
if(.not. c_associated()) then ! { dg-error "Missing actual argument" }
- call abort()
+ STOP 4
end if
if(.not. c_associated(my_c_ptr_2)) then
- call abort()
+ STOP 5
end if
if(.not. c_associated(my_integer)) then ! { dg-error "shall have the type TYPE.C_PTR. or TYPE.C_FUNPTR." }
- call abort()
+ STOP 6
end if
end subroutine sub0
type(c_ptr) :: x
x = c_null_ptr
print *, C_ASSOCIATED(x) ! <<< was ICEing here
- if (C_ASSOCIATED(x)) call abort ()
+ if (C_ASSOCIATED(x)) STOP 1
END PROGRAM c_assoc
b = 0.0
c = a
call f_to_f (b, %VAL (a), %REF (c), %LOC (c))
- if ((2.0 * a).ne.b) call abort ()
+ if ((2.0 * a).ne.b) STOP 1
a8 = 43.0
b8 = 1.0
c8 = a8
call f_to_f8 (b8, %VAL (a8), %REF (c8), %LOC (c8))
- if ((2.0 * a8).ne.b8) call abort ()
+ if ((2.0 * a8).ne.b8) STOP 2
i = 99
j = 0
k = i
call i_to_i (j, %VAL (i), %REF (k), %LOC (k))
- if ((3 * i).ne.j) call abort ()
+ if ((3 * i).ne.j) STOP 3
i8 = 199
j8 = 10
k8 = i8
call i_to_i8 (j8, %VAL (i8), %REF (k8), %LOC (k8))
- if ((3 * i8).ne.j8) call abort ()
+ if ((3 * i8).ne.j8) STOP 4
u = (-1.0, 2.0)
v = (1.0, -2.0)
w = u
call c_to_c (v, %VAL (u), %REF (w), %LOC (w))
- if ((4.0 * u).ne.v) call abort ()
+ if ((4.0 * u).ne.v) STOP 5
u8 = (-1.0, 2.0)
v8 = (1.0, -2.0)
w8 = u8
call c_to_c8 (v8, %VAL (u8), %REF (w8), %LOC (w8))
- if ((4.0 * u8).ne.v8) call abort ()
+ if ((4.0 * u8).ne.v8) STOP 6
stop
end
subroutine bmp_write(nx)
implicit none
integer, value :: nx
- if(nx /= 10) call abort()
+ if(nx /= 10) STOP 1
nx = 11
- if(nx /= 11) call abort()
+ if(nx /= 11) STOP 2
end subroutine bmp_write
module x
contains
SUBROUTINE Grid2BMP(NX)
INTEGER, INTENT(IN) :: NX
- if(nx /= 10) call abort()
+ if(nx /= 10) STOP 3
call bmp_write(%val(nx))
- if(nx /= 10) call abort()
+ if(nx /= 10) STOP 4
END SUBROUTINE Grid2BMP
END module x
! implicit none
! integer :: n
! n = 5
-! if(n /= 5) call abort()
+! if(n /= 5) STOP 5
! call test2(%VAL(n))
-! if(n /= 5) call abort()
+! if(n /= 5) STOP 6
! contains
! subroutine test2(a)
! integer, value :: a
-! if(a /= 5) call abort()
+! if(a /= 5) STOP 7
! a = 2
-! if(a /= 2) call abort()
+! if(a /= 2) STOP 8
! end subroutine test2
!end subroutine test
subroutine param_test(my_char, my_char_2) bind(c)
character(c_char), value :: my_char
character(c_char), value :: my_char_2
- if(my_char /= c_char_'y') call abort()
- if(my_char_2 /= c_char_'z') call abort()
+ if(my_char /= c_char_'y') STOP 1
+ if(my_char_2 /= c_char_'z') STOP 2
call sub1(my_char)
end subroutine param_test
subroutine sub1(my_char_ref) bind(c)
character(c_char) :: my_char_ref
- if(my_char_ref /= c_char_'y') call abort()
+ if(my_char_ref /= c_char_'y') STOP 3
end subroutine sub1
end module c_char_tests
subroutine bar(a)
use, intrinsic :: iso_c_binding, only: c_char
character(c_char), value :: a
- if(a /= c_char_'a') call abort()
+ if(a /= c_char_'a') STOP 1
end subroutine bar
subroutine bar2(a)
use, intrinsic :: iso_c_binding, only: c_char
character(c_char) :: a
- if(a /= c_char_'a') call abort()
+ if(a /= c_char_'a') STOP 2
end subroutine bar2
use iso_c_binding
call c_f_pointer(my_c_double_complex, my_f03_double_complex)
call c_f_pointer(my_c_long_double_complex, my_f03_long_double_complex)
- if(my_f03_float_complex /= (1.0, 0.0)) call abort ()
- if(my_f03_double_complex /= (2.0d0, 0.0d0)) call abort ()
+ if(my_f03_float_complex /= (1.0, 0.0)) STOP 1
+ if(my_f03_double_complex /= (2.0d0, 0.0d0)) STOP 2
if(my_f03_long_double_complex /= (3.0_c_long_double, &
- 0.0_c_long_double)) call abort ()
+ 0.0_c_long_double)) STOP 3
end subroutine test_complex_scalars
subroutine test_complex_arrays(float_complex_array, double_complex_array, &
do i = 1, num_elems
if(f03_float_complex_array(i) &
- /= (i*(1.0, 0.0))) call abort ()
+ /= (i*(1.0, 0.0))) STOP 4
if(f03_double_complex_array(i) &
- /= (i*(1.0d0, 0.0d0))) call abort ()
+ /= (i*(1.0d0, 0.0d0))) STOP 5
if(f03_long_double_complex_array(i) &
- /= (i*(1.0_c_long_double, 0.0_c_long_double))) call abort ()
+ /= (i*(1.0_c_long_double, 0.0_c_long_double))) STOP 6
end do
end subroutine test_complex_arrays
end module c_f_pointer_complex
logical(c_bool), pointer :: f03_logical_ptr
call c_f_pointer(c_logical_ptr, f03_logical_ptr)
- if(f03_logical_ptr .neqv. .true.) call abort ()
+ if(f03_logical_ptr .neqv. .true.) STOP 1
end subroutine test_scalar
subroutine test_array(c_logical_array, num_elems) bind(c)
! Odd numbered locations are true (even numbered offsets in C)
do i = 1, num_elems, 2
- if(f03_logical_array(i) .neqv. .true.) call abort ()
+ if(f03_logical_array(i) .neqv. .true.) STOP 2
end do
! Even numbered locations are false.
do i = 2, num_elems, 2
- if(f03_logical_array(i) .neqv. .false.) call abort ()
+ if(f03_logical_array(i) .neqv. .false.) STOP 3
end do
end subroutine test_array
end module c_f_pointer_logical
shape(1) = num_elems
call c_f_pointer(cPtr, myArrayPtr, shape)
do i = 1, num_elems
- if(myArrayPtr(i) /= (i-1)) call abort ()
+ if(myArrayPtr(i) /= (i-1)) STOP 1
end do
end subroutine test_long_long_1d
call c_f_pointer(cPtr, myArrayPtr, shape)
do j = 1, num_cols
do i = 1, num_rows
- if(myArrayPtr(i,j) /= ((j-1)*num_rows)+(i-1)) call abort ()
+ if(myArrayPtr(i,j) /= ((j-1)*num_rows)+(i-1)) STOP 2
end do
end do
end subroutine test_long_long_2d
shape(1) = num_elems
call c_f_pointer(cPtr, myArrayPtr, shape)
do i = 1, num_elems
- if(myArrayPtr(i) /= (i-1)) call abort ()
+ if(myArrayPtr(i) /= (i-1)) STOP 3
end do
end subroutine test_long_1d
shape(1) = num_elems
call c_f_pointer(cPtr, myArrayPtr, shape)
do i = 1, num_elems
- if(myArrayPtr(i) /= (i-1)) call abort ()
+ if(myArrayPtr(i) /= (i-1)) STOP 4
end do
end subroutine test_int_1d
shape(1) = num_elems
call c_f_pointer(cPtr, myArrayPtr, shape)
do i = 1, num_elems
- if(myArrayPtr(i) /= (i-1)) call abort ()
+ if(myArrayPtr(i) /= (i-1)) STOP 5
end do
end subroutine test_short_1d
shape1(1) = num_elems
call c_f_pointer(cPtr, myArrayPtr, shape1)
do i = 1, num_elems
- if(myArrayPtr(i) /= (i-1)) call abort ()
+ if(myArrayPtr(i) /= (i-1)) STOP 6
end do
nullify(myArrayPtr)
shape2(1) = num_elems
call c_f_pointer(cPtr, myArrayPtr, shape2)
do i = 1, num_elems
- if(myArrayPtr(i) /= (i-1)) call abort ()
+ if(myArrayPtr(i) /= (i-1)) STOP 7
end do
end subroutine test_mixed
end module c_f_pointer_shape_tests_2
shape(1) = num_elems
call c_f_pointer(cPtr, myArrayPtr, shape)
do i = 1, num_elems
- if(myArrayPtr(i) /= (i-1)) call abort ()
+ if(myArrayPtr(i) /= (i-1)) STOP 1
end do
end subroutine test_long_long_1d
call c_f_pointer(cPtr, myArrayPtr, shape(1:3:2))
do j = 1, num_cols
do i = 1, num_rows
- if(myArrayPtr(i,j) /= ((j-1)*num_rows)+(i-1)) call abort ()
+ if(myArrayPtr(i,j) /= ((j-1)*num_rows)+(i-1)) STOP 2
end do
end do
end subroutine test_long_long_2d
shape(1) = num_elems
call c_f_pointer(cPtr, myArrayPtr, shape)
do i = 1, num_elems
- if(myArrayPtr(i) /= (i-1)) call abort ()
+ if(myArrayPtr(i) /= (i-1)) STOP 3
end do
end subroutine test_long_1d
shape(1) = num_elems
call c_f_pointer(cPtr, myArrayPtr, shape)
do i = 1, num_elems
- if(myArrayPtr(i) /= (i-1)) call abort ()
+ if(myArrayPtr(i) /= (i-1)) STOP 4
end do
end subroutine test_int_1d
shape(1) = num_elems
call c_f_pointer(cPtr, myArrayPtr, shape)
do i = 1, num_elems
- if(myArrayPtr(i) /= (i-1)) call abort ()
+ if(myArrayPtr(i) /= (i-1)) STOP 5
end do
end subroutine test_short_1d
shape1(1) = num_elems
call c_f_pointer(cPtr, myArrayPtr, shape1)
do i = 1, num_elems
- if(myArrayPtr(i) /= (i-1)) call abort ()
+ if(myArrayPtr(i) /= (i-1)) STOP 6
end do
nullify(myArrayPtr)
shape2(1) = num_elems
call c_f_pointer(cPtr, myArrayPtr, shape2)
do i = 1, num_elems
- if(myArrayPtr(i) /= (i-1)) call abort ()
+ if(myArrayPtr(i) /= (i-1)) STOP 7
end do
end subroutine test_mixed
end module c_f_pointer_shape_tests_4
myshape = [1,2,3,4,1]
call c_f_pointer(x, ptr, shape=myshape(1:4:2))
-if (any (lbound(ptr) /= [ 1, 1])) call abort ()
-if (any (ubound(ptr) /= [ 1, 3])) call abort ()
-if (any (shape(ptr) /= [ 1, 3])) call abort ()
-if (any (ptr(1,:) /= array)) call abort()
+if (any (lbound(ptr) /= [ 1, 1])) STOP 1
+if (any (ubound(ptr) /= [ 1, 3])) STOP 2
+if (any (shape(ptr) /= [ 1, 3])) STOP 3
+if (any (ptr(1,:) /= array)) STOP 4
call c_f_pointer(x, ptr2, shape=myshape([1,3,1]))
-if (any (lbound(ptr2) /= [ 1, 1, 1])) call abort ()
-if (any (ubound(ptr2) /= [ 1, 3, 1])) call abort ()
-if (any (shape(ptr2) /= [ 1, 3, 1])) call abort ()
-if (any (ptr2(1,:,1) /= array)) call abort()
+if (any (lbound(ptr2) /= [ 1, 1, 1])) STOP 5
+if (any (ubound(ptr2) /= [ 1, 3, 1])) STOP 6
+if (any (shape(ptr2) /= [ 1, 3, 1])) STOP 7
+if (any (ptr2(1,:,1) /= array)) STOP 8
end
call c_f_pointer(myCDerived, myF90Type)
! make sure numbers are ok. initialized in c_f_tests_driver.c
if(myF90Type%cInt .ne. 1) then
- call abort()
+ STOP 1
endif
if(myF90Type%cDouble .ne. 2.0d0) then
- call abort()
+ STOP 2
endif
if(myF90Type%cFloat .ne. 3.0) then
- call abort()
+ STOP 3
endif
if(myF90Type%cShort .ne. 4) then
- call abort()
+ STOP 4
endif
shapeArray(1) = arrayLen
(derivedArray2D(dim1, dim2)%cDouble .ne. 4.0d0) .or. &
(derivedArray2D(dim1, dim2)%cFloat .ne. 4.0) .or. &
(derivedArray2D(dim1, dim2)%cShort .ne. 4)) then
- call abort()
+ STOP 5
endif
end subroutine testDerivedPtrs
end module c_f_pointer_tests
type(c_ptr), intent(in) :: cptr
integer, dimension(:,:,:), pointer :: table_tmp
call c_f_pointer (cptr, table_tmp, (/2,1,2/))
- if (any(table_tmp /= table)) call abort
+ if (any(table_tmp /= table)) STOP 1
end subroutine set_table
end program main
integer(c_int_least128_t) :: b
! integer(c_int_fast128_t) :: c
- if (sizeof (a) /= 16) call abort
- if (sizeof (b) /= 16) call abort
-! if (sizeof (c) /= 16) call abort
+ if (sizeof (a) /= 16) STOP 1
+ if (sizeof (b) /= 16) STOP 2
+! if (sizeof (c) /= 16) STOP 3
end program c_kind_int128
character(c_char), value :: my_char
logical(c_bool), value :: my_bool
- if(my_short /= 1_c_short) call abort()
- if(my_int /= 2_c_int) call abort()
- if(my_long /= 3_c_long) call abort()
- if(my_long_long /= 4_c_long_long) call abort()
+ if(my_short /= 1_c_short) STOP 1
+ if(my_int /= 2_c_int) STOP 2
+ if(my_long /= 3_c_long) STOP 3
+ if(my_long_long /= 4_c_long_long) STOP 4
- if(my_int8_t /= 1_c_int8_t) call abort()
- if(my_int_least8_t /= 2_c_int_least8_t ) call abort()
- if(my_int_fast8_t /= 3_c_int_fast8_t ) call abort()
+ if(my_int8_t /= 1_c_int8_t) STOP 5
+ if(my_int_least8_t /= 2_c_int_least8_t ) STOP 6
+ if(my_int_fast8_t /= 3_c_int_fast8_t ) STOP 7
- if(my_int16_t /= 1_c_int16_t) call abort()
- if(my_int_least16_t /= 2_c_int_least16_t) call abort()
- if(my_int_fast16_t /= 3_c_int_fast16_t ) call abort()
+ if(my_int16_t /= 1_c_int16_t) STOP 8
+ if(my_int_least16_t /= 2_c_int_least16_t) STOP 9
+ if(my_int_fast16_t /= 3_c_int_fast16_t ) STOP 10
- if(my_int32_t /= 1_c_int32_t) call abort()
- if(my_int_least32_t /= 2_c_int_least32_t) call abort()
- if(my_int_fast32_t /= 3_c_int_fast32_t ) call abort()
+ if(my_int32_t /= 1_c_int32_t) STOP 11
+ if(my_int_least32_t /= 2_c_int_least32_t) STOP 12
+ if(my_int_fast32_t /= 3_c_int_fast32_t ) STOP 13
- if(my_int64_t /= 1_c_int64_t) call abort()
- if(my_int_least64_t /= 2_c_int_least64_t) call abort()
- if(my_int_fast64_t /= 3_c_int_fast64_t ) call abort()
+ if(my_int64_t /= 1_c_int64_t) STOP 14
+ if(my_int_least64_t /= 2_c_int_least64_t) STOP 15
+ if(my_int_fast64_t /= 3_c_int_fast64_t ) STOP 16
- if(my_intmax_t /= 1_c_intmax_t) call abort()
- if(my_intptr_t /= 0_c_intptr_t) call abort()
+ if(my_intmax_t /= 1_c_intmax_t) STOP 17
+ if(my_intptr_t /= 0_c_intptr_t) STOP 18
- if(my_float /= 1.0_c_float) call abort()
- if(my_double /= 2.0_c_double) call abort()
- if(my_long_double /= 3.0_c_long_double) call abort()
+ if(my_float /= 1.0_c_float) STOP 19
+ if(my_double /= 2.0_c_double) STOP 20
+ if(my_long_double /= 3.0_c_long_double) STOP 21
- if(my_char /= c_char_'y') call abort()
- if(my_bool .neqv. .true._c_bool) call abort()
+ if(my_char /= c_char_'y') STOP 22
+ if(my_bool .neqv. .true._c_bool) STOP 23
end subroutine param_test
end module c_kind_params
cptr = c_loc (obj1%array)
call c_f_pointer (cptr, array, shape=[100])
- if (any (array /= [(i, i=1,100)])) call abort ()
+ if (any (array /= [(i, i=1,100)])) STOP 1
cptr = c_loc (obj1%array2)
call c_f_pointer (cptr, array, shape=[100])
- if (any (array /= [(i, i=1,100)])) call abort ()
+ if (any (array /= [(i, i=1,100)])) STOP 2
end program testcloc
my_c_ptr_1 = c_loc(xtar)
my_c_ptr_2 = c_loc(xptr)
if(test_scalar_address(my_c_ptr_1) .ne. 1) then
- call abort()
+ STOP 1
end if
if(test_scalar_address(my_c_ptr_2) .ne. 1) then
- call abort()
+ STOP 2
end if
end subroutine test0
int_array_tar = 100
my_c_ptr_1 = c_loc(int_array_tar)
if(test_array_address(my_c_ptr_1, 100) .ne. 1) then
- call abort()
+ STOP 3
end if
end subroutine test1
my_c_ptr_1 = c_loc(type_tar)
my_c_ptr_2 = c_loc(type_ptr)
if(test_type_address(my_c_ptr_1) .ne. 1) then
- call abort()
+ STOP 4
end if
if(test_type_address(my_c_ptr_2) .ne. 1) then
- call abort()
+ STOP 5
end if
end subroutine test2
end module c_loc_tests_2
integer, target :: tgt
call sub(file, noreinit)
- if(c_associated(file%gsl_file)) call abort()
- if(c_associated(file%gsl_func)) call abort()
+ if(c_associated(file%gsl_file)) STOP 1
+ if(c_associated(file%gsl_func)) STOP 2
file%gsl_file = c_loc(tgt)
file%gsl_func = c_funloc(proc)
call sub(file, noreinit)
- if(c_associated(file%gsl_file)) call abort()
- if(c_associated(file%gsl_func)) call abort()
+ if(c_associated(file%gsl_file)) STOP 3
+ if(c_associated(file%gsl_func)) STOP 4
end program test
! { dg-final { scan-tree-dump-times "c_funptr.\[0-9\]+ = 0B;" 1 "original" } }
integer, target :: tgt
call sub(file, noreinit)
- if(c_associated(file%gsl_file)) call abort()
- if(c_associated(file%gsl_func)) call abort()
+ if(c_associated(file%gsl_file)) STOP 1
+ if(c_associated(file%gsl_func)) STOP 2
file%gsl_file = c_loc(tgt)
file%gsl_func = c_funloc(proc)
call sub(file, noreinit)
- if(c_associated(file%gsl_file)) call abort()
- if(c_associated(file%gsl_func)) call abort()
+ if(c_associated(file%gsl_file)) STOP 3
+ if(c_associated(file%gsl_func)) STOP 4
end program test
! { dg-final { scan-tree-dump-times "c_funptr.\[0-9\]+ = 0B;" 1 "original" } }
! if the value of c_size_t isn't equal to the value of C's sizeof(size_t)
! we call abort.
if(c_size_t .ne. my_c_size) then
- call abort ()
+ STOP 1
end if
end subroutine sub0
end module c_size_t_test
! Using F2008's C_SIZEOF
i = c_sizeof(i)
-if (i /= 4) call abort()
+if (i /= 4) STOP 1
i = c_sizeof(j)
-if (i /= 40) call abort()
+if (i /= 40) STOP 2
i = c_sizeof(str2)
-if (i /= 4) call abort()
+if (i /= 4) STOP 3
i = c_sizeof(str2(1))
-if (i /= 1) call abort()
+if (i /= 1) STOP 4
write(*,*) c_sizeof(cptr), c_sizeof(iptr), c_sizeof(C_NULL_PTR)
! Using GNU's SIZEOF
i = sizeof(i)
-if (i /= 4) call abort()
+if (i /= 4) STOP 5
i = sizeof(j)
-if (i /= 40) call abort()
+if (i /= 40) STOP 6
i = sizeof(str)
-if (i /= 4) call abort()
+if (i /= 4) STOP 7
i = sizeof(str(1))
-if (i /= 4) call abort()
+if (i /= 4) STOP 8
i = sizeof(str(1)(1:3))
-if (i /= 3) call abort()
+if (i /= 3) STOP 9
end
pointer (ipt, pointee)
integer(c_intptr_t) :: int_cptr
real :: x
-if (c_sizeof(ipt) /= c_sizeof(int_cptr)) call abort()
-if (c_sizeof(pointee) /= c_sizeof(x)*10) call abort()
+if (c_sizeof(ipt) /= c_sizeof(int_cptr)) STOP 1
+if (c_sizeof(pointee) /= c_sizeof(x)*10) STOP 2
end
i = c_sizeof(str2(1:3)) ! { dg-error "must be an interoperable data" }
- if (i /= 3) call abort()
+ if (i /= 3) STOP 1
end program foo
string = 4_"123456789x"
write(string,'(a11)') 4_"abcdefg"
- if (string .ne. 4_" abcdefg ") call abort
+ if (string .ne. 4_" abcdefg ") STOP 1
write(string,*) 12345
- if (string .ne. 4_" 12345 ") call abort
+ if (string .ne. 4_" 12345 ") STOP 2
write(string, '(i6,5x,i8,a5)') 78932, 123456, "abc"
- if (string .ne. 4_" 78932 123456 abc ") call abort
+ if (string .ne. 4_" 78932 123456 abc ") STOP 3
write(string, *) .true., .false. , .true.
- if (string .ne. 4_" T F T ") call abort
+ if (string .ne. 4_" T F T ") STOP 4
write(string, *) 1.2345e-06, 4.2846e+10_8
- if (string .ne. 4_" 1.23450002E-06 42846000000.000000 ") call abort
+ if (string .ne. 4_" 1.23450002E-06 42846000000.000000 ") STOP 5
write(string, *) nan, inf
- if (string .ne. 4_" NaN Infinity ") call abort
+ if (string .ne. 4_" NaN Infinity ") STOP 6
write(string, '(10x,f3.1,3x,f9.1)') nan, inf
- if (string .ne. 4_" NaN Infinity ") call abort
+ if (string .ne. 4_" NaN Infinity ") STOP 7
write(string, *) (1.2, 3.4 )
- if (string .ne. 4_" (1.20000005,3.40000010)") call abort
+ if (string .ne. 4_" (1.20000005,3.40000010)") STOP 8
end program char4_iunit_1
read(widestring,'(i5,1x,f7.5,1x,a9,1x,a15)') i, x, str_default, str_char4
if (i /= 12345 .or. (x - 2.5436001) > epsilon(x) .or. &
str_default /= "hijklmnop" .or. str_char4 /= k_"qwertyuiopasdfg")&
- call abort
+ STOP 1
i = 77777
x = 0.0
str_default = "xxxxxxxxx"
str_char4
if (i /= 345 .or. (x - 52.542999) > epsilon(x) .or. &
str_default /= "0 hijklmn" .or. str_char4 /= k_"p qwertyuiopasd")&
- call abort
+ STOP 2
read(skinnystring,'(2x,i4,tl3,1x,f7.5,1x,a9,1x,a15)')i, x, str_default,&
str_char4
if (i /= 345 .or. (x - 52.542999) > epsilon(x) .or. &
str_default /= "0 hijklmn" .or. str_char4 /= k_"p qwertyuiopasd")&
- call abort
+ STOP 3
write(widestring,'(2x,i4,tl3,1x,f10.5,1x,a9,1x,a15)')i, x, str_default,&
trim(str_char4)
- if (widestring .ne. k_" 3 52.54300 0 hijklmn p qwertyuiopasd") call abort
+ if (widestring .ne. k_" 3 52.54300 0 hijklmn p qwertyuiopasd") STOP 4
write(skinnystring,'(2x,i4,tl3,1x,f10.5,1x,a9,1x,a15)')i, x, str_default,&
trim(str_char4)
- if (skinnystring .ne. " 3 52.54300 0 hijklmn p qwertyuiopasd") call abort
+ if (skinnystring .ne. " 3 52.54300 0 hijklmn p qwertyuiopasd") STOP 5
write(widestring,*)"test",i, x, str_default,&
trim(str_char4)
if (widestring .ne. &
- k_" test 345 52.5429993 0 hijklmnp qwertyuiopasd") call abort
+ k_" test 345 52.5429993 0 hijklmnp qwertyuiopasd") STOP 6
end program char4_iunit_2
integer :: n
character (len = n) :: v(n)
v = ''
- if (any (v /= '')) call abort
+ if (any (v /= '')) STOP 1
end subroutine foo
call foo(7)
program y
use z
- if (a(1) /= 'main ') call abort
- if (a(2) /= 'main ') call abort
- if (b(1) /= 'abcd ') call abort
- if (b(2) /= 'efghij') call abort
+ if (a(1) /= 'main ') STOP 1
+ if (a(2) /= 'main ') STOP 2
+ if (b(1) /= 'abcd ') STOP 3
+ if (b(2) /= 'efghij') STOP 4
end program y
call alloc (2)
if ((any (c%a /= "wxyz")) .OR. &
(any (c%b(1) /= "abcd")) .OR. &
- (any (c%b(2) /= "efgh"))) call abort ()
+ (any (c%b(2) /= "efgh"))) STOP 1
contains
SUBROUTINE alloc (n)
USE global
y(:)%c = "abcdef" ! { dg-warning "in assignment \\(5/6\\)" }
p(1) = y(1)%c(3:) ! { dg-warning "in assignment \\(2/3\\)" }
-if (p(1).ne."cd") call abort()
+if (p(1).ne."cd") STOP 1
p(1) = y(1)%c ! { dg-warning "in assignment \\(2/5\\)" }
-if (p(1).ne."ab") call abort()
+if (p(1).ne."ab") STOP 2
q = "xyz"
p = q ! { dg-warning "CHARACTER expression will be truncated in assignment \\(2/3\\)" }
-if (any (p.ne.q(:)(1:2))) call abort()
+if (any (p.ne.q(:)(1:2))) STOP 3
end
character (len = 5), dimension (:), pointer :: ptr
character (len = 5), dimension (2), target :: a = (/ 'abcde', 'fghij' /)
ptr => a
- if (.not. associated (ptr, a)) call abort
+ if (.not. associated (ptr, a)) STOP 1
end program main
! The code comes from http://www.star.le.ac.uk/~cgp/fortran.html (by Clive Page)
! Reported by Thomas Koenig <tkoenig@gcc.gnu.org>
!
- if (any (Up ("AbCdEfGhIjKlM") .ne. (/"ABCDEFGHIJKLM"/))) call abort ()
+ if (any (Up ("AbCdEfGhIjKlM") .ne. (/"ABCDEFGHIJKLM"/))) STOP 1
contains
Character (len=20) Function Up (string)
Character(len=*) string
C
c2 = 'a' // char(255)
c1 = 'a'
- if (.not. (c2 .gt. c1)) call abort
+ if (.not. (c2 .gt. c1)) STOP 1
C
C Comparison between char(255) and space
C
c3 = ' '
c4 = char(255)
- if (.not. (c4 .gt. c3)) call abort
+ if (.not. (c4 .gt. c3)) STOP 2
C
C Check constant folding
C
- if (.not. ('a' // char(255) .gt. 'a')) call abort
+ if (.not. ('a' // char(255) .gt. 'a')) STOP 3
- if (.not. (char(255) .gt. 'a')) call abort
+ if (.not. (char(255) .gt. 'a')) STOP 4
end
type(t_ctl) :: ctl
integer :: i,k
- if (tdefi(1) .ne. ctl%tdefi(1)) call abort ()
+ if (tdefi(1) .ne. ctl%tdefi(1)) STOP 1
end program gfcbug62
integer :: i,k
i = 1
k = 1
- if (tdefi(1) .ne. ctl%tdefi(1)) call abort ()
+ if (tdefi(1) .ne. ctl%tdefi(1)) STOP 1
end program gfcbug62
j = len ((/"abcdefghijk", chr1, chr2/))
k = len ((/'hello ','goodbye'/))
l = foo ("yes siree, Bob")
- if (any ((/11,11,7,14/) /= (/i,j,k,l/))) call abort ()
+ if (any ((/11,11,7,14/) /= (/i,j,k,l/))) STOP 1
contains
integer function foo (arg)
character(*) :: arg
program p
character, parameter :: c = char(256,4) ! { dg-error "cannot be converted" }
- if (rank(c) /= 0) call abort
+ if (rank(c) /= 0) STOP 1
end
do i1 = 1, n1
if (b (i1, i2, i3) .ne. a (mod (d1 + i1 - 1, n1) + 1, &
mod (d2 + i2 - 1, n2) + 1, &
- mod (d3 + i3 - 1, n3) + 1)) call abort
+ mod (d3 + i3 - 1, n3) + 1)) STOP 1
end do
end do
end do
do i2 = 1, n2
do i1 = 1, n1
i2p = mod (shift1 (i1, i3) + i2 - 1, n2) + 1
- if (b (i1, i2, i3) .ne. a (i1, i2p, i3)) call abort
+ if (b (i1, i2, i3) .ne. a (i1, i2p, i3)) STOP 1
end do
end do
end do
! { dg-do run }
character (kind=kind("a")) :: u
- if (kind(u) /= kind("a")) call abort
+ if (kind(u) /= kind("a")) STOP 1
end
do i2 = 1, n2
do i1 = 1, n1
if (i1 + d1 .gt. n1 .or. i2 + d2 .gt. n2 .or. i3 + d3 .gt. n3) then
- if (b (i1, i2, i3) .ne. filler) call abort
+ if (b (i1, i2, i3) .ne. filler) STOP 1
else
- if (b (i1, i2, i3) .ne. a (i1 + d1, i2 + d2, i3 + d3)) call abort
+ if (b (i1, i2, i3) .ne. a (i1 + d1, i2 + d2, i3 + d3)) STOP 2
end if
end do
end do
do i1 = 1, n1
i2p = i2 + shift1 (i1, i3)
if (i2p .gt. n2) then
- if (b (i1, i2, i3) .ne. filler) call abort
+ if (b (i1, i2, i3) .ne. filler) STOP 1
else
- if (b (i1, i2, i3) .ne. a (i1, i2p, i3)) call abort
+ if (b (i1, i2, i3) .ne. a (i1, i2p, i3)) STOP 2
end if
end do
end do
do i2 = 1, n2
do i1 = 1, n1
if (i2 + d2 .le. n2) then
- if (b (i1, i2, i3) .ne. a (i1, i2 + d2, i3)) call abort
+ if (b (i1, i2, i3) .ne. a (i1, i2 + d2, i3)) STOP 1
else if (has_filler) then
- if (b (i1, i2, i3) .ne. filler (i1, i3)) call abort
+ if (b (i1, i2, i3) .ne. filler (i1, i3)) STOP 2
else
- if (b (i1, i2, i3) .ne. '') call abort
+ if (b (i1, i2, i3) .ne. '') STOP 3
end if
end do
end do
do i1 = 1, n1
i2p = i2 + shift1 (i1, i3)
if (i2p .le. n2) then
- if (b (i1, i2, i3) .ne. a (i1, i2p, i3)) call abort
+ if (b (i1, i2, i3) .ne. a (i1, i2p, i3)) STOP 1
else if (has_filler) then
- if (b (i1, i2, i3) .ne. filler (i1, i3)) call abort
+ if (b (i1, i2, i3) .ne. filler (i1, i3)) STOP 2
else
- if (b (i1, i2, i3) .ne. '') call abort
+ if (b (i1, i2, i3) .ne. '') STOP 3
end if
end do
end do
chk(1:8) = "5"
chk(9:10) = " "
Z(:)="456"
- if (any (EOSHIFT(Z(:)(2:2),2) .ne. chk)) call abort
+ if (any (EOSHIFT(Z(:)(2:2),2) .ne. chk)) STOP 1
END subroutine
END
character (len=10), allocatable :: str(:)
allocate (str(1))
str(1) = "dog"
- if (size(str) /= 1 .or. str(1) /= "dog") call abort()
+ if (size(str) /= 1 .or. str(1) /= "dog") STOP 1
contains
subroutine foo(xx,yy)
character (len=*), intent(in) :: xx(:)
xx(1) = ""
xx(2) = "dog"
call foo ((xx),xx)
- if (trim (xx(1)) .ne. "dog") call abort
- if (size (xx, 1) .ne. 1) call abort
+ if (trim (xx(1)) .ne. "dog") STOP 1
+ if (size (xx, 1) .ne. 1) STOP 2
contains
subroutine foo (xx,yy)
character(len=*), intent(in) :: xx(:)
contains
subroutine sfoo(ch1, ch2)
character*(*) :: ch1, ch2
- if (ch1 /= ch2) call abort ()
+ if (ch1 /= ch2) STOP 1
end subroutine sfoo
subroutine afoo(ch1, ch2)
character*(*), dimension(:) :: ch1, ch2
- if (any(ch1 /= ch2)) call abort ()
+ if (any(ch1 /= ch2)) STOP 2
end subroutine afoo
function pfoo(ch2)
character*5, dimension(:), target :: ch2
character(len=3), dimension(3,3) :: m1
m1 = p
- if (any (spread (p, 1, 2) /= spread (m1, 1, 2))) call abort
+ if (any (spread (p, 1, 2) /= spread (m1, 1, 2))) STOP 1
end
!\r
program main\r
implicit none\r
- if (f5 ('1') .ne. "a") call abort\r
- if (len (f5 ('1')) .ne. 1) call abort\r
- if (f5 ('4') .ne. "abcd") call abort\r
- if (len (f5 ('4')) .ne. 4) call abort\r
+ if (f5 ('1') .ne. "a") STOP 1
+ if (len (f5 ('1')) .ne. 1) STOP 1
+ if (f5 ('4') .ne. "abcd") STOP 1
+ if (len (f5 ('4')) .ne. 4) STOP 1
contains\r
function f5 (c)\r
character(len=1_8) :: c\r
LL(4)%c = 'QWERTYUIO'
RR%c = LL%c ! The equivalence forces a dependency
L%c = LL(2:4)%c
- if (any (RR(2:4)%c .ne. L%c)) call abort
+ if (any (RR(2:4)%c .ne. L%c)) STOP 1
nfv1 = (/1,2,3/)
nfv2 = nfv1
L%c = R%c
L(nfv1)%c = L(nfv2)%c ! The vector indices force a dependency
- if (any (R%c .ne. L%c)) call abort
+ if (any (R%c .ne. L%c)) STOP 2
end
i = 3
c(i:i) = 'a'
c(i+1:i+1) = 'b'
- if (c(i:i) /= 'a') call abort ()
- if (c(i+1:i+1) /= 'b') call abort ()
+ if (c(i:i) /= 'a') STOP 1
+ if (c(i+1:i+1) /= 'b') STOP 2
end program main
! { dg-final { scan-tree-dump-times "gfortran_compare_string" 0 "original" } }
character(len=20) :: ctwenty='abcdefghijabcdefghij'
ii = -6
text_block=[ character(len=ii) :: cten, ctwenty ]
- if (any(len_trim(text_block) /= 0)) call abort
+ if (any(len_trim(text_block) /= 0)) STOP 1
end program rabbithole
! { dg-output "At line 10 of file .*char_length_20.f90.*Fortran runtime warning: Negative character length treated as LEN = 0" }
character(len=20) :: ctwenty='abcdefghijabcdefghij'
ii = -6
text_block = [character(len=ii) :: cten, ctwenty]
- if (any(len_trim(text_block) /= 0)) call abort
+ if (any(len_trim(text_block) /= 0)) STOP 1
end program rabbithole
character (len=5) :: words(5:8) = (/"two ","three","four ","five "/), sep = "^#^"
character (len=5) :: words2(4) = (/"bat ","ball ","goal ","stump"/), sep2 = "&"
- if (join (words, sep) .ne. "two^#^three^#^four^#^five") call abort ()
- if (len (join (words, sep)) .ne. 25) call abort ()
+ if (join (words, sep) .ne. "two^#^three^#^four^#^five") STOP 1
+ if (len (join (words, sep)) .ne. 25) STOP 2
- if (join (words(5:6), sep) .ne. "two^#^three") call abort ()
- if (len (join (words(5:6), sep)) .ne. 11) call abort ()
+ if (join (words(5:6), sep) .ne. "two^#^three") STOP 3
+ if (len (join (words(5:6), sep)) .ne. 11) STOP 4
- if (join (words(7:8), sep) .ne. "four^#^five") call abort ()
- if (len (join (words(7:8), sep)) .ne. 11) call abort ()
+ if (join (words(7:8), sep) .ne. "four^#^five") STOP 5
+ if (len (join (words(7:8), sep)) .ne. 11) STOP 6
- if (join (words(5:7:2), sep) .ne. "two^#^four") call abort ()
- if (len (join (words(5:7:2), sep)) .ne. 10) call abort ()
+ if (join (words(5:7:2), sep) .ne. "two^#^four") STOP 7
+ if (len (join (words(5:7:2), sep)) .ne. 10) STOP 8
- if (join (words(6:8:2), sep) .ne. "three^#^five") call abort ()
- if (len (join (words(6:8:2), sep)) .ne. 12) call abort ()
+ if (join (words(6:8:2), sep) .ne. "three^#^five") STOP 9
+ if (len (join (words(6:8:2), sep)) .ne. 12) STOP 10
- if (join (words2, sep2) .ne. "bat&ball&goal&stump") call abort ()
- if (len (join (words2, sep2)) .ne. 19) call abort ()
+ if (join (words2, sep2) .ne. "bat&ball&goal&stump") STOP 11
+ if (len (join (words2, sep2)) .ne. 19) STOP 12
- if (join (words2(1:2), sep2) .ne. "bat&ball") call abort ()
- if (len (join (words2(1:2), sep2)) .ne. 8) call abort ()
+ if (join (words2(1:2), sep2) .ne. "bat&ball") STOP 13
+ if (len (join (words2(1:2), sep2)) .ne. 8) STOP 14
- if (join (words2(2:4:2), sep2) .ne. "ball&stump") call abort ()
- if (len (join (words2(2:4:2), sep2)) .ne. 10) call abort ()
+ if (join (words2(2:4:2), sep2) .ne. "ball&stump") STOP 15
+ if (len (join (words2(2:4:2), sep2)) .ne. 10) STOP 16
end program xjoin
c = "aa"
l = c .eq. "aa"
- if (any (.not. l)) call abort
+ if (any (.not. l)) STOP 1
call foo ([c(1)])
l = c .eq. "aa"
- if (any (.not. l)) call abort
+ if (any (.not. l)) STOP 2
contains
character(3) :: zz(2) = (/"abc","cde"/)
character(2) :: ans(2)
integer :: i = 2, j = 3
- if (any(ccopy("_&_"//(/"A","B"/)//"?") .ne. (/"_&_A?","_&_B?"/))) call abort ()
- if (any(ccopy(z//zz) .ne. (/"zzabc","zzcde"/))) call abort ()
- if (any(ccopy(z//zz(:)(1:2)) .ne. (/"zzab ","zzcd "/))) call abort ()
- if (any(ccopy(z//mz(:)(2:3)) .ne. (/"zzgh ","zzjk "/))) call abort ()
+ if (any(ccopy("_&_"//(/"A","B"/)//"?") .ne. (/"_&_A?","_&_B?"/))) STOP 1
+ if (any(ccopy(z//zz) .ne. (/"zzabc","zzcde"/))) STOP 2
+ if (any(ccopy(z//zz(:)(1:2)) .ne. (/"zzab ","zzcd "/))) STOP 3
+ if (any(ccopy(z//mz(:)(2:3)) .ne. (/"zzgh ","zzjk "/))) STOP 4
! This was another bug, uncovered when the PR was fixed.
- if (any(ccopy(z//mz(:)(i:j)) .ne. (/"zzgh ","zzjk "/))) call abort ()
+ if (any(ccopy(z//mz(:)(i:j)) .ne. (/"zzgh ","zzjk "/))) STOP 5
end program xx
call test_pack
call test_unpack
call test_pr31197
- if (ctr .ne. 8) call abort
+ if (ctr .ne. 8) STOP 1
contains
subroutine test_reshape
Z(:)="123"
- if (any (RESHAPE(Z(:)(2:2),(/5,2/)) .ne. "2")) call abort
+ if (any (RESHAPE(Z(:)(2:2),(/5,2/)) .ne. "2")) STOP 2
ctr = ctr + 1
end subroutine
subroutine test_eoshift
chk(1:8) = "5"
chk(9:10) = " "
Z(:)="456"
- if (any (EOSHIFT(Z(:)(2:2),2) .ne. chk)) call abort
+ if (any (EOSHIFT(Z(:)(2:2),2) .ne. chk)) STOP 3
ctr = ctr + 1
END subroutine
subroutine test_cshift
Z(:)="901"
- if (any (CSHIFT(Z(:)(2:2),2) .ne. "0")) call abort
+ if (any (CSHIFT(Z(:)(2:2),2) .ne. "0")) STOP 4
ctr = ctr + 1
end subroutine
subroutine test_spread
Z(:)="789"
- if (any (SPREAD(Z(:)(2:2),dim=1,ncopies=2) .ne. "8")) call abort
+ if (any (SPREAD(Z(:)(2:2),dim=1,ncopies=2) .ne. "8")) STOP 5
ctr = ctr + 1
end subroutine
subroutine test_transpose
W(:, :)="abc"
- if (any (TRANSPOSE(W(:,:)(1:2)) .ne. "ab")) call abort
+ if (any (TRANSPOSE(W(:,:)(1:2)) .ne. "ab")) STOP 6
ctr = ctr + 1
end subroutine
subroutine test_pack
W(:, :)="def"
- if (any (pack(W(:,:)(2:3),mask=.true.) .ne. "ef")) call abort
+ if (any (pack(W(:,:)(2:3),mask=.true.) .ne. "ef")) STOP 7
ctr = ctr + 1
end subroutine
subroutine test_unpack
logical, dimension(5,2) :: mask
Z(:)="hij"
mask = .true.
- if (any (unpack(Z(:)(2:2),mask,' ') .ne. "i")) call abort
+ if (any (unpack(Z(:)(2:2),mask,' ') .ne. "i")) STOP 8
ctr = ctr + 1
end subroutine
subroutine test_pr31197
CHARACTER(LEN=3) :: A = "xyz"
END TYPE
TYPE(data), DIMENSION(10), TARGET :: T
- if (any (TRANSPOSE(RESHAPE(T(:)%A(2:2),(/5,2/))) .ne. "y")) call abort
+ if (any (TRANSPOSE(RESHAPE(T(:)%A(2:2),(/5,2/))) .ne. "y")) STOP 9
ctr = ctr + 1
end subroutine
END
do i1 = 1, n1
if (mask (i1, i2)) then
i = i + 1
- if (b (i) .ne. a (i1, i2)) call abort
+ if (b (i) .ne. a (i1, i2)) STOP 1
end if
end do
end do
- if (size (b, 1) .ne. i) call abort
+ if (size (b, 1) .ne. i) STOP 2
end subroutine test1
subroutine test2 (b)
character (len = slen), dimension (:) :: b
- if (size (b, 1) .ne. nv) call abort
+ if (size (b, 1) .ne. nv) STOP 3
i = 0
do i2 = 1, n2
do i1 = 1, n1
if (mask (i1, i2)) then
i = i + 1
- if (b (i) .ne. a (i1, i2)) call abort
+ if (b (i) .ne. a (i1, i2)) STOP 4
end if
end do
end do
do i = i + 1, nv
- if (b (i) .ne. vector (i)) call abort
+ if (b (i) .ne. vector (i)) STOP 5
end do
end subroutine test2
end program main
do i2 = 1, n2
do i1 = 1, n1
i = i + 1
- if (b (i) .ne. a (i1, i2)) call abort
+ if (b (i) .ne. a (i1, i2)) STOP 1
end do
end do
- if (size (b, 1) .ne. i) call abort
+ if (size (b, 1) .ne. i) STOP 2
end subroutine test1
subroutine test2 (b)
character (len = slen), dimension (:) :: b
- if (size (b, 1) .ne. nv) call abort
+ if (size (b, 1) .ne. nv) STOP 3
i = 0
do i2 = 1, n2
do i1 = 1, n1
i = i + 1
- if (b (i) .ne. a (i1, i2)) call abort
+ if (b (i) .ne. a (i1, i2)) STOP 4
end do
end do
do i = i + 1, nv
- if (b (i) .ne. vector (i)) call abort
+ if (b (i) .ne. vector (i)) STOP 5
end do
end subroutine test2
end program main
c3(1:1) = "o"\r
c3(4:4) = "l"\r
c1 => c3 ! pointer => pointer\r
- if (t1 /= "lnmo") call abort ()\r
- if (c1 /= "onml") call abort ()\r
+ if (t1 /= "lnmo") STOP 1\r
+ if (c1 /= "onml") STOP 2\r
\r
! Now arrays.\r
c4 = "lmno" ! pointer = constant\r
const(4:4) ="l" ! c4(:)(4:4) = "l" is still broken\r
c4 = const\r
c2 => c4 ! pointer => pointer\r
- if (any (t2 /= "lnmo")) call abort ()\r
- if (any (c2 /= "onml")) call abort ()\r
+ if (any (t2 /= "lnmo")) STOP 3\r
+ if (any (c2 /= "onml")) STOP 4\r
deallocate (c3, c4)\r
end program char_pointer_assign
character (len = 5), pointer :: textp2
textp => textt
textp2 => textt(1:5)
- if(len(textp) /= 7) call abort()
- if(len(textp2) /= 5) call abort()
+ if(len(textp) /= 7) STOP 1
+ if(len(textp2) /= 5) STOP 2
textp = 'aaaaaaa'
textp2 = 'bbbbbbb'
- if(textp /= 'bbbbbaa') call abort()
- if(textp2 /= 'bbbbb') call abort()
+ if(textp /= 'bbbbbaa') STOP 3
+ if(textp2 /= 'bbbbb') STOP 4
end program test
! Do assignments first
allocate (a%scalar, a%array(2))
a%scalar = scalar_t
- if (a%scalar /= "abcd") call abort ()
+ if (a%scalar /= "abcd") STOP 1
a%array = array_t
- if (any(a%array /= (/"abcd","efgh"/))) call abort ()
+ if (any(a%array /= (/"abcd","efgh"/))) STOP 2
deallocate (a%scalar, a%array)
! Now do pointer assignments.
a%scalar => scalar_t
- if (a%scalar /= "abcd") call abort ()
+ if (a%scalar /= "abcd") STOP 3
a%array => array_t
- if (any(a%array /= (/"abcd","efgh"/))) call abort ()
+ if (any(a%array /= (/"abcd","efgh"/))) STOP 4
end program char_pointer_comp_assign
allocate (c2(2))
c2 = (/"abcd","efgh"/)
c2 = afoo (c2)
- if (c2(1) /= "efgh") call abort ()
- if (c2(2) /= "abcd") call abort ()
+ if (c2(1) /= "efgh") STOP 1
+ if (c2(2) /= "abcd") STOP 2
deallocate (c2)
contains
function afoo (ac0) result (ac1)
contains\r
subroutine foo (cc1)\r
character*4 :: cc1\r
- if (cc1 /= "wxyz") call abort ()\r
+ if (cc1 /= "wxyz") STOP 1\r
end subroutine foo\r
subroutine sfoo (sc1)\r
character*4, pointer :: sc1\r
- if (sc1 /= "wxyz") call abort ()\r
+ if (sc1 /= "wxyz") STOP 2\r
end subroutine sfoo\r
subroutine afoo (ac1)\r
character*4, pointer :: ac1(:)\r
- if (ac1(1) /= "wxyz") call abort ()\r
+ if (ac1(1) /= "wxyz") STOP 3\r
end subroutine afoo\r
end program char_pointer_dummy
allocate (c1, c2(1))
! Check that we have not broken non-pointer characters.
c0 = foo ()
- if (c0 /= "abcd") call abort ()
+ if (c0 /= "abcd") STOP 1
! Value assignments
c1 = sfoo ()
- if (c1 /= "abcd") call abort ()
+ if (c1 /= "abcd") STOP 2
c2 = afoo (c0)
- if (c2(1) /= "abcd") call abort ()
+ if (c2(1) /= "abcd") STOP 3
deallocate (c1, c2)
! Pointer assignments
c1 => sfoo ()
- if (c1 /= "abcd") call abort ()
+ if (c1 /= "abcd") STOP 4
c2 => afoo (c0)
- if (c2(1) /= "abcd") call abort ()
+ if (c2(1) /= "abcd") STOP 5
deallocate (c1, c2)
contains
function foo () result (cc1)
integer :: i1, i2, i3, ai, padi
do i = 1, 3
- if (size (b, i) .ne. shape (i)) call abort
+ if (size (b, i) .ne. shape (i)) STOP 1
end do
ai = 0
padi = 0
do i3 = 1, shape (3)
if (ai .lt. n) then
ai = ai + 1
- if (b (i1, i2, i3) .ne. a (ai)) call abort
+ if (b (i1, i2, i3) .ne. a (ai)) STOP 2
else
padi = padi + 1
if (padi .gt. n) padi = 1
- if (b (i1, i2, i3) .ne. pad (padi)) call abort
+ if (b (i1, i2, i3) .ne. pad (padi)) STOP 3
end if
end do
end do
subroutine test (string, length)
character (len = *) :: string
integer, intent (in) :: length
- if (len (string) .ne. length) call abort
+ if (len (string) .ne. length) STOP 1
end subroutine test
end program main
temper(1) = 'doncaster'
temper(2) = 'uxbridge'
ctemp = temper
- if (any (ctemp /= ["donc", "uxbr"])) call abort ()
+ if (any (ctemp /= ["donc", "uxbr"])) STOP 1
!
!------------------------
!'This went a bit wrong.'
!------------------------
ctemp = jetter(1,2)
- if (any (ctemp /= ["donc", "uxbr"])) call abort ()
+ if (any (ctemp /= ["donc", "uxbr"])) STOP 2
contains
function jetter(id1,id2)
subroutine foo(cc, teststr)
character (len=*), intent(in) :: cc(:)
character (len=*), intent(in) :: teststr
- if (any (cc .ne. teststr)) call abort
+ if (any (cc .ne. teststr)) STOP 1
end subroutine foo
end module abc
integer :: i
! Test the fix for the original bug
- if (len (Get0(1)) .ne. 5) call abort
- if (Get0(2) .ne. "Orange") call abort
+ if (len (Get0(1)) .ne. 5) STOP 1
+ if (Get0(2) .ne. "Orange") STOP 2
! Test the fix for the subsequent issues
call fruity
- if (trim (buffer) .ne. " 6Orange") call abort
+ if (trim (buffer) .ne. " 6Orange") STOP 3
call fruity2
- if (trim (buffer) .ne. " 5Mango") call abort
+ if (trim (buffer) .ne. " 5Mango") STOP 4
call fruity3
- if (trim (buffer) .ne. " 4Pear") call abort
+ if (trim (buffer) .ne. " 4Pear") STOP 5
do i = 3, 4
call Sget (i, arg)
if (i == 3) then
- if (trim (buffer) .ne. " 5Mango") call abort
- if (trim (arg) .ne. "Mango") call abort
+ if (trim (buffer) .ne. " 5Mango") STOP 6
+ if (trim (arg) .ne. "Mango") STOP 7
else
- if (trim (buffer) .ne. " 4Pear") call abort
+ if (trim (buffer) .ne. " 4Pear") STOP 8
! Since arg is fixed length in this scope, it gets over-written
! by s, which in this case is length 4. Thus, the 'o' remains.
- if (trim (arg) .ne. "Pearo") call abort
+ if (trim (arg) .ne. "Pearo") STOP 9
end if
enddo
contains
IMPLICIT NONE
integer :: i
write (buffer, '(i2,a)') len (Get (1)), Get (1)
- if (trim (buffer) .ne. " 5Apple") call abort
+ if (trim (buffer) .ne. " 5Apple") STOP 1
call fruity(3)
- if (trim (buffer) .ne. " 5Mango") call abort
- if (trim (names(3)) .ne. "Mangue") Call abort
+ if (trim (buffer) .ne. " 5Mango") STOP 2
+ if (trim (names(3)) .ne. "Mangue") STOP 3
END PROGRAM WheresThatbLinkingConstantGone
subroutine test (string, length)
character (len = *) :: string
integer, intent (in) :: length
- if (len (string) .ne. length) call abort
+ if (len (string) .ne. length) STOP 1
end subroutine test
end program main
subroutine test (string, length)
character (len = *) :: string
integer, intent (in) :: length
- if (len (string) .ne. length) call abort
+ if (len (string) .ne. length) STOP 1
end subroutine test
end program main
subroutine test (string, length)
character (len = *) :: string
integer, intent (in) :: length
- if (len (string) .ne. length) call abort
+ if (len (string) .ne. length) STOP 1
end subroutine test
end program main
subroutine test (string, length)
character (len = *) :: string
integer, intent (in) :: length
- if (len (string) .ne. length) call abort
+ if (len (string) .ne. length) STOP 1
end subroutine test
end program main
subroutine test (string, length)
character (len = *) :: string
integer, intent (in) :: length
- if (len (string) .ne. length) call abort
+ if (len (string) .ne. length) STOP 1
end subroutine test
end program main
subroutine test (string, length)
character (len = *) :: string
integer, intent (in) :: length
- if (len (string) .ne. length) call abort
+ if (len (string) .ne. length) STOP 1
end subroutine test
end program main
subroutine test (string, length)
character (len = *) :: string
integer, intent (in) :: length
- if (len (string) .ne. length) call abort
+ if (len (string) .ne. length) STOP 1
end subroutine test
end program main
subroutine test (b)
character (len = slen), dimension (:, :, :) :: b
- if (size (b, 1) .ne. n1) call abort
- if (size (b, 2) .ne. n2) call abort
- if (size (b, 3) .ne. n3) call abort
+ if (size (b, 1) .ne. n1) STOP 1
+ if (size (b, 2) .ne. n2) STOP 2
+ if (size (b, 3) .ne. n3) STOP 3
do i3 = 1, n3
do i2 = 1, n2
do i1 = 1, n1
- if (b (i1, i2, i3) .ne. a (i1, i3)) call abort
+ if (b (i1, i2, i3) .ne. a (i1, i3)) STOP 4
end do
end do
end do
subroutine test (b)
character (len = slen), dimension (:, :) :: b
- if (size (b, 1) .ne. n2) call abort
- if (size (b, 2) .ne. n1) call abort
+ if (size (b, 1) .ne. n2) STOP 1
+ if (size (b, 2) .ne. n1) STOP 2
do i2 = 1, n2
do i1 = 1, n1
- if (b (i2, i1) .ne. a (i1, i2)) call abort
+ if (b (i2, i1) .ne. a (i1, i2)) STOP 3
end do
end do
end subroutine test
end type foo_t
type(foo_t) :: foo
- if (len(foo%bar) /= 80 .or. len(foo%gee) /= 75) call abort
+ if (len(foo%bar) /= 80 .or. len(foo%gee) /= 75) STOP 1
end program char_type_len
subroutine test (a)
character (len = slen), dimension (:, :) :: a
- if (size (a, 1) .ne. n1) call abort
- if (size (a, 2) .ne. n2) call abort
+ if (size (a, 1) .ne. n1) STOP 1
+ if (size (a, 2) .ne. n2) STOP 2
i = 0
do i2 = 1, n2
do i1 = 1, n1
if (mask (i1, i2)) then
i = i + 1
- if (a (i1, i2) .ne. vector (i)) call abort
+ if (a (i1, i2) .ne. vector (i)) STOP 3
else
- if (a (i1, i2) .ne. field (i1, i2)) call abort
+ if (a (i1, i2) .ne. field (i1, i2)) STOP 4
end if
end do
end do
subroutine test (a)
character (len = slen), dimension (:, :) :: a
- if (size (a, 1) .ne. n1) call abort
- if (size (a, 2) .ne. n2) call abort
+ if (size (a, 1) .ne. n1) STOP 1
+ if (size (a, 2) .ne. n2) STOP 2
i = 0
do i2 = 1, n2
do i1 = 1, n1
if (mask (i1, i2)) then
i = i + 1
- if (a (i1, i2) .ne. vector (i)) call abort
+ if (a (i1, i2) .ne. vector (i)) STOP 3
else
- if (a (i1, i2) .ne. field) call abort
+ if (a (i1, i2) .ne. field) STOP 4
end if
end do
end do
character(*), dimension(:) :: chr
character(len = len(chr)) :: tmp
if (size(chr,1) == 2) then
- if (any (chr .ne. (/"Label 1", "Label 2"/))) call abort ()
+ if (any (chr .ne. (/"Label 1", "Label 2"/))) STOP 1
elseif (size(chr,1) == 4) then
- if (any (chr .ne. (/"Label 3", "Label 4","Label 1", "Label 2"/))) call abort ()
+ if (any (chr .ne. (/"Label 3", "Label 4","Label 1", "Label 2"/))) STOP 2
elseif (size(chr,1) == 5) then
if (any (chr .ne. (/"Label 3", "Label 4","Label 1", "Label 2", "Label 5"/))) &
- call abort ()
+ STOP 3
end if
end subroutine read_library_data_
n = n + 1 ; if (c .eq. c) call yes
n = n + 1 ; if (c .ge. c) call yes
n = n + 1 ; if (c .le. c) call yes
- if (c /= c) call abort
- if (c > c) call abort
- if (c < c) call abort
- if (c .ne. c) call abort
- if (c .gt. c) call abort
- if (c .lt. c) call abort
- if (n /= i) call abort
+ if (c /= c) STOP 1
+ if (c > c) STOP 2
+ if (c < c) STOP 3
+ if (c .ne. c) STOP 4
+ if (c .gt. c) STOP 5
+ if (c .lt. c) STOP 6
+ if (n /= i) STOP 7
end program main
subroutine yes
n = n + 1 ; if (c(k2:) .eq. c(k2:4)) call yes
n = n + 1 ; if (c(:) .ge. c) call yes
n = n + 1 ; if (c .le. c) call yes
- if (c(1:2) /= c(1:2)) call abort
- if (c(k1:k2) > c(k1:k2)) call abort
- if (c(:2) < c(1:2)) call abort
- if (c(:) .ne. c) call abort
- if (c(:2) .gt. c(1:2)) call abort
- if (c(1:2) .lt. c(:2)) call abort
- if (n /= i) call abort
+ if (c(1:2) /= c(1:2)) STOP 1
+ if (c(k1:k2) > c(k1:k2)) STOP 2
+ if (c(:2) < c(1:2)) STOP 3
+ if (c(:) .ne. c) STOP 4
+ if (c(:2) .gt. c(1:2)) STOP 5
+ if (c(1:2) .lt. c(:2)) STOP 6
+ if (n /= i) STOP 7
end program main
subroutine yes
k33 = 3
k44 = 4
c = 'abcd'
- if (c(2:) /= c(k2:k4)) call abort
- if (c(k2:k4) /= c(k22:)) call abort
- if (c(2:3) == c(1:2)) call abort
- if (c(1:2) == c(2:3)) call abort
- if (c(k1:) == c(k2:)) call abort
- if (c(:3) == c(:k4)) call abort
- if (c(:k4) == c(:3)) call abort
- if (c(:k3) == c(:k44)) call abort
+ if (c(2:) /= c(k2:k4)) STOP 1
+ if (c(k2:k4) /= c(k22:)) STOP 2
+ if (c(2:3) == c(1:2)) STOP 3
+ if (c(1:2) == c(2:3)) STOP 4
+ if (c(k1:) == c(k2:)) STOP 5
+ if (c(:3) == c(:k4)) STOP 6
+ if (c(:k4) == c(:3)) STOP 7
+ if (c(:k3) == c(:k44)) STOP 8
end program main
! { dg-final { scan-tree-dump-times "gfortran_compare_string" 6 "original" } }
n = n + 1; if ('b' // c > 'a' // d) call yes
n = n + 1; if (c // 'b' > c // 'a') call yes
- if ('a' // c /= 'a' // c) call abort
- if ('a' // c // 'b' == 'a' // c // 'a') call abort
- if ('b' // c == 'a' // c) call abort
- if (c // 'a' == c // 'b') call abort
- if (c // 'a ' /= c // 'a') call abort
- if (c // 'b' /= c // 'b ') call abort
+ if ('a' // c /= 'a' // c) STOP 1
+ if ('a' // c // 'b' == 'a' // c // 'a') STOP 2
+ if ('b' // c == 'a' // c) STOP 3
+ if (c // 'a' == c // 'b') STOP 4
+ if (c // 'a ' /= c // 'a') STOP 5
+ if (c // 'b' /= c // 'b ') STOP 6
- if (n /= i) call abort
+ if (n /= i) STOP 7
end program main
subroutine yes
i = 0
c = 'abcd'
d = 'efgh'
- if (c // 'a' >= d // 'a') call abort
- if ('a' // c >= 'a' // d) call abort
+ if (c // 'a' >= d // 'a') STOP 1
+ if ('a' // c >= 'a' // d) STOP 2
end program main
! { dg-final { scan-tree-dump-times "gfortran_concat_string" 0 "original" } }
n = 0
i = 0
c = 'abcd'
- if ('a ' // c == 'a' // c) call abort
- if ('a' // c == 'a ' // c) call abort
+ if ('a ' // c == 'a' // c) STOP 1
+ if ('a' // c == 'a ' // c) STOP 2
end program main
! { dg-final { scan-tree-dump-times "gfortran_concat_string" 4 "original" } }
subroutine yes(a)
implicit none
logical, intent(in) :: a
- if (.not. a) call abort
+ if (.not. a) STOP 1
end subroutine yes
subroutine no(a)
implicit none
logical, intent(in) :: a
- if (a) call abort
+ if (a) STOP 2
end subroutine no
! { dg-final { scan-tree-dump-times "gfortran_compare_string" 0 "original" } }
program main
character(3) :: a
a = 'ab'
- if (.not. LLE(a,a)) call abort
- if (LLT(a,a)) call abort
- if (.not. LGE(a,a)) call abort
- if (LGT(a,a)) call abort
+ if (.not. LLE(a,a)) STOP 1
+ if (LLT(a,a)) STOP 2
+ if (.not. LGE(a,a)) STOP 3
+ if (LGT(a,a)) STOP 4
end program main
! { dg-final { scan-tree-dump-times "gfortran_compare_string" 0 "original" } }
character (kind=4,len=4) :: c,d
a = 'ab'
b = 'aa'
- if (a < b) call abort
+ if (a < b) STOP 1
c = 4_"aaaa"
d = 4_"aaab"
- if (c == d) call abort
- if (c > d) call abort
+ if (c == d) STOP 2
+ if (c > d) STOP 3
end program main
! { dg-final { scan-tree-dump-times "_gfortran_compare_string_char4" 1 "original" } }
! { dg-final { scan-tree-dump-times "__builtin_memcmp" 2 "original" } }
end
program foo
use m
- if (trim(x%c(1)) /= 'ab') call abort
+ if (trim(x%c(1)) /= 'ab') STOP 1
end program foo
character(2) :: c(1) = [character(3) :: 'abc']
end type
type(t) :: x
- if (trim(x%c(1)) /= 'ab') call abort
+ if (trim(x%c(1)) /= 'ab') STOP 1
end
i2 = ibset(huge(0_2), bit_size(i2)-1)
i4 = ibset(huge(0_4), bit_size(i4)-1)
i8 = ibset(huge(0_8), bit_size(i8)-1)
- if (i1 /= -1 .or. i2 /= -1 .or. i4 /= -1 .or. i8 /= -1) call abort
+ if (i1 /= -1 .or. i2 /= -1 .or. i4 /= -1 .or. i8 /= -1) STOP 1
i1 = ibclr(-1_1, bit_size(i1)-1)
i2 = ibclr(-1_2, bit_size(i2)-1)
i4 = ibclr(-1_4, bit_size(i4)-1)
i8 = ibclr(-1_8, bit_size(i8)-1)
- if (i1 /= huge(0_1) .or. i2 /= huge(0_2)) call abort
- if (i4 /= huge(0_4) .or. i8 /= huge(0_8)) call abort
+ if (i1 /= huge(0_1) .or. i2 /= huge(0_2)) STOP 2
+ if (i4 /= huge(0_4) .or. i8 /= huge(0_8)) STOP 3
i1 = not(0_1)
i2 = not(0_2)
i4 = not(0_4)
i8 = not(0_8)
- if (i1 /= -1 .or. i2 /= -1 .or. i4 /= -1 .or. i8 /= -1) call abort
+ if (i1 /= -1 .or. i2 /= -1 .or. i4 /= -1 .or. i8 /= -1) STOP 4
end program chkbits
if (access(n,"") /= 0 .or. access(n," ") /= 0 .or. access(n,"r") /= 0 .or. &
access(n,"R") /= 0 .or. access(n,"w") /= 0 .or. access(n,"W") /= 0) &
- call abort
+ STOP 1
call chmod (n, "a+x", i)
if (i == 0) then
- if (access(n,"x") /= 0 .or. access(n,"X") /= 0) call abort
+ if (access(n,"x") /= 0 .or. access(n,"X") /= 0) STOP 2
end if
call chmod (n, "a-w", i)
if (i == 0 .and. getuid() /= 0) then
- if (access(n,"w") == 0 .or. access(n,"W") == 0) call abort
+ if (access(n,"w") == 0 .or. access(n,"W") == 0) STOP 3
end if
open (10,file=n)
if (access(n,"") == 0 .or. access(n," ") == 0 .or. access(n,"r") == 0 .or. &
access(n,"R") == 0 .or. access(n,"w") == 0 .or. access(n,"W") == 0) &
- call abort
+ STOP 4
end
if (access(n,"") /= 0 .or. access(n," ") /= 0 .or. access(n,"r") /= 0 .or. &
access(n,"R") /= 0 .or. access(n,"w") /= 0 .or. access(n,"W") /= 0) &
- call abort
+ STOP 1
i = chmod (n, "a+x")
if (i == 0) then
- if (access(n,"x") /= 0 .or. access(n,"X") /= 0) call abort
+ if (access(n,"x") /= 0 .or. access(n,"X") /= 0) STOP 2
end if
i = chmod (n, "a-w")
if (i == 0 .and. getuid() /= 0) then
- if (access(n,"w") == 0 .or. access(n,"W") == 0) call abort
+ if (access(n,"w") == 0 .or. access(n,"W") == 0) STOP 3
end if
open (10,file=n)
if (access(n,"") == 0 .or. access(n," ") == 0 .or. access(n,"r") == 0 .or. &
access(n,"R") == 0 .or. access(n,"w") == 0 .or. access(n,"W") == 0) &
- call abort
+ STOP 4
end
if (access(n,"") /= 0 .or. access(n," ") /= 0 .or. access(n,"r") /= 0 .or. &
access(n,"R") /= 0 .or. access(n,"w") /= 0 .or. access(n,"W") /= 0) &
- call abort
+ STOP 1
i = chmod (n, "a+x")
if (i == 0) then
- if (access(n,"x") /= 0 .or. access(n,"X") /= 0) call abort
+ if (access(n,"x") /= 0 .or. access(n,"X") /= 0) STOP 2
end if
i = chmod (n, "a-w")
if (i == 0 .and. getuid() /= 0) then
- if (access(n,"w") == 0 .or. access(n,"W") == 0) call abort
+ if (access(n,"w") == 0 .or. access(n,"W") == 0) STOP 3
end if
open (10,file=n)
if (access(n,"") == 0 .or. access(n," ") == 0 .or. access(n,"r") == 0 .or. &
access(n,"R") == 0 .or. access(n,"w") == 0 .or. access(n,"W") == 0) &
- call abort
+ STOP 4
end
call sub(c1)
-if (c1%comp/=5) call abort()
+if (c1%comp/=5) STOP 1
deallocate(c1)
type(parent), target :: t
class(parent), pointer :: cp => null()
- if (associated(cp)) call abort()
+ if (associated(cp)) STOP 1
cp => t
- if (.not. associated(cp)) call abort()
+ if (.not. associated(cp)) STOP 2
end
type(foo_outer),allocatable :: try2
class(foo_outer), allocatable :: try3
- if (allocated(try%int)) call abort()
+ if (allocated(try%int)) STOP 1
allocate(foo_outer :: try3)
- if (allocated(try3%int)) call abort()
+ if (allocated(try3%int)) STOP 2
allocate(try2)
- if (allocated(try2%int)) call abort()
+ if (allocated(try2%int)) STOP 3
end subroutine foo_checkit
end module foo_mod
class(two_three), allocatable :: a1
class(three), allocatable :: a2
-if (same_type_as(a1,a2)) call abort()
+if (same_type_as(a1,a2)) STOP 1
end
use m
implicit none
-if (allocated(x)) call abort()
+if (allocated(x)) STOP 1
end
type(t2) :: one, two
one = two
- if (allocated (one%a)) call abort ()
+ if (allocated (one%a)) STOP 1
allocate (two%a)
two%a%x = 7890
one = two
- if (one%a%x /= 7890) call abort ()
+ if (one%a%x /= 7890) STOP 2
deallocate (two%a)
one = two
- if (allocated (one%a)) call abort ()
+ if (allocated (one%a)) STOP 3
end subroutine test1
subroutine test2 ()
type(t2) :: one, two
one = two
- if (allocated (one%a)) call abort ()
+ if (allocated (one%a)) STOP 4
allocate (two%a)
one = two
- if (.not.allocated (one%a)) call abort ()
- if (allocated (one%a%x)) call abort ()
+ if (.not.allocated (one%a)) STOP 5
+ if (allocated (one%a%x)) STOP 6
allocate (two%a%x(2))
two%a%x(:) = 7890
one = two
- if (any (one%a%x /= 7890)) call abort ()
+ if (any (one%a%x /= 7890)) STOP 7
deallocate (two%a)
one = two
- if (allocated (one%a)) call abort ()
+ if (allocated (one%a)) STOP 8
end subroutine test2
! Test allocate with array source - PR52102
allocate (two%a(2), source = [t(4), t(6)])
- if (allocated (one%a)) call abort ()
+ if (allocated (one%a)) STOP 9
one = two
- if (.not.allocated (one%a)) call abort ()
+ if (.not.allocated (one%a)) STOP 10
- if ((one%a(1)%x /= 4)) call abort ()
- if ((one%a(2)%x /= 6)) call abort ()
+ if ((one%a(1)%x /= 4)) STOP 11
+ if ((one%a(2)%x /= 6)) STOP 12
deallocate (two%a)
one = two
- if (allocated (one%a)) call abort ()
+ if (allocated (one%a)) STOP 13
! Test allocate with no source followed by assignments.
allocate (two%a(2))
two%a(1)%x = 5
two%a(2)%x = 7
- if (allocated (one%a)) call abort ()
+ if (allocated (one%a)) STOP 14
one = two
- if (.not.allocated (one%a)) call abort ()
+ if (.not.allocated (one%a)) STOP 15
- if ((one%a(1)%x /= 5)) call abort ()
- if ((one%a(2)%x /= 7)) call abort ()
+ if ((one%a(1)%x /= 5)) STOP 16
+ if ((one%a(2)%x /= 7)) STOP 17
deallocate (two%a)
one = two
- if (allocated (one%a)) call abort ()
+ if (allocated (one%a)) STOP 18
end subroutine test3
subroutine test4 ()
type(t2) :: one, two
- if (allocated (one%a)) call abort ()
- if (allocated (two%a)) call abort ()
+ if (allocated (one%a)) STOP 19
+ if (allocated (two%a)) STOP 20
allocate (two%a(2))
- if (allocated (two%a(1)%x)) call abort ()
- if (allocated (two%a(2)%x)) call abort ()
+ if (allocated (two%a(1)%x)) STOP 21
+ if (allocated (two%a(2)%x)) STOP 22
allocate (two%a(1)%x(3), source=[1,2,3])
allocate (two%a(2)%x(5), source=[5,6,7,8,9])
one = two
- if (.not. allocated (one%a)) call abort ()
- if (.not. allocated (one%a(1)%x)) call abort ()
- if (.not. allocated (one%a(2)%x)) call abort ()
+ if (.not. allocated (one%a)) STOP 23
+ if (.not. allocated (one%a(1)%x)) STOP 24
+ if (.not. allocated (one%a(2)%x)) STOP 25
- if (size(one%a) /= 2) call abort()
- if (size(one%a(1)%x) /= 3) call abort()
- if (size(one%a(2)%x) /= 5) call abort()
- if (any (one%a(1)%x /= [1,2,3])) call abort ()
- if (any (one%a(2)%x /= [5,6,7,8,9])) call abort ()
+ if (size(one%a) /= 2) STOP 26
+ if (size(one%a(1)%x) /= 3) STOP 27
+ if (size(one%a(2)%x) /= 5) STOP 28
+ if (any (one%a(1)%x /= [1,2,3])) STOP 29
+ if (any (one%a(2)%x /= [5,6,7,8,9])) STOP 30
deallocate (two%a(1)%x)
one = two
- if (.not. allocated (one%a)) call abort ()
- if (allocated (one%a(1)%x)) call abort ()
- if (.not. allocated (one%a(2)%x)) call abort ()
+ if (.not. allocated (one%a)) STOP 31
+ if (allocated (one%a(1)%x)) STOP 32
+ if (.not. allocated (one%a(2)%x)) STOP 33
- if (size(one%a) /= 2) call abort()
- if (size(one%a(2)%x) /= 5) call abort()
- if (any (one%a(2)%x /= [5,6,7,8,9])) call abort ()
+ if (size(one%a) /= 2) STOP 34
+ if (size(one%a(2)%x) /= 5) STOP 35
+ if (any (one%a(2)%x /= [5,6,7,8,9])) STOP 36
deallocate (two%a)
one = two
- if (allocated (one%a)) call abort ()
- if (allocated (two%a)) call abort ()
+ if (allocated (one%a)) STOP 37
+ if (allocated (two%a)) STOP 38
end subroutine test4
Type(t),Target :: x
Call sub(x)
Print *,x%c
- if (x%c /= 3) call abort ()
+ if (x%c /= 3) STOP 1
Contains
Subroutine sub(p)
Class(t),Pointer,Intent(In) :: p
Type(t),Target :: x
Call sub(x) ! { dg-error "Fortran 2008: Non-pointer actual argument" }
Print *,x%c
- if (x%c /= 3) call abort ()
+ if (x%c /= 3) STOP 1
Contains
Subroutine sub(p)
Class(t),Pointer,Intent(In) :: p
a%comp = 3
x => a
print *,x%comp
- if (x%comp/=3) call abort()
+ if (x%comp/=3) STOP 1
end
class (vector_iter_t), pointer :: x
call factory (x)
- if (x%get_vector_value() .ne. 99) call abort
- if (x%get_pointer_value() .ne. 99) call abort
+ if (x%get_vector_value() .ne. 99) STOP 1
+ if (x%get_pointer_value() .ne. 99) STOP 2
end
class(*) :: arg
select type (arg)
type is (mytype)
- if (arg%i .ne. 99_8) call abort
+ if (arg%i .ne. 99_8) STOP 1
end select
end subroutine
class(mytype) :: arg
select type (arg)
type is (mytype)
- if (arg%i .ne. 99_8) call abort
+ if (arg%i .ne. 99_8) STOP 2
end select
end subroutine
Type Is (t)
Continue
Class Is (t)
- call abort
+ STOP 1
Class Default
- call abort
+ STOP 2
End Select
! Print *, 'ok'
End Program
allocate(barfoo,source = f(11))
bar = [f(33), [f(22), barfoo], f(1)]
- if (any (bar%i .ne. [33, 22, 11, 1])) call abort
+ if (any (bar%i .ne. [33, 22, 11, 1])) STOP 1
deallocate (barfoo)
contains
type(t1), dimension(3) :: v1, v2
v1%i = [1,2,3]
v2 = return_t1(v1)
- if (any (v2%i .ne. v1%i)) call abort
+ if (any (v2%i .ne. v1%i)) STOP 1
v1%i = [4,5,6]
v2 = return_t1_p(v1)
- if (any (v2%i .ne. v1%i)) call abort
+ if (any (v2%i .ne. v1%i)) STOP 2
end program test
subroutine d (x)
real :: x
- if (abs(x-3.0)>1E-3) call abort()
+ if (abs(x-3.0)>1E-3) STOP 1
end subroutine
subroutine s (x)
class(t) :: x
real :: r
r = x%a (1.1) ! worked
- if (r .ne. a (1.1)) call abort
+ if (r .ne. a (1.1)) STOP 1
r = x%a (b (1.2)) ! worked
- if (r .ne. a(b (1.2))) call abort
+ if (r .ne. a(b (1.2))) STOP 2
r = b ( x%a (1.3)) ! worked
- if (r .ne. b(a (1.3))) call abort
+ if (r .ne. b(a (1.3))) STOP 3
r = x%a(x%b (1.4)) ! failed
- if (r .ne. a(b (1.4))) call abort
+ if (r .ne. a(b (1.4))) STOP 4
r = x%a(x%c ()) ! failed
- if (r .ne. a(c (x))) call abort
+ if (r .ne. a(c (x))) STOP 5
call x%d (x%a(1.5)) ! failed
! pointer -> pointer
! { dg-final { scan-tree-dump-not "par_p\[^\n]*VIEW_CONVERT_EXPR\[^\n]*var_p" "original" } }
call do_it4 (var_p)
- if (var_a%x .ne. 2) call abort()
- if (var_p%x .ne. 2) call abort()
+ if (var_a%x .ne. 2) STOP 1
+ if (var_p%x .ne. 2) STOP 2
deallocate (var_a)
deallocate (var_p)
end
i = 3
end select
deallocate(cp)
- if (i /= 1) call abort()
+ if (i /= 1) STOP 1
i = 0
allocate(t2 :: cp)
i = 3
end select
deallocate(cp)
- if (i /= 2) call abort()
+ if (i /= 2) STOP 2
i = 0
allocate(cp, source = x)
i = 3
end select
deallocate(cp)
- if (i /= 3) call abort()
+ if (i /= 3) STOP 3
i = 0
allocate(t2 :: cp2)
end select
deallocate(cp)
deallocate(cp2)
- if (i /= 2) call abort()
+ if (i /= 2) STOP 4
! (2) check initialization (default initialization vs. SOURCE)
allocate(cp)
- if (cp%comp /= 5) call abort()
+ if (cp%comp /= 5) STOP 5
deallocate(cp)
x%comp = 4
allocate(cp, source=x)
- if (cp%comp /= 4) call abort()
+ if (cp%comp /= 4) STOP 6
deallocate(cp)
end
allocate(kernel1(5), kernel2(5),mold=executive_producer%create_show_array (5))
select type(kernel1)
- type is (integrand); if (any (kernel1%variable .ne. 1)) call abort
+ type is (integrand); if (any (kernel1%variable .ne. 1)) STOP 1
end select
deallocate (kernel1)
allocate(kernel1(3),mold=executive_producer%create_show ())
select type(kernel1)
- type is (integrand); if (any (kernel1%variable .ne. 1)) call abort
+ type is (integrand); if (any (kernel1%variable .ne. 1)) STOP 2
end select
deallocate (kernel1)
allocate(kernel1(3),source = kernel2(3:5))
select type(kernel1)
- type is (integrand); if (any (kernel1%variable .ne. [3,4,5])) call abort
+ type is (integrand); if (any (kernel1%variable .ne. [3,4,5])) STOP 3
end select
end program
allocate(d%L(2)%B,source=b1) ! wrong code
- if (d%L(2)%B%fields/=5.) call abort()
+ if (d%L(2)%B%fields/=5.) STOP 1
end program
subroutine sub
type(t), save, allocatable :: x
class(t), save,allocatable :: y
- if (.not. same_type_as(x,y)) call abort()
+ if (.not. same_type_as(x,y)) STOP 1
end subroutine sub
subroutine sub2
type(t), save, allocatable :: a(:)
class(t), save,allocatable :: b(:)
- if (.not. same_type_as(a,b)) call abort()
+ if (.not. same_type_as(a,b)) STOP 2
end subroutine sub2
end module m
contains
subroutine foo()
class(t), allocatable :: x
- if(allocated(x)) call abort()
- if(.not.same_type_as(x,y)) call abort()
+ if(allocated(x)) STOP 1
+ if(.not.same_type_as(x,y)) STOP 2
allocate (t2 :: x)
end
subroutine bar()
class(t), allocatable :: x(:)
- if(allocated(x)) call abort()
- if(.not.same_type_as(x,y)) call abort()
+ if(allocated(x)) STOP 3
+ if(.not.same_type_as(x,y)) STOP 4
allocate (t2 :: x(4))
end
end
class(*), allocatable, target :: a(:)
e = 1.0
call add_element_poly(a,e)
-if (size(a) /= 1) call abort()
+if (size(a) /= 1) STOP 1
call add_element_poly(a,e)
-if (size(a) /= 2) call abort()
+if (size(a) /= 2) STOP 2
select type (a)
type is (real)
- if (any (a /= [ 1, 1])) call abort()
+ if (any (a /= [ 1, 1])) STOP 3
end select
contains
subroutine add_element_poly(a,e)
x%i = reshape([( i, i = 1, 9 )], [3, 3])
allocate(z(9), source=reshape(x, (/ 9 /)))
- if (any( z%i /= [( i, i = 1, 9 )])) call abort()
+ if (any( z%i /= [( i, i = 1, 9 )])) STOP 1
deallocate (x, z)
end
end select
allocate(y, source=transpose(x))
- if (any( ubound(y) /= [6,2])) call abort()
- if (any(reshape(y(:,:)%i, [12]) /= [ 1,3,5,7,9,11, 2,4,6,8,10,12])) call abort()
+ if (any( ubound(y) /= [6,2])) STOP 1
+ if (any(reshape(y(:,:)%i, [12]) /= [ 1,3,5,7,9,11, 2,4,6,8,10,12])) STOP 2
deallocate (x,y)
end
select type(m2)
type is (t2)
print *, m2%i, m2%r
- if (m2%i/=54) call abort()
- if (abs(m2%r-384.02)>1E-3) call abort()
+ if (m2%i/=54) STOP 1
+ if (abs(m2%r-384.02)>1E-3) STOP 2
m2%i = 42
m2%r = -4.0
class default
- call abort()
+ STOP 3
end select
allocate(m1, source=m2)
select type(m1)
type is (t2)
print *, m1%i, m1%r
- if (m1%i/=42) call abort()
- if (abs(m1%r+4.0)>1E-3) call abort()
+ if (m1%i/=42) STOP 4
+ if (abs(m1%r+4.0)>1E-3) STOP 5
class default
- call abort()
+ STOP 6
end select
end
class(t), allocatable :: a
allocate(a, source=t2(1,2))
print *,a%i
-if(a%i /= 1) call abort()
+if(a%i /= 1) STOP 1
select type (a)
type is (t2)
print *,a%j
- if(a%j /= 2) call abort()
+ if(a%j /= 2) STOP 2
end select
end
write(*,*) a%irp(:)
- if (any (a%irp /= [1,3,4,5])) call abort()
+ if (any (a%irp /= [1,3,4,5])) STOP 1
end program bug23
x%a = [ (i, i = 1,10) ]
print '(*(i3))', x%a
class default
- call abort()
+ STOP 1
end select
allocate(y, source=x)
x%a = [ (i, i = 11,20) ]
print '(*(i3))', x%a
class default
- call abort()
+ STOP 2
end select
select type(y)
type is (t2)
print '(*(i3))', y%a
- if (any (y%a /= [ (i, i = 1,10) ])) call abort()
+ if (any (y%a /= [ (i, i = 1,10) ])) STOP 3
class default
- call abort()
+ STOP 4
end select
end
type(show_producer) :: executive_producer
allocate(kernel,source=executive_producer%create_show ())
- if (kernel%variable .ne. 99) call abort
+ if (kernel%variable .ne. 99) STOP 1
end program
allocate(kernel(5),source=executive_producer%create_show_array (5))
select type(kernel)
- type is (integrand); if (any (kernel%variable .ne. [1,2,3,4,5])) call abort
+ type is (integrand); if (any (kernel%variable .ne. [1,2,3,4,5])) STOP 1
end select
deallocate (kernel)
allocate(kernel(3),source=executive_producer%create_show ())
select type(kernel)
- type is (integrand); if (any (kernel%variable .ne. -1)) call abort
+ type is (integrand); if (any (kernel%variable .ne. -1)) STOP 2
end select
end program
type(show_producer) :: executive_producer
allocate(kernel1, kernel2,mold=executive_producer%create_show ())
- if (kernel1%variable .ne. -1) call abort
- if (kernel2%variable .ne. -1) call abort
+ if (kernel1%variable .ne. -1) STOP 1
+ if (kernel2%variable .ne. -1) STOP 2
end program
call display(x, [1], [4], t2 = [(type2(i,42.0 + float (i)), i = 1, 4)])
call display(x, [1], [4], t2 = [(type2(111,99.0), i = 1, 4)])
- if (any (disp (x) .ne. [99.0,99.0,99.0,99.0])) call abort
+ if (any (disp (x) .ne. [99.0,99.0,99.0,99.0])) STOP 1
if (allocated (x)) deallocate (x)
allocate(x(1:4), source = type1(42))
call display(x, [1], [4], t1 = [(type1(42), i = 1, 4)])
call display(x, [1], [4], t1 = [type1(42),type1(99),type1(42),type1(42)])
- if (any (disp (x) .ne. [0.0,0.0,0.0,0.0])) call abort
+ if (any (disp (x) .ne. [0.0,0.0,0.0,0.0])) STOP 2
contains
subroutine display(x, lower, upper, t1, t2)
select type (x)
type is (type1)
if (present (t1)) then
- if (any (x%i .ne. t1%i)) call abort
+ if (any (x%i .ne. t1%i)) STOP 3
else
- call abort
+ STOP 4
end if
x(2)%i = 99
type is (type2)
if (present (t2)) then
- if (any (x%i .ne. t2%i)) call abort
- if (any (x%r .ne. t2%r)) call abort
+ if (any (x%i .ne. t2%i)) STOP 5
+ if (any (x%r .ne. t2%r)) STOP 6
else
- call abort
+ STOP 7
end if
x%i = 111
x%r = 99.0
subroutine bounds (x, lower, upper)
class(type1), allocatable, dimension (:) :: x
integer, dimension (:) :: lower, upper
- if (any (lower .ne. lbound (x))) call abort
- if (any (upper .ne. ubound (x))) call abort
+ if (any (lower .ne. lbound (x))) STOP 8
+ if (any (upper .ne. ubound (x))) STOP 9
end subroutine
elemental function disp(y) result(ans)
class(type1), intent(in) :: y
x%i = 77
call f(x)
- if (x%i /= 6) call abort ()
+ if (x%i /= 6) STOP 1
call f()
contains
subroutine f(y1)
class(mytype), allocatable :: x,y
allocate (mytype2 :: x)
call g(x)
- if (allocated (x) .or. .not. same_type_as (x,y)) call abort()
+ if (allocated (x) .or. .not. same_type_as (x,y)) STOP 2
allocate (mytype2 :: x)
call h(x)
- if (allocated (x) .or. .not. same_type_as (x,y)) call abort()
+ if (allocated (x) .or. .not. same_type_as (x,y)) STOP 3
call h()
contains
CONTAINS
SUBROUTINE display_indv(self)
CLASS(individual), INTENT(IN) :: self
- if (any(self%genes .ne. [999,9999]) )call abort
+ if (any(self%genes .ne. [999,9999]) )STOP 1
END SUBROUTINE
END
allocate (a%cBh(2), source = [(ncBhStde(i*99, [1,2]), i = 1,2)])
select type (q => a%cBh(2)) ! Similarly, reference 2nd element to test offset
type is (ncBhStd)
- call abort
+ STOP 2
type is (ncBhStde)
- if (q%i .ne. 198) call abort ! This tests that the component really gets the
+ if (q%i .ne. 198) STOP 3! This tests that the component really gets the
end select ! language specific flag denoting a class type
end
allocate(b%cBh(1),source=defaultBhC)
b%cBh(1)%hostNode => b
! #1 this worked
- if (loc(b) .ne. loc(b%cBh(1)%hostNode)) call abort
+ if (loc(b) .ne. loc(b%cBh(1)%hostNode)) STOP 4
call Node_C_Bh_Move(b)
! #2 this worked
- if (loc(b) .ne. loc(b%cBh(1)%hostNode)) call abort
- if (loc(b) .ne. loc(b%cBh(2)%hostNode)) call abort
+ if (loc(b) .ne. loc(b%cBh(1)%hostNode)) STOP 5
+ if (loc(b) .ne. loc(b%cBh(2)%hostNode)) STOP 6
! #3 this did not
bh => bhGet(b,instance=1)
- if (loc (b) .ne. loc(bh%hostNode)) call abort
+ if (loc (b) .ne. loc(bh%hostNode)) STOP 7
bh => bhGet(b,instance=2)
- if (loc (b) .ne. loc(bh%hostNode)) call abort
+ if (loc (b) .ne. loc(bh%hostNode)) STOP 8
end
! { dg-final { scan-tree-dump-times "builtin_free" 12 "original" } }
subroutine sub(x)
class(t), allocatable, intent(out) :: x(:)
- if (allocated (x)) call abort()
- if (.not. same_type_as(x, var_t)) call abort()
+ if (allocated (x)) STOP 1
+ if (.not. same_type_as(x, var_t)) STOP 2
allocate (t2 :: x(5))
end subroutine sub
class(t), allocatable, OPTIONAL, intent(out) :: x(:)
if (.not. present(x)) return
- if (allocated (x)) call abort()
- if (.not. same_type_as(x, var_t)) call abort()
+ if (allocated (x)) STOP 3
+ if (.not. same_type_as(x, var_t)) STOP 4
allocate (t2 :: x(5))
end subroutine sub2
implicit none
class(t), save, allocatable :: y(:)
-if (allocated (y)) call abort()
-if (.not. same_type_as(y,var_t)) call abort()
+if (allocated (y)) STOP 5
+if (.not. same_type_as(y,var_t)) STOP 6
call sub(y)
-if (.not.allocated(y)) call abort()
-if (.not. same_type_as(y, var_t2)) call abort()
-if (size (y) /= 5) call abort()
+if (.not.allocated(y)) STOP 7
+if (.not. same_type_as(y, var_t2)) STOP 8
+if (size (y) /= 5) STOP 9
call sub(y)
-if (.not.allocated(y)) call abort()
-if (.not. same_type_as(y, var_t2)) call abort()
-if (size (y) /= 5) call abort()
+if (.not.allocated(y)) STOP 10
+if (.not. same_type_as(y, var_t2)) STOP 11
+if (size (y) /= 5) STOP 12
deallocate (y)
-if (allocated (y)) call abort()
-if (.not. same_type_as(y,var_t)) call abort()
+if (allocated (y)) STOP 13
+if (.not. same_type_as(y,var_t)) STOP 14
call sub2()
call sub2(y)
-if (.not.allocated(y)) call abort()
-if (.not. same_type_as(y, var_t2)) call abort()
-if (size (y) /= 5) call abort()
+if (.not.allocated(y)) STOP 15
+if (.not. same_type_as(y, var_t2)) STOP 16
+if (size (y) /= 5) STOP 17
call sub2(y)
-if (.not.allocated(y)) call abort()
-if (.not. same_type_as(y, var_t2)) call abort()
-if (size (y) /= 5) call abort()
+if (.not.allocated(y)) STOP 18
+if (.not. same_type_as(y, var_t2)) STOP 19
+if (size (y) /= 5) STOP 20
end
! { dg-final { scan-tree-dump-times "__builtin_free" 5 "original" } }
call display(x, [1], [4], t2 = [(type2(i,42.0 + float (i)), i = 1, 4)])
call display(x, [1], [4], t2 = [(type2(111,99.0), i = 1, 4)])
- if (any (disp (x) .ne. [99.0,99.0,99.0,99.0])) call abort
+ if (any (disp (x) .ne. [99.0,99.0,99.0,99.0])) STOP 1
if (associated (x)) deallocate (x)
allocate(x(1:4), source = type1(42))
call display(x, [1], [4], t1 = [(type1(42), i = 1, 4)])
call display(x, [1], [4], t1 = [type1(42),type1(99),type1(42),type1(42)])
- if (any (disp (x) .ne. [0.0,0.0,0.0,0.0])) call abort
+ if (any (disp (x) .ne. [0.0,0.0,0.0,0.0])) STOP 2
if (associated (x)) deallocate (x)
select type (x)
type is (type1)
if (present (t1)) then
- if (any (x%i .ne. t1%i)) call abort
+ if (any (x%i .ne. t1%i)) STOP 3
else
- call abort
+ STOP 4
end if
x(2)%i = 99
type is (type2)
if (present (t2)) then
- if (any (x%i .ne. t2%i)) call abort
- if (any (x%r .ne. t2%r)) call abort
+ if (any (x%i .ne. t2%i)) STOP 5
+ if (any (x%r .ne. t2%r)) STOP 6
else
- call abort
+ STOP 7
end if
x%i = 111
x%r = 99.0
subroutine bounds (x, lower, upper)
class(type1), pointer, dimension (:) :: x
integer, dimension (:) :: lower, upper
- if (any (lower .ne. lbound (x))) call abort
- if (any (upper .ne. ubound (x))) call abort
+ if (any (lower .ne. lbound (x))) STOP 8
+ if (any (upper .ne. ubound (x))) STOP 9
end subroutine
elemental function disp(y) result(ans)
class(type1), intent(in) :: y
subroutine copyFromClassArray(classarray)
class (Foo), intent(in) :: classarray(:)
- if (lbound(classarray, 1) .ne. 1) call abort()
- if (ubound(classarray, 1) .ne. 2) call abort()
- if (size(classarray) .ne. 2) call abort()
+ if (lbound(classarray, 1) .ne. 1) STOP 1
+ if (ubound(classarray, 1) .ne. 2) STOP 2
+ if (size(classarray) .ne. 2) STOP 3
end subroutine
subroutine AddArray(P)
select type (P)
type is (double precision)
- if (abs(P(1)-3.d0) .gt. 1.d-8) call abort()
- if (abs(P(2)-4.d0) .gt. 1.d-8) call abort()
+ if (abs(P(1)-3.d0) .gt. 1.d-8) STOP 4
+ if (abs(P(2)-4.d0) .gt. 1.d-8) STOP 5
class default
- call abort()
+ STOP 6
end select
select type (Pt)
type is (double precision)
- if (abs(Pt(1)-3.d0) .gt. 1.d-8) call abort()
- if (abs(Pt(2)-4.d0) .gt. 1.d-8) call abort()
+ if (abs(Pt(1)-3.d0) .gt. 1.d-8) STOP 7
+ if (abs(Pt(2)-4.d0) .gt. 1.d-8) STOP 8
class default
- call abort()
+ STOP 9
end select
end subroutine
subroutine W(ar)
class(*), intent(in) :: ar(:)
- if (lbound(ar, 1) /= 1) call abort()
+ if (lbound(ar, 1) /= 1) STOP 10
select type (ar)
type is (integer)
! The indeces 1:2 are essential here, or else one would not
! note, that the array internally starts at 0, although the
! check for the lbound above went fine.
- if (any (ar(1:2) .ne. [3, 4])) call abort()
+ if (any (ar(1:2) .ne. [3, 4])) STOP 11
class default
- call abort()
+ STOP 12
end select
end subroutine
subroutine WtwoD(ar)
class(*), intent(in) :: ar(:,:)
- if (any (lbound(ar) /= [1, 1])) call abort()
+ if (any (lbound(ar) /= [1, 1])) STOP 13
select type (ar)
type is (integer)
if (any (reshape(ar(1:2,1:3), [6]) .ne. [3, 4, 5, 5, 6, 7])) &
- call abort()
+ STOP 14
class default
- call abort()
+ STOP 15
end select
end subroutine
end program class_array_20
i_p => o%arr
call o%P(i_p)
- if (any(o%arr%i /= reshape([9,42,42,42],[2,2]))) call abort()
+ if (any(o%arr%i /= reshape([9,42,42,42],[2,2]))) STOP 1
do l= 1, 10
do i= 1, 2
do j= 1,2
if ((i == 1 .and. j == 1 .and. l == 5 .and. &
o%arr(i,j)%a(5) /= 1) &
.or. (.not. (i == 1 .and. j == 1 .and. l == 5) &
- .and. o%arr(i,j)%a(l) /= 72)) call abort()
+ .and. o%arr(i,j)%a(l) /= 72)) STOP 2
end do
end do
end do
if ((i == 1 .and. j == 1 .and. l == 5 .and. &
i_a(i,j)%a(5) /= 1) &
.or. (.not. (i == 1 .and. j == 1 .and. l == 5) &
- .and. i_a(i,j)%a(l) /= 72)) call abort()
+ .and. i_a(i,j)%a(l) /= 72)) STOP 3
end do
end do
end do
i_p%i = 4
call indir(o, i_p)
- if (any(o%arr%i /= reshape([9,42,42,42],[2,2]))) call abort()
+ if (any(o%arr%i /= reshape([9,42,42,42],[2,2]))) STOP 4
end program test
! vim:ts=2:sts=2:cindent:sw=2:tw=80:
! print *, "Before qsort: ", A%disp()
call qsort(A)
! print *, "After qsort: ", A%disp()
- if (any (A%disp() .ne. [2,3,4,5,7])) call abort
+ if (any (A%disp() .ne. [2,3,4,5,7])) STOP 1
end program main
type(t) :: x(3)
integer :: n(3) = [0,100,200]
call x(:)%foo(n)
- if (any(n .ne. [99,199,299])) call abort
+ if (any(n .ne. [99,199,299])) STOP 1
end
class(base_type), dimension(:), allocatable, intent(inout) :: a
class(base_type), dimension(:), allocatable :: tmp
allocate (tmp (2 * size (a))) ! how to alloc b with same type as a ?
- if (trim (print_type ("tmp", tmp)) .ne. "tmp is base_type") call abort
+ if (trim (print_type ("tmp", tmp)) .ne. "tmp is base_type") STOP 1
tmp(:size(a)) = a ! polymorphic l.h.s.
call move_alloc (from=tmp, to=a)
end subroutine reallocate
class(base_type), dimension(:), allocatable :: a
allocate (extended_type :: a(10))
- if (trim (print_type ("a", a)) .ne. "a is extended_type") call abort
+ if (trim (print_type ("a", a)) .ne. "a is extended_type") STOP 2
call reallocate (a)
- if (trim (print_type ("a", a)) .ne. "a is base_type") call abort
+ if (trim (print_type ("a", a)) .ne. "a is base_type") STOP 3
deallocate (a)
end program main
end type
type(desc_type) :: desc
- if (allocated(desc%indxmap)) call abort()
+ if (allocated(desc%indxmap)) STOP 1
end
use m
class(t1), allocatable :: x(:)
allocate (x(4), source = [(t1 (i), i=1,4)])
- if (any (x%disp () .ne. [1,2,3,4])) call abort
- if (any (x(2:3)%disp () .ne. [2,3])) call abort
- if (any (x(4:3:-1)%disp () .ne. [4,3])) call abort
- if (x(4)%disp () .ne. 4) call abort
+ if (any (x%disp () .ne. [1,2,3,4])) STOP 1
+ if (any (x(2:3)%disp () .ne. [2,3])) STOP 2
+ if (any (x(4:3:-1)%disp () .ne. [4,3])) STOP 3
+ if (x(4)%disp () .ne. 4) STOP 4
deallocate (x)
allocate (x(4), source = [(t2 (2 * i, real (i) + 0.333), i=1,4)])
- if (any (x%disp () .ne. [1,2,3,4])) call abort
- if (any (x(2:3)%disp () .ne. [2,3])) call abort
- if (any (x(4:3:-1)%disp () .ne. [4,3])) call abort
- if (x(4)%disp () .ne. 4) call abort
+ if (any (x%disp () .ne. [1,2,3,4])) STOP 5
+ if (any (x(2:3)%disp () .ne. [2,3])) STOP 6
+ if (any (x(4:3:-1)%disp () .ne. [4,3])) STOP 7
+ if (x(4)%disp () .ne. 4) STOP 8
end
! foo's assign negates, whilst its '*' negates and mutliplies.
unitf%foo_x = 1
call rescale(unitf, 42)
- if (unitf%foo_x .ne. 42) call abort
+ if (unitf%foo_x .ne. 42) STOP 1
! bar's assign negates foo_x, whilst its '*' copies foo_x
! and does a multiply by twice factor.
unitb%foo_x = 1
unitb%bar_x = 2
call rescale(unitb, 3)
- if (unitb%bar_x .ne. 12) call abort
- if (unitb%foo_x .ne. -1) call abort
+ if (unitb%bar_x .ne. 12) STOP 2
+ if (unitb%foo_x .ne. -1) STOP 3
contains
subroutine rescale(this,scale)
class(foo) ,intent(inout) :: this
y%a = 44
y%b = 55
call intent_out (y)
- if (y%a/=1 .or. y%b/=3) call abort()
+ if (y%a/=1 .or. y%b/=3) STOP 1
y%a = 66
y%b = 77
call intent_out_unused (y)
- if (y%a/=1 .or. y%b/=3) call abort()
+ if (y%a/=1 .or. y%b/=3) STOP 2
contains
class(t), intent(out) :: x
select type (x)
type is (t2)
- if (x%a/=1 .or. x%b/=3) call abort()
+ if (x%a/=1 .or. x%b/=3) STOP 3
end select
end subroutine
call suba(alloc=.false., prsnt=.false.)
call suba(xa, alloc=.false., prsnt=.true.)
- if (.not. allocated (xa)) call abort ()
- if (.not. allocated (xa%i)) call abort ()
- if (xa%i /= 5) call abort ()
+ if (.not. allocated (xa)) STOP 1
+ if (.not. allocated (xa%i)) STOP 2
+ if (xa%i /= 5) STOP 3
xa%i = -3
call suba(xa, alloc=.true., prsnt=.true.)
- if (allocated (xa)) call abort ()
+ if (allocated (xa)) STOP 4
call suba2(alloc=.false., prsnt=.false.)
call suba2(xa2, alloc=.false., prsnt=.true.)
- if (.not. allocated (xa2)) call abort ()
- if (size (xa2) /= 1) call abort ()
- if (.not. allocated (xa2(1)%i)) call abort ()
- if (xa2(1)%i /= 5) call abort ()
+ if (.not. allocated (xa2)) STOP 5
+ if (size (xa2) /= 1) STOP 6
+ if (.not. allocated (xa2(1)%i)) STOP 7
+ if (xa2(1)%i /= 5) STOP 8
xa2(1)%i = -3
call suba2(xa2, alloc=.true., prsnt=.true.)
- if (allocated (xa2)) call abort ()
+ if (allocated (xa2)) STOP 9
call subp(alloc=.false., prsnt=.false.)
call subp(xp, alloc=.false., prsnt=.true.)
- if (.not. associated (xp)) call abort ()
- if (.not. allocated (xp%i)) call abort ()
- if (xp%i /= 5) call abort ()
+ if (.not. associated (xp)) STOP 10
+ if (.not. allocated (xp%i)) STOP 11
+ if (xp%i /= 5) STOP 12
xp%i = -3
call subp(xp, alloc=.true., prsnt=.true.)
- if (associated (xp)) call abort ()
+ if (associated (xp)) STOP 13
call subp2(alloc=.false., prsnt=.false.)
call subp2(xp2, alloc=.false., prsnt=.true.)
- if (.not. associated (xp2)) call abort ()
- if (size (xp2) /= 1) call abort ()
- if (.not. allocated (xp2(1)%i)) call abort ()
- if (xp2(1)%i /= 5) call abort ()
+ if (.not. associated (xp2)) STOP 14
+ if (size (xp2) /= 1) STOP 15
+ if (.not. allocated (xp2(1)%i)) STOP 16
+ if (xp2(1)%i /= 5) STOP 17
xp2(1)%i = -3
call subp2(xp2, alloc=.true., prsnt=.true.)
- if (associated (xp2)) call abort ()
+ if (associated (xp2)) STOP 18
call subac(alloc=.false., prsnt=.false.)
call subac(xac, alloc=.false., prsnt=.true.)
- if (.not. allocated (xac)) call abort ()
- if (.not. allocated (xac%i)) call abort ()
- if (xac%i /= 5) call abort ()
+ if (.not. allocated (xac)) STOP 19
+ if (.not. allocated (xac%i)) STOP 20
+ if (xac%i /= 5) STOP 21
xac%i = -3
call subac(xac, alloc=.true., prsnt=.true.)
- if (allocated (xac)) call abort ()
+ if (allocated (xac)) STOP 22
call suba2c(alloc=.false., prsnt=.false.)
call suba2c(xa2c, alloc=.false., prsnt=.true.)
- if (.not. allocated (xa2c)) call abort ()
- if (size (xa2c) /= 1) call abort ()
- if (.not. allocated (xa2c(1)%i)) call abort ()
- if (xa2c(1)%i /= 5) call abort ()
+ if (.not. allocated (xa2c)) STOP 23
+ if (size (xa2c) /= 1) STOP 24
+ if (.not. allocated (xa2c(1)%i)) STOP 25
+ if (xa2c(1)%i /= 5) STOP 26
xa2c(1)%i = -3
call suba2c(xa2c, alloc=.true., prsnt=.true.)
- if (allocated (xa2c)) call abort ()
+ if (allocated (xa2c)) STOP 27
contains
subroutine suba2c(x, prsnt, alloc)
class(t), optional, allocatable :: x(:)[:]
logical prsnt, alloc
- if (present (x) .neqv. prsnt) call abort ()
+ if (present (x) .neqv. prsnt) STOP 28
if (prsnt) then
- if (alloc .neqv. allocated(x)) call abort ()
+ if (alloc .neqv. allocated(x)) STOP 29
if (.not. allocated (x)) then
allocate (x(1)[*])
x(1)%i = 5
else
- if (x(1)%i /= -3) call abort()
+ if (x(1)%i /= -3) STOP 30
deallocate (x)
end if
end if
subroutine subac(x, prsnt, alloc)
class(t), optional, allocatable :: x[:]
logical prsnt, alloc
- if (present (x) .neqv. prsnt) call abort ()
+ if (present (x) .neqv. prsnt) STOP 31
if (present (x)) then
- if (alloc .neqv. allocated(x)) call abort ()
+ if (alloc .neqv. allocated(x)) STOP 32
if (.not. allocated (x)) then
allocate (x[*])
x%i = 5
else
- if (x%i /= -3) call abort()
+ if (x%i /= -3) STOP 33
deallocate (x)
end if
end if
subroutine suba2(x, prsnt, alloc)
class(t), optional, allocatable :: x(:)
logical prsnt, alloc
- if (present (x) .neqv. prsnt) call abort ()
+ if (present (x) .neqv. prsnt) STOP 34
if (prsnt) then
- if (alloc .neqv. allocated(x)) call abort ()
+ if (alloc .neqv. allocated(x)) STOP 35
if (.not. allocated (x)) then
allocate (x(1))
x(1)%i = 5
else
- if (x(1)%i /= -3) call abort()
+ if (x(1)%i /= -3) STOP 36
deallocate (x)
end if
end if
subroutine suba(x, prsnt, alloc)
class(t), optional, allocatable :: x
logical prsnt, alloc
- if (present (x) .neqv. prsnt) call abort ()
+ if (present (x) .neqv. prsnt) STOP 37
if (present (x)) then
- if (alloc .neqv. allocated(x)) call abort ()
+ if (alloc .neqv. allocated(x)) STOP 38
if (.not. allocated (x)) then
allocate (x)
x%i = 5
else
- if (x%i /= -3) call abort()
+ if (x%i /= -3) STOP 39
deallocate (x)
end if
end if
subroutine subp2(x, prsnt, alloc)
class(t), optional, pointer :: x(:)
logical prsnt, alloc
- if (present (x) .neqv. prsnt) call abort ()
+ if (present (x) .neqv. prsnt) STOP 40
if (present (x)) then
- if (alloc .neqv. associated(x)) call abort ()
+ if (alloc .neqv. associated(x)) STOP 41
if (.not. associated (x)) then
allocate (x(1))
x(1)%i = 5
else
- if (x(1)%i /= -3) call abort()
+ if (x(1)%i /= -3) STOP 42
deallocate (x)
end if
end if
subroutine subp(x, prsnt, alloc)
class(t), optional, pointer :: x
logical prsnt, alloc
- if (present (x) .neqv. prsnt) call abort ()
+ if (present (x) .neqv. prsnt) STOP 43
if (present (x)) then
- if (alloc .neqv. associated(x)) call abort ()
+ if (alloc .neqv. associated(x)) STOP 44
if (.not. associated (x)) then
allocate (x)
x%i = 5
else
- if (x%i /= -3) call abort()
+ if (x%i /= -3) STOP 45
deallocate (x)
end if
end if
subroutine s2(x)
class(t), intent(in), optional :: x
- if (present (x)) call abort ()
+ if (present (x)) STOP 1
!print *, present(x)
end subroutine s2
subroutine s2p(x,psnt)
class(t), intent(in), pointer, optional :: x
logical psnt
- if (present (x).neqv. psnt) call abort ()
+ if (present (x).neqv. psnt) STOP 2
!print *, present(x)
end subroutine s2p
subroutine s2caf(x)
class(t), intent(in), optional :: x[*]
- if (present (x)) call abort ()
+ if (present (x)) STOP 3
!print *, present(x)
end subroutine s2caf
subroutine s2t(x)
type(t), intent(in), optional :: x
- if (present (x)) call abort ()
+ if (present (x)) STOP 4
!print *, present(x)
end subroutine s2t
subroutine s2t2(x)
type(t2), intent(in), optional :: x
- if (present (x)) call abort ()
+ if (present (x)) STOP 5
!print *, present(x)
end subroutine s2t2
subroutine s2tp(x, psnt)
type(t), pointer, intent(in), optional :: x
logical psnt
- if (present (x).neqv. psnt) call abort ()
+ if (present (x).neqv. psnt) STOP 6
!print *, present(x)
end subroutine s2tp
subroutine s2t2p(x, psnt)
type(t2), pointer, intent(in), optional :: x
logical psnt
- if (present (x).neqv. psnt) call abort ()
+ if (present (x).neqv. psnt) STOP 7
!print *, present(x)
end subroutine s2t2p
impure elemental subroutine s2elem(x)
class(t), intent(in), optional :: x
- if (present (x)) call abort ()
+ if (present (x)) STOP 8
!print *, present(x)
end subroutine s2elem
impure elemental subroutine s2elem_t(x)
type(t), intent(in), optional :: x
- if (present (x)) call abort ()
+ if (present (x)) STOP 9
!print *, present(x)
end subroutine s2elem_t
impure elemental subroutine s2elem_t2(x)
type(t2), intent(in), optional :: x
- if (present (x)) call abort ()
+ if (present (x)) STOP 10
!print *, present(x)
end subroutine s2elem_t2
subroutine a2(x)
class(t), intent(in), optional :: x(:)
- if (present (x)) call abort ()
+ if (present (x)) STOP 11
! print *, present(x)
end subroutine a2
subroutine a2p(x, psnt)
class(t), pointer, intent(in), optional :: x(:)
logical psnt
- if (present (x).neqv. psnt) call abort ()
+ if (present (x).neqv. psnt) STOP 12
! print *, present(x)
end subroutine a2p
subroutine a2caf(x)
class(t), intent(in), optional :: x(:)[*]
- if (present (x)) call abort ()
+ if (present (x)) STOP 13
! print *, present(x)
end subroutine a2caf
subroutine a4(x)
class(t), intent(in), optional :: x(4)
- if (present (x)) call abort ()
+ if (present (x)) STOP 14
!print *, present(x)
end subroutine a4
subroutine a4p(x, psnt)
class(t), pointer, intent(in), optional :: x(:)
logical psnt
- if (present (x).neqv. psnt) call abort ()
+ if (present (x).neqv. psnt) STOP 15
!print *, present(x)
end subroutine a4p
subroutine a4caf(x)
class(t), intent(in), optional :: x(4)[*]
- if (present (x)) call abort ()
+ if (present (x)) STOP 16
!print *, present(x)
end subroutine a4caf
subroutine a4t(x)
type(t), intent(in), optional :: x(4)
- if (present (x)) call abort ()
+ if (present (x)) STOP 17
!print *, present(x)
end subroutine a4t
subroutine a4t2(x)
type(t2), intent(in), optional :: x(4)
- if (present (x)) call abort ()
+ if (present (x)) STOP 18
!print *, present(x)
end subroutine a4t2
subroutine a4tp(x, psnt)
type(t), pointer, intent(in), optional :: x(:)
logical psnt
- if (present (x).neqv. psnt) call abort ()
+ if (present (x).neqv. psnt) STOP 19
!print *, present(x)
end subroutine a4tp
subroutine a4t2p(x, psnt)
type(t2), pointer, intent(in), optional :: x(:)
logical psnt
- if (present (x).neqv. psnt) call abort ()
+ if (present (x).neqv. psnt) STOP 20
!print *, present(x)
end subroutine a4t2p
subroutine ar(x)
class(t), intent(in), optional :: x(..)
- if (present (x)) call abort ()
+ if (present (x)) STOP 21
!print *, present(x)
end subroutine ar
subroutine art(x)
type(t), intent(in), optional :: x(..)
- if (present (x)) call abort ()
+ if (present (x)) STOP 22
!print *, present(x)
end subroutine art
subroutine arp(x, psnt)
class(t), pointer, intent(in), optional :: x(..)
logical psnt
- if (present (x).neqv. psnt) call abort ()
+ if (present (x).neqv. psnt) STOP 23
!print *, present(x)
end subroutine arp
subroutine artp(x, psnt)
type(t), intent(in), pointer, optional :: x(..)
logical psnt
- if (present (x).neqv. psnt) call abort ()
+ if (present (x).neqv. psnt) STOP 24
!print *, present(x)
end subroutine artp
foo => string
select type (foo)
type is (character(*))
- if (foo .ne. 'foo') call abort
+ if (foo .ne. 'foo') STOP 1
foo = 'bar'
end select
end function
select type (res)
type is (character(*))
- if (res .ne. 'bar') call abort
+ if (res .ne. 'bar') STOP 2
end select
- if (string .ne. 'bar') call abort
+ if (string .ne. 'bar') STOP 3
end
b => ptr()
select type (b)
type is (character(*))
- if (a .ne. "bar") call abort
+ if (a .ne. "bar") STOP 1
end select
contains
function ptr()
allocate(t2 :: x(10))
select type(x)
type is(t2)
- if (size (x) /= 10) call abort ()
+ if (size (x) /= 10) STOP 1
x = [(t2(a=-i, B=[1*i,2*i,3*i,4*i]), i = 1, 10)]
do i = 1, 10
if (x(i)%a /= -i .or. size (x(i)%b) /= 4 &
.or. any (x(i)%b /= [1*i,2*i,3*i,4*i])) then
- call abort()
+ STOP 2
end if
- if (x(i)%z /= cmplx(3.3, 4.4)) call abort()
+ if (x(i)%z /= cmplx(3.3, 4.4)) STOP 3
end do
class default
- call abort()
+ STOP 4
end select
call base(x)
contains
subroutine base(y)
type(t) :: y(:)
- if (size (y) /= 10) call abort ()
+ if (size (y) /= 10) STOP 5
do i = 1, 10
if (y(i)%a /= -i .or. size (y(i)%b) /= 4 &
.or. any (y(i)%b /= [1*i,2*i,3*i,4*i])) then
- call abort()
+ STOP 6
end if
end do
end subroutine base
subroutine baseExplicit(v, n)
integer, intent(in) :: n
type(t) :: v(n)
- if (size (v) /= 10) call abort ()
+ if (size (v) /= 10) STOP 7
do i = 1, 10
if (v(i)%a /= -i .or. size (v(i)%b) /= 4 &
.or. any (v(i)%b /= [1*i,2*i,3*i,4*i])) then
- call abort()
+ STOP 8
end if
end do
end subroutine baseExplicit
class(t), intent(in) :: z(:)
select type(z)
type is(t2)
- if (size (z) /= 10) call abort ()
+ if (size (z) /= 10) STOP 9
do i = 1, 10
if (z(i)%a /= -i .or. size (z(i)%b) /= 4 &
.or. any (z(i)%b /= [1*i,2*i,3*i,4*i])) then
- call abort()
+ STOP 10
end if
- if (z(i)%z /= cmplx(3.3, 4.4)) call abort()
+ if (z(i)%z /= cmplx(3.3, 4.4)) STOP 11
end do
class default
- call abort()
+ STOP 12
end select
call base(z)
call baseExplicit(z, size(z))
class(t), intent(in) :: u(n)
select type(u)
type is(t2)
- if (size (u) /= 10) call abort ()
+ if (size (u) /= 10) STOP 13
do i = 1, 10
if (u(i)%a /= -i .or. size (u(i)%b) /= 4 &
.or. any (u(i)%b /= [1*i,2*i,3*i,4*i])) then
- call abort()
+ STOP 14
end if
- if (u(i)%z /= cmplx(3.3, 4.4)) call abort()
+ if (u(i)%z /= cmplx(3.3, 4.4)) STOP 15
end do
class default
- call abort()
+ STOP 16
end select
call base(u)
call baseExplicit(u, n)
subroutine subpr2 (x)
type(foo) :: x
- if (x%i /= 55) call abort ()
+ if (x%i /= 55) STOP 1
end subroutine
subroutine subpr2_array (x)
type(foo) :: x(:)
- if (any(x(:)%i /= 55)) call abort ()
+ if (any(x(:)%i /= 55)) STOP 2
end subroutine
function f ()
allocate (foo_1 :: xx)
xx%i = 33
call subpr (xx)
- if (xx%i /= 3) call abort ()
+ if (xx%i /= 3) STOP 3
xx%i = 33
call subpr_elem (xx)
- if (xx%i /= 3) call abort ()
+ if (xx%i /= 3) STOP 4
call subpr (f ())
allocate (foo_1 :: yy(2))
yy(:)%i = 33
call subpr_elem (yy)
- if (any (yy%i /= 3)) call abort ()
+ if (any (yy%i /= 3)) STOP 5
yy(:)%i = 33
call subpr_elem (yy(1))
- if (yy(1)%i /= 3) call abort ()
+ if (yy(1)%i /= 3) STOP 6
yy(:)%i = 33
call subpr_array (yy)
- if (any (yy%i /= 3)) call abort ()
+ if (any (yy%i /= 3)) STOP 7
yy(:)%i = 33
call subpr_array (yy(1:2))
- if (any (yy(1:2)%i /= 3)) call abort ()
+ if (any (yy(1:2)%i /= 3)) STOP 8
call subpr2_array (g ())
end program
allocate (cm)
cm%i = 77
tm = cm
- if (tm%i .ne. cm%i) call abort
+ if (tm%i .ne. cm%i) STOP 1
end subroutine
subroutine comment2
type is (child)
cm2%mother=cm
end select
- if (cm2%i .ne. cm%i) call abort
+ if (cm2%i .ne. cm%i) STOP 2
end subroutine
end program
type(v) :: a, b(3)
x = func1() ! scalar to scalar - no alloc comps
- if (x%ii .ne. 77) call abort
+ if (x%ii .ne. 77) STOP 1
y = func2() ! array to array - no alloc comps
- if (any (y%ii .ne. [1,2,3])) call abort
+ if (any (y%ii .ne. [1,2,3])) STOP 2
y = func1() ! scalar to array - no alloc comps
- if (any (y%ii .ne. 77)) call abort
+ if (any (y%ii .ne. 77)) STOP 3
x = func3() ! scalar daughter type to scalar - no alloc comps
- if (x%ii .ne. 99) call abort
+ if (x%ii .ne. 99) STOP 4
y = func4() ! array daughter type to array - no alloc comps
- if (any (y%ii .ne. [3,4,5])) call abort
+ if (any (y%ii .ne. [3,4,5])) STOP 5
y = func3() ! scalar daughter type to array - no alloc comps
- if (any (y%ii .ne. [99,99,99])) call abort
+ if (any (y%ii .ne. [99,99,99])) STOP 6
a = func5() ! scalar to scalar - alloc comps in parent type
- if (any (a%rr .ne. [10.0,20.0])) call abort
+ if (any (a%rr .ne. [10.0,20.0])) STOP 7
b = func6() ! array to array - alloc comps in parent type
- if (any (b(3)%rr .ne. [3.0,4.0])) call abort
+ if (any (b(3)%rr .ne. [3.0,4.0])) STOP 8
a = func7() ! scalar daughter type to scalar - alloc comps in parent type
- if (any (a%rr .ne. [10.0,20.0])) call abort
+ if (any (a%rr .ne. [10.0,20.0])) STOP 9
b = func8() ! array daughter type to array - alloc comps in parent type
- if (any (b(3)%rr .ne. [3.0,4.0])) call abort
+ if (any (b(3)%rr .ne. [3.0,4.0])) STOP 10
b = func7() ! scalar daughter type to array - alloc comps in parent type
- if (any (b(2)%rr .ne. [10.0,20.0])) call abort
+ if (any (b(2)%rr .ne. [10.0,20.0])) STOP 11
! This is an extension of class_to_type_2.f90's test using a daughter type
! instead of the declared type.
- if (subpr2_array (g ()) .ne. 99 ) call abort
+ if (subpr2_array (g ()) .ne. 99 ) STOP 12
contains
function func1() result(res)
integer function subpr2_array (x)
type(t) :: x(:)
- if (any(x(:)%ii /= 55)) call abort
+ if (any(x(:)%ii /= 55)) STOP 13
subpr2_array = 99
end function
type(t) :: a
allocate (a%caf[3:*])
a%caf = 7
-if (a%caf /= 7) call abort ()
+if (a%caf /= 7) STOP 1
if (any (lcobound (a%caf) /= [ 3 ]) &
.or. ucobound (a%caf, dim=1) /= this_image ()+2) &
- call abort ()
+ STOP 2
deallocate (a%caf)
end
allocate(object%indices(me))
object%indices = 42
- if ( any( object[me]%indices(:) /= 42 ) ) call abort()
+ if ( any( object[me]%indices(:) /= 42 ) ) STOP 1
end program
allocate(a[*], stat=stat, errmsg=str)
!print *, stat, trim(str)
if (stat == 0 .or. str /= "Attempt to allocate an allocated object") &
- call abort ()
+ STOP 1
str = repeat('Y', len(str))
allocate(b(2)[*], stat=stat, errmsg=str)
!print *, stat, trim(str)
if (stat == 0 .or. str /= "Attempt to allocate an allocated object") &
- call abort ()
+ STOP 2
str = repeat('Q', len(str))
allocate(c, stat=stat, errmsg=str)
!print *, stat, trim(str)
if (stat == 0 .or. str /= "Attempt to allocate an allocated object") &
- call abort ()
+ STOP 3
str = repeat('P', len(str))
allocate(d(3), stat=stat, errmsg=str)
!print *, stat, trim(str)
if (stat == 0 .or. str /= "Attempt to allocate an allocated object") &
- call abort ()
+ STOP 4
end
call atomic_define(a(1), 7_2)
call atomic_ref(b, a(1))
-if (b /= a(1)) call abort()
+if (b /= a(1)) STOP 1
call atomic_define(c, .false.)
call atomic_ref(d, c[this_image()])
-if (d .neqv. .false.) call abort()
+if (d .neqv. .false.) STOP 2
call atomic_define(c[this_image()], .true.)
call atomic_ref(d, c)
-if (d .neqv. .true.) call abort()
+if (d .neqv. .true.) STOP 3
end
if (this_image() == 1) then
call atomic_define(caf[num_images()], 5, stat=stat)
- if (stat /= 0) call abort()
+ if (stat /= 0) STOP 1
call atomic_define(caf_log[num_images()], .true., stat=stat)
- if (stat /= 0) call abort()
+ if (stat /= 0) STOP 2
end if
sync all
if (this_image() == num_images()) then
- if (caf /= 5) call abort()
- if (.not. caf_log) call abort()
+ if (caf /= 5) STOP 3
+ if (.not. caf_log) STOP 4
var = 99
call atomic_ref(var, caf, stat=stat)
- if (stat /= 0 .or. var /= 5) call abort()
+ if (stat /= 0 .or. var /= 5) STOP 5
var2 = .false.
call atomic_ref(var2, caf_log, stat=stat)
- if (stat /= 0 .or. .not. var2) call abort()
+ if (stat /= 0 .or. .not. var2) STOP 6
end if
call atomic_ref(var, caf[num_images()], stat=stat)
-if (stat /= 0 .or. var /= 5) call abort()
+if (stat /= 0 .or. var /= 5) STOP 7
call atomic_ref(var2, caf_log[num_images()], stat=stat)
-if (stat /= 0 .or. .not. var2) call abort()
+if (stat /= 0 .or. .not. var2) STOP 8
sync all
! ADD
sync all
call atomic_add(caf, this_image(), stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 9
do i = 1, num_images()
call atomic_add(caf[i], 1, stat=stat)
- if (stat /= 0) call abort()
+ if (stat /= 0) STOP 10
call atomic_ref(var, caf, stat=stat)
- if (stat /= 0 .or. var < this_image()) call abort()
+ if (stat /= 0 .or. var < this_image()) STOP 11
end do
sync all
call atomic_ref(var, caf[num_images()], stat=stat)
-if (stat /= 0 .or. var /= num_images() + this_image()) call abort()
+if (stat /= 0 .or. var /= num_images() + this_image()) STOP 12
do i = 1, num_images()
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= num_images() + i) call abort()
+ if (stat /= 0 .or. var /= num_images() + i) STOP 13
end do
sync all
if (this_image() < storage_size(caf)-2) then
do i = this_image(), min(num_images(), storage_size(caf)-2)
call atomic_and(caf[i], shiftl(1, this_image()), stat=stat)
- if (stat /= 0) call abort()
+ if (stat /= 0) STOP 14
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = iand(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 15
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 16
end if
end do
end if
if (this_image() < storage_size(caf)-2) then
do i = this_image(), min(num_images(), storage_size(caf)-2)
call atomic_and(caf[i], shiftl(1, this_image()), stat=stat)
- if (stat /= 0) call abort()
+ if (stat /= 0) STOP 17
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = iand(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 18
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 19
end if
end do
end if
if (this_image() < storage_size(caf)-2) then
do i = this_image(), min(num_images(), storage_size(caf)-2)
call atomic_and(caf[i], shiftl(1, this_image()), stat=stat)
- if (stat /= 0) call abort()
+ if (stat /= 0) STOP 20
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = iand(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 21
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 22
end if
end do
end if
if (this_image() < storage_size(caf)-2) then
do i = this_image(), min(num_images(), storage_size(caf)-2)
call atomic_or(caf[i], shiftl(1, this_image()), stat=stat)
- if (stat /= 0) call abort()
+ if (stat /= 0) STOP 23
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = ior(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 24
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 25
end if
end do
end if
if (this_image() < storage_size(caf)-2) then
do i = this_image(), min(num_images(), storage_size(caf)-2)
call atomic_or(caf[i], shiftl(1, this_image()), stat=stat)
- if (stat /= 0) call abort()
+ if (stat /= 0) STOP 26
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = ior(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 27
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 28
end if
end do
end if
if (this_image() < storage_size(caf)-2) then
do i = this_image(), min(num_images(), storage_size(caf)-2)
call atomic_or(caf[i], shiftl(1, this_image()), stat=stat)
- if (stat /= 0) call abort()
+ if (stat /= 0) STOP 29
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = ior(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 30
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 31
end if
end do
end if
if (this_image() < storage_size(caf)-2) then
do i = this_image(), min(num_images(), storage_size(caf)-2)
call atomic_xor(caf[i], shiftl(1, this_image()), stat=stat)
- if (stat /= 0) call abort()
+ if (stat /= 0) STOP 32
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = ieor(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 33
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 34
end if
end do
end if
if (this_image() < storage_size(caf)-2) then
do i = this_image(), min(num_images(), storage_size(caf)-2)
call atomic_xor(caf[i], shiftl(1, this_image()), stat=stat)
- if (stat /= 0) call abort()
+ if (stat /= 0) STOP 35
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = ieor(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 36
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 37
end if
end do
end if
if (this_image() < storage_size(caf)-2) then
do i = this_image(), min(num_images(), storage_size(caf)-2)
call atomic_xor(caf[i], shiftl(1, this_image()), stat=stat)
- if (stat /= 0) call abort()
+ if (stat /= 0) STOP 38
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = ieor(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 39
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 40
end if
end do
end if
sync all
var = -99
call atomic_fetch_add(caf, this_image(), var, stat=stat)
-if (stat /= 0 .or. var < 0) call abort()
-if (num_images() == 1 .and. var /= 0) call abort()
+if (stat /= 0 .or. var < 0) STOP 41
+if (num_images() == 1 .and. var /= 0) STOP 42
do i = 1, num_images()
var = -99
call atomic_fetch_add(caf[i], 1, var, stat=stat)
- if (stat /= 0 .or. var < 0) call abort()
+ if (stat /= 0 .or. var < 0) STOP 43
call atomic_ref(var, caf, stat=stat)
- if (stat /= 0 .or. var < this_image()) call abort()
+ if (stat /= 0 .or. var < this_image()) STOP 44
end do
sync all
call atomic_ref(var, caf[num_images()], stat=stat)
-if (stat /= 0 .or. var /= num_images() + this_image()) call abort()
+if (stat /= 0 .or. var /= num_images() + this_image()) STOP 45
do i = 1, num_images()
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= num_images() + i) call abort()
+ if (stat /= 0 .or. var /= num_images() + i) STOP 46
end do
sync all
do i = this_image(), min(num_images(), storage_size(caf)-2)
var = 99
call atomic_fetch_and(caf[i], shiftl(1, this_image()), var, stat=stat)
- if (stat /= 0 .or. var /= 0) call abort()
+ if (stat /= 0 .or. var /= 0) STOP 47
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = iand(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 48
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 49
end if
end do
end if
do i = this_image(), min(num_images(), storage_size(caf)-2)
var = -99
call atomic_fetch_and(caf[i], shiftl(1, this_image()), var, stat=stat)
- if (stat /= 0 .or. var == shiftl(1, this_image())) call abort()
+ if (stat /= 0 .or. var == shiftl(1, this_image())) STOP 50
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = iand(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 51
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 52
end if
end do
end if
do i = this_image(), min(num_images(), storage_size(caf)-2)
var = -99
call atomic_fetch_and(caf[i], shiftl(1, this_image()), var, stat=stat)
- if (stat /= 0 .or. var <= 0) call abort()
+ if (stat /= 0 .or. var <= 0) STOP 53
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = iand(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 54
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 55
end if
end do
end if
do i = this_image(), min(num_images(), storage_size(caf)-2)
var = -99
call atomic_fetch_or(caf[i], shiftl(1, this_image()), var, stat=stat)
- if (stat /= 0 .or. var < 0 .or. var == shiftl(1, this_image())) call abort()
+ if (stat /= 0 .or. var < 0 .or. var == shiftl(1, this_image())) STOP 56
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = ior(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 57
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 58
end if
end do
end if
do i = this_image(), min(num_images(), storage_size(caf)-2)
var = -99
call atomic_fetch_or(caf[i], shiftl(1, this_image()), var, stat=stat)
- if (stat /= 0 .or. (var < 0 .and. var /= -1)) call abort()
+ if (stat /= 0 .or. (var < 0 .and. var /= -1)) STOP 59
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = ior(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 60
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 61
end if
end do
end if
do i = this_image(), min(num_images(), storage_size(caf)-2)
var = -99
call atomic_fetch_or(caf[i], shiftl(1, this_image()), var, stat=stat)
- if (stat /= 0 .or. var <= 0) call abort()
+ if (stat /= 0 .or. var <= 0) STOP 62
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = ior(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 63
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 64
end if
end do
end if
do i = this_image(), min(num_images(), storage_size(caf)-2)
var = -99
call atomic_fetch_xor(caf[i], shiftl(1, this_image()), var, stat=stat)
- if (stat /= 0 .or. var < 0 .or. var == shiftl(1, this_image())) call abort()
+ if (stat /= 0 .or. var < 0 .or. var == shiftl(1, this_image())) STOP 65
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = ieor(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 66
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 67
end if
end do
end if
do i = this_image(), min(num_images(), storage_size(caf)-2)
var = -99
call atomic_fetch_xor(caf[i], shiftl(1, this_image()), var, stat=stat)
- if (stat /= 0 .or. (var < 0 .and. var /= -1)) call abort()
+ if (stat /= 0 .or. (var < 0 .and. var /= -1)) STOP 68
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = ieor(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 69
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 70
end if
end do
end if
do i = this_image(), min(num_images(), storage_size(caf)-2)
var = -99
call atomic_fetch_xor(caf[i], shiftl(1, this_image()), var, stat=stat)
- if (stat /= 0 .or. var <= 0) call abort()
+ if (stat /= 0 .or. var <= 0) STOP 71
end do
end if
sync all
do i = 1, min(num_images(), storage_size(caf)-2)
var3 = ieor(var3, shiftl(1, i))
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 72
if (i == this_image()) then
call atomic_ref(var, caf[i], stat=stat)
- if (stat /= 0 .or. var /= var3) call abort()
+ if (stat /= 0 .or. var /= var3) STOP 73
end if
end do
end if
if (this_image() == 1) then
call atomic_cas(caf[num_images()], compare=5, new=3, old=var, stat=stat)
- if (stat /= 0 .or. var /= 9) call abort()
+ if (stat /= 0 .or. var /= 9) STOP 74
call atomic_ref(var, caf[num_images()], stat=stat)
- if (stat /= 0 .or. var /= 9) call abort()
+ if (stat /= 0 .or. var /= 9) STOP 75
end if
sync all
-if (this_image() == num_images() .and. caf /= 9) call abort()
+if (this_image() == num_images() .and. caf /= 9) STOP 76
call atomic_ref(var, caf[num_images()], stat=stat)
-if (stat /= 0 .or. var /= 9) call abort()
+if (stat /= 0 .or. var /= 9) STOP 77
sync all
if (this_image() == 1) then
call atomic_cas(caf[num_images()], compare=9, new=3, old=var, stat=stat)
- if (stat /= 0 .or. var /= 9) call abort()
+ if (stat /= 0 .or. var /= 9) STOP 78
call atomic_ref(var, caf[num_images()], stat=stat)
- if (stat /= 0 .or. var /= 3) call abort()
+ if (stat /= 0 .or. var /= 3) STOP 79
end if
sync all
-if (this_image() == num_images() .and. caf /= 3) call abort()
+if (this_image() == num_images() .and. caf /= 3) STOP 80
call atomic_ref(var, caf[num_images()], stat=stat)
-if (stat /= 0 .or. var /= 3) call abort()
+if (stat /= 0 .or. var /= 3) STOP 81
sync all
if (this_image() == 1) then
call atomic_cas(caf_log[num_images()], compare=.false., new=.false., old=var2, stat=stat)
- if (stat /= 0 .or. var2 .neqv. .true.) call abort()
+ if (stat /= 0 .or. var2 .neqv. .true.) STOP 82
call atomic_ref(var2, caf_log[num_images()], stat=stat)
- if (stat /= 0 .or. var2 .neqv. .true.) call abort()
+ if (stat /= 0 .or. var2 .neqv. .true.) STOP 83
end if
sync all
-if (this_image() == num_images() .and. caf_log .neqv. .true.) call abort()
+if (this_image() == num_images() .and. caf_log .neqv. .true.) STOP 84
call atomic_ref(var2, caf_log[num_images()], stat=stat)
-if (stat /= 0 .or. var2 .neqv. .true.) call abort()
+if (stat /= 0 .or. var2 .neqv. .true.) STOP 85
sync all
if (this_image() == 1) then
call atomic_cas(caf_log[num_images()], compare=.true., new=.false., old=var2, stat=stat)
- if (stat /= 0 .or. var2 .neqv. .true.) call abort()
+ if (stat /= 0 .or. var2 .neqv. .true.) STOP 86
call atomic_ref(var2, caf_log[num_images()], stat=stat)
- if (stat /= 0 .or. var2 .neqv. .false.) call abort()
+ if (stat /= 0 .or. var2 .neqv. .false.) STOP 87
end if
sync all
-if (this_image() == num_images() .and. caf_log .neqv. .false.) call abort()
+if (this_image() == num_images() .and. caf_log .neqv. .false.) STOP 88
call atomic_ref(var2, caf_log[num_images()], stat=stat)
-if (stat /= 0 .or. var2 .neqv. .false.) call abort()
+if (stat /= 0 .or. var2 .neqv. .false.) STOP 89
end
call expl (y)
i = lcobound(x, dim=1)
j = ucobound(x, dim=1)
- if (i /= 1 .or. j /= num_images()) call abort()
+ if (i /= 1 .or. j /= num_images()) STOP 1
i = lcobound(y, dim=1)
j = ucobound(y, dim=1)
- if (i /= 1 .or. j /= num_images()) call abort()
+ if (i /= 1 .or. j /= num_images()) STOP 2
end subroutine foo
subroutine bar(y)
integer :: i, j
i = lcobound(y, dim=1)
j = ucobound(y, dim=1)
- if (i /= 1 .or. j /= num_images()) call abort()
+ if (i /= 1 .or. j /= num_images()) STOP 3
end subroutine bar
subroutine expl(z)
integer :: i, j
i = lcobound(z, dim=1)
j = ucobound(z, dim=1)
- if (i /= 1 .or. j /= num_images()) call abort()
+ if (i /= 1 .or. j /= num_images()) STOP 4
end subroutine expl
end program test_caf
end if
sync all
if (this_image() == 1) then
- if (str2a /= 1_"abc ") call abort()
+ if (str2a /= 1_"abc ") STOP 1
else
- if (str2a /= 1_"XXXXXXX") call abort()
+ if (str2a /= 1_"XXXXXXX") STOP 2
end if
! SCALAR - kind 4 - with padding
end if
sync all
if (this_image() == 1) then
- if (ustr2a /= 4_"abc ") call abort()
+ if (ustr2a /= 4_"abc ") STOP 3
else
- if (ustr2a /= 4_"XXXXXXX") call abort()
+ if (ustr2a /= 4_"XXXXXXX") STOP 4
end if
! SCALAR - kind 1 - with trimming
end if
sync all
if (this_image() == 1) then
- if (str1a /= 1_"abc") call abort()
+ if (str1a /= 1_"abc") STOP 5
else
- if (str1a /= 1_"XXX") call abort()
+ if (str1a /= 1_"XXX") STOP 6
end if
! SCALAR - kind 4 - with trimming
end if
sync all
if (this_image() == 1) then
- if (ustr1a /= 4_"abc") call abort()
+ if (ustr1a /= 4_"abc") STOP 7
else
- if (ustr1a /= 4_"XXX") call abort()
+ if (ustr1a /= 4_"XXX") STOP 8
end if
! - - - - - array = array
sync all
if (this_image() == 1) then
if (str2b(1) /= 1_"abc " .or. str2b(2) /= 1_"def " &
- .or. str2b(3) /= 1_"gjh ") call abort()
+ .or. str2b(3) /= 1_"gjh ") STOP 9
else
if (str2b(1) /= 1_"XXXXXXX" .or. str2b(2) /= 1_"YYYYYYY" &
- .or. str2b(3) /= 1_"ZZZZZZZ") call abort()
+ .or. str2b(3) /= 1_"ZZZZZZZ") STOP 10
end if
! contiguous ARRAY - kind 4 - with padding
sync all
if (this_image() == 1) then
if (ustr2b(1) /= 4_"abc " .or. ustr2b(2) /= 4_"def " &
- .or. ustr2b(3) /= 4_"gjh ") call abort()
+ .or. ustr2b(3) /= 4_"gjh ") STOP 11
else
if (ustr2b(1) /= 4_"XXXXXXX" .or. ustr2b(2) /= 4_"YYYYYYY" &
- .or. ustr2b(3) /= 4_"ZZZZZZZ") call abort()
+ .or. ustr2b(3) /= 4_"ZZZZZZZ") STOP 12
end if
! contiguous ARRAY - kind 1 - with trimming
sync all
if (this_image() == 1) then
if (str1b(1) /= 1_"abc" .or. str1b(2) /= 1_"hij" &
- .or. str1b(3) /= 1_"opq") call abort()
+ .or. str1b(3) /= 1_"opq") STOP 13
else
if (str1b(1) /= 1_"XXX" .or. str1b(2) /= 1_"YYY" &
- .or. str1b(3) /= 1_"ZZZ") call abort()
+ .or. str1b(3) /= 1_"ZZZ") STOP 14
end if
! contiguous ARRAY - kind 4 - with trimming
sync all
if (this_image() == 1) then
if (ustr1b(1) /= 4_"abc" .or. ustr1b(2) /= 4_"hij" &
- .or. ustr1b(3) /= 4_"opq") call abort()
+ .or. ustr1b(3) /= 4_"opq") STOP 15
else
if (ustr1b(1) /= 4_"XXX" .or. ustr1b(2) /= 4_"YYY" &
- .or. ustr1b(3) /= 4_"ZZZ") call abort()
+ .or. ustr1b(3) /= 4_"ZZZ") STOP 16
end if
! - - - - - array = scalar
sync all
if (this_image() == 1) then
if (str2b(1) /= 1_"abc " .or. str2b(2) /= 1_"abc " &
- .or. str2b(3) /= 1_"abc ") call abort()
+ .or. str2b(3) /= 1_"abc ") STOP 17
else
if (str2b(1) /= 1_"XXXXXXX" .or. str2b(2) /= 1_"YYYYYYY" &
- .or. str2b(3) /= 1_"ZZZZZZZ") call abort()
+ .or. str2b(3) /= 1_"ZZZZZZZ") STOP 18
end if
! contiguous ARRAY - kind 4 - with padding
sync all
if (this_image() == 1) then
if (ustr2b(1) /= 4_"abc " .or. ustr2b(2) /= 4_"abc " &
- .or. ustr2b(3) /= 4_"abc ") call abort()
+ .or. ustr2b(3) /= 4_"abc ") STOP 19
else
if (ustr2b(1) /= 4_"XXXXXXX" .or. ustr2b(2) /= 4_"YYYYYYY" &
- .or. ustr2b(3) /= 4_"ZZZZZZZ") call abort()
+ .or. ustr2b(3) /= 4_"ZZZZZZZ") STOP 20
end if
! contiguous ARRAY - kind 1 - with trimming
sync all
if (this_image() == 1) then
if (str1b(1) /= 1_"abc" .or. str1b(2) /= 1_"abc" &
- .or. str1b(3) /= 1_"abc") call abort()
+ .or. str1b(3) /= 1_"abc") STOP 21
else
if (str1b(1) /= 1_"XXX" .or. str1b(2) /= 1_"YYY" &
- .or. str1b(3) /= 1_"ZZZ") call abort()
+ .or. str1b(3) /= 1_"ZZZ") STOP 22
end if
! contiguous ARRAY - kind 4 - with trimming
sync all
if (this_image() == 1) then
if (ustr1b(1) /= 4_"abc" .or. ustr1b(2) /= 4_"abc" &
- .or. ustr1b(3) /= 4_"abc") call abort()
+ .or. ustr1b(3) /= 4_"abc") STOP 23
else
if (ustr1b(1) /= 4_"XXX" .or. ustr1b(2) /= 4_"YYY" &
- .or. ustr1b(3) /= 4_"ZZZ") call abort()
+ .or. ustr1b(3) /= 4_"ZZZ") STOP 24
end if
! ---------- Take from a coindexed variable -------------
end if
sync all
if (this_image() == num_images()) then
- if (str2a /= 1_"abc ") call abort()
+ if (str2a /= 1_"abc ") STOP 25
else
- if (str2a /= 1_"XXXXXXX") call abort()
+ if (str2a /= 1_"XXXXXXX") STOP 26
end if
! SCALAR - kind 4 - with padding
end if
sync all
if (this_image() == num_images()) then
- if (ustr2a /= 4_"abc ") call abort()
+ if (ustr2a /= 4_"abc ") STOP 27
else
- if (ustr2a /= 4_"XXXXXXX") call abort()
+ if (ustr2a /= 4_"XXXXXXX") STOP 28
end if
! SCALAR - kind 1 - with trimming
end if
sync all
if (this_image() == num_images()) then
- if (str1a /= 1_"abc") call abort()
+ if (str1a /= 1_"abc") STOP 29
else
- if (str1a /= 1_"XXX") call abort()
+ if (str1a /= 1_"XXX") STOP 30
end if
! SCALAR - kind 4 - with trimming
end if
sync all
if (this_image() == num_images()) then
- if (ustr1a /= 4_"abc") call abort()
+ if (ustr1a /= 4_"abc") STOP 31
else
- if (ustr1a /= 4_"XXX") call abort()
+ if (ustr1a /= 4_"XXX") STOP 32
end if
! - - - - - array = array
sync all
if (this_image() == num_images()) then
if (str2b(1) /= 1_"abc " .or. str2b(2) /= 1_"def " &
- .or. str2b(3) /= 1_"gjh ") call abort()
+ .or. str2b(3) /= 1_"gjh ") STOP 33
else
if (str2b(1) /= 1_"XXXXXXX" .or. str2b(2) /= 1_"YYYYYYY" &
- .or. str2b(3) /= 1_"ZZZZZZZ") call abort()
+ .or. str2b(3) /= 1_"ZZZZZZZ") STOP 34
end if
! contiguous ARRAY - kind 4 - with padding
sync all
if (this_image() == num_images()) then
if (ustr2b(1) /= 4_"abc " .or. ustr2b(2) /= 4_"def " &
- .or. ustr2b(3) /= 4_"gjh ") call abort()
+ .or. ustr2b(3) /= 4_"gjh ") STOP 35
else
if (ustr2b(1) /= 4_"XXXXXXX" .or. ustr2b(2) /= 4_"YYYYYYY" &
- .or. ustr2b(3) /= 4_"ZZZZZZZ") call abort()
+ .or. ustr2b(3) /= 4_"ZZZZZZZ") STOP 36
end if
! contiguous ARRAY - kind 1 - with trimming
sync all
if (this_image() == num_images()) then
if (str1b(1) /= 1_"abc" .or. str1b(2) /= 1_"hij" &
- .or. str1b(3) /= 1_"opq") call abort()
+ .or. str1b(3) /= 1_"opq") STOP 37
else
if (str1b(1) /= 1_"XXX" .or. str1b(2) /= 1_"YYY" &
- .or. str1b(3) /= 1_"ZZZ") call abort()
+ .or. str1b(3) /= 1_"ZZZ") STOP 38
end if
! contiguous ARRAY - kind 4 - with trimming
sync all
if (this_image() == num_images()) then
if (ustr1b(1) /= 4_"abc" .or. ustr1b(2) /= 4_"hij" &
- .or. ustr1b(3) /= 4_"opq") call abort()
+ .or. ustr1b(3) /= 4_"opq") STOP 39
else
if (ustr1b(1) /= 4_"XXX" .or. ustr1b(2) /= 4_"YYY" &
- .or. ustr1b(3) /= 4_"ZZZ") call abort()
+ .or. ustr1b(3) /= 4_"ZZZ") STOP 40
end if
! - - - - - array = scalar
sync all
if (this_image() == num_images()) then
if (str2b(1) /= 1_"abc " .or. str2b(2) /= 1_"abc " &
- .or. str2b(3) /= 1_"abc ") call abort()
+ .or. str2b(3) /= 1_"abc ") STOP 41
else
if (str2b(1) /= 1_"XXXXXXX" .or. str2b(2) /= 1_"YYYYYYY" &
- .or. str2b(3) /= 1_"ZZZZZZZ") call abort()
+ .or. str2b(3) /= 1_"ZZZZZZZ") STOP 42
end if
! contiguous ARRAY - kind 4 - with padding
sync all
if (this_image() == num_images()) then
if (ustr2b(1) /= 4_"abc " .or. ustr2b(2) /= 4_"abc " &
- .or. ustr2b(3) /= 4_"abc ") call abort()
+ .or. ustr2b(3) /= 4_"abc ") STOP 43
else
if (ustr2b(1) /= 4_"XXXXXXX" .or. ustr2b(2) /= 4_"YYYYYYY" &
- .or. ustr2b(3) /= 4_"ZZZZZZZ") call abort()
+ .or. ustr2b(3) /= 4_"ZZZZZZZ") STOP 44
end if
! contiguous ARRAY - kind 1 - with trimming
sync all
if (this_image() == num_images()) then
if (str1b(1) /= 1_"abc" .or. str1b(2) /= 1_"abc" &
- .or. str1b(3) /= 1_"abc") call abort()
+ .or. str1b(3) /= 1_"abc") STOP 45
else
if (str1b(1) /= 1_"XXX" .or. str1b(2) /= 1_"YYY" &
- .or. str1b(3) /= 1_"ZZZ") call abort()
+ .or. str1b(3) /= 1_"ZZZ") STOP 46
end if
! contiguous ARRAY - kind 4 - with trimming
sync all
if (this_image() == num_images()) then
if (ustr1b(1) /= 4_"abc" .or. ustr1b(2) /= 4_"abc" &
- .or. ustr1b(3) /= 4_"abc") call abort()
+ .or. ustr1b(3) /= 4_"abc") STOP 47
else
if (ustr1b(1) /= 4_"XXX" .or. ustr1b(2) /= 4_"YYY" &
- .or. ustr1b(3) /= 4_"ZZZ") call abort()
+ .or. ustr1b(3) /= 4_"ZZZ") STOP 48
end if
end if
sync all
if (this_image() == 1) then
- if (str2a /= 1_"abc ") call abort()
+ if (str2a /= 1_"abc ") STOP 49
else
- if (str2a /= 1_"XXXXXXX") call abort()
+ if (str2a /= 1_"XXXXXXX") STOP 50
end if
! SCALAR - kind 4 - with padding
end if
sync all
if (this_image() == 1) then
- if (ustr2a /= 4_"abc ") call abort()
+ if (ustr2a /= 4_"abc ") STOP 51
else
- if (ustr2a /= 4_"XXXXXXX") call abort()
+ if (ustr2a /= 4_"XXXXXXX") STOP 52
end if
! SCALAR - kind 1 - with trimming
end if
sync all
if (this_image() == 1) then
- if (str1a /= 1_"abc") call abort()
+ if (str1a /= 1_"abc") STOP 53
else
- if (str1a /= 1_"XXX") call abort()
+ if (str1a /= 1_"XXX") STOP 54
end if
! SCALAR - kind 4 - with trimming
end if
sync all
if (this_image() == 1) then
- if (ustr1a /= 4_"abc") call abort()
+ if (ustr1a /= 4_"abc") STOP 55
else
- if (ustr1a /= 4_"XXX") call abort()
+ if (ustr1a /= 4_"XXX") STOP 56
end if
! - - - - - array = array
sync all
if (this_image() == 1) then
if (str2b(1) /= 1_"abc " .or. str2b(2) /= 1_"def " &
- .or. str2b(3) /= 1_"gjh ") call abort()
+ .or. str2b(3) /= 1_"gjh ") STOP 57
else
if (str2b(1) /= 1_"XXXXXXX" .or. str2b(2) /= 1_"YYYYYYY" &
- .or. str2b(3) /= 1_"ZZZZZZZ") call abort()
+ .or. str2b(3) /= 1_"ZZZZZZZ") STOP 58
end if
! contiguous ARRAY - kind 4 - with padding
sync all
if (this_image() == 1) then
if (ustr2b(1) /= 4_"abc " .or. ustr2b(2) /= 4_"def " &
- .or. ustr2b(3) /= 4_"gjh ") call abort()
+ .or. ustr2b(3) /= 4_"gjh ") STOP 59
else
if (ustr2b(1) /= 4_"XXXXXXX" .or. ustr2b(2) /= 4_"YYYYYYY" &
- .or. ustr2b(3) /= 4_"ZZZZZZZ") call abort()
+ .or. ustr2b(3) /= 4_"ZZZZZZZ") STOP 60
end if
! contiguous ARRAY - kind 1 - with trimming
sync all
if (this_image() == 1) then
if (str1b(1) /= 1_"abc" .or. str1b(2) /= 1_"hij" &
- .or. str1b(3) /= 1_"opq") call abort()
+ .or. str1b(3) /= 1_"opq") STOP 61
else
if (str1b(1) /= 1_"XXX" .or. str1b(2) /= 1_"YYY" &
- .or. str1b(3) /= 1_"ZZZ") call abort()
+ .or. str1b(3) /= 1_"ZZZ") STOP 62
end if
! contiguous ARRAY - kind 4 - with trimming
sync all
if (this_image() == 1) then
if (ustr1b(1) /= 4_"abc" .or. ustr1b(2) /= 4_"hij" &
- .or. ustr1b(3) /= 4_"opq") call abort()
+ .or. ustr1b(3) /= 4_"opq") STOP 63
else
if (ustr1b(1) /= 4_"XXX" .or. ustr1b(2) /= 4_"YYY" &
- .or. ustr1b(3) /= 4_"ZZZ") call abort()
+ .or. ustr1b(3) /= 4_"ZZZ") STOP 64
end if
! - - - - - array = scalar
sync all
if (this_image() == 1) then
if (str2b(1) /= 1_"abc " .or. str2b(2) /= 1_"abc " &
- .or. str2b(3) /= 1_"abc ") call abort()
+ .or. str2b(3) /= 1_"abc ") STOP 65
else
if (str2b(1) /= 1_"XXXXXXX" .or. str2b(2) /= 1_"YYYYYYY" &
- .or. str2b(3) /= 1_"ZZZZZZZ") call abort()
+ .or. str2b(3) /= 1_"ZZZZZZZ") STOP 66
end if
! contiguous ARRAY - kind 4 - with padding
sync all
if (this_image() == 1) then
if (ustr2b(1) /= 4_"abc " .or. ustr2b(2) /= 4_"abc " &
- .or. ustr2b(3) /= 4_"abc ") call abort()
+ .or. ustr2b(3) /= 4_"abc ") STOP 67
else
if (ustr2b(1) /= 4_"XXXXXXX" .or. ustr2b(2) /= 4_"YYYYYYY" &
- .or. ustr2b(3) /= 4_"ZZZZZZZ") call abort()
+ .or. ustr2b(3) /= 4_"ZZZZZZZ") STOP 68
end if
! contiguous ARRAY - kind 1 - with trimming
sync all
if (this_image() == 1) then
if (str1b(1) /= 1_"abc" .or. str1b(2) /= 1_"abc" &
- .or. str1b(3) /= 1_"abc") call abort()
+ .or. str1b(3) /= 1_"abc") STOP 69
else
if (str1b(1) /= 1_"XXX" .or. str1b(2) /= 1_"YYY" &
- .or. str1b(3) /= 1_"ZZZ") call abort()
+ .or. str1b(3) /= 1_"ZZZ") STOP 70
end if
! contiguous ARRAY - kind 4 - with trimming
sync all
if (this_image() == 1) then
if (ustr1b(1) /= 4_"abc" .or. ustr1b(2) /= 4_"abc" &
- .or. ustr1b(3) /= 4_"abc") call abort()
+ .or. ustr1b(3) /= 4_"abc") STOP 71
else
if (ustr1b(1) /= 4_"XXX" .or. ustr1b(2) /= 4_"YYY" &
- .or. ustr1b(3) /= 4_"ZZZ") call abort()
+ .or. ustr1b(3) /= 4_"ZZZ") STOP 72
end if
! ============== char1 <-> char4 =====================
end if
sync all
if (this_image() == 1) then
- if (str2a /= 1_"abc ") call abort()
+ if (str2a /= 1_"abc ") STOP 73
else
- if (str2a /= 1_"XXXXXXX") call abort()
+ if (str2a /= 1_"XXXXXXX") STOP 74
end if
! SCALAR - kind 4 <- 1 - with padding
end if
sync all
if (this_image() == 1) then
- if (ustr2a /= 4_"abc ") call abort()
+ if (ustr2a /= 4_"abc ") STOP 75
else
- if (ustr2a /= 4_"XXXXXXX") call abort()
+ if (ustr2a /= 4_"XXXXXXX") STOP 76
end if
! SCALAR - kind 1 <- 4 - with trimming
end if
sync all
if (this_image() == 1) then
- if (str1a /= 1_"abc") call abort()
+ if (str1a /= 1_"abc") STOP 77
else
- if (str1a /= 1_"XXX") call abort()
+ if (str1a /= 1_"XXX") STOP 78
end if
! SCALAR - kind 4 <- 1 - with trimming
end if
sync all
if (this_image() == 1) then
- if (ustr1a /= 4_"abc") call abort()
+ if (ustr1a /= 4_"abc") STOP 79
else
- if (ustr1a /= 4_"XXX") call abort()
+ if (ustr1a /= 4_"XXX") STOP 80
end if
! - - - - - array = array
sync all
if (this_image() == 1) then
if (str2b(1) /= 1_"abc " .or. str2b(2) /= 1_"def " &
- .or. str2b(3) /= 1_"gjh ") call abort()
+ .or. str2b(3) /= 1_"gjh ") STOP 81
else
if (str2b(1) /= 1_"XXXXXXX" .or. str2b(2) /= 1_"YYYYYYY" &
- .or. str2b(3) /= 1_"ZZZZZZZ") call abort()
+ .or. str2b(3) /= 1_"ZZZZZZZ") STOP 82
end if
! contiguous ARRAY - kind 4 <- 1 - with padding
sync all
if (this_image() == 1) then
if (ustr2b(1) /= 4_"abc " .or. ustr2b(2) /= 4_"def " &
- .or. ustr2b(3) /= 4_"gjh ") call abort()
+ .or. ustr2b(3) /= 4_"gjh ") STOP 83
else
if (ustr2b(1) /= 4_"XXXXXXX" .or. ustr2b(2) /= 4_"YYYYYYY" &
- .or. ustr2b(3) /= 4_"ZZZZZZZ") call abort()
+ .or. ustr2b(3) /= 4_"ZZZZZZZ") STOP 84
end if
! contiguous ARRAY - kind 1 <- 4 - with trimming
sync all
if (this_image() == 1) then
if (str1b(1) /= 1_"abc" .or. str1b(2) /= 1_"hij" &
- .or. str1b(3) /= 1_"opq") call abort()
+ .or. str1b(3) /= 1_"opq") STOP 85
else
if (str1b(1) /= 1_"XXX" .or. str1b(2) /= 1_"YYY" &
- .or. str1b(3) /= 1_"ZZZ") call abort()
+ .or. str1b(3) /= 1_"ZZZ") STOP 86
end if
! contiguous ARRAY - kind 4 <- 1 - with trimming
sync all
if (this_image() == 1) then
if (ustr1b(1) /= 4_"abc" .or. ustr1b(2) /= 4_"hij" &
- .or. ustr1b(3) /= 4_"opq") call abort()
+ .or. ustr1b(3) /= 4_"opq") STOP 87
else
if (ustr1b(1) /= 4_"XXX" .or. ustr1b(2) /= 4_"YYY" &
- .or. ustr1b(3) /= 4_"ZZZ") call abort()
+ .or. ustr1b(3) /= 4_"ZZZ") STOP 88
end if
! - - - - - array = scalar
sync all
if (this_image() == 1) then
if (str2b(1) /= 1_"abc " .or. str2b(2) /= 1_"abc " &
- .or. str2b(3) /= 1_"abc ") call abort()
+ .or. str2b(3) /= 1_"abc ") STOP 89
else
if (str2b(1) /= 1_"XXXXXXX" .or. str2b(2) /= 1_"YYYYYYY" &
- .or. str2b(3) /= 1_"ZZZZZZZ") call abort()
+ .or. str2b(3) /= 1_"ZZZZZZZ") STOP 90
end if
! contiguous ARRAY - kind 4 <- 1 - with padding
sync all
if (this_image() == 1) then
if (ustr2b(1) /= 4_"abc " .or. ustr2b(2) /= 4_"abc " &
- .or. ustr2b(3) /= 4_"abc ") call abort()
+ .or. ustr2b(3) /= 4_"abc ") STOP 91
else
if (ustr2b(1) /= 4_"XXXXXXX" .or. ustr2b(2) /= 4_"YYYYYYY" &
- .or. ustr2b(3) /= 4_"ZZZZZZZ") call abort()
+ .or. ustr2b(3) /= 4_"ZZZZZZZ") STOP 92
end if
! contiguous ARRAY - kind 1 <- 4 - with trimming
sync all
if (this_image() == 1) then
if (str1b(1) /= 1_"abc" .or. str1b(2) /= 1_"abc" &
- .or. str1b(3) /= 1_"abc") call abort()
+ .or. str1b(3) /= 1_"abc") STOP 93
else
if (str1b(1) /= 1_"XXX" .or. str1b(2) /= 1_"YYY" &
- .or. str1b(3) /= 1_"ZZZ") call abort()
+ .or. str1b(3) /= 1_"ZZZ") STOP 94
end if
! contiguous ARRAY - kind 4 <- 1 - with trimming
sync all
if (this_image() == 1) then
if (ustr1b(1) /= 4_"abc" .or. ustr1b(2) /= 4_"abc" &
- .or. ustr1b(3) /= 4_"abc") call abort()
+ .or. ustr1b(3) /= 4_"abc") STOP 95
else
if (ustr1b(1) /= 4_"XXX" .or. ustr1b(2) /= 4_"YYY" &
- .or. ustr1b(3) /= 4_"ZZZ") call abort()
+ .or. ustr1b(3) /= 4_"ZZZ") STOP 96
end if
! ---------- Take from a coindexed variable -------------
end if
sync all
if (this_image() == num_images()) then
- if (str2a /= 1_"abc ") call abort()
+ if (str2a /= 1_"abc ") STOP 97
else
- if (str2a /= 1_"XXXXXXX") call abort()
+ if (str2a /= 1_"XXXXXXX") STOP 98
end if
! SCALAR - kind 4 <- 1 - with padding
end if
sync all
if (this_image() == num_images()) then
- if (ustr2a /= 4_"abc ") call abort()
+ if (ustr2a /= 4_"abc ") STOP 99
else
- if (ustr2a /= 4_"XXXXXXX") call abort()
+ if (ustr2a /= 4_"XXXXXXX") STOP 100
end if
! SCALAR - kind 1 <- 4 - with trimming
end if
sync all
if (this_image() == num_images()) then
- if (str1a /= 1_"abc") call abort()
+ if (str1a /= 1_"abc") STOP 101
else
- if (str1a /= 1_"XXX") call abort()
+ if (str1a /= 1_"XXX") STOP 102
end if
! SCALAR - kind 4 <- 1 - with trimming
end if
sync all
if (this_image() == num_images()) then
- if (ustr1a /= 4_"abc") call abort()
+ if (ustr1a /= 4_"abc") STOP 103
else
- if (ustr1a /= 4_"XXX") call abort()
+ if (ustr1a /= 4_"XXX") STOP 104
end if
! - - - - - array = array
sync all
if (this_image() == num_images()) then
if (str2b(1) /= 1_"abc " .or. str2b(2) /= 1_"def " &
- .or. str2b(3) /= 1_"gjh ") call abort()
+ .or. str2b(3) /= 1_"gjh ") STOP 105
else
if (str2b(1) /= 1_"XXXXXXX" .or. str2b(2) /= 1_"YYYYYYY" &
- .or. str2b(3) /= 1_"ZZZZZZZ") call abort()
+ .or. str2b(3) /= 1_"ZZZZZZZ") STOP 106
end if
! contiguous ARRAY - kind 4 <- 1 - with padding
sync all
if (this_image() == num_images()) then
if (ustr2b(1) /= 4_"abc " .or. ustr2b(2) /= 4_"def " &
- .or. ustr2b(3) /= 4_"gjh ") call abort()
+ .or. ustr2b(3) /= 4_"gjh ") STOP 107
else
if (ustr2b(1) /= 4_"XXXXXXX" .or. ustr2b(2) /= 4_"YYYYYYY" &
- .or. ustr2b(3) /= 4_"ZZZZZZZ") call abort()
+ .or. ustr2b(3) /= 4_"ZZZZZZZ") STOP 108
end if
! contiguous ARRAY - kind 1 <- 4 - with trimming
sync all
if (this_image() == num_images()) then
if (str1b(1) /= 1_"abc" .or. str1b(2) /= 1_"hij" &
- .or. str1b(3) /= 1_"opq") call abort()
+ .or. str1b(3) /= 1_"opq") STOP 109
else
if (str1b(1) /= 1_"XXX" .or. str1b(2) /= 1_"YYY" &
- .or. str1b(3) /= 1_"ZZZ") call abort()
+ .or. str1b(3) /= 1_"ZZZ") STOP 110
end if
! contiguous ARRAY - kind 4 <- 1 - with trimming
sync all
if (this_image() == num_images()) then
if (ustr1b(1) /= 4_"abc" .or. ustr1b(2) /= 4_"hij" &
- .or. ustr1b(3) /= 4_"opq") call abort()
+ .or. ustr1b(3) /= 4_"opq") STOP 111
else
if (ustr1b(1) /= 4_"XXX" .or. ustr1b(2) /= 4_"YYY" &
- .or. ustr1b(3) /= 4_"ZZZ") call abort()
+ .or. ustr1b(3) /= 4_"ZZZ") STOP 112
end if
! - - - - - array = scalar
sync all
if (this_image() == num_images()) then
if (str2b(1) /= 1_"abc " .or. str2b(2) /= 1_"abc " &
- .or. str2b(3) /= 1_"abc ") call abort()
+ .or. str2b(3) /= 1_"abc ") STOP 113
else
if (str2b(1) /= 1_"XXXXXXX" .or. str2b(2) /= 1_"YYYYYYY" &
- .or. str2b(3) /= 1_"ZZZZZZZ") call abort()
+ .or. str2b(3) /= 1_"ZZZZZZZ") STOP 114
end if
! contiguous ARRAY - kind 4 <- 1 - with padding
sync all
if (this_image() == num_images()) then
if (ustr2b(1) /= 4_"abc " .or. ustr2b(2) /= 4_"abc " &
- .or. ustr2b(3) /= 4_"abc ") call abort()
+ .or. ustr2b(3) /= 4_"abc ") STOP 115
else
if (ustr2b(1) /= 4_"XXXXXXX" .or. ustr2b(2) /= 4_"YYYYYYY" &
- .or. ustr2b(3) /= 4_"ZZZZZZZ") call abort()
+ .or. ustr2b(3) /= 4_"ZZZZZZZ") STOP 116
end if
! contiguous ARRAY - kind 1 <- 4 - with trimming
sync all
if (this_image() == num_images()) then
if (str1b(1) /= 1_"abc" .or. str1b(2) /= 1_"abc" &
- .or. str1b(3) /= 1_"abc") call abort()
+ .or. str1b(3) /= 1_"abc") STOP 117
else
if (str1b(1) /= 1_"XXX" .or. str1b(2) /= 1_"YYY" &
- .or. str1b(3) /= 1_"ZZZ") call abort()
+ .or. str1b(3) /= 1_"ZZZ") STOP 118
end if
! contiguous ARRAY - kind 4 <- 1 - with trimming
sync all
if (this_image() == num_images()) then
if (ustr1b(1) /= 4_"abc" .or. ustr1b(2) /= 4_"abc" &
- .or. ustr1b(3) /= 4_"abc") call abort()
+ .or. ustr1b(3) /= 4_"abc") STOP 119
else
if (ustr1b(1) /= 4_"XXX" .or. ustr1b(2) /= 4_"YYY" &
- .or. ustr1b(3) /= 4_"ZZZ") call abort()
+ .or. ustr1b(3) /= 4_"ZZZ") STOP 120
end if
end if
sync all
if (this_image() == 1) then
- if (str2a /= 1_"abc ") call abort()
+ if (str2a /= 1_"abc ") STOP 121
else
- if (str2a /= 1_"XXXXXXX") call abort()
+ if (str2a /= 1_"XXXXXXX") STOP 122
end if
! SCALAR - kind 4 <- 1 - with padding
end if
sync all
if (this_image() == 1) then
- if (ustr2a /= 4_"abc ") call abort()
+ if (ustr2a /= 4_"abc ") STOP 123
else
- if (ustr2a /= 4_"XXXXXXX") call abort()
+ if (ustr2a /= 4_"XXXXXXX") STOP 124
end if
! SCALAR - kind 1 <- 4 - with trimming
end if
sync all
if (this_image() == 1) then
- if (str1a /= 1_"abc") call abort()
+ if (str1a /= 1_"abc") STOP 125
else
- if (str1a /= 1_"XXX") call abort()
+ if (str1a /= 1_"XXX") STOP 126
end if
! SCALAR - kind 4 <- 1 - with trimming
end if
sync all
if (this_image() == 1) then
- if (ustr1a /= 4_"abc") call abort()
+ if (ustr1a /= 4_"abc") STOP 127
else
- if (ustr1a /= 4_"XXX") call abort()
+ if (ustr1a /= 4_"XXX") STOP 128
end if
! - - - - - array = array
sync all
if (this_image() == 1) then
if (str2b(1) /= 1_"abc " .or. str2b(2) /= 1_"def " &
- .or. str2b(3) /= 1_"gjh ") call abort()
+ .or. str2b(3) /= 1_"gjh ") STOP 129
else
if (str2b(1) /= 1_"XXXXXXX" .or. str2b(2) /= 1_"YYYYYYY" &
- .or. str2b(3) /= 1_"ZZZZZZZ") call abort()
+ .or. str2b(3) /= 1_"ZZZZZZZ") STOP 130
end if
! contiguous ARRAY - kind 4 <- 1 - with padding
sync all
if (this_image() == 1) then
if (ustr2b(1) /= 4_"abc " .or. ustr2b(2) /= 4_"def " &
- .or. ustr2b(3) /= 4_"gjh ") call abort()
+ .or. ustr2b(3) /= 4_"gjh ") STOP 131
else
if (ustr2b(1) /= 4_"XXXXXXX" .or. ustr2b(2) /= 4_"YYYYYYY" &
- .or. ustr2b(3) /= 4_"ZZZZZZZ") call abort()
+ .or. ustr2b(3) /= 4_"ZZZZZZZ") STOP 132
end if
! contiguous ARRAY - kind 1 <- 4 - with trimming
sync all
if (this_image() == 1) then
if (str1b(1) /= 1_"abc" .or. str1b(2) /= 1_"hij" &
- .or. str1b(3) /= 1_"opq") call abort()
+ .or. str1b(3) /= 1_"opq") STOP 133
else
if (str1b(1) /= 1_"XXX" .or. str1b(2) /= 1_"YYY" &
- .or. str1b(3) /= 1_"ZZZ") call abort()
+ .or. str1b(3) /= 1_"ZZZ") STOP 134
end if
! contiguous ARRAY - kind 4 <- 1 - with trimming
sync all
if (this_image() == 1) then
if (ustr1b(1) /= 4_"abc" .or. ustr1b(2) /= 4_"hij" &
- .or. ustr1b(3) /= 4_"opq") call abort()
+ .or. ustr1b(3) /= 4_"opq") STOP 135
else
if (ustr1b(1) /= 4_"XXX" .or. ustr1b(2) /= 4_"YYY" &
- .or. ustr1b(3) /= 4_"ZZZ") call abort()
+ .or. ustr1b(3) /= 4_"ZZZ") STOP 136
end if
! - - - - - array = scalar
sync all
if (this_image() == 1) then
if (str2b(1) /= 1_"abc " .or. str2b(2) /= 1_"abc " &
- .or. str2b(3) /= 1_"abc ") call abort()
+ .or. str2b(3) /= 1_"abc ") STOP 137
else
if (str2b(1) /= 1_"XXXXXXX" .or. str2b(2) /= 1_"YYYYYYY" &
- .or. str2b(3) /= 1_"ZZZZZZZ") call abort()
+ .or. str2b(3) /= 1_"ZZZZZZZ") STOP 138
end if
! contiguous ARRAY - kind 4 <- 1 - with padding
sync all
if (this_image() == 1) then
if (ustr2b(1) /= 4_"abc " .or. ustr2b(2) /= 4_"abc " &
- .or. ustr2b(3) /= 4_"abc ") call abort()
+ .or. ustr2b(3) /= 4_"abc ") STOP 139
else
if (ustr2b(1) /= 4_"XXXXXXX" .or. ustr2b(2) /= 4_"YYYYYYY" &
- .or. ustr2b(3) /= 4_"ZZZZZZZ") call abort()
+ .or. ustr2b(3) /= 4_"ZZZZZZZ") STOP 140
end if
! contiguous ARRAY - kind 1 <- 4 - with trimming
sync all
if (this_image() == 1) then
if (str1b(1) /= 1_"abc" .or. str1b(2) /= 1_"abc" &
- .or. str1b(3) /= 1_"abc") call abort()
+ .or. str1b(3) /= 1_"abc") STOP 141
else
if (str1b(1) /= 1_"XXX" .or. str1b(2) /= 1_"YYY" &
- .or. str1b(3) /= 1_"ZZZ") call abort()
+ .or. str1b(3) /= 1_"ZZZ") STOP 142
end if
! contiguous ARRAY - kind 4 <- 1 - with trimming
sync all
if (this_image() == 1) then
if (ustr1b(1) /= 4_"abc" .or. ustr1b(2) /= 4_"abc" &
- .or. ustr1b(3) /= 4_"abc") call abort()
+ .or. ustr1b(3) /= 4_"abc") STOP 143
else
if (ustr1b(1) /= 4_"XXX" .or. ustr1b(2) /= 4_"YYY" &
- .or. ustr1b(3) /= 4_"ZZZ") call abort()
+ .or. ustr1b(3) /= 4_"ZZZ") STOP 144
end if
end subroutine char_test
call co_max (val, result_image=1)
if (this_image() == 1) then
!write(*,*) "Maximal value", val
- if (val /= num_images()) call abort()
+ if (val /= num_images()) STOP 1
end if
end subroutine test_max
call co_min (val, result_image=1)
if (this_image() == 1) then
!write(*,*) "Minimal value", val
- if (val /= 1) call abort()
+ if (val /= 1) STOP 2
end if
end subroutine test_min
if (this_image() == 1) then
!write(*,*) "The sum is ", val
n = num_images()
- if (val /= (n**2 + n)/2) call abort()
+ if (val /= (n**2 + n)/2) STOP 3
end if
end subroutine test_sum
end program test
integer :: tmp
call co_max (val(::2))
if (num_images() > 1) then
- if (any (val /= [42, this_image(), 101])) call abort()
+ if (any (val /= [42, this_image(), 101])) STOP 1
else
- if (any (val /= [42, this_image(), -55])) call abort()
+ if (any (val /= [42, this_image(), -55])) STOP 2
endif
val = tmp_val
call co_max (val(:))
if (num_images() > 1) then
- if (any (val /= [42, num_images(), 101])) call abort()
+ if (any (val /= [42, num_images(), 101])) STOP 3
else
- if (any (val /= [42, num_images(), -55])) call abort()
+ if (any (val /= [42, num_images(), -55])) STOP 4
endif
end subroutine test_max
if (this_image() == num_images()) then
!write(*,*) "Minimal value", val
if (num_images() > 1) then
- if (any (val /= [-99, 1, -55])) call abort()
+ if (any (val /= [-99, 1, -55])) STOP 5
else
- if (any (val /= [42, 1, -55])) call abort()
+ if (any (val /= [42, 1, -55])) STOP 6
endif
else
- if (any (val /= tmp_val)) call abort()
+ if (any (val /= tmp_val)) STOP 7
endif
end subroutine test_min
integer :: n
n = 88
call co_sum (val, result_image=1, stat=n)
- if (n /= 0) call abort()
+ if (n /= 0) STOP 8
if (this_image() == 1) then
n = num_images()
!write(*,*) "The sum is ", val
- if (any (val /= [42 + (n-1)*(-99), (n**2 + n)/2, -55+(n-1)*101])) call abort()
+ if (any (val /= [42 + (n-1)*(-99), (n**2 + n)/2, -55+(n-1)*101])) STOP 9
else
- if (any (val /= tmp_val)) call abort()
+ if (any (val /= tmp_val)) STOP 10
end if
end subroutine test_sum
end program test
sync all
call co_broadcast(i, source_image=num_images(), stat=stat, errmsg=errstr)
- if (stat /= 0) call abort()
- if (errstr /= "ZZZZZ") call abort()
- if (i /= 2) call abort()
+ if (stat /= 0) STOP 1
+ if (errstr /= "ZZZZZ") STOP 2
+ if (i /= 2) STOP 3
call co_broadcast(j, source_image=num_images(), stat=stat, errmsg=errstr)
- if (stat /= 0) call abort()
- if (errstr /= "ZZZZZ") call abort()
- if (any (j /= 66)) call abort
+ if (stat /= 0) STOP 4
+ if (errstr /= "ZZZZZ") STOP 5
+ if (any (j /= 66)) STOP 1
call co_broadcast(a, source_image=num_images(), stat=stat, errmsg=errstr)
- if (stat /= 0) call abort()
- if (errstr /= "ZZZZZ") call abort()
- if (any (a /= -99.0)) call abort
+ if (stat /= 0) STOP 6
+ if (errstr /= "ZZZZZ") STOP 7
+ if (any (a /= -99.0)) STOP 2
call co_broadcast(str1, source_image=num_images(), stat=stat, errmsg=errstr)
- if (stat /= 0) call abort()
- if (errstr /= "ZZZZZ") call abort()
- if (str1 /= "abcd") call abort()
+ if (stat /= 0) STOP 8
+ if (errstr /= "ZZZZZ") STOP 9
+ if (str1 /= "abcd") STOP 10
call co_broadcast(str2, source_image=num_images(), stat=stat, errmsg=errstr)
- if (stat /= 0) call abort()
- if (errstr /= "ZZZZZ") call abort()
- if (any (str2 /= 4_"12 3 4 5")) call abort
+ if (stat /= 0) STOP 11
+ if (errstr /= "ZZZZZ") STOP 12
+ if (any (str2 /= 4_"12 3 4 5")) STOP 3
call co_broadcast(dt, source_image=num_images(), stat=stat, errmsg=errstr)
- if (stat /= 0) call abort()
- if (errstr /= "ZZZZZ") call abort()
- if (any (dt(:)%i /= -1)) call abort()
- if (any (dt(:)%c /= 'a')) call abort()
- if (any (dt(:)%x(1) /= 3.)) call abort()
- if (any (dt(:)%x(2) /= 1.)) call abort()
- if (any (dt(:)%x(3) /= 8.)) call abort()
- if (any (dt(:)%y(1) /= 99.)) call abort()
- if (any (dt(:)%y(2) /= 24.)) call abort()
- if (any (dt(:)%y(3) /= 5.)) call abort()
+ if (stat /= 0) STOP 13
+ if (errstr /= "ZZZZZ") STOP 14
+ if (any (dt(:)%i /= -1)) STOP 15
+ if (any (dt(:)%c /= 'a')) STOP 16
+ if (any (dt(:)%x(1) /= 3.)) STOP 17
+ if (any (dt(:)%x(2) /= 1.)) STOP 18
+ if (any (dt(:)%x(3) /= 8.)) STOP 19
+ if (any (dt(:)%y(1) /= 99.)) STOP 20
+ if (any (dt(:)%y(2) /= 24.)) STOP 21
+ if (any (dt(:)%y(3) /= 5.)) STOP 22
sync all
dt = t(1, 'C', [1.,2.,3.], [3,3,3])
call co_broadcast(str2(::2), source_image=num_images(), stat=stat, &
errmsg=errstr)
- if (stat /= 0) call abort()
- if (errstr /= "ZZZZZ") call abort()
- if (str2(1) /= 4_"001122") call abort()
+ if (stat /= 0) STOP 23
+ if (errstr /= "ZZZZZ") STOP 24
+ if (str2(1) /= 4_"001122") STOP 25
if (this_image() == num_images()) then
- if (str2(1) /= 4_"001122") call abort()
+ if (str2(1) /= 4_"001122") STOP 26
else
- if (str2(2) /= 4_"12 3 4 5") call abort()
+ if (str2(2) /= 4_"12 3 4 5") STOP 27
end if
call co_broadcast(dt(2::2), source_image=num_images(), stat=stat, &
errmsg=errstr)
- if (stat /= 0) call abort()
- if (errstr /= "ZZZZZ") call abort()
+ if (stat /= 0) STOP 28
+ if (errstr /= "ZZZZZ") STOP 29
if (this_image() == num_images()) then
- if (any (dt(1:1)%i /= 1)) call abort()
- if (any (dt(1:1)%c /= 'C')) call abort()
- if (any (dt(1:1)%x(1) /= 1.)) call abort()
- if (any (dt(1:1)%x(2) /= 2.)) call abort()
- if (any (dt(1:1)%x(3) /= 3.)) call abort()
- if (any (dt(1:1)%y(1) /= 3.)) call abort()
- if (any (dt(1:1)%y(2) /= 3.)) call abort()
- if (any (dt(1:1)%y(3) /= 3.)) call abort()
+ if (any (dt(1:1)%i /= 1)) STOP 30
+ if (any (dt(1:1)%c /= 'C')) STOP 31
+ if (any (dt(1:1)%x(1) /= 1.)) STOP 32
+ if (any (dt(1:1)%x(2) /= 2.)) STOP 33
+ if (any (dt(1:1)%x(3) /= 3.)) STOP 34
+ if (any (dt(1:1)%y(1) /= 3.)) STOP 35
+ if (any (dt(1:1)%y(2) /= 3.)) STOP 36
+ if (any (dt(1:1)%y(3) /= 3.)) STOP 37
- if (any (dt(2:)%i /= -2)) call abort()
- if (any (dt(2:)%c /= 'i')) call abort()
- if (any (dt(2:)%x(1) /= 9.)) call abort()
- if (any (dt(2:)%x(2) /= 2.)) call abort()
- if (any (dt(2:)%x(3) /= 3.)) call abort()
- if (any (dt(2:)%y(1) /= 4.)) call abort()
- if (any (dt(2:)%y(2) /= 44.)) call abort()
- if (any (dt(2:)%y(3) /= 321.)) call abort()
+ if (any (dt(2:)%i /= -2)) STOP 38
+ if (any (dt(2:)%c /= 'i')) STOP 39
+ if (any (dt(2:)%x(1) /= 9.)) STOP 40
+ if (any (dt(2:)%x(2) /= 2.)) STOP 41
+ if (any (dt(2:)%x(3) /= 3.)) STOP 42
+ if (any (dt(2:)%y(1) /= 4.)) STOP 43
+ if (any (dt(2:)%y(2) /= 44.)) STOP 44
+ if (any (dt(2:)%y(3) /= 321.)) STOP 45
else
- if (any (dt(1::2)%i /= 1)) call abort()
- if (any (dt(1::2)%c /= 'C')) call abort()
- if (any (dt(1::2)%x(1) /= 1.)) call abort()
- if (any (dt(1::2)%x(2) /= 2.)) call abort()
- if (any (dt(1::2)%x(3) /= 3.)) call abort()
- if (any (dt(1::2)%y(1) /= 3.)) call abort()
- if (any (dt(1::2)%y(2) /= 3.)) call abort()
- if (any (dt(1::2)%y(3) /= 3.)) call abort()
+ if (any (dt(1::2)%i /= 1)) STOP 46
+ if (any (dt(1::2)%c /= 'C')) STOP 47
+ if (any (dt(1::2)%x(1) /= 1.)) STOP 48
+ if (any (dt(1::2)%x(2) /= 2.)) STOP 49
+ if (any (dt(1::2)%x(3) /= 3.)) STOP 50
+ if (any (dt(1::2)%y(1) /= 3.)) STOP 51
+ if (any (dt(1::2)%y(2) /= 3.)) STOP 52
+ if (any (dt(1::2)%y(3) /= 3.)) STOP 53
- if (any (dt(2::2)%i /= -2)) call abort()
- if (any (dt(2::2)%c /= 'i')) call abort()
- if (any (dt(2::2)%x(1) /= 9.)) call abort()
- if (any (dt(2::2)%x(2) /= 2.)) call abort()
- if (any (dt(2::2)%x(3) /= 3.)) call abort()
- if (any (dt(2::2)%y(1) /= 4.)) call abort()
- if (any (dt(2::2)%y(2) /= 44.)) call abort()
- if (any (dt(2::2)%y(3) /= 321.)) call abort()
+ if (any (dt(2::2)%i /= -2)) STOP 54
+ if (any (dt(2::2)%c /= 'i')) STOP 55
+ if (any (dt(2::2)%x(1) /= 9.)) STOP 56
+ if (any (dt(2::2)%x(2) /= 2.)) STOP 57
+ if (any (dt(2::2)%x(3) /= 3.)) STOP 58
+ if (any (dt(2::2)%y(1) /= 4.)) STOP 59
+ if (any (dt(2::2)%y(2) /= 44.)) STOP 60
+ if (any (dt(2::2)%y(3) /= 321.)) STOP 61
endif
end program test
i4_2 = i4_2 * 21 * i
end do
call co_reduce(i4, op_i4, stat=stat)
-if (stat /= 0) call abort()
-if (i4_2 /= i4) call abort()
+if (stat /= 0) STOP 1
+if (i4_2 /= i4) STOP 2
contains
pure integer function op_i4(a,b)
k = 1
j = -1
i = 0
- if (scalar[i,j,k] /= this_image()) call abort
+ if (scalar[i,j,k] /= this_image()) STOP 1
stop "OK"
else if (num_images() == 2) then
k = 1
counter = 0
do i = 0,P
counter = counter+1
- if (counter /= scalar[i,j,k]) call abort()
+ if (counter /= scalar[i,j,k]) STOP 1
end do
stop "OK"
end if
end do
if (is_err) then
- call abort()
+ STOP 2
end if
end program cosubscript_test
subroutine sub(A,n)
integer :: n
integer :: A(n:)[n:2*n,3*n:*]
- if (lbound(A,dim=1) /= n) call abort ()
- if (any (lcobound(A) /= [n, 3*n])) call abort ()
- if (ucobound(A, dim=1) /= 2*n) call abort()
+ if (lbound(A,dim=1) /= n) STOP 1
+ if (any (lcobound(A) /= [n, 3*n])) STOP 2
+ if (ucobound(A, dim=1) /= 2*n) STOP 3
end subroutine sub
subroutine sub2(A,n)
integer :: n
integer :: A(:)[-n:*]
- if (lbound(A,dim=1) /= 1) call abort ()
- if (lcobound(A, dim=1) /= -n) call abort ()
+ if (lbound(A,dim=1) /= 1) STOP 4
+ if (lcobound(A, dim=1) /= -n) STOP 5
end subroutine sub2
subroutine sub3(A)
integer :: A(:)[0,*]
- if (lbound(A,dim=1) /= 1) call abort ()
- if (lcobound(A, dim=1) /= 1) call abort ()
- if (ucobound(A, dim=1) /= 0) call abort ()
- if (lcobound(A, dim=2) /= 1) call abort ()
+ if (lbound(A,dim=1) /= 1) STOP 6
+ if (lcobound(A, dim=1) /= 1) STOP 7
+ if (ucobound(A, dim=1) /= 0) STOP 8
+ if (lcobound(A, dim=2) /= 1) STOP 9
end subroutine sub3
subroutine sub4(A)
integer :: A(:)[*]
- if (lbound(A,dim=1) /= 1) call abort ()
- if (lcobound(A, dim=1) /= 1) call abort ()
+ if (lbound(A,dim=1) /= 1) STOP 10
+ if (lcobound(A, dim=1) /= 1) STOP 11
end subroutine sub4
subroutine sub5(A)
integer, allocatable :: A(:)[:,:]
- if (lbound(A,dim=1) /= 1) call abort ()
- if (lcobound(A, dim=1) /= 2) call abort ()
- if (ucobound(A, dim=1) /= 3) call abort ()
- if (lcobound(A, dim=2) /= 5) call abort ()
+ if (lbound(A,dim=1) /= 1) STOP 12
+ if (lcobound(A, dim=1) /= 2) STOP 13
+ if (ucobound(A, dim=1) /= 3) STOP 14
+ if (lcobound(A, dim=2) /= 5) STOP 15
end subroutine sub5
end
count = -42
call event_query (var, count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 1
stat = 99
event post (var, stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 2
call event_query(var, count, stat=stat)
-if (count /= 1 .or. stat /= 0) call abort()
+if (count /= 1 .or. stat /= 0) STOP 3
stat = 99
event post (var[this_image()])
call event_query(var, count)
-if (count /= 2) call abort()
+if (count /= 2) STOP 4
stat = 99
event wait (var)
call event_query(var, count)
-if (count /= 1) call abort()
+if (count /= 1) STOP 5
stat = 99
event post (var)
call event_query(var, count)
-if (count /= 2) call abort()
+if (count /= 2) STOP 6
stat = 99
event post (var)
call event_query(var, count)
-if (count /= 3) call abort()
+if (count /= 3) STOP 7
stat = 99
event wait (var, until_count=2)
call event_query(var, count)
-if (count /= 1) call abort()
+if (count /= 1) STOP 8
stat = 99
event wait (var, stat=stat, until_count=1)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 9
call event_query(event=var, stat=stat, count=count)
-if (count /= 0 .or. stat /= 0) call abort()
+if (count /= 0 .or. stat /= 0) STOP 10
end
count = -42
call event_query (var(1), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 1
call event_query (var(1), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 2
call event_query (var(2), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 3
call event_query (var(3), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 4
stat = 99
event post (var(2), stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 5
call event_query (var(1), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 6
call event_query(var(2), count, stat=stat)
-if (count /= 1 .or. stat /= 0) call abort()
+if (count /= 1 .or. stat /= 0) STOP 7
call event_query (var(3), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 8
stat = 99
event post (var(2)[this_image()])
call event_query(var(1), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 9
call event_query(var(2), count)
-if (count /= 2) call abort()
+if (count /= 2) STOP 10
call event_query(var(2), count)
-if (count /= 2) call abort()
+if (count /= 2) STOP 11
call event_query(var(3), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 12
stat = 99
event wait (var(2))
call event_query(var(1), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 13
call event_query(var(2), count)
-if (count /= 1) call abort()
+if (count /= 1) STOP 14
call event_query(var(3), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 15
stat = 99
event post (var(2))
call event_query(var(1), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 16
call event_query(var(2), count)
-if (count /= 2) call abort()
+if (count /= 2) STOP 17
call event_query(var(3), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 18
stat = 99
event post (var(2))
call event_query(var(1), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 19
call event_query(var(2), count)
-if (count /= 3) call abort()
+if (count /= 3) STOP 20
call event_query(var(3), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 21
stat = 99
event wait (var(2), until_count=2)
call event_query(var(1), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 22
call event_query(var(2), count)
-if (count /= 1) call abort()
+if (count /= 1) STOP 23
call event_query(var(3), count)
-if (count /= 0) call abort()
+if (count /= 0) STOP 24
stat = 99
event wait (var(2), stat=stat, until_count=1)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 25
call event_query(event=var(1), stat=stat, count=count)
-if (count /= 0 .or. stat /= 0) call abort()
+if (count /= 0 .or. stat /= 0) STOP 26
call event_query(event=var(2), stat=stat, count=count)
-if (count /= 0 .or. stat /= 0) call abort()
+if (count /= 0 .or. stat /= 0) STOP 27
call event_query(event=var(3), stat=stat, count=count)
-if (count /= 0 .or. stat /= 0) call abort()
+if (count /= 0 .or. stat /= 0) STOP 28
end
a(:,:) = b(:,:)
c(:,:) = caf(:,:)[num_images()]
if (any (a /= c)) then
- call abort()
+ STOP 1
end if
sync all
end do
end do
if (any (a /= c)) then
- call abort()
+ STOP 2
end if
sync all
c(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2) &
= caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[num_images()]
if (any (c /= a)) then
- call abort()
+ STOP 3
end if
sync all
end do
a(:,:) = b(:,:)
c(:,:) = caf(:,:)[num_images()]
if (any (a /= c)) then
- call abort()
+ STOP 4
end if
sync all
end do
end do
if (any (a /= c)) then
- call abort()
+ STOP 5
end if
sync all
c(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2) &
= caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[num_images()]
if (any (c /= a)) then
- call abort()
+ STOP 6
end if
sync all
end do
a(:,:) = b(:,:)
c(:,:) = caf(:,:)[num_images()]
if (any (a /= c)) then
- call abort()
+ STOP 7
end if
sync all
end do
end do
if (any (a /= c)) then
- call abort()
+ STOP 8
end if
sync all
c(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2) &
= caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[num_images()]
if (any (c /= a)) then
- call abort()
+ STOP 9
end if
sync all
end do
index1 = image_index(a, [3, -4, 88] )
index2 = image_index(b, [-1, 0] )
index3 = image_index(c, [1] )
-if (index1 /= 1 .or. index2 /= 1 .or. index3 /= 1) call abort()
+if (index1 /= 1 .or. index2 /= 1 .or. index3 /= 1) STOP 1
index1 = image_index(a, [3, -3, 88] )
index3 = image_index(c, [2] )
if (one .and. (index1 /= 0 .or. index2 /= 0 .or. index3 /= 0)) &
- call abort()
+ STOP 2
if (.not. one .and. (index1 /= 2 .or. index2 /= 2 .or. index3 /= 2)) &
- call abort()
+ STOP 3
index1 = image_index(d, [-1, 1] )
index2 = image_index(d, [0, 1] )
if (one .and. (index1 /= 1 .or. index2 /= 0)) &
- call abort()
+ STOP 4
if (.not. one .and. (index1 /= 1 .or. index2 /= 2)) &
- call abort()
+ STOP 5
index1 = image_index(e, [-1, 3] )
index2 = image_index(e, [-1, 4] )
if (one .and. (index1 /= 1 .or. index2 /= 0)) &
- call abort()
+ STOP 6
if (.not. one .and. (index1 /= 1 .or. index2 /= 2)) &
- call abort()
+ STOP 7
call test(1, a,b,c)
index3 = image_index(a, [3, 1, 0] ) ! = 13
if (num_images() < 13 .and. (index1 /= 1 .or. index2 /= 0 .or. index3 /= 0)) &
- call abort()
+ STOP 8
if (num_images() >= 213 .and. (index1 /= 1 .or. index2 /= 213 .or. index3 /= 13)) &
- call abort()
+ STOP 9
if (num_images() >= 13 .and. (index1 /= 1 .or. index2 /= 0 .or. index3 /= 13)) &
- call abort()
+ STOP 10
contains
index1 = image_index(a, [3, -4, 88] )
index2 = image_index(b, [-1, 0] )
index3 = image_index(c, [1] )
- if (index1 /= 1 .or. index2 /= 1 .or. index3 /= 1) call abort()
+ if (index1 /= 1 .or. index2 /= 1 .or. index3 /= 1) STOP 11
index1 = image_index(a, [3, -3, 88] )
index3 = image_index(c, [2] )
if (one .and. (index1 /= 0 .or. index2 /= 0 .or. index3 /= 0)) &
- call abort()
+ STOP 12
if (.not. one .and. (index1 /= 2 .or. index2 /= 2 .or. index3 /= 2)) &
- call abort()
+ STOP 13
end subroutine test
end program test_image_index
index2 = image_index(d, [0, 1] )
if (one .and. (index1 /= 1 .or. index2 /= 0)) &
- call abort()
+ STOP 1
if (.not. one .and. (index1 /= 1 .or. index2 /= 2)) &
- call abort()
+ STOP 2
index1 = image_index(e, [-1, 3] )
index2 = image_index(e, [-1, 4] )
if (one .and. (index1 /= 1 .or. index2 /= 0)) &
- call abort()
+ STOP 3
if (.not. one .and. (index1 /= 1 .or. index2 /= 2)) &
- call abort()
+ STOP 4
call test(1, e, d, e)
call test(2, e, d, e)
index3 = image_index(c, [1] )
if (n == 1) then
- if (index1 /= 1 .or. index2 /= 1 .or. index3 /= 1) call abort()
+ if (index1 /= 1 .or. index2 /= 1 .or. index3 /= 1) STOP 5
else if (num_images() == 1) then
- if (index1 /= 1 .or. index2 /= 0 .or. index3 /= 1) call abort()
+ if (index1 /= 1 .or. index2 /= 0 .or. index3 /= 1) STOP 6
else
- if (index1 /= 1 .or. index2 /= 2 .or. index3 /= 1) call abort()
+ if (index1 /= 1 .or. index2 /= 2 .or. index3 /= 1) STOP 7
end if
index1 = image_index(a, [3*n, -3*n, 88*n] )
index3 = image_index(c, [2] )
if (one .and. (index1 /= 0 .or. index2 /= 0 .or. index3 /= 0)) &
- call abort()
+ STOP 8
if (n == 1 .and. num_images() == 2) then
if (index1 /= 2 .or. index2 /= 2 .or. index3 /= 2) &
- call abort()
+ STOP 9
else if (n == 2 .and. num_images() == 2) then
if (index1 /= 0 .or. index2 /= 0 .or. index3 /= 2) &
- call abort()
+ STOP 10
end if
end subroutine test
end program test_image_index
index1 = image_index(a, [3, -4, 88] )
index2 = image_index(b, [-1, 0] )
index3 = image_index(c, [1] )
-if (index1 /= 1 .or. index2 /= 1 .or. index3 /= 1) call abort()
+if (index1 /= 1 .or. index2 /= 1 .or. index3 /= 1) STOP 1
index1 = image_index(a, [3, -3, 88] )
index3 = image_index(c, [2] )
if (one .and. (index1 /= 0 .or. index2 /= 0 .or. index3 /= 0)) &
- call abort()
+ STOP 2
if (.not. one .and. (index1 /= 2 .or. index2 /= 2 .or. index3 /= 2)) &
- call abort()
+ STOP 3
index1 = image_index(d, [-1, 1] )
index2 = image_index(d, [0, 1] )
if (one .and. (index1 /= 1 .or. index2 /= 0)) &
- call abort()
+ STOP 4
if (.not. one .and. (index1 /= 1 .or. index2 /= 2)) &
- call abort()
+ STOP 5
index1 = image_index(e, [-1, 3] )
index2 = image_index(e, [-1, 4] )
if (one .and. (index1 /= 1 .or. index2 /= 0)) &
- call abort()
+ STOP 6
if (.not. one .and. (index1 /= 1 .or. index2 /= 2)) &
- call abort()
+ STOP 7
call test(1, a,b,c)
index3 = image_index(a, [3, 1, 0] ) ! = 13
if (num_images() < 13 .and. (index1 /= 1 .or. index2 /= 0 .or. index3 /= 0)) &
- call abort()
+ STOP 8
if (num_images() >= 213 .and. (index1 /= 1 .or. index2 /= 213 .or. index3 /= 13)) &
- call abort()
+ STOP 9
if (num_images() >= 13 .and. (index1 /= 1 .or. index2 /= 0 .or. index3 /= 13)) &
- call abort()
+ STOP 10
contains
index1 = image_index(a, [3, -4, 88] )
index2 = image_index(b, [-1, 0] )
index3 = image_index(c, [1] )
- if (index1 /= 1 .or. index2 /= 1 .or. index3 /= 1) call abort()
+ if (index1 /= 1 .or. index2 /= 1 .or. index3 /= 1) STOP 11
index1 = image_index(a, [3, -3, 88] )
index3 = image_index(c, [2] )
if (one .and. (index1 /= 0 .or. index2 /= 0 .or. index3 /= 0)) &
- call abort()
+ STOP 12
if (.not. one .and. (index1 /= 2 .or. index2 /= 2 .or. index3 /= 2)) &
- call abort()
+ STOP 13
end subroutine test
end program test_image_index
allocate(x%caf[*], y%caf[*])
ptr => y%caf
ptr = 6
-if (.not.allocated(x%caf)) call abort()
-if (.not.allocated(y%caf)) call abort()
-if (y%caf /= 6) call abort ()
+if (.not.allocated(x%caf)) STOP 1
+if (.not.allocated(y%caf)) STOP 2
+if (y%caf /= 6) STOP 3
x = y
-if (x%caf /= 6) call abort ()
-if (.not. associated (ptr,y%caf)) call abort()
-if (associated (ptr,x%caf)) call abort()
+if (x%caf /= 6) STOP 4
+if (.not. associated (ptr,y%caf)) STOP 5
+if (associated (ptr,x%caf)) STOP 6
ptr = 123
-if (y%caf /= 123) call abort ()
-if (x%caf /= 6) call abort ()
+if (y%caf /= 123) STOP 7
+if (x%caf /= 6) STOP 8
end program main
stat = 99
LOCK(lock, stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 1
stat = 99
UNLOCK(lock, stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 2
if (this_image() == 1) then
acquired = .false.
LOCK (lock[this_image()], acquired_lock=acquired)
- if (.not. acquired) call abort()
+ if (.not. acquired) STOP 3
UNLOCK (lock[1])
end if
end
stat = 99
LOCK(lock1, stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 1
LOCK(lock2(1,1), stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 2
LOCK(lock2(2,2), stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 3
LOCK(lock3(3), stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 4
LOCK(lock3(4), stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 5
stat = 99
UNLOCK(lock1, stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 6
UNLOCK(lock2(1,1), stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 7
UNLOCK(lock2(2,2), stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 8
UNLOCK(lock3(3), stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 9
UNLOCK(lock3(4), stat=stat)
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 10
if (this_image() == 1) then
acquired = .false.
LOCK (lock1[this_image()], acquired_lock=acquired)
- if (.not. acquired) call abort()
+ if (.not. acquired) STOP 11
acquired = .false.
LOCK (lock2(1,1)[this_image()], acquired_lock=acquired)
- if (.not. acquired) call abort()
+ if (.not. acquired) STOP 12
acquired = .false.
LOCK (lock2(2,2)[this_image()], acquired_lock=acquired)
- if (.not. acquired) call abort()
+ if (.not. acquired) STOP 13
acquired = .false.
LOCK (lock3(3)[this_image()], acquired_lock=acquired)
- if (.not. acquired) call abort()
+ if (.not. acquired) STOP 14
acquired = .false.
LOCK (lock3(4)[this_image()], acquired_lock=acquired)
- if (.not. acquired) call abort()
+ if (.not. acquired) STOP 15
UNLOCK (lock1[1])
UNLOCK (lock2(1,1)[1])
allocate (u[4:*])
call move_alloc (u, v)
-if (allocated (u)) call abort ()
-if (lcobound (v, dim=1) /= 4) call abort ()
-if (ucobound (v, dim=1) /= 3 + num_images()) call abort ()
+if (allocated (u)) STOP 1
+if (lcobound (v, dim=1) /= 4) STOP 2
+if (ucobound (v, dim=1) /= 3 + num_images()) STOP 3
allocate (w(-2:3)[4:5,-1:*])
call move_alloc (w, x)
-if (allocated (w)) call abort ()
-if (lbound (x, dim=1) /= -2) call abort ()
-if (ubound (x, dim=1) /= 3) call abort ()
-if (any (lcobound (x) /= [4, -1])) call abort ()
-if (any (ucobound (x) /= [5, -2 + (num_images()+1)/2])) call abort ()
+if (allocated (w)) STOP 4
+if (lbound (x, dim=1) /= -2) STOP 5
+if (ubound (x, dim=1) /= 3) STOP 6
+if (any (lcobound (x) /= [4, -1])) STOP 7
+if (any (ucobound (x) /= [5, -2 + (num_images()+1)/2])) STOP 8
end
end type t
class(t), allocatable :: A(:)[:,:]
allocate (A(2)[1:4,-5:*])
-if (any (lcobound(A) /= [1, -5])) call abort ()
+if (any (lcobound(A) /= [1, -5])) STOP 1
if (num_images() == 1) then
- if (any (ucobound(A) /= [4, -5])) call abort ()
+ if (any (ucobound(A) /= [4, -5])) STOP 2
else
- if (ucobound(A,dim=1) /= 4) call abort ()
+ if (ucobound(A,dim=1) /= 4) STOP 3
end if
if (allocated(A)) i = 5
call s(A)
subroutine s(x)
class(t),allocatable :: x(:)[:,:]
- if (any (lcobound(x) /= [1, -5])) call abort ()
+ if (any (lcobound(x) /= [1, -5])) STOP 4
if (num_images() == 1) then
- if (any (ucobound(x) /= [4, -5])) call abort ()
+ if (any (ucobound(x) /= [4, -5])) STOP 5
else
- if (ucobound(x,dim=1) /= 4) call abort ()
+ if (ucobound(x,dim=1) /= 4) STOP 6
end if
end subroutine s
subroutine st(x)
class(t) :: x(:)[4,2:*]
! FIXME
-! if (any (lcobound(x) /= [1, 2])) call abort ()
-! if (lcobound(x, dim=1) /= 1) call abort ()
-! if (lcobound(x, dim=2) /= 2) call abort ()
+! if (any (lcobound(x) /= [1, 2])) STOP 7
+! if (lcobound(x, dim=1) /= 1) STOP 8
+! if (lcobound(x, dim=2) /= 2) STOP 9
! if (this_image() == 1) then
-! if (any (this_image(x) /= lcobound(x))) call abort ()
-! if (this_image(x, dim=1) /= lcobound(x, dim=1)) call abort ()
-! if (this_image(x, dim=2) /= lcobound(x, dim=2)) call abort ()
+! if (any (this_image(x) /= lcobound(x))) STOP 10
+! if (this_image(x, dim=1) /= lcobound(x, dim=1)) STOP 11
+! if (this_image(x, dim=2) /= lcobound(x, dim=2)) STOP 12
! end if
! if (num_images() == 1) then
-! if (any (ucobound(x) /= [4, 2])) call abort ()
-! if (ucobound(x, dim=1) /= 4) call abort ()
-! if (ucobound(x, dim=2) /= 2) call abort ()
+! if (any (ucobound(x) /= [4, 2])) STOP 13
+! if (ucobound(x, dim=1) /= 4) STOP 14
+! if (ucobound(x, dim=2) /= 2) STOP 15
! else
-! if (ucobound(x,dim=1) /= 4) call abort ()
+! if (ucobound(x,dim=1) /= 4) STOP 16
! end if
end subroutine st
end
class(t), allocatable :: A[:,:]
allocate (A[1:4,-5:*])
if (allocated(A)) stop
-if (any (lcobound(A) /= [1, -5])) call abort ()
+if (any (lcobound(A) /= [1, -5])) STOP 1
if (num_images() == 1) then
- if (any (ucobound(A) /= [4, -5])) call abort ()
+ if (any (ucobound(A) /= [4, -5])) STOP 2
else
- if (ucobound(A,dim=1) /= 4) call abort ()
+ if (ucobound(A,dim=1) /= 4) STOP 3
end if
if (allocated(A)) i = 5
call s(A)
contains
subroutine s(x)
class(t) :: x[4,2:*]
- if (any (lcobound(x) /= [1, 2])) call abort ()
+ if (any (lcobound(x) /= [1, 2])) STOP 4
if (num_images() == 1) then
- if (any (ucobound(x) /= [4, 2])) call abort ()
+ if (any (ucobound(x) /= [4, 2])) STOP 5
else
- if (ucobound(x,dim=1) /= 4) call abort ()
+ if (ucobound(x,dim=1) /= 4) STOP 6
end if
end subroutine s
subroutine st(x)
class(t) :: x[:,:]
- if (any (lcobound(x) /= [1, -5])) call abort ()
+ if (any (lcobound(x) /= [1, -5])) STOP 7
if (num_images() == 1) then
- if (any (ucobound(x) /= [4, -5])) call abort ()
+ if (any (ucobound(x) /= [4, -5])) STOP 8
else
- if (ucobound(x,dim=1) /= 4) call abort ()
+ if (ucobound(x,dim=1) /= 4) STOP 9
end if
end subroutine st
end
allocate(a(1)[*])
if (this_image() == 1 .and. any (this_image(a) /= lcobound(a))) &
- call abort ()
-if (any (lcobound(a) /= 1)) call abort()
-if (any (ucobound(a) /= this_image())) call abort ()
+ STOP 1
+if (any (lcobound(a) /= 1)) STOP 2
+if (any (ucobound(a) /= this_image())) STOP 3
deallocate(a)
allocate(b[*])
if (this_image() == 1 .and. any (this_image(b) /= lcobound(b))) &
- call abort ()
-if (any (lcobound(b) /= 1)) call abort()
-if (any (ucobound(b) /= this_image())) call abort ()
+ STOP 4
+if (any (lcobound(b) /= 1)) STOP 5
+if (any (ucobound(b) /= this_image())) STOP 6
deallocate(b)
allocate(a(1)[-10:*])
if (this_image() == 1 .and. any (this_image(a) /= lcobound(a))) &
- call abort ()
-if (any (lcobound(a) /= -10)) call abort()
-if (any (ucobound(a) /= -11+this_image())) call abort ()
+ STOP 7
+if (any (lcobound(a) /= -10)) STOP 8
+if (any (ucobound(a) /= -11+this_image())) STOP 9
deallocate(a)
allocate(d[23:*])
if (this_image() == 1 .and. any (this_image(d) /= lcobound(d))) &
- call abort ()
-if (any (lcobound(d) /= 23)) call abort()
-if (any (ucobound(d) /= 22+this_image())) call abort ()
+ STOP 10
+if (any (lcobound(d) /= 23)) STOP 11
+if (any (ucobound(d) /= 22+this_image())) STOP 12
deallocate(d)
end
allocate(object%indices(me))
object%indices = 42
- if ( any( object[me]%indices(:) /= 42 ) ) call abort()
+ if ( any( object[me]%indices(:) /= 42 ) ) STOP 1
end program
end module m
use m
-if (any (a /= 7)) call abort()
+if (any (a /= 7)) STOP 1
a = 88
-if (any (a /= 88)) call abort()
+if (any (a /= 88)) STOP 2
block
integer :: b[*] = 8494
- if (b /= 8494) call abort()
+ if (b /= 8494) STOP 3
end block
-if (any (a /= 88)) call abort()
+if (any (a /= 88)) STOP 4
call test ()
end
subroutine test()
real :: z[*] = sqrt(2.0)
- if (z /= sqrt(2.0)) call abort()
+ if (z /= sqrt(2.0)) STOP 5
call sub1()
contains
subroutine sub1
real :: r[4,*] = -1
- if (r /= -1) call abort
+ if (r /= -1) STOP 1
r = 10
- if (r /= 10) call abort
+ if (r /= 10) STOP 2
end subroutine sub1
subroutine uncalled()
integer :: not_refed[2:*] = 784
- if (not_refed /= 784) call abort()
+ if (not_refed /= 784) STOP 6
end subroutine uncalled
end subroutine test
integer, allocatable :: A[:], B[:,:]
integer :: n1, n2, n3
-if (allocated (a)) call abort ()
-if (allocated (b)) call abort ()
+if (allocated (a)) STOP 1
+if (allocated (b)) STOP 2
allocate(a[*])
a = 5 + this_image ()
-if (a[this_image ()] /= 5 + this_image ()) call abort
+if (a[this_image ()] /= 5 + this_image ()) STOP 1
a[this_image ()] = 8 - 2*this_image ()
-if (a[this_image ()] /= 8 - 2*this_image ()) call abort
+if (a[this_image ()] /= 8 - 2*this_image ()) STOP 2
if (lcobound(a, dim=1) /= 1 .or. ucobound(a,dim=1) /= num_images()) &
- call abort ()
+ STOP 3
deallocate(a)
allocate(a[4:*])
a[this_image ()] = 8 - 2*this_image ()
if (lcobound(a, dim=1) /= 4 .or. ucobound(a,dim=1) /= 3 + num_images()) &
- call abort ()
+ STOP 4
n1 = -1
n2 = 5
n3 = 3
allocate (B[n1:n2, n3:*])
if (any (lcobound(b) /= [-1, 3]) .or. lcobound(B, dim=2) /= n3) &
- call abort()
+ STOP 5
call sub(A, B)
-if (allocated (a)) call abort ()
-if (.not.allocated (b)) call abort ()
+if (allocated (a)) STOP 6
+if (.not.allocated (b)) STOP 7
call two(.true.)
call two(.false.)
integer, allocatable :: x[:], y[:,:]
if (any (lcobound(y) /= [-1, 3]) .or. lcobound(y, dim=2) /= n3) &
- call abort()
+ STOP 8
if (lcobound(x, dim=1) /= 4 .or. ucobound(x,dim=1) /= 3 + num_images()) &
- call abort ()
- if (x[this_image ()] /= 8 - 2*this_image ()) call abort
+ STOP 9
+ if (x[this_image ()] /= 8 - 2*this_image ()) STOP 3
deallocate(x)
end subroutine sub
integer, allocatable, SAVE :: a[:]
if (init) then
- if (allocated(a)) call abort()
+ if (allocated(a)) STOP 10
allocate(a[*])
a = 45
else
- if (.not. allocated(a)) call abort()
- if (a /= 45) call abort()
+ if (.not. allocated(a)) STOP 11
+ if (a /= 45) STOP 12
deallocate(a)
end if
end subroutine two
p%y = 13
p%z = 15
-if (a /= 7) call abort()
+if (a /= 7) STOP 1
a = 88
-if (a /= 88) call abort()
+if (a /= 88) STOP 2
-if (p%x /= 11) call abort()
+if (p%x /= 11) STOP 3
p%x = 17
-if (p%x /= 17) call abort()
+if (p%x /= 17) STOP 4
block
integer, allocatable :: b[:]
allocate(b[*])
b = 8494
- if (b /= 8494) call abort()
+ if (b /= 8494) STOP 5
end block
-if (a /= 88) call abort()
+if (a /= 88) STOP 6
call test ()
end
v%y = 23
v%z = 25
- if (z /= sqrt(2.0)) call abort()
- if (v%x /= 21) call abort()
+ if (z /= sqrt(2.0)) STOP 7
+ if (v%x /= 21) STOP 8
end subroutine test
sync all
if (this_image() == num_images()) then
if (any (a /= caf)) &
- call abort()
+ STOP 1
end if
sync all
sync all
if (this_image() == num_images()) then
if (any (a /= caf)) &
- call abort()
+ STOP 2
end if
sync all
sync all
if (this_image() == num_images()) then
if (any (a /= caf)) &
- call abort()
+ STOP 3
end if
sync all
print *, a
print *, caf
print *, a-caf
- call abort()
+ STOP 4
endif
end if
sync all
sync all
if (this_image() == num_images()) then
if (any (a /= caf)) &
- call abort()
+ STOP 5
end if
! Whole array: ARRAY = ARRAY
sync all
if (this_image() == num_images()) then
if (any (a /= caf)) &
- call abort()
+ STOP 6
end if
sync all
sync all
if (this_image() == num_images()) then
if (any (a /= caf)) &
- call abort()
+ STOP 7
end if
sync all
print *, a
print *, caf
print *, a-caf
- call abort()
+ STOP 8
endif
end if
sync all
sync all
if (this_image() == num_images()) then
if (any (a /= caf)) &
- call abort()
+ STOP 9
end if
! Whole array: ARRAY = ARRAY
sync all
if (this_image() == num_images()) then
if (any (a /= caf)) &
- call abort()
+ STOP 10
end if
sync all
sync all
if (this_image() == num_images()) then
if (any (a /= caf)) &
- call abort()
+ STOP 11
end if
! Array sections with different ranges and pos/neg strides
print *, a
print *, caf
print *, a-caf
- call abort()
+ STOP 12
endif
end if
sync all
! First check send/copy to self
co_str_k1_scal[1] = str_k1_scal
- if (co_str_k1_scal /= str_k1_scal // ' ') call abort()
+ if (co_str_k1_scal /= str_k1_scal // ' ') STOP 1
co_str_k4_scal[1] = str_k4_scal
- if (co_str_k4_scal /= str_k4_scal // 4_' ') call abort()
+ if (co_str_k4_scal /= str_k4_scal // 4_' ') STOP 2
co_str_k4_scal[1] = str_k1_scal
- if (co_str_k4_scal /= str_k4_scal // 4_' ') call abort()
+ if (co_str_k4_scal /= str_k4_scal // 4_' ') STOP 3
co_str_k1_scal[1] = str_k4_scal
- if (co_str_k1_scal /= str_k1_scal // ' ') call abort()
+ if (co_str_k1_scal /= str_k1_scal // ' ') STOP 4
co_str_k1_arr(:)[1] = str_k1_arr
- if (any(co_str_k1_arr /= ['abc ', 'EFG ', 'klm ', 'NOP '])) call abort()
+ if (any(co_str_k1_arr /= ['abc ', 'EFG ', 'klm ', 'NOP '])) STOP 5
co_str_k4_arr(:)[1] = [4_'abc', 4_'EFG', 4_'klm', 4_'NOP']! str_k4_arr
- if (any(co_str_k4_arr /= [4_'abc ', 4_'EFG ', 4_'klm ', 4_'NOP '])) call abort()
+ if (any(co_str_k4_arr /= [4_'abc ', 4_'EFG ', 4_'klm ', 4_'NOP '])) STOP 6
co_str_k4_arr(:)[1] = str_k1_arr
- if (any(co_str_k4_arr /= [ 4_'abc ', 4_'EFG ', 4_'klm ', 4_'NOP '])) call abort()
+ if (any(co_str_k4_arr /= [ 4_'abc ', 4_'EFG ', 4_'klm ', 4_'NOP '])) STOP 7
co_str_k1_arr(:)[1] = str_k4_arr
- if (any(co_str_k1_arr /= ['abc ', 'EFG ', 'klm ', 'NOP '])) call abort()
+ if (any(co_str_k1_arr /= ['abc ', 'EFG ', 'klm ', 'NOP '])) STOP 8
end program send_convert_char_array
a(:,:) = b(:,:)
caf2(:,:)[this_image()] = caf(:,:)[num_images()]
if (any (a /= caf2)) then
- call abort()
+ STOP 1
end if
sync all
end do
end do
if (any (a /= caf2)) then
- call abort()
+ STOP 2
end if
sync all
caf2(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[this_image()] &
= caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[num_images()]
if (any (caf2 /= a)) then
- call abort()
+ STOP 3
end if
sync all
end do
a(:,:) = b(:,:)
caf2(:,:)[this_image()] = caf(:,:)[num_images()]
if (any (a /= caf2)) then
- call abort()
+ STOP 4
end if
sync all
end do
end do
if (any (a /= caf2)) then
- call abort()
+ STOP 5
end if
sync all
caf2(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[this_image()] &
= caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[num_images()]
if (any (caf2 /= a)) then
- call abort()
+ STOP 6
end if
sync all
end do
a(:,:) = b(:,:)
caf2(:,:)[this_image()] = caf(:,:)[num_images()]
if (any (a /= caf2)) then
- call abort()
+ STOP 7
end if
sync all
end do
end do
if (any (a /= caf2)) then
- call abort()
+ STOP 8
end if
sync all
caf2(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[this_image()] &
= caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[num_images()]
if (any (caf2 /= a)) then
- call abort()
+ STOP 9
end if
sync all
end do
allocate(b%a[lb:*])
b%a%i = 7
- if (b%a%i /= 7) call abort
- if (any (lcobound(b%a) /= (/ lb /))) call abort
- if (ucobound(b%a, dim=1) /= num_images() + lb - 1) call abort
- if (any (lcobound(b%a%i) /= (/ lb /))) call abort
- if (ucobound(b%a%i, dim=1) /= num_images() + lb - 1) call abort
+ if (b%a%i /= 7) STOP 1
+ if (any (lcobound(b%a) /= (/ lb /))) STOP 2
+ if (ucobound(b%a, dim=1) /= num_images() + lb - 1) STOP 3
+ if (any (lcobound(b%a%i) /= (/ lb /))) STOP 4
+ if (ucobound(b%a%i, dim=1) /= num_images() + lb - 1) STOP 5
allocate(c%a(la)[lc:*])
c%a%i = init
- if (any(c%a%i /= init)) call abort
- if (any (lcobound(c%a) /= (/ lc /))) call abort
- if (ucobound(c%a, dim=1) /= num_images() + lc - 1) call abort
- if (any (lcobound(c%a%i) /= (/ lc /))) call abort
- if (ucobound(c%a%i, dim=1) /= num_images() + lc - 1) call abort
- if (c%a(2)%i /= init(2)) call abort
- if (any (lcobound(c%a(2)) /= (/ lc /))) call abort
- if (ucobound(c%a(2), dim=1) /= num_images() + lc - 1) call abort
- if (any (lcobound(c%a(2)%i) /= (/ lc /))) call abort
- if (ucobound(c%a(2)%i, dim=1) /= num_images() + lc - 1) call abort
+ if (any(c%a%i /= init)) STOP 6
+ if (any (lcobound(c%a) /= (/ lc /))) STOP 7
+ if (ucobound(c%a, dim=1) /= num_images() + lc - 1) STOP 8
+ if (any (lcobound(c%a%i) /= (/ lc /))) STOP 9
+ if (ucobound(c%a%i, dim=1) /= num_images() + lc - 1) STOP 10
+ if (c%a(2)%i /= init(2)) STOP 11
+ if (any (lcobound(c%a(2)) /= (/ lc /))) STOP 12
+ if (ucobound(c%a(2), dim=1) /= num_images() + lc - 1) STOP 13
+ if (any (lcobound(c%a(2)%i) /= (/ lc /))) STOP 14
+ if (ucobound(c%a(2)%i, dim=1) /= num_images() + lc - 1) STOP 15
deallocate(b%a, c%a)
end
n = 5
sync all (stat=n)
-if (n /= 0) call abort()
+if (n /= 0) STOP 1
n = 5
sync all (stat=n,errmsg=str)
-if (n /= 0) call abort()
+if (n /= 0) STOP 2
!
n = 5
sync memory (stat=n)
-if (n /= 0) call abort()
+if (n /= 0) STOP 3
n = 5
sync memory (errmsg=str,stat=n)
-if (n /= 0) call abort()
+if (n /= 0) STOP 4
!
n = 5
sync images (*, stat=n)
-if (n /= 0) call abort()
+if (n /= 0) STOP 5
n = 5
sync images (*,errmsg=str,stat=n)
-if (n /= 0) call abort()
+if (n /= 0) STOP 6
end
n = 5
sync all (stat=n)
-if (n /= 0) call abort()
+if (n /= 0) STOP 1
n = 5
sync all (stat=n,errmsg=str)
-if (n /= 0) call abort()
+if (n /= 0) STOP 2
!
n = 5
sync memory (stat=n)
-if (n /= 0) call abort()
+if (n /= 0) STOP 3
n = 5
sync memory (errmsg=str,stat=n)
-if (n /= 0) call abort()
+if (n /= 0) STOP 4
!
n = 5
sync images (*, stat=n)
-if (n /= 0) call abort()
+if (n /= 0) STOP 5
n = 5
sync images (*,errmsg=str,stat=n)
-if (n /= 0) call abort()
+if (n /= 0) STOP 6
n = -1
sync images ( num_images() )
allocatable :: b
integer :: i
-if (this_image(A, dim=1) /= 2) call abort()
+if (this_image(A, dim=1) /= 2) STOP 1
i = 1
-if (this_image(A, dim=i) /= 2) call abort()
+if (this_image(A, dim=i) /= 2) STOP 2
select case (this_image())
case (1)
- if (this_image(A, dim=2) /= 3) call abort()
- if (this_image(A, dim=3) /= 7) call abort()
+ if (this_image(A, dim=2) /= 3) STOP 3
+ if (this_image(A, dim=3) /= 7) STOP 4
i = 2
- if (this_image(A, dim=i) /= 3) call abort()
+ if (this_image(A, dim=i) /= 3) STOP 5
i = 3
- if (this_image(A, dim=i) /= 7) call abort()
- if (any (this_image(A) /= [2,3,7])) call abort()
+ if (this_image(A, dim=i) /= 7) STOP 6
+ if (any (this_image(A) /= [2,3,7])) STOP 7
case (2)
- if (this_image(A, dim=2) /= 4) call abort()
- if (this_image(A, dim=3) /= 7) call abort()
+ if (this_image(A, dim=2) /= 4) STOP 8
+ if (this_image(A, dim=3) /= 7) STOP 9
i = 2
- if (this_image(A, dim=i) /= 4) call abort()
+ if (this_image(A, dim=i) /= 4) STOP 10
i = 3
- if (this_image(A, dim=i) /= 7) call abort()
- if (any (this_image(A) /= [2,4,7])) call abort()
+ if (this_image(A, dim=i) /= 7) STOP 11
+ if (any (this_image(A) /= [2,4,7])) STOP 12
case (3)
- if (this_image(A, dim=2) /= 3) call abort()
- if (this_image(A, dim=3) /= 8) call abort()
+ if (this_image(A, dim=2) /= 3) STOP 13
+ if (this_image(A, dim=3) /= 8) STOP 14
i = 2
- if (this_image(A, dim=i) /= 3) call abort()
+ if (this_image(A, dim=i) /= 3) STOP 15
i = 3
- if (this_image(A, dim=i) /= 8) call abort()
- if (any (this_image(A) /= [2,3,8])) call abort()
+ if (this_image(A, dim=i) /= 8) STOP 16
+ if (any (this_image(A) /= [2,3,8])) STOP 17
case (4)
- if (this_image(A, dim=2) /= 4) call abort()
- if (this_image(A, dim=3) /= 8) call abort()
+ if (this_image(A, dim=2) /= 4) STOP 18
+ if (this_image(A, dim=3) /= 8) STOP 19
i = 2
- if (this_image(A, dim=i) /= 4) call abort()
+ if (this_image(A, dim=i) /= 4) STOP 20
i = 3
- if (this_image(A, dim=i) /= 8) call abort()
- if (any (this_image(A) /= [2,4,8])) call abort()
+ if (this_image(A, dim=i) /= 8) STOP 21
+ if (any (this_image(A) /= [2,4,8])) STOP 22
case (5)
- if (this_image(A, dim=2) /= 3) call abort()
- if (this_image(A, dim=3) /= 9) call abort()
+ if (this_image(A, dim=2) /= 3) STOP 23
+ if (this_image(A, dim=3) /= 9) STOP 24
i = 2
- if (this_image(A, dim=i) /= 3) call abort()
+ if (this_image(A, dim=i) /= 3) STOP 25
i = 3
- if (this_image(A, dim=i) /= 9) call abort()
- if (any (this_image(A) /= [2,3,9])) call abort()
+ if (this_image(A, dim=i) /= 9) STOP 26
+ if (any (this_image(A) /= [2,3,9])) STOP 27
case (6)
- if (this_image(A, dim=2) /= 4) call abort()
- if (this_image(A, dim=3) /= 9) call abort()
+ if (this_image(A, dim=2) /= 4) STOP 28
+ if (this_image(A, dim=3) /= 9) STOP 29
i = 2
- if (this_image(A, dim=i) /= 4) call abort()
+ if (this_image(A, dim=i) /= 4) STOP 30
i = 3
- if (this_image(A, dim=i) /= 9) call abort()
- if (any (this_image(A) /= [2,4,9])) call abort()
+ if (this_image(A, dim=i) /= 9) STOP 31
+ if (any (this_image(A) /= [2,4,9])) STOP 32
case (7)
- if (this_image(A, dim=2) /= 3) call abort()
- if (this_image(A, dim=3) /= 10) call abort()
+ if (this_image(A, dim=2) /= 3) STOP 33
+ if (this_image(A, dim=3) /= 10) STOP 34
i = 2
- if (this_image(A, dim=i) /= 3) call abort()
+ if (this_image(A, dim=i) /= 3) STOP 35
i = 3
- if (this_image(A, dim=i) /= 10) call abort()
- if (any (this_image(A) /= [2,3,10])) call abort()
+ if (this_image(A, dim=i) /= 10) STOP 36
+ if (any (this_image(A) /= [2,3,10])) STOP 37
case (8)
- if (this_image(A, dim=2) /= 4) call abort()
- if (this_image(A, dim=3) /= 10) call abort()
+ if (this_image(A, dim=2) /= 4) STOP 38
+ if (this_image(A, dim=3) /= 10) STOP 39
i = 2
- if (this_image(A, dim=i) /= 4) call abort()
+ if (this_image(A, dim=i) /= 4) STOP 40
i = 3
- if (this_image(A, dim=i) /= 10) call abort()
- if (any (this_image(A) /= [2,4,10])) call abort()
+ if (this_image(A, dim=i) /= 10) STOP 41
+ if (any (this_image(A) /= [2,4,10])) STOP 42
end select
select case (this_image())
case (1)
- if (this_image(B, dim=1) /= -1) call abort()
- if (this_image(B, dim=2) /= 2) call abort()
- if (this_image(B, dim=3) /= 1) call abort()
+ if (this_image(B, dim=1) /= -1) STOP 43
+ if (this_image(B, dim=2) /= 2) STOP 44
+ if (this_image(B, dim=3) /= 1) STOP 45
i = 1
- if (this_image(B, dim=i) /= -1) call abort()
+ if (this_image(B, dim=i) /= -1) STOP 46
i = 2
- if (this_image(B, dim=i) /= 2) call abort()
+ if (this_image(B, dim=i) /= 2) STOP 47
i = 3
- if (this_image(B, dim=i) /= 1) call abort()
- if (any (this_image(B) /= [-1,2,1])) call abort()
+ if (this_image(B, dim=i) /= 1) STOP 48
+ if (any (this_image(B) /= [-1,2,1])) STOP 49
case (2)
- if (this_image(B, dim=1) /= 0) call abort()
- if (this_image(B, dim=2) /= 2) call abort()
- if (this_image(B, dim=3) /= 1) call abort()
+ if (this_image(B, dim=1) /= 0) STOP 50
+ if (this_image(B, dim=2) /= 2) STOP 51
+ if (this_image(B, dim=3) /= 1) STOP 52
i = 1
- if (this_image(B, dim=i) /= 0) call abort()
+ if (this_image(B, dim=i) /= 0) STOP 53
i = 2
- if (this_image(B, dim=i) /= 2) call abort()
+ if (this_image(B, dim=i) /= 2) STOP 54
i = 3
- if (this_image(B, dim=i) /= 1) call abort()
- if (any (this_image(B) /= [0,2,1])) call abort()
+ if (this_image(B, dim=i) /= 1) STOP 55
+ if (any (this_image(B) /= [0,2,1])) STOP 56
case (3)
- if (this_image(B, dim=1) /= -1) call abort()
- if (this_image(B, dim=2) /= 3) call abort()
- if (this_image(B, dim=3) /= 1) call abort()
+ if (this_image(B, dim=1) /= -1) STOP 57
+ if (this_image(B, dim=2) /= 3) STOP 58
+ if (this_image(B, dim=3) /= 1) STOP 59
i = 1
- if (this_image(B, dim=i) /= -1) call abort()
+ if (this_image(B, dim=i) /= -1) STOP 60
i = 2
- if (this_image(B, dim=i) /= 3) call abort()
+ if (this_image(B, dim=i) /= 3) STOP 61
i = 3
- if (this_image(B, dim=i) /= 1) call abort()
- if (any (this_image(B) /= [-1,3,1])) call abort()
+ if (this_image(B, dim=i) /= 1) STOP 62
+ if (any (this_image(B) /= [-1,3,1])) STOP 63
case (4)
- if (this_image(B, dim=1) /= 0) call abort()
- if (this_image(B, dim=2) /= 3) call abort()
- if (this_image(B, dim=3) /= 1) call abort()
+ if (this_image(B, dim=1) /= 0) STOP 64
+ if (this_image(B, dim=2) /= 3) STOP 65
+ if (this_image(B, dim=3) /= 1) STOP 66
i = 1
- if (this_image(B, dim=i) /= 0) call abort()
+ if (this_image(B, dim=i) /= 0) STOP 67
i = 2
- if (this_image(B, dim=i) /= 3) call abort()
+ if (this_image(B, dim=i) /= 3) STOP 68
i = 3
- if (this_image(B, dim=i) /= 1) call abort()
- if (any (this_image(B) /= [0,3,1])) call abort()
+ if (this_image(B, dim=i) /= 1) STOP 69
+ if (any (this_image(B) /= [0,3,1])) STOP 70
case (5)
- if (this_image(B, dim=1) /= -1) call abort()
- if (this_image(B, dim=2) /= 4) call abort()
- if (this_image(B, dim=3) /= 1) call abort()
+ if (this_image(B, dim=1) /= -1) STOP 71
+ if (this_image(B, dim=2) /= 4) STOP 72
+ if (this_image(B, dim=3) /= 1) STOP 73
i = 1
- if (this_image(B, dim=i) /= -1) call abort()
+ if (this_image(B, dim=i) /= -1) STOP 74
i = 2
- if (this_image(B, dim=i) /= 4) call abort()
+ if (this_image(B, dim=i) /= 4) STOP 75
i = 3
- if (this_image(B, dim=i) /= 1) call abort()
- if (any (this_image(B) /= [-1,4,1])) call abort()
+ if (this_image(B, dim=i) /= 1) STOP 76
+ if (any (this_image(B) /= [-1,4,1])) STOP 77
case (6)
- if (this_image(B, dim=1) /= 0) call abort()
- if (this_image(B, dim=2) /= 4) call abort()
- if (this_image(B, dim=3) /= 1) call abort()
+ if (this_image(B, dim=1) /= 0) STOP 78
+ if (this_image(B, dim=2) /= 4) STOP 79
+ if (this_image(B, dim=3) /= 1) STOP 80
i = 1
- if (this_image(B, dim=i) /= 0) call abort()
+ if (this_image(B, dim=i) /= 0) STOP 81
i = 2
- if (this_image(B, dim=i) /= 4) call abort()
+ if (this_image(B, dim=i) /= 4) STOP 82
i = 3
- if (this_image(B, dim=i) /= 1) call abort()
- if (any (this_image(B) /= [0,4,1])) call abort()
+ if (this_image(B, dim=i) /= 1) STOP 83
+ if (any (this_image(B) /= [0,4,1])) STOP 84
case (7)
- if (this_image(B, dim=1) /= -1) call abort()
- if (this_image(B, dim=2) /= 2) call abort()
- if (this_image(B, dim=3) /= 2) call abort()
+ if (this_image(B, dim=1) /= -1) STOP 85
+ if (this_image(B, dim=2) /= 2) STOP 86
+ if (this_image(B, dim=3) /= 2) STOP 87
i = 1
- if (this_image(B, dim=i) /= -1) call abort()
+ if (this_image(B, dim=i) /= -1) STOP 88
i = 2
- if (this_image(B, dim=i) /= 2) call abort()
+ if (this_image(B, dim=i) /= 2) STOP 89
i = 3
- if (this_image(B, dim=i) /= 2) call abort()
- if (any (this_image(B) /= [-1,2,2])) call abort()
+ if (this_image(B, dim=i) /= 2) STOP 90
+ if (any (this_image(B) /= [-1,2,2])) STOP 91
case (8)
- if (this_image(B, dim=1) /= 0) call abort()
- if (this_image(B, dim=2) /= 2) call abort()
- if (this_image(B, dim=3) /= 2) call abort()
+ if (this_image(B, dim=1) /= 0) STOP 92
+ if (this_image(B, dim=2) /= 2) STOP 93
+ if (this_image(B, dim=3) /= 2) STOP 94
i = 1
- if (this_image(B, dim=i) /= 0) call abort()
+ if (this_image(B, dim=i) /= 0) STOP 95
i = 2
- if (this_image(B, dim=i) /= 2) call abort()
+ if (this_image(B, dim=i) /= 2) STOP 96
i = 3
- if (this_image(B, dim=i) /= 2) call abort()
- if (any (this_image(B) /= [0,2,2])) call abort()
+ if (this_image(B, dim=i) /= 2) STOP 97
+ if (any (this_image(B) /= [0,2,2])) STOP 98
end select
end
integer :: a[2:2, 3:4, 7:*]
integer :: i
-if (this_image(A, dim=1) /= 2) call abort()
+if (this_image(A, dim=1) /= 2) STOP 1
i = 1
-if (this_image(A, dim=i) /= 2) call abort()
+if (this_image(A, dim=i) /= 2) STOP 2
select case (this_image())
case (1)
- if (this_image(A, dim=2) /= 3) call abort()
- if (this_image(A, dim=3) /= 7) call abort()
+ if (this_image(A, dim=2) /= 3) STOP 3
+ if (this_image(A, dim=3) /= 7) STOP 4
i = 2
- if (this_image(A, dim=i) /= 3) call abort()
+ if (this_image(A, dim=i) /= 3) STOP 5
i = 3
- if (this_image(A, dim=i) /= 7) call abort()
- if (any (this_image(A) /= [2,3,7])) call abort()
+ if (this_image(A, dim=i) /= 7) STOP 6
+ if (any (this_image(A) /= [2,3,7])) STOP 7
case (2)
- if (this_image(A, dim=2) /= 4) call abort()
- if (this_image(A, dim=3) /= 7) call abort()
+ if (this_image(A, dim=2) /= 4) STOP 8
+ if (this_image(A, dim=3) /= 7) STOP 9
i = 2
- if (this_image(A, dim=i) /= 4) call abort()
+ if (this_image(A, dim=i) /= 4) STOP 10
i = 3
- if (this_image(A, dim=i) /= 7) call abort()
- if (any (this_image(A) /= [2,4,7])) call abort()
+ if (this_image(A, dim=i) /= 7) STOP 11
+ if (any (this_image(A) /= [2,4,7])) STOP 12
case (3)
- if (this_image(A, dim=2) /= 3) call abort()
- if (this_image(A, dim=3) /= 8) call abort()
+ if (this_image(A, dim=2) /= 3) STOP 13
+ if (this_image(A, dim=3) /= 8) STOP 14
i = 2
- if (this_image(A, dim=i) /= 3) call abort()
+ if (this_image(A, dim=i) /= 3) STOP 15
i = 3
- if (this_image(A, dim=i) /= 8) call abort()
- if (any (this_image(A) /= [2,3,8])) call abort()
+ if (this_image(A, dim=i) /= 8) STOP 16
+ if (any (this_image(A) /= [2,3,8])) STOP 17
case (4)
- if (this_image(A, dim=2) /= 4) call abort()
- if (this_image(A, dim=3) /= 8) call abort()
+ if (this_image(A, dim=2) /= 4) STOP 18
+ if (this_image(A, dim=3) /= 8) STOP 19
i = 2
- if (this_image(A, dim=i) /= 4) call abort()
+ if (this_image(A, dim=i) /= 4) STOP 20
i = 3
- if (this_image(A, dim=i) /= 8) call abort()
- if (any (this_image(A) /= [2,4,8])) call abort()
+ if (this_image(A, dim=i) /= 8) STOP 21
+ if (any (this_image(A) /= [2,4,8])) STOP 22
case (5)
- if (this_image(A, dim=2) /= 3) call abort()
- if (this_image(A, dim=3) /= 9) call abort()
+ if (this_image(A, dim=2) /= 3) STOP 23
+ if (this_image(A, dim=3) /= 9) STOP 24
i = 2
- if (this_image(A, dim=i) /= 3) call abort()
+ if (this_image(A, dim=i) /= 3) STOP 25
i = 3
- if (this_image(A, dim=i) /= 9) call abort()
- if (any (this_image(A) /= [2,3,9])) call abort()
+ if (this_image(A, dim=i) /= 9) STOP 26
+ if (any (this_image(A) /= [2,3,9])) STOP 27
case (6)
- if (this_image(A, dim=2) /= 4) call abort()
- if (this_image(A, dim=3) /= 9) call abort()
+ if (this_image(A, dim=2) /= 4) STOP 28
+ if (this_image(A, dim=3) /= 9) STOP 29
i = 2
- if (this_image(A, dim=i) /= 4) call abort()
+ if (this_image(A, dim=i) /= 4) STOP 30
i = 3
- if (this_image(A, dim=i) /= 9) call abort()
- if (any (this_image(A) /= [2,4,9])) call abort()
+ if (this_image(A, dim=i) /= 9) STOP 31
+ if (any (this_image(A) /= [2,4,9])) STOP 32
case (7)
- if (this_image(A, dim=2) /= 3) call abort()
- if (this_image(A, dim=3) /= 10) call abort()
+ if (this_image(A, dim=2) /= 3) STOP 33
+ if (this_image(A, dim=3) /= 10) STOP 34
i = 2
- if (this_image(A, dim=i) /= 3) call abort()
+ if (this_image(A, dim=i) /= 3) STOP 35
i = 3
- if (this_image(A, dim=i) /= 10) call abort()
- if (any (this_image(A) /= [2,3,10])) call abort()
+ if (this_image(A, dim=i) /= 10) STOP 36
+ if (any (this_image(A) /= [2,3,10])) STOP 37
case (8)
- if (this_image(A, dim=2) /= 4) call abort()
- if (this_image(A, dim=3) /= 10) call abort()
+ if (this_image(A, dim=2) /= 4) STOP 38
+ if (this_image(A, dim=3) /= 10) STOP 39
i = 2
- if (this_image(A, dim=i) /= 4) call abort()
+ if (this_image(A, dim=i) /= 4) STOP 40
i = 3
- if (this_image(A, dim=i) /= 10) call abort()
- if (any (this_image(A) /= [2,4,10])) call abort()
+ if (this_image(A, dim=i) /= 10) STOP 41
+ if (any (this_image(A) /= [2,4,10])) STOP 42
end select
contains
index2 = image_index(d, [0, 1] )
if (one .and. (index1 /= 1 .or. index2 /= 0)) &
- call abort()
+ STOP 43
if (.not. one .and. (index1 /= 1 .or. index2 /= 2)) &
- call abort()
+ STOP 44
index1 = image_index(e, [-1, 3] )
index2 = image_index(e, [-1, 4] )
if (one .and. (index1 /= 1 .or. index2 /= 0)) &
- call abort()
+ STOP 45
if (.not. one .and. (index1 /= 1 .or. index2 /= 2)) &
- call abort()
+ STOP 46
end subroutine test_image_index
integer, allocatable :: a(:)[:,:,:]
allocate(a(1)[-4:9,8,4:*])
- if (this_image(a,dim=1) /= -4_8) call abort()
- if (lcobound (a,dim=1) /= -4_8) call abort()
- if (ucobound (a,dim=1) /= 9_8) call abort()
+ if (this_image(a,dim=1) /= -4_8) STOP 1
+ if (lcobound (a,dim=1) /= -4_8) STOP 2
+ if (ucobound (a,dim=1) /= 9_8) STOP 3
- if (this_image(a,dim=2) /= 1_8) call abort()
- if (lcobound (a,dim=2) /= 1_8) call abort()
- if (ucobound (a,dim=2) /= 8_8) call abort()
+ if (this_image(a,dim=2) /= 1_8) STOP 4
+ if (lcobound (a,dim=2) /= 1_8) STOP 5
+ if (ucobound (a,dim=2) /= 8_8) STOP 6
- if (this_image(a,dim=3) /= 4_8) call abort()
- if (lcobound (a,dim=3) /= 4_8) call abort()
- if (ucobound (a,dim=3) /= 4_8) call abort()
+ if (this_image(a,dim=3) /= 4_8) STOP 7
+ if (lcobound (a,dim=3) /= 4_8) STOP 8
+ if (ucobound (a,dim=3) /= 4_8) STOP 9
- if (any(this_image(a) /= [-4_8, 1_8, 4_8])) call abort()
- if (any(lcobound (a) /= [-4_8, 1_8, 4_8])) call abort()
- if (any(ucobound (a) /= [9_8, 8_8, 4_8])) call abort()
+ if (any(this_image(a) /= [-4_8, 1_8, 4_8])) STOP 10
+ if (any(lcobound (a) /= [-4_8, 1_8, 4_8])) STOP 11
+ if (any(ucobound (a) /= [9_8, 8_8, 4_8])) STOP 12
end subroutine one
subroutine two()
integer, allocatable :: a(:)[:,:,:]
allocate(a(1)[-4:9,8,4:*])
- if (this_image(a,dim=1) /= -4) call abort()
- if (lcobound (a,dim=1) /= -4) call abort()
- if (ucobound (a,dim=1) /= 9) call abort()
+ if (this_image(a,dim=1) /= -4) STOP 13
+ if (lcobound (a,dim=1) /= -4) STOP 14
+ if (ucobound (a,dim=1) /= 9) STOP 15
- if (this_image(a,dim=2) /= 1) call abort()
- if (lcobound (a,dim=2) /= 1) call abort()
- if (ucobound (a,dim=2) /= 8) call abort()
+ if (this_image(a,dim=2) /= 1) STOP 16
+ if (lcobound (a,dim=2) /= 1) STOP 17
+ if (ucobound (a,dim=2) /= 8) STOP 18
- if (this_image(a,dim=3) /= 4) call abort()
- if (lcobound (a,dim=3) /= 4) call abort()
- if (ucobound (a,dim=3) /= 4) call abort()
+ if (this_image(a,dim=3) /= 4) STOP 19
+ if (lcobound (a,dim=3) /= 4) STOP 20
+ if (ucobound (a,dim=3) /= 4) STOP 21
- if (any(this_image(a) /= [-4, 1, 4])) call abort()
- if (any(lcobound (a) /= [-4, 1, 4])) call abort()
- if (any(ucobound (a) /= [9, 8, 4])) call abort()
+ if (any(this_image(a) /= [-4, 1, 4])) STOP 22
+ if (any(lcobound (a) /= [-4, 1, 4])) STOP 23
+ if (any(ucobound (a) /= [9, 8, 4])) STOP 24
end subroutine two
subroutine three(n,A, n2)
integer :: A(3)[n:*]
A(1) = 42
- if (A(1) /= 42) call abort()
+ if (A(1) /= 42) STOP 25
A(1)[n2] = -42
- if (A(1)[n2] /= -42) call abort()
+ if (A(1)[n2] /= -42) STOP 26
- if (this_image(A,dim=1) /= n) call abort()
- if (lcobound (A,dim=1) /= n) call abort()
- if (ucobound (A,dim=1) /= n) call abort()
+ if (this_image(A,dim=1) /= n) STOP 27
+ if (lcobound (A,dim=1) /= n) STOP 28
+ if (ucobound (A,dim=1) /= n) STOP 29
- if (any(this_image(A) /= n)) call abort()
- if (any(lcobound (A) /= n)) call abort()
- if (any(ucobound (A) /= n)) call abort()
+ if (any(this_image(A) /= n)) STOP 30
+ if (any(lcobound (A) /= n)) STOP 31
+ if (any(ucobound (A) /= n)) STOP 32
end subroutine three
subroutine three_a(n,A)
integer :: A(3)[n+2:n+5,n-1:*]
A(1) = 42
- if (A(1) /= 42) call abort()
+ if (A(1) /= 42) STOP 33
A(1)[4,n] = -42
- if (A(1)[4,n] /= -42) call abort()
+ if (A(1)[4,n] /= -42) STOP 34
- if (this_image(A,dim=1) /= n+2) call abort()
- if (lcobound (A,dim=1) /= n+2) call abort()
- if (ucobound (A,dim=1) /= n+5) call abort()
+ if (this_image(A,dim=1) /= n+2) STOP 35
+ if (lcobound (A,dim=1) /= n+2) STOP 36
+ if (ucobound (A,dim=1) /= n+5) STOP 37
- if (this_image(A,dim=2) /= n-1) call abort()
- if (lcobound (A,dim=2) /= n-1) call abort()
- if (ucobound (A,dim=2) /= n-1) call abort()
+ if (this_image(A,dim=2) /= n-1) STOP 38
+ if (lcobound (A,dim=2) /= n-1) STOP 39
+ if (ucobound (A,dim=2) /= n-1) STOP 40
- if (any(this_image(A) /= [n+2,n-1])) call abort()
- if (any(lcobound (A) /= [n+2,n-1])) call abort()
- if (any(ucobound (A) /= [n+5,n-1])) call abort()
+ if (any(this_image(A) /= [n+2,n-1])) STOP 41
+ if (any(lcobound (A) /= [n+2,n-1])) STOP 42
+ if (any(ucobound (A) /= [n+5,n-1])) STOP 43
end subroutine three_a
subroutine three_b(n,A)
integer :: A(-1:3,0:4,-2:5,-4:7)[n+2:n+5,n-1:*]
A(-1,0,-2,-4) = 42
- if (A(-1,0,-2,-4) /= 42) call abort()
+ if (A(-1,0,-2,-4) /= 42) STOP 44
A(1,0,-2,-4) = 99
- if (A(1,0,-2,-4) /= 99) call abort()
+ if (A(1,0,-2,-4) /= 99) STOP 45
- if (this_image(A,dim=1) /= n+2) call abort()
- if (lcobound (A,dim=1) /= n+2) call abort()
- if (ucobound (A,dim=1) /= n+5) call abort()
+ if (this_image(A,dim=1) /= n+2) STOP 46
+ if (lcobound (A,dim=1) /= n+2) STOP 47
+ if (ucobound (A,dim=1) /= n+5) STOP 48
- if (this_image(A,dim=2) /= n-1) call abort()
- if (lcobound (A,dim=2) /= n-1) call abort()
- if (ucobound (A,dim=2) /= n-1) call abort()
+ if (this_image(A,dim=2) /= n-1) STOP 49
+ if (lcobound (A,dim=2) /= n-1) STOP 50
+ if (ucobound (A,dim=2) /= n-1) STOP 51
- if (any(this_image(A) /= [n+2,n-1])) call abort()
- if (any(lcobound (A) /= [n+2,n-1])) call abort()
- if (any(ucobound (A) /= [n+5,n-1])) call abort()
+ if (any(this_image(A) /= [n+2,n-1])) STOP 52
+ if (any(lcobound (A) /= [n+2,n-1])) STOP 53
+ if (any(ucobound (A) /= [n+5,n-1])) STOP 54
end subroutine three_b
subroutine four(A)
integer, allocatable :: A(:)[:]
- if (this_image(A,dim=1) /= -4_8) call abort()
- if (lcobound (A,dim=1) /= -4_8) call abort()
- if (ucobound (A,dim=1) /= -4_8) call abort()
+ if (this_image(A,dim=1) /= -4_8) STOP 55
+ if (lcobound (A,dim=1) /= -4_8) STOP 56
+ if (ucobound (A,dim=1) /= -4_8) STOP 57
end subroutine four
subroutine five()
i = 1
foo(1)[5,4] = 42
- if (foo(1)[5,4] /= 42) call abort()
- if (this_image(foo,dim=i) /= 5) call abort()
- if (lcobound(foo,dim=i) /= 5) call abort()
- if (ucobound(foo,dim=i) /= 7) call abort()
+ if (foo(1)[5,4] /= 42) STOP 58
+ if (this_image(foo,dim=i) /= 5) STOP 59
+ if (lcobound(foo,dim=i) /= 5) STOP 60
+ if (ucobound(foo,dim=i) /= 7) STOP 61
i = 2
- if (this_image(foo,dim=i) /= 4) call abort()
- if (lcobound(foo,dim=i) /= 4) call abort()
- if (ucobound(foo,dim=i) /= 4) call abort()
+ if (this_image(foo,dim=i) /= 4) STOP 62
+ if (lcobound(foo,dim=i) /= 4) STOP 63
+ if (ucobound(foo,dim=i) /= 4) STOP 64
end subroutine five
end program test
str = repeat('X', len(str))
write(str,*) 'z=',z(:),' on image',this_image()
if (str /= " z= 1.20000005 1.20000005 1.20000005 on image 1") &
- call abort
+ STOP 1
str = repeat('X', len(str))
write(str,*) 'z=',z,' on image',this_image()
if (str /= " z= 1.20000005 1.20000005 1.20000005 on image 1") &
- call abort
+ STOP 2
str = repeat('X', len(str))
write(str,*) 'z=',z(1:3)[this_image()],' on image',this_image()
if (str /= " z= 1.20000005 1.20000005 1.20000005 on image 1") &
- call abort
+ STOP 3
call ex2a()
call ex5()
str = repeat('X', len(str))
write(str,*) 'z=',z(:,:),' on image',this_image()
if (str /= " z= 1.20000005 1.20000005 1.20000005 1.20000005 on image 1") &
- call abort
+ STOP 4
str = repeat('X', len(str))
write(str,*) 'z=',z,' on image',this_image()
if (str /= " z= 1.20000005 1.20000005 1.20000005 1.20000005 on image 1") &
- call abort
+ STOP 5
end subroutine ex2a
subroutine ex5
str = repeat('X', len(str))
write(str,*) 'In main on image',this_image(), 'w= ',w
if (str /= " In main on image 1 w= 1.00000000 1.00000000 1.00000000 1.00000000") &
- call abort
+ STOP 6
str = repeat('X', len(str))
write(str,*) 'In main on image',this_image(), 'w= ',w(1:4)
if (str /= " In main on image 1 w= 1.00000000 1.00000000 1.00000000 1.00000000") &
- call abort
+ STOP 7
str = repeat('X', len(str))
write(str,*) 'In main on image',this_image(), 'w= ',w(:)[1]
if (str /= " In main on image 1 w= 1.00000000 1.00000000 1.00000000 1.00000000") &
- call abort
+ STOP 8
sync all
call ex5_sub(me,w)
str = repeat('X', len(str))
write(str,*) 'In sub on image',this_image(), 'w= ',w
if (str /= " In sub on image 1 w= 1.00000000") &
- call abort
+ STOP 9
end subroutine ex5_sub
index1 = image_index(a, [3, -4, 88] )
index2 = image_index(b, [-1, 0] )
index3 = image_index(c, [1] )
-if (index1 /= 1 .or. index2 /= 1 .or. index3 /= 1) call abort()
+if (index1 /= 1 .or. index2 /= 1 .or. index3 /= 1) STOP 1
index1 = image_index(a, [3, -3, 88] )
index3 = image_index(c, [2] )
if (one .and. (index1 /= 0 .or. index2 /= 0 .or. index3 /= 0)) &
- call abort()
+ STOP 2
if (.not. one .and. (index1 /= 2 .or. index2 /= 2 .or. index3 /= 2)) &
- call abort()
+ STOP 3
index1 = image_index(d, [-1, 1] )
index2 = image_index(d, [0, 1] )
if (one .and. (index1 /= 1 .or. index2 /= 0)) &
- call abort()
+ STOP 4
if (.not. one .and. (index1 /= 1 .or. index2 /= 2)) &
- call abort()
+ STOP 5
index1 = image_index(e, [-1, 3] )
index2 = image_index(e, [-1, 4] )
if (one .and. (index1 /= 1 .or. index2 /= 0)) &
- call abort()
+ STOP 6
if (.not. one .and. (index1 /= 1 .or. index2 /= 2)) &
- call abort()
+ STOP 7
call test(1, a,b,c)
index3 = image_index(a, [3, 1, 0] ) ! = 13
if (num_images() < 13 .and. (index1 /= 1 .or. index2 /= 0 .or. index3 /= 0)) &
- call abort()
+ STOP 8
if (num_images() >= 213 .and. (index1 /= 1 .or. index2 /= 213 .or. index3 /= 13)) &
- call abort()
+ STOP 9
if (num_images() >= 13 .and. (index1 /= 1 .or. index2 /= 0 .or. index3 /= 13)) &
- call abort()
+ STOP 10
contains
index1 = image_index(a, [3, -4, 88] )
index2 = image_index(b, [-1, 0] )
index3 = image_index(c, [1] )
- if (index1 /= 1 .or. index2 /= 1 .or. index3 /= 1) call abort()
+ if (index1 /= 1 .or. index2 /= 1 .or. index3 /= 1) STOP 11
index1 = image_index(a, [3, -3, 88] )
index3 = image_index(c, [2] )
if (one .and. (index1 /= 0 .or. index2 /= 0 .or. index3 /= 0)) &
- call abort()
+ STOP 12
if (.not. one .and. (index1 /= 2 .or. index2 /= 2 .or. index3 /= 2)) &
- call abort()
+ STOP 13
end subroutine test
end program test_image_index
sync all ( )
n = 5
sync all (stat=n)
- if (n /= 0) call abort()
+ if (n /= 0) STOP 1
n = 5
sync all (stat=n,errmsg=str)
- if (n /= 0) call abort()
+ if (n /= 0) STOP 2
sync all (errmsg=str)
sync memory
sync memory ( )
n = 5
sync memory (stat=n)
- if (n /= 0) call abort()
+ if (n /= 0) STOP 3
n = 5
sync memory (errmsg=str,stat=n)
- if (n /= 0) call abort()
+ if (n /= 0) STOP 4
sync memory (errmsg=str)
sync images (*, stat=n)
sync images (1)
sync images ([1])
-if (num_images() /= 1) call abort()
+if (num_images() /= 1) STOP 5
error stop 'stop'
end
subroutine test
complex, save :: z[*]
- if (z /= cmplx (0.0, 0.0)) call abort()
+ if (z /= cmplx (0.0, 0.0)) STOP 1
end subroutine test
! v2 should get value in u (0)
v2 = v1
- if(v2 /= u) call abort()
+ if(v2 /= u) STOP 1
end program
object%dynvol = vol_static
sync all
neighbor = merge(1,neighbor,me==num_images())
-if (object[neighbor]%scalar /= 42) call abort()
-if (object[neighbor]%indices(4) /= 4) call abort()
-if (object[neighbor]%matrix(3,6) /= 53) call abort()
-if (any( object[neighbor]%indices(:) /= [1,2,3,4,5] )) call abort()
-if (any( object[neighbor]%matrix(:,:) /= reshape([(i, i=1, 70)], [10, 7]))) call abort()
-if (any( object[neighbor]%matrix(3,:) /= [(i * 10 + 3, i=0, 6)])) call abort()
-if (any( object[neighbor]%matrix(:,2) /= [(i + 10, i=1, 10)])) call abort()
-if (any( object[neighbor]%matrix(idx,2) /= [11, 12, 11, 17, 15])) call abort()
-if (any( object[neighbor]%matrix(3,idx) /= [3, 13, 3, 63, 43])) call abort()
-if (any( object[neighbor]%matrix(2:8:4, 5:1:-1) /= reshape([42, 46, 32, 36, 22, 26, 12, 16, 2, 6], [2,5]))) call abort()
-if (any( object[neighbor]%matrix(:8:4, 2::2) /= reshape([11, 15, 31, 35, 51, 55], [2,3]))) call abort()
-if (any( object[neighbor]%volume /= vol_static)) call abort()
-if (any( object[neighbor]%dynvol /= vol_static)) call abort()
-if (any( object[neighbor]%volume(:, 2:4, :) /= vol_static(:, 2:4, :))) call abort()
-if (any( object[neighbor]%dynvol(:, 2:4, :) /= vol_static(:, 2:4, :))) call abort()
+if (object[neighbor]%scalar /= 42) STOP 1
+if (object[neighbor]%indices(4) /= 4) STOP 2
+if (object[neighbor]%matrix(3,6) /= 53) STOP 3
+if (any( object[neighbor]%indices(:) /= [1,2,3,4,5] )) STOP 4
+if (any( object[neighbor]%matrix(:,:) /= reshape([(i, i=1, 70)], [10, 7]))) STOP 5
+if (any( object[neighbor]%matrix(3,:) /= [(i * 10 + 3, i=0, 6)])) STOP 6
+if (any( object[neighbor]%matrix(:,2) /= [(i + 10, i=1, 10)])) STOP 7
+if (any( object[neighbor]%matrix(idx,2) /= [11, 12, 11, 17, 15])) STOP 8
+if (any( object[neighbor]%matrix(3,idx) /= [3, 13, 3, 63, 43])) STOP 9
+if (any( object[neighbor]%matrix(2:8:4, 5:1:-1) /= reshape([42, 46, 32, 36, 22, 26, 12, 16, 2, 6], [2,5]))) STOP 10
+if (any( object[neighbor]%matrix(:8:4, 2::2) /= reshape([11, 15, 31, 35, 51, 55], [2,3]))) STOP 11
+if (any( object[neighbor]%volume /= vol_static)) STOP 12
+if (any( object[neighbor]%dynvol /= vol_static)) STOP 13
+if (any( object[neighbor]%volume(:, 2:4, :) /= vol_static(:, 2:4, :))) STOP 14
+if (any( object[neighbor]%dynvol(:, 2:4, :) /= vol_static(:, 2:4, :))) STOP 15
vol2 = vol_static(:, ::2, :)
-if (any( object[neighbor]%volume(:, ::2, :) /= vol2)) call abort()
-if (any( object[neighbor]%dynvol(:, ::2, :) /= vol2)) call abort()
+if (any( object[neighbor]%volume(:, ::2, :) /= vol2)) STOP 16
+if (any( object[neighbor]%dynvol(:, ::2, :) /= vol2)) STOP 17
allocate(bar%vec(-2:2))
bar%vec(1)%volume = vol_static
-if (any(bar[neighbor]%vec(1)%volume /= vol_static)) call abort()
+if (any(bar[neighbor]%vec(1)%volume /= vol_static)) STOP 18
i = 15
bar%vec(1)%scalar = i
-if (.not. allocated(bar%vec(1)%scalar)) call abort()
-if (bar[neighbor]%vec(1)%scalar /= 15) call abort()
+if (.not. allocated(bar%vec(1)%scalar)) STOP 19
+if (bar[neighbor]%vec(1)%scalar /= 15) STOP 20
bar%vec(0)%scalar = 27
-if (.not. allocated(bar%vec(0)%scalar)) call abort()
-if (bar[neighbor]%vec(0)%scalar /= 27) call abort()
+if (.not. allocated(bar%vec(0)%scalar)) STOP 21
+if (bar[neighbor]%vec(0)%scalar /= 27) STOP 22
bar%vec(1)%indices = [ 3, 4, 15 ]
allocate(bar%vec(2)%indices(5))
bar%vec(2)%indices = 89
-if (.not. allocated(bar%vec(1)%indices)) call abort()
-if (allocated(bar%vec(-2)%indices)) call abort()
-if (allocated(bar%vec(-1)%indices)) call abort()
-if (allocated(bar%vec( 0)%indices)) call abort()
-if (.not. allocated(bar%vec( 2)%indices)) call abort()
-if (any(bar[me]%vec(2)%indices /= 89)) call abort()
+if (.not. allocated(bar%vec(1)%indices)) STOP 23
+if (allocated(bar%vec(-2)%indices)) STOP 24
+if (allocated(bar%vec(-1)%indices)) STOP 25
+if (allocated(bar%vec( 0)%indices)) STOP 26
+if (.not. allocated(bar%vec( 2)%indices)) STOP 27
+if (any(bar[me]%vec(2)%indices /= 89)) STOP 28
-if (any (bar[neighbor]%vec(1)%indices /= [ 3,4,15])) call abort()
+if (any (bar[neighbor]%vec(1)%indices /= [ 3,4,15])) STOP 29
deallocate(bar%vec(2)%indices, object%scalar, object%matrix)
deallocate(bar%vec)
object[neighbor]%matrix = reshape([(i, i=1, 70)], [10, 7])
object[neighbor]%dynvol = vol_static
sync all
-if (object%scalar /= 42) call abort()
-if (any( object%indices /= [1,2,3,4,5] )) call abort()
-if (any( object%matrix /= reshape([(i, i=1, 70)], [10, 7]))) call abort()
-if (any( object%volume /= vol_static)) call abort()
-if (any( object%dynvol /= vol_static)) call abort()
+if (object%scalar /= 42) STOP 1
+if (any( object%indices /= [1,2,3,4,5] )) STOP 2
+if (any( object%matrix /= reshape([(i, i=1, 70)], [10, 7]))) STOP 3
+if (any( object%volume /= vol_static)) STOP 4
+if (any( object%dynvol /= vol_static)) STOP 5
vol2 = vol_static
vol2(:, ::2, :) = 42
object[neighbor]%volume(:, ::2, :) = 42
object[neighbor]%dynvol(:, ::2, :) = 42
-if (any( object%volume /= vol2)) call abort()
-if (any( object%dynvol /= vol2)) call abort()
+if (any( object%volume /= vol2)) STOP 6
+if (any( object%dynvol /= vol2)) STOP 7
allocate(bar%vec(-2:2))
bar[neighbor]%vec(1)%volume = vol_static
-if (any(bar%vec(1)%volume /= vol_static)) call abort()
+if (any(bar%vec(1)%volume /= vol_static)) STOP 8
i = 15
bar[neighbor]%vec(1)%scalar = i
-if (.not. allocated(bar%vec(1)%scalar)) call abort()
-if (bar%vec(1)%scalar /= 15) call abort()
+if (.not. allocated(bar%vec(1)%scalar)) STOP 9
+if (bar%vec(1)%scalar /= 15) STOP 10
bar[neighbor]%vec(0)%scalar = 27
-if (.not. allocated(bar%vec(0)%scalar)) call abort()
-if (bar%vec(0)%scalar /= 27) call abort()
+if (.not. allocated(bar%vec(0)%scalar)) STOP 11
+if (bar%vec(0)%scalar /= 27) STOP 12
bar[neighbor]%vec(1)%indices = [ 3, 4, 15 ]
allocate(bar%vec(2)%indices(5))
bar[neighbor]%vec(2)%indices = 89
-if (.not. allocated(bar%vec(1)%indices)) call abort()
-if (allocated(bar%vec(-2)%indices)) call abort()
-if (allocated(bar%vec(-1)%indices)) call abort()
-if (allocated(bar%vec( 0)%indices)) call abort()
-if (.not. allocated(bar%vec( 2)%indices)) call abort()
-if (any(bar%vec(2)%indices /= 89)) call abort()
+if (.not. allocated(bar%vec(1)%indices)) STOP 13
+if (allocated(bar%vec(-2)%indices)) STOP 14
+if (allocated(bar%vec(-1)%indices)) STOP 15
+if (allocated(bar%vec( 0)%indices)) STOP 16
+if (.not. allocated(bar%vec( 2)%indices)) STOP 17
+if (any(bar%vec(2)%indices /= 89)) STOP 18
-if (any (bar%vec(1)%indices /= [ 3,4,15])) call abort()
+if (any (bar%vec(1)%indices /= [ 3,4,15])) STOP 19
end program
sync all
- if(me == 1 .and. o%coo[np]%x(10) /= 11 ) call abort()
+ if(me == 1 .and. o%coo[np]%x(10) /= 11 ) STOP 1
! Check the whole array is correct.
- if (me == 1 .and. any( o%coo[np]%x /= [(i, i=2, 101)] ) ) call abort()
+ if (me == 1 .and. any( o%coo[np]%x /= [(i, i=2, 101)] ) ) STOP 2
deallocate(o%coo%x)
allocate(some_local_object, source=foobar)
- if (.not. allocated(foobar)) call abort()
- if (.not. allocated(some_local_object)) call abort()
+ if (.not. allocated(foobar)) STOP 1
+ if (.not. allocated(some_local_object)) STOP 2
deallocate(some_local_object)
deallocate(foobar)
allocate(some_local_object, source=foobar)
- if (.not. allocated(foobar)) call abort()
- if (lbound(foobar, 1) /= 1 .OR. ubound(foobar, 1) /= 10) call abort()
- if (.not. allocated(some_local_object)) call abort()
- if (any(some_local_object(:)%bar /= [99, 99, 99, 99, 99, 99, 99, 99, 99, 99])) call abort()
+ if (.not. allocated(foobar)) STOP 1
+ if (lbound(foobar, 1) /= 1 .OR. ubound(foobar, 1) /= 10) STOP 2
+ if (.not. allocated(some_local_object)) STOP 3
+ if (any(some_local_object(:)%bar /= [99, 99, 99, 99, 99, 99, 99, 99, 99, 99])) STOP 4
deallocate(some_local_object)
deallocate(foobar)
class is (foo)
r => z
class default
- call abort()
+ STOP 1
end select
-if (.not. associated(r)) call abort()
+if (.not. associated(r)) STOP 2
deallocate(r)
deallocate(p)
allocate(some_local_object, source=foobar)
- if (.not. allocated(foobar)) call abort()
- if (lbound(foobar, 1) /= 1 .OR. ubound(foobar, 1) /= 10) call abort()
- if (.not. allocated(some_local_object)) call abort()
- if (any(some_local_object(:)%bar /= [99, 99, 99, 99, 99, 99, 99, 99, 99, 99])) call abort()
+ if (.not. allocated(foobar)) STOP 1
+ if (lbound(foobar, 1) /= 1 .OR. ubound(foobar, 1) /= 10) STOP 2
+ if (.not. allocated(some_local_object)) STOP 3
+ if (any(some_local_object(:)%bar /= [99, 99, 99, 99, 99, 99, 99, 99, 99, 99])) STOP 4
deallocate(some_local_object)
deallocate(foobar)
me=this_image() ! me is always 1 here
object%indices=[(i,i=1,me)]
- if ( size(object%indices) /= 1 ) call abort()
+ if ( size(object%indices) /= 1 ) STOP 1
! therefore no array is present here and no array test needed.
- if ( object%indices(1) /= 1 ) call abort()
+ if ( object%indices(1) /= 1 ) STOP 2
end program
! { dg-final { scan-tree-dump-times "_gfortran_caf_register \\(D.\[0-9\]+, 1, &\\(\\(struct mytype\\) \\*object\\).indices.token, &\\(\\(struct mytype\\) \\*object\\).indices, 0B, 0B, 0\\);" 1 "original" } }
sync all
! Check the caf_get()-offset is computed correctly.
- if(me == 1 .and. coo[np]%y(10) /= 11 ) call abort()
+ if(me == 1 .and. coo[np]%y(10) /= 11 ) STOP 1
! Check the whole array is correct.
- if (me == 1 .and. any( coo[np]%y /= [(i, i=2, 101)] ) ) call abort()
+ if (me == 1 .and. any( coo[np]%y /= [(i, i=2, 101)] ) ) STOP 2
deallocate(coo%x)
allocate(outbox%v(1), source=particles(this_image()))
- if (any( outbox[1]%v(1)%x(1:2) /= [ 1.0, 1.0] )) call abort()
- if (any( outbox[1]%v(1)%x(:) /= [ 1.0, 1.0] )) call abort()
- if (any( outbox[1]%v(1)%x /= [ 1.0, 1.0] )) call abort()
+ if (any( outbox[1]%v(1)%x(1:2) /= [ 1.0, 1.0] )) STOP 1
+ if (any( outbox[1]%v(1)%x(:) /= [ 1.0, 1.0] )) STOP 2
+ if (any( outbox[1]%v(1)%x /= [ 1.0, 1.0] )) STOP 3
allocate(object(1)[*], source=particles(this_image()))
- if (any( object(1)[1]%x(1:2) /= [ 1.0, 1.0] )) call abort()
- if (any( object(1)[1]%x(:) /= [ 1.0, 1.0] )) call abort()
- if (any( object(1)[1]%x /= [ 1.0, 1.0] )) call abort()
+ if (any( object(1)[1]%x(1:2) /= [ 1.0, 1.0] )) STOP 4
+ if (any( object(1)[1]%x(:) /= [ 1.0, 1.0] )) STOP 5
+ if (any( object(1)[1]%x /= [ 1.0, 1.0] )) STOP 6
end program
allocate (xx[*])
- if (allocated(xx%i)) call abort()
- if (allocated(xx[1]%i)) call abort()
- if (allocated(xx[1]%r)) call abort()
+ if (allocated(xx%i)) STOP 1
+ if (allocated(xx[1]%i)) STOP 2
+ if (allocated(xx[1]%r)) STOP 3
allocate(xx%i)
- if (.not. allocated(xx[1]%i)) call abort()
- if (allocated(xx[1]%r)) call abort()
+ if (.not. allocated(xx[1]%i)) STOP 4
+ if (allocated(xx[1]%r)) STOP 5
allocate(xx%r(5))
- if (.not. allocated(xx[1]%i)) call abort()
- if (.not. allocated(xx[1]%r)) call abort()
+ if (.not. allocated(xx[1]%i)) STOP 6
+ if (.not. allocated(xx[1]%r)) STOP 7
deallocate(xx%i)
- if (allocated(xx[1]%i)) call abort()
- if (.not. allocated(xx[1]%r)) call abort()
+ if (allocated(xx[1]%i)) STOP 8
+ if (.not. allocated(xx[1]%r)) STOP 9
deallocate(xx%r)
- if (allocated(xx[1]%i)) call abort()
- if (allocated(xx[1]%r)) call abort()
+ if (allocated(xx[1]%i)) STOP 10
+ if (allocated(xx[1]%r)) STOP 11
deallocate(xx)
end
B = [1,2,3,4,5,6,7,8,9,10]
A(10:2:-1) = A(9:1:-1)[1] ! 0
B(10:2:-1) = B(9:1:-1)
-if (any (A-B /= 0)) call abort
+if (any (A-B /= 0)) STOP 1
A = [1,2,3,4,5,6,7,8,9,10]
B = [1,2,3,4,5,6,7,8,9,10]
A(9:1:-1) = A(10:2:-1)[1] ! 1
B(9:1:-1) = B(10:2:-1)
-if (any (A-B /= 0)) call abort
+if (any (A-B /= 0)) STOP 2
A = [1,2,3,4,5,6,7,8,9,10]
B = [1,2,3,4,5,6,7,8,9,10]
allocate(P(10))
P(:) = A(:)[1] ! 1
-if (any (A-B /= 0)) call abort
+if (any (A-B /= 0)) STOP 3
A = [1,2,3,4,5,6,7,8,9,10]
B = [1,2,3,4,5,6,7,8,9,10]
B = [1,2,3,4,5,6,7,8,9,10]
A(1:5)[1] = A(3:7)[1] ! 1
B(1:5) = B(3:7)
-if (any (A-B /= 0)) call abort
+if (any (A-B /= 0)) STOP 4
end
! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, &parm.\[0-9\]+, 4, 4, 0, 0B\\\);" 1 "original" } }
subroutine foo()
use m
type(t) :: x,y
-if (allocated(x%caf)) call abort()
+if (allocated(x%caf)) STOP 1
x = y
end
caf_dt = t (1,2)
call sub (caf, caf_dt%b)
print *,caf, caf_dt%b
- if (caf /= -99 .or. caf_dt%b /= -101) call abort ()
+ if (caf /= -99 .or. caf_dt%b /= -101) STOP 1
call sub_opt ()
call sub_opt (caf)
- if (caf /= 124) call abort ()
+ if (caf /= 124) STOP 2
contains
subroutine sub (x1, x2)
integer :: y1[*], y2[*]
print *, y1, y2
- if (y1 /= 42 .or. y2 /= 2) call abort ()
+ if (y1 /= 42 .or. y2 /= 2) STOP 3
y1 = -99
y2 = -101
end subroutine sub2
subroutine sub_opt (z)
integer, optional :: z[*]
if (present (z)) then
- if (z /= -99) call abort ()
+ if (z /= -99) STOP 4
z = 124
end if
end subroutine sub_opt
caf_dt = t (1,2)
call sub (caf, caf_dt%b)
print *,caf, caf_dt%b
- if (caf /= -99 .or. caf_dt%b /= -101) call abort ()
+ if (caf /= -99 .or. caf_dt%b /= -101) STOP 1
call sub_opt ()
call sub_opt (caf)
- if (caf /= 124) call abort ()
+ if (caf /= 124) STOP 2
contains
subroutine sub (x1, x2)
integer :: y1[*], y2[*]
print *, y1, y2
- if (y1 /= 42 .or. y2 /= 2) call abort ()
+ if (y1 /= 42 .or. y2 /= 2) STOP 3
y1 = -99
y2 = -101
end subroutine sub2
subroutine sub_opt (z)
integer, optional :: z[*]
if (present (z)) then
- if (z /= -99) call abort ()
+ if (z /= -99) STOP 4
z = 124
end if
end subroutine sub_opt
object%dynvol => vol_static
sync all
neighbor = merge(1,neighbor,me==num_images())
-if (object[neighbor]%scalar /= 42) call abort()
-if (object[neighbor]%indices(4) /= 4) call abort()
-if (object[neighbor]%matrix(3,6) /= 53) call abort()
-if (any( object[neighbor]%indices(:) /= [1,2,3,4,5] )) call abort()
-if (any( object[neighbor]%matrix(:,:) /= reshape([(i, i=1, 70)], [10, 7]))) call abort()
-if (any( object[neighbor]%matrix(3,:) /= [(i * 10 + 3, i=0, 6)])) call abort()
-if (any( object[neighbor]%matrix(:,2) /= [(i + 10, i=1, 10)])) call abort()
-if (any( object[neighbor]%matrix(idx,2) /= [11, 12, 11, 17, 15])) call abort()
-if (any( object[neighbor]%matrix(3,idx) /= [3, 13, 3, 63, 43])) call abort()
-if (any( object[neighbor]%matrix(2:8:4, 5:1:-1) /= reshape([42, 46, 32, 36, 22, 26, 12, 16, 2, 6], [2,5]))) call abort()
-if (any( object[neighbor]%matrix(:8:4, 2::2) /= reshape([11, 15, 31, 35, 51, 55], [2,3]))) call abort()
-if (any( object[neighbor]%volume /= vol_static)) call abort()
-if (any( object[neighbor]%dynvol /= vol_static)) call abort()
-if (any( object[neighbor]%volume(:, 2:4, :) /= vol_static(:, 2:4, :))) call abort()
-if (any( object[neighbor]%dynvol(:, 2:4, :) /= vol_static(:, 2:4, :))) call abort()
+if (object[neighbor]%scalar /= 42) STOP 1
+if (object[neighbor]%indices(4) /= 4) STOP 2
+if (object[neighbor]%matrix(3,6) /= 53) STOP 3
+if (any( object[neighbor]%indices(:) /= [1,2,3,4,5] )) STOP 4
+if (any( object[neighbor]%matrix(:,:) /= reshape([(i, i=1, 70)], [10, 7]))) STOP 5
+if (any( object[neighbor]%matrix(3,:) /= [(i * 10 + 3, i=0, 6)])) STOP 6
+if (any( object[neighbor]%matrix(:,2) /= [(i + 10, i=1, 10)])) STOP 7
+if (any( object[neighbor]%matrix(idx,2) /= [11, 12, 11, 17, 15])) STOP 8
+if (any( object[neighbor]%matrix(3,idx) /= [3, 13, 3, 63, 43])) STOP 9
+if (any( object[neighbor]%matrix(2:8:4, 5:1:-1) /= reshape([42, 46, 32, 36, 22, 26, 12, 16, 2, 6], [2,5]))) STOP 10
+if (any( object[neighbor]%matrix(:8:4, 2::2) /= reshape([11, 15, 31, 35, 51, 55], [2,3]))) STOP 11
+if (any( object[neighbor]%volume /= vol_static)) STOP 12
+if (any( object[neighbor]%dynvol /= vol_static)) STOP 13
+if (any( object[neighbor]%volume(:, 2:4, :) /= vol_static(:, 2:4, :))) STOP 14
+if (any( object[neighbor]%dynvol(:, 2:4, :) /= vol_static(:, 2:4, :))) STOP 15
vol2 = vol_static(:, ::2, :)
-if (any( object[neighbor]%volume(:, ::2, :) /= vol2)) call abort()
-if (any( object[neighbor]%dynvol(:, ::2, :) /= vol2)) call abort()
+if (any( object[neighbor]%volume(:, ::2, :) /= vol2)) STOP 16
+if (any( object[neighbor]%dynvol(:, ::2, :) /= vol2)) STOP 17
allocate(bar%vec(-2:2))
bar%vec(1)%volume = vol_static
-if (any(bar[neighbor]%vec(1)%volume /= vol_static)) call abort()
+if (any(bar[neighbor]%vec(1)%volume /= vol_static)) STOP 18
i = 15
allocate(bar%vec(1)%scalar, bar%vec(0)%scalar)
bar%vec(1)%scalar = i
-if (.not. associated(bar%vec(1)%scalar)) call abort()
-if (bar[neighbor]%vec(1)%scalar /= 15) call abort()
+if (.not. associated(bar%vec(1)%scalar)) STOP 19
+if (bar[neighbor]%vec(1)%scalar /= 15) STOP 20
bar%vec(0)%scalar = 27
-if (.not. associated(bar%vec(0)%scalar)) call abort()
-if (bar[neighbor]%vec(0)%scalar /= 27) call abort()
+if (.not. associated(bar%vec(0)%scalar)) STOP 21
+if (bar[neighbor]%vec(0)%scalar /= 27) STOP 22
allocate(bar%vec(1)%indices(3), bar%vec(2)%indices(5))
bar%vec(1)%indices = [ 3, 4, 15 ]
bar%vec(2)%indices = 89
-if (.not. associated(bar%vec(1)%indices)) call abort()
-if (associated(bar%vec(-2)%indices)) call abort()
-if (associated(bar%vec(-1)%indices)) call abort()
-if (associated(bar%vec( 0)%indices)) call abort()
-if (.not. associated(bar%vec( 2)%indices)) call abort()
-if (any(bar[me]%vec(2)%indices /= 89)) call abort()
+if (.not. associated(bar%vec(1)%indices)) STOP 23
+if (associated(bar%vec(-2)%indices)) STOP 24
+if (associated(bar%vec(-1)%indices)) STOP 25
+if (associated(bar%vec( 0)%indices)) STOP 26
+if (.not. associated(bar%vec( 2)%indices)) STOP 27
+if (any(bar[me]%vec(2)%indices /= 89)) STOP 28
-if (any (bar[neighbor]%vec(1)%indices /= [ 3,4,15])) call abort()
+if (any (bar[neighbor]%vec(1)%indices /= [ 3,4,15])) STOP 29
deallocate(bar%vec(2)%indices, bar%vec(1)%indices, bar%vec(1)%scalar, bar%vec(0)%scalar)
deallocate(object%indices, object%scalar, object%matrix)
object[neighbor]%matrix = reshape([(i, i=1, 70)], [10, 7])
object[neighbor]%dynvol = vol_static
sync all
-if (object%scalar /= 42) call abort()
-if (any( object%indices /= [1,2,3,4,5] )) call abort()
-if (any( object%matrix /= reshape([(i, i=1, 70)], [10, 7]))) call abort()
-if (any( object%volume /= vol_static)) call abort()
-if (any( object%dynvol /= vol_static)) call abort()
+if (object%scalar /= 42) STOP 1
+if (any( object%indices /= [1,2,3,4,5] )) STOP 2
+if (any( object%matrix /= reshape([(i, i=1, 70)], [10, 7]))) STOP 3
+if (any( object%volume /= vol_static)) STOP 4
+if (any( object%dynvol /= vol_static)) STOP 5
vol2 = vol_static
vol2(:, ::2, :) = 42
object[neighbor]%volume(:, ::2, :) = 42
object[neighbor]%dynvol(:, ::2, :) = 42
-if (any( object%volume /= vol2)) call abort()
-if (any( object%dynvol /= vol2)) call abort()
+if (any( object%volume /= vol2)) STOP 6
+if (any( object%dynvol /= vol2)) STOP 7
allocate(bar%vec(-2:2))
bar[neighbor]%vec(1)%volume = vol_static
-if (any(bar%vec(1)%volume /= vol_static)) call abort()
+if (any(bar%vec(1)%volume /= vol_static)) STOP 8
allocate(bar%vec(1)%scalar, bar%vec(0)%scalar, bar%vec(1)%indices(3))
i = 15
bar[neighbor]%vec(1)%scalar = i
-if (.not. associated(bar%vec(1)%scalar)) call abort()
-if (bar%vec(1)%scalar /= 15) call abort()
+if (.not. associated(bar%vec(1)%scalar)) STOP 9
+if (bar%vec(1)%scalar /= 15) STOP 10
bar[neighbor]%vec(0)%scalar = 27
-if (.not. associated(bar%vec(0)%scalar)) call abort()
-if (bar%vec(0)%scalar /= 27) call abort()
+if (.not. associated(bar%vec(0)%scalar)) STOP 11
+if (bar%vec(0)%scalar /= 27) STOP 12
bar[neighbor]%vec(1)%indices = [ 3, 4, 15 ]
allocate(bar%vec(2)%indices(5))
bar[neighbor]%vec(2)%indices = 89
-if (.not. associated(bar%vec(1)%indices)) call abort()
-if (associated(bar%vec(-2)%indices)) call abort()
-if (associated(bar%vec(-1)%indices)) call abort()
-if (associated(bar%vec( 0)%indices)) call abort()
-if (.not. associated(bar%vec( 2)%indices)) call abort()
-if (any(bar%vec(2)%indices /= 89)) call abort()
+if (.not. associated(bar%vec(1)%indices)) STOP 13
+if (associated(bar%vec(-2)%indices)) STOP 14
+if (associated(bar%vec(-1)%indices)) STOP 15
+if (associated(bar%vec( 0)%indices)) STOP 16
+if (.not. associated(bar%vec( 2)%indices)) STOP 17
+if (any(bar%vec(2)%indices /= 89)) STOP 18
-if (any (bar%vec(1)%indices /= [ 3,4,15])) call abort()
+if (any (bar%vec(1)%indices /= [ 3,4,15])) STOP 19
end program
obj[np]%scal = 42
! Check the token for the scalar is set.
- if (obj[np]%scal /= 42) call abort()
+ if (obj[np]%scal /= 42) STOP 1
! Now the same for arrays.
obj[np]%array = [(i * np + me, i = 1, 15)]
- if (any(obj[np]%array /= [(i * np + me, i = 1, 15)])) call abort()
+ if (any(obj[np]%array /= [(i * np + me, i = 1, 15)])) STOP 2
end program check_caf_send_by_ref
stat = 42
tmp = me[num_images(),stat = stat]
- if(stat /= 0) call abort()
+ if(stat /= 0) STOP 1
end program whitespace
allocate(b%c)
b%a%i = 7
b%c%i = 13
-if (b%a%i /= 7) call abort
-if (any (lcobound(b%a) /= (/ 5 /))) call abort ! { dg-error "Expected coarray variable" }
-if (ucobound(b%a, dim=1) /= this_image() + 4) call abort ! { dg-error "Expected coarray variable" }
-if (any (lcobound(b%a%i) /= (/ 5 /))) call abort ! { dg-error "Expected coarray variable" }
-if (ucobound(b%a%i, dim=1) /= this_image() + 4) call abort ! { dg-error "Expected coarray variable" }
-if (b%c%i /= 13) call abort
-if (any (lcobound(b%c) /= (/ 5 /))) call abort ! { dg-error "Expected coarray variable" }
-if (ucobound(b%c, dim=1) /= this_image() + 4) call abort ! { dg-error "Expected coarray variable" }
-if (any (lcobound(b%c%i) /= (/ 5 /))) call abort ! { dg-error "Expected coarray variable" }
-if (ucobound(b%c%i, dim=1) /= this_image() + 4) call abort ! { dg-error "Expected coarray variable" }
+if (b%a%i /= 7) STOP 1
+if (any (lcobound(b%a) /= (/ 5 /))) STOP 2! { dg-error "Expected coarray variable" }
+if (ucobound(b%a, dim=1) /= this_image() + 4) STOP 3! { dg-error "Expected coarray variable" }
+if (any (lcobound(b%a%i) /= (/ 5 /))) STOP 4! { dg-error "Expected coarray variable" }
+if (ucobound(b%a%i, dim=1) /= this_image() + 4) STOP 5! { dg-error "Expected coarray variable" }
+if (b%c%i /= 13) STOP 6
+if (any (lcobound(b%c) /= (/ 5 /))) STOP 7! { dg-error "Expected coarray variable" }
+if (ucobound(b%c, dim=1) /= this_image() + 4) STOP 8! { dg-error "Expected coarray variable" }
+if (any (lcobound(b%c%i) /= (/ 5 /))) STOP 9! { dg-error "Expected coarray variable" }
+if (ucobound(b%c%i, dim=1) /= this_image() + 4) STOP 10! { dg-error "Expected coarray variable" }
end
!WRITE(*,*) 'OK'
ELSE
WRITE(*,*) 'FAIL'
- call abort()
+ STOP 1
END IF
TYPE IS (t)
ii = a(1)[1]%a
- call abort()
+ STOP 2
CLASS IS (t)
ii = a(1)[1]%a
- call abort()
+ STOP 3
END SELECT
END IF
SELECT TYPE (a)
TYPE IS (real)
ii = a(1)[1]
- call abort()
+ STOP 4
TYPE IS (t)
IF (ALL(A(:)[1]%a == 4.0)) THEN
!WRITE(*,*) 'OK'
ELSE
WRITE(*,*) 'FAIL'
- call abort()
+ STOP 5
END IF
CLASS IS (t)
ii = a(1)[1]%a
- call abort()
+ STOP 6
END SELECT
END IF
end program
write(11,'(a)') ",,"
rewind(11)
read(11,*)stuff, stuff2
- if (stuff.ne.1.0) call abort()
- if (stuff2.ne.2.0) call abort()
+ if (stuff.ne.1.0) STOP 1
+ if (stuff2.ne.2.0) STOP 2
rewind (11)
write(11,'(a)') ","
rewind(11)
read(11,*)stuff
- if (stuff.ne.1.0) call abort()
+ if (stuff.ne.1.0) STOP 3
close(11, status='delete')
end
character*12 c
write (c,100) 0, 1
- if (c .ne. 'i = 0, j = 1') call abort
+ if (c .ne. 'i = 0, j = 1') STOP 1
write (c,100) 0
- if (c .ne. 'i = 0 ') call abort
+ if (c .ne. 'i = 0 ') STOP 2
100 format ('i = 'i1,:,', j = ',i1)
end
! { dg-options "" }
character*6 c
write (c,1001) 1
- if (c .ne. ' 1 ') call abort
+ if (c .ne. ' 1 ') STOP 1
1001 format (' ',i4' ')
end
b = 2
c = 3
d = 4
- if (any (n .ne. (/1, 2, 3, 4/))) call abort
+ if (any (n .ne. (/1, 2, 3, 4/))) STOP 1
end program
common /block/ a, b, c
integer(kind=1) a
integer b, c
- if (a .ne. 1 .or. b .ne. HUGE(b) .or. c .ne. 2) call abort
+ if (a .ne. 1 .or. b .ne. HUGE(b) .or. c .ne. 2) STOP 1
end subroutine
subroutine one()
integer :: i
common i
- if (i/=5) call abort()
+ if (i/=5) STOP 1
end subroutine one
program test
real(8) x, y, z
common i(8)
equivalence (x, i(3)),(y,i(7))
- if ((i(1) .ne. 42) .or. (i(5) .ne. 43)) call abort
- if ((i(2) .ne. 0) .or. (i(2) .ne. 0)) call abort
- if ((x .ne. z) .or. (y .ne. z)) call abort
+ if ((i(1) .ne. 42) .or. (i(5) .ne. 43)) STOP 1
+ if ((i(2) .ne. 0) .or. (i(2) .ne. 0)) STOP 2
+ if ((x .ne. z) .or. (y .ne. z)) STOP 3
end subroutine
subroutine bar
integer a(2), b, c, d
COMMON /foo/ a
EQUIVALENCE (a(1),b), (c, a(2))
- if (b.ne.101) call abort ()
- if (c.ne.102) call abort ()
+ if (b.ne.101) STOP 1
+ if (c.ne.102) STOP 2
END
real, pointer :: p(:), q
common /block/ p, q
- if (any (p .ne. (/1.0, 2.0/)) .or. (q .ne. 42.0)) call abort ()
+ if (any (p .ne. (/1.0, 2.0/)) .or. (q .ne. 42.0)) STOP 1
end subroutine
program common_pointer_1
do 60 i=lft,llt\r
60 dett(i)=o64th/det(i)\r
\r
- if (det(lft) .ne. 1d0) call abort ()
- if (det(llt) .ne. 1d0) call abort ()\r
+ if (det(lft) .ne. 1d0) STOP 1
+ if (det(llt) .ne. 1d0) STOP 2\r
\r
return\r
c\r
! Testcase for the COMPLEX intrinsic
! { dg-do run }
- if (complex(1_1, -1_2) /= complex(1.0_4, -1.0_8)) call abort
- if (complex(1_4, -1.0) /= complex(1.0_4, -1_8)) call abort
+ if (complex(1_1, -1_2) /= complex(1.0_4, -1.0_8)) STOP 1
+ if (complex(1_4, -1.0) /= complex(1.0_4, -1_8)) STOP 2
end
complex(8), volatile :: z81_1 = cmplx(1.0_8, 1.0_8, kind=8)
complex(8), volatile :: z8p_p = cmplx(pi8, pi8, kind=8)
-if (abs(tan(z0_0) - cmplx(0.0,0.0,4)) > eps) call abort()
-if (abs(tan(z1_1) - cmplx(0.27175257,1.0839232,4)) > eps) call abort()
-if (abs(tan(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) call abort()
-if (abs(tan(z81_1) - cmplx(0.27175258531951174_8,1.0839233273386946_8,8)) > eps8) call abort()
+if (abs(tan(z0_0) - cmplx(0.0,0.0,4)) > eps) STOP 1
+if (abs(tan(z1_1) - cmplx(0.27175257,1.0839232,4)) > eps) STOP 2
+if (abs(tan(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) STOP 3
+if (abs(tan(z81_1) - cmplx(0.27175258531951174_8,1.0839233273386946_8,8)) > eps8) STOP 4
-if (abs(cosh(z0_0) - cmplx(1.0,0.0,4)) > eps) call abort()
-if (abs(cosh(z1_1) - cmplx(0.83372992,0.98889768,4)) > eps) call abort()
-if (abs(cosh(z80_0) - cmplx(1.0_8,0.0_8,8)) > eps8) call abort()
-if (abs(cosh(z81_1) - cmplx(0.83373002513114913_8,0.98889770576286506_8,8)) > eps8) call abort()
+if (abs(cosh(z0_0) - cmplx(1.0,0.0,4)) > eps) STOP 5
+if (abs(cosh(z1_1) - cmplx(0.83372992,0.98889768,4)) > eps) STOP 6
+if (abs(cosh(z80_0) - cmplx(1.0_8,0.0_8,8)) > eps8) STOP 7
+if (abs(cosh(z81_1) - cmplx(0.83373002513114913_8,0.98889770576286506_8,8)) > eps8) STOP 8
-if (abs(sinh(z0_0) - cmplx(0.0,0.0,4)) > eps) call abort()
-if (abs(sinh(z1_1) - cmplx(0.63496387,1.2984575,4)) > eps) call abort()
-if (abs(sinh(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) call abort()
-if (abs(sinh(z81_1) - cmplx(0.63496391478473613_8,1.2984575814159773_8,8)) > eps8) call abort()
+if (abs(sinh(z0_0) - cmplx(0.0,0.0,4)) > eps) STOP 9
+if (abs(sinh(z1_1) - cmplx(0.63496387,1.2984575,4)) > eps) STOP 10
+if (abs(sinh(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) STOP 11
+if (abs(sinh(z81_1) - cmplx(0.63496391478473613_8,1.2984575814159773_8,8)) > eps8) STOP 12
-if (abs(tanh(z0_0) - cmplx(0.0,0.0,4)) > eps) call abort()
-if (abs(tanh(z1_1) - cmplx(1.0839232,0.27175257,4)) > eps) call abort()
-if (abs(tanh(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) call abort()
-if (abs(tanh(z81_1) - cmplx(1.0839233273386946_8,0.27175258531951174_8,8)) > eps8) call abort()
+if (abs(tanh(z0_0) - cmplx(0.0,0.0,4)) > eps) STOP 13
+if (abs(tanh(z1_1) - cmplx(1.0839232,0.27175257,4)) > eps) STOP 14
+if (abs(tanh(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) STOP 15
+if (abs(tanh(z81_1) - cmplx(1.0839233273386946_8,0.27175258531951174_8,8)) > eps8) STOP 16
end
print '(a,g0," + I*",g0," eps=",g0)', 'Diff: ', &
real(z)-real(zref), &
aimag(z)-aimag(zref), eps4
- call abort()
+ STOP 1
end if
END SUBROUTINE check4
SUBROUTINE check8(z, zref)
print '(a,g0," + I*",g0," eps=",g0)', 'Diff: ', &
real(z)-real(zref), &
aimag(z)-aimag(zref), eps8
- call abort()
+ STOP 2
end if
END SUBROUTINE check8
end module test
complex(8), parameter :: z81_1 = cmplx(1.0_8, 1.0_8, kind=8)
complex(8), parameter :: z8p_p = cmplx(pi8, pi8, kind=8)
-if (abs(tan(z0_0) - cmplx(0.0,0.0,4)) > eps) call abort()
-if (abs(tan(z1_1) - cmplx(0.27175257,1.0839232,4)) > eps) call abort()
-if (abs(tan(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) call abort()
-if (abs(tan(z81_1) - cmplx(0.27175258531951174_8,1.0839233273386946_8,8)) > eps8) call abort()
+if (abs(tan(z0_0) - cmplx(0.0,0.0,4)) > eps) STOP 1
+if (abs(tan(z1_1) - cmplx(0.27175257,1.0839232,4)) > eps) STOP 2
+if (abs(tan(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) STOP 3
+if (abs(tan(z81_1) - cmplx(0.27175258531951174_8,1.0839233273386946_8,8)) > eps8) STOP 4
-if (abs(cosh(z0_0) - cmplx(1.0,0.0,4)) > eps) call abort()
-if (abs(cosh(z1_1) - cmplx(0.83372992,0.98889768,4)) > eps) call abort()
-if (abs(cosh(z80_0) - cmplx(1.0_8,0.0_8,8)) > eps8) call abort()
-if (abs(cosh(z81_1) - cmplx(0.83373002513114913_8,0.98889770576286506_8,8)) > eps8) call abort()
+if (abs(cosh(z0_0) - cmplx(1.0,0.0,4)) > eps) STOP 5
+if (abs(cosh(z1_1) - cmplx(0.83372992,0.98889768,4)) > eps) STOP 6
+if (abs(cosh(z80_0) - cmplx(1.0_8,0.0_8,8)) > eps8) STOP 7
+if (abs(cosh(z81_1) - cmplx(0.83373002513114913_8,0.98889770576286506_8,8)) > eps8) STOP 8
-if (abs(sinh(z0_0) - cmplx(0.0,0.0,4)) > eps) call abort()
-if (abs(sinh(z1_1) - cmplx(0.63496387,1.2984575,4)) > eps) call abort()
-if (abs(sinh(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) call abort()
-if (abs(sinh(z81_1) - cmplx(0.63496391478473613_8,1.2984575814159773_8,8)) > eps8) call abort()
+if (abs(sinh(z0_0) - cmplx(0.0,0.0,4)) > eps) STOP 9
+if (abs(sinh(z1_1) - cmplx(0.63496387,1.2984575,4)) > eps) STOP 10
+if (abs(sinh(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) STOP 11
+if (abs(sinh(z81_1) - cmplx(0.63496391478473613_8,1.2984575814159773_8,8)) > eps8) STOP 12
-if (abs(tanh(z0_0) - cmplx(0.0,0.0,4)) > eps) call abort()
-if (abs(tanh(z1_1) - cmplx(1.0839232,0.27175257,4)) > eps) call abort()
-if (abs(tanh(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) call abort()
-if (abs(tanh(z81_1) - cmplx(1.0839233273386946_8,0.27175258531951174_8,8)) > eps8) call abort()
+if (abs(tanh(z0_0) - cmplx(0.0,0.0,4)) > eps) STOP 13
+if (abs(tanh(z1_1) - cmplx(1.0839232,0.27175257,4)) > eps) STOP 14
+if (abs(tanh(z80_0) - cmplx(0.0_8,0.0_8,8)) > eps8) STOP 15
+if (abs(tanh(z81_1) - cmplx(1.0839233273386946_8,0.27175258531951174_8,8)) > eps8) STOP 16
end
! { dg-final { scan-tree-dump-times "abort" 0 "original" } }
write (10, *) " ( 0.99 , 9.9 )"
rewind (10)
read (10,*) a
- if (a.ne.(0.99, 9.90)) call abort ()
+ if (a.ne.(0.99, 9.90)) STOP 1
! Test a new record after the.comma (the original bug).
write (10, *) " 999.0 )"
rewind (10)
read (10,*) a
- if (a.ne.(99.0, 999.0)) call abort ()
+ if (a.ne.(99.0, 999.0)) STOP 2
! Test a new record before the.comma
write (10, *) " , 9.9 )"
rewind (10)
read (10,*) a
- if (a.ne.(0.99, 9.90)) call abort ()
+ if (a.ne.(0.99, 9.90)) STOP 3
! Test a new records before and after the.comma
write (10, *) " 999.0 )"
rewind (10)
read (10,*) a
- if (a.ne.(99.0, 999.0)) call abort ()
+ if (a.ne.(99.0, 999.0)) STOP 4
! Test a new records and blank records before and after the.comma
write (10, *) " 9.9 )"
rewind (10)
read (10,*) a
- if (a.ne.(0.99, 9.9)) call abort ()
+ if (a.ne.(0.99, 9.9)) STOP 5
close (10)
end program complex_read
rewind(74)
! can read the complex in as two reals, one on each line
read(74,'(E13.5)')r1,r2
- if (r1.ne.1.0 .and. r2.ne.2.0) call abort
+ if (r1.ne.1.0 .and. r2.ne.2.0) STOP 1
end
parameter (a="12")
parameter (b = a(1:2))
write (c,'("#",A,"#")') b
- if (c .ne. '#12 #') call abort
+ if (c .ne. '#12 #') STOP 1
end
subroutine test_foo()
type(foo) :: f
f = foo()
- if (f%bar /= 1) call abort ()
+ if (f%bar /= 1) STOP 1
f = foo(2)
- if (f%bar /= 2) call abort ()
+ if (f%bar /= 2) STOP 2
end subroutine test_foo
end module foo_module
subroutine test_bar()
type(bar) :: f
f = bar()
- if (f%bar /= 3) call abort ()
+ if (f%bar /= 3) STOP 3
f = bar(4)
- if (f%bar /= 4) call abort ()
+ if (f%bar /= 4) STOP 4
end subroutine test_bar
end module bar_module
call test_foo()
f = foo()
- if (f%bar /= 1) call abort ()
+ if (f%bar /= 1) STOP 5
f = foo(2)
- if (f%bar /= 2) call abort ()
+ if (f%bar /= 2) STOP 6
call test_bar()
b = bar()
- if (b%bar /= 3) call abort ()
+ if (b%bar /= 3) STOP 7
b = bar(4)
- if (b%bar /= 4) call abort ()
+ if (b%bar /= 4) STOP 8
end program main
integer :: k
x = cons(3)
k = cons()
-if (x%j /= 9) call abort ()
-if (k /= 42) call abort ()
+if (x%j /= 9) STOP 1
+if (k /= 42) STOP 2
!print *, x%j
!print *, k
end
type (rational_t) :: return_type
! print *, trim (message_)
- if (my_test_cnt /= 1) call abort()
+ if (my_test_cnt /= 1) STOP 1
my_test_cnt = my_test_cnt + 1
call return_type % Rational_t_init
! print *, "n, id", this_% n, this_% id
if (my_test_cnt == 0) then
- if (this_% n /= 0 .or. this_% id /= 1) call abort ()
+ if (this_% n /= 0 .or. this_% id /= 1) STOP 2
else if (my_test_cnt == 2) then
- if (this_% n /= 10 .or. this_% id /= 0) call abort ()
+ if (this_% n /= 10 .or. this_% id /= 0) STOP 3
else
- call abort ()
+ STOP 4
end if
my_test_cnt = my_test_cnt + 1
end subroutine Print_rational_t
type (temp_node_t) :: return_type
!print *, trim (message_)
- if (my_test_cnt /= 4) call abort()
+ if (my_test_cnt /= 4) STOP 5
my_test_cnt = my_test_cnt + 1
call return_type % Temp_node_t_init
! print *, "temp, id", this_% temperature, this_% id
if (my_test_cnt == 3) then
- if (this_% temperature /= 20 .or. this_% id /= 1) call abort ()
+ if (this_% temperature /= 20 .or. this_% id /= 1) STOP 6
else if (my_test_cnt == 5) then
- if (this_% temperature /= 10 .or. this_% id /= 0) call abort ()
+ if (this_% temperature /= 10 .or. this_% id /= 0) STOP 7
else
- call abort ()
+ STOP 8
end if
my_test_cnt = my_test_cnt + 1
end subroutine Print_temp_node_t
! print *, ""
!
! print *, "after declaration"
- if (my_test_cnt /= 0) call abort()
+ if (my_test_cnt /= 0) STOP 9
call sample_rational_t % print
- if (my_test_cnt /= 1) call abort()
+ if (my_test_cnt /= 1) STOP 10
sample_rational_t = sample_rational_t % rational_t ("using override")
- if (my_test_cnt /= 2) call abort()
+ if (my_test_cnt /= 2) STOP 11
! print *, "after override"
! call print (sample_rational_t)
! call sample_rational_t % print ()
call sample_rational_t % print
- if (my_test_cnt /= 3) call abort()
+ if (my_test_cnt /= 3) STOP 12
! print *, "sample_t"
! print *, "--------"
! print *, "after declaration"
call sample_temp_node_t % print
- if (my_test_cnt /= 4) call abort()
+ if (my_test_cnt /= 4) STOP 13
sample_temp_node_t = temp_node_t ("using override")
- if (my_test_cnt /= 5) call abort()
+ if (my_test_cnt /= 5) STOP 14
! print *, "after override"
! call print (sample_rational_t)
! call sample_rational_t % print ()
call sample_temp_node_t % print
- if (my_test_cnt /= 6) call abort()
+ if (my_test_cnt /= 6) STOP 15
end program Struct_over
external proc1
integer var
- if (var .ne. 42) call abort
+ if (var .ne. 42) STOP 1
call proc
end subroutine
use contained_1_mod
i = 0
call a
- if (i .ne. 1) call abort
+ if (i .ne. 1) STOP 2
end program
SUBROUTINE nxtstg1()
INTEGER :: i
i = setbd() ! available by host association.
- if (setbd () .ne. 99 ) call abort ()
+ if (setbd () .ne. 99 ) STOP 1
END SUBROUTINE nxtstg1
SUBROUTINE nxtstg2()
INTEGER :: i
integer :: setbd ! makes it external.
i = setbd() ! this is the PR
- if (setbd () .ne. 42 ) call abort ()
+ if (setbd () .ne. 42 ) STOP 2
END SUBROUTINE nxtstg2
FUNCTION binden()
integer setbd ! setbd is external, since not use assoc.
CALL nxtstg1()
CALL nxtstg2()
- if (setbd () .ne. 42 ) call abort ()
+ if (setbd () .ne. 42 ) STOP 3
call foo
contains
subroutine foo
USE ksbin1_aux_mod ! module setbd is available
- if (setbd () .ne. 99 ) call abort ()
+ if (setbd () .ne. 99 ) STOP 4
end subroutine
END PROGRAM test
real a
a = 1.0
call foo ()
- if (a.ne.1.0) call abort ()
+ if (a.ne.1.0) STOP 1
contains
subroutine foo ()
real b
program fire
use chk_gfortran
implicit none
- if(.not. is_gfortran()) call abort()
+ if(.not. is_gfortran()) STOP 1
end program fire
world!" ! { dg-warning "Missing '&' in continued character constant" }
if (c.ne.&
"Hello, world!")&
- call abort();end program main
+ STOP 1;end program main
&&&&&'
if (len(trim(str)) /= 44 &
.or. str /= 'Print rather a lot of ampersands &&&&&&&&&&&') &
- call abort()
+ STOP 1
end
1 FORMAT (''&
' abcdefg x')
write(astring, 1)
-if (astring.ne."' abcdefg x") call abort
+if (astring.ne."' abcdefg x") STOP 1
END
900 format('This is actually ok.' & !comment
' end' )
write(astring,100)
-if (astring.ne."This format is OK.") call abort
+if (astring.ne."This format is OK.") STOP 1
write(astring,200)
-if (astring.ne."This format now works.") call abort
+if (astring.ne."This format now works.") STOP 2
write(astring,300)
-if (astring.ne."This format now works.") call abort
+if (astring.ne."This format now works.") STOP 3
write(astring,400)
-if (astring.ne."This format is OK.") call abort
+if (astring.ne."This format is OK.") STOP 4
write(astring,500)
-if (astring.ne."This format is OK.") call abort
+if (astring.ne."This format is OK.") STOP 5
write(astring,600)
-if (astring.ne."This format now works.'") call abort
+if (astring.ne."This format now works.'") STOP 6
write(astring,700)
-if (astring.ne."This format now works.'") call abort
+if (astring.ne."This format now works.'") STOP 7
write(astring,800)
-if (astring.ne."This is actually ok.' end") call abort
+if (astring.ne."This is actually ok.' end") STOP 8
write(astring,900)
-if (astring.ne."This is actually ok. end") call abort
+if (astring.ne."This is actually ok. end") STOP 9
end
600 format('This format is OK.''' !comment
& )
write(astring,100)
- if (astring.ne."This format is OK.") call abort
+ if (astring.ne."This format is OK.") STOP 1
write(astring,200)
- if (astring.ne."This format works now.") call abort
+ if (astring.ne."This format works now.") STOP 2
write(astring,300)
- if (astring.ne."This format is OK.") call abort
+ if (astring.ne."This format is OK.") STOP 3
write(astring,400)
- if (astring.ne."This format is OK.") call abort
+ if (astring.ne."This format is OK.") STOP 4
write(astring,500)
- if (astring.ne."This format is now OK.'") call abort
+ if (astring.ne."This format is now OK.'") STOP 5
write(astring,600)
- if (astring.ne."This format is OK.'") call abort
+ if (astring.ne."This format is OK.'") STOP 6
end
str = "hello world &
& &
&!"
-if (str.ne."hello world !") call abort
+if (str.ne."hello world !") STOP 1
end program print_ascertain
close (20)
open(20,file="convert.dat",form="unformatted",access="stream")
read(20) i,c,j
- if (i .ne. two_swap .or. j .ne. two_swap .or. c .ne. "ab") call abort
+ if (i .ne. two_swap .or. j .ne. two_swap .or. c .ne. "ab") STOP 1
close (20)
open(20,file="convert.dat",form="unformatted",convert="swap") ! { dg-warning "CONVERT" }
read (20) d
close (20,status="delete")
- if (d .ne. "ab") call abort
+ if (d .ne. "ab") STOP 2
end program main
read (10,rec=1) i1
read (10,rec=2) i2
read (10,rec=3) i3
- if (i1 /= 4 .or. i2 /= 1 .or. i3 /= 4) call abort
+ if (i1 /= 4 .or. i2 /= 1 .or. i3 /= 4) STOP 1
close (10,status="delete")
end program main
INTEGER, PARAMETER :: odd(4) = COUNT (MOD(m, 2) == 1, dim=1)
INTEGER, PARAMETER :: even = COUNT (MOD(m, 2) == 0)
- IF (sevens /= 1) CALL abort()
- IF (ANY(odd /= [ 2,2,2,2 ])) CALL abort()
- IF (even /= 8) CALL abort()
+ IF (sevens /= 1) STOP 1
+ IF (ANY(odd /= [ 2,2,2,2 ])) STOP 2
+ IF (even /= 8) STOP 3
! check the kind parameter
- IF (KIND(COUNT (m == 7, KIND=2)) /= 2) CALL abort()
+ IF (KIND(COUNT (m == 7, KIND=2)) /= 2) STOP 4
END
read( unit=10, fmt='(64A)', advance='NO', iostat=iostat, &
size=n_chars_read ) buffer
- if (n_chars_read.ne.1) call abort
- if (any(buffer(1:n_chars_read).ne."a")) call abort
- if (.not.is_iostat_eor(iostat)) call abort
+ if (n_chars_read.ne.1) STOP 1
+ if (any(buffer(1:n_chars_read).ne."a")) STOP 2
+ if (.not.is_iostat_eor(iostat)) STOP 3
read( unit=10, fmt='(64A)', advance='NO', iostat=iostat, &
size=n_chars_read ) buffer
- if (n_chars_read.ne.1) call abort
- if (any(buffer(1:n_chars_read).ne."b")) call abort
- if (.not.is_iostat_eor(iostat)) call abort
+ if (n_chars_read.ne.1) STOP 4
+ if (any(buffer(1:n_chars_read).ne."b")) STOP 5
+ if (.not.is_iostat_eor(iostat)) STOP 6
read( unit=10, fmt='(64A)', advance='NO', iostat=iostat, &
size=n_chars_read ) buffer
- if (n_chars_read.ne.1) call abort
- if (any(buffer(1:n_chars_read).ne."c")) call abort
- if (.not.is_iostat_eor(iostat)) call abort
+ if (n_chars_read.ne.1) STOP 7
+ if (any(buffer(1:n_chars_read).ne."c")) STOP 8
+ if (.not.is_iostat_eor(iostat)) STOP 9
read( unit=10, fmt='(64A)', advance='NO', iostat=iostat, &
size=n_chars_read ) buffer
- if (n_chars_read.ne.0) call abort
- if (any(buffer(1:n_chars_read).ne."a")) call abort
- if (.not.is_iostat_end(iostat)) call abort
+ if (n_chars_read.ne.0) STOP 10
+ if (any(buffer(1:n_chars_read).ne."a")) STOP 11
+ if (.not.is_iostat_end(iostat)) STOP 12
close(10, status="delete")
! Set up the test file with normal file end.
100 continue
close(10, status="delete")
- call abort
+ STOP 13
101 continue
close(10, status="delete")
- if (u(1:len_trim(u)).ne."no end of line marker") call abort
+ if (u(1:len_trim(u)).ne."no end of line marker") STOP 14
end program main
real :: z
c_a = loc(z)
a = 42
- if (z /= 42) call abort
+ if (z /= 42) STOP 1
end program test
do i=13,400
if (errors(i)) then
! print *,"Test",i,"failed."
- call abort()
+ STOP 1
endif
end do
if (foo.eq.0) then
! print *,"Test did not run correctly."
- call abort()
+ STOP 2
endif
end program craytest
ii = -1
jj = 1
! print *,"Test did not run correctly"
- call abort()
+ STOP 3
endif
end subroutine donothing
forall (i = 1:100) arr(i) = i
ipt = loc (arr)
- if (any (var .ne. (/1, 2, 3, 4, 5, 6, 7, 8, 9, 10/))) call abort
+ if (any (var .ne. (/1, 2, 3, 4, 5, 6, 7, 8, 9, 10/))) STOP 1
end
! Check pointers to subroutines.
subptr = loc(sub)
call subpte(tmp)
- if (tmp .ne. 17) call abort()
+ if (tmp .ne. 17) STOP 1
! Check pointers to functions.
fnptr = loc(fn)
tmp = fnpte(7)
- if (tmp .ne. 14) call abort()
+ if (tmp .ne. 14) STOP 2
end program cray_pointers_7
x = x + dx
end do
z = euler(0.0,1.0,0.0005,fcn)
- if (abs (y - z) .gt. 1e-6) call abort
+ if (abs (y - z) .gt. 1e-6) STOP 1
end
do i=-3,3,2
call cshift_sp_3_v1 (a, i, k, b)
c = cshift(a,i,k)
- if (any (c /= b)) call abort
+ if (any (c /= b)) STOP 1
end do
end do
deallocate (b,c)
do i=-3,3,2
call cshift_sp_3_v1 (a(1:n-1,1:n-1,1:n-1), i, k, b)
c = cshift(a(1:n-1,1:n-1,1:n-1), i, k)
- if (any (c /= b)) call abort
+ if (any (c /= b)) STOP 2
end do
end do
end program testme
if (any(b /= c)) then
print *,b
print *,c
- call abort
+ STOP 1
end if
tb = cshift(ta,sh1,1)
- if (any(tb%i1 /= c)) call abort
+ if (any(tb%i1 /= c)) STOP 2
b = cshift(a,sh2,2)
call emul_cshift(a,sh2,2,c)
- if (any(b /= c)) call abort
+ if (any(b /= c)) STOP 3
tb = cshift(ta,sh2,2)
- if (any (tb%i2 /= c*2)) call abort
+ if (any (tb%i2 /= c*2)) STOP 4
b = cshift(a,sh3,3)
call emul_cshift(a,sh3,3,c)
- if (any(b /= c)) call abort
+ if (any(b /= c)) STOP 5
tb = cshift(ta,sh3,3)
- if (any(tb%i3 /= c*3)) call abort
+ if (any(tb%i3 /= c*3)) STOP 6
b = -42
c = -42
b(1:n1:2,:,:) = cshift(a(1:n1/2,:,:),sh1,1)
call emul_cshift(a(1:n1/2,:,:), sh1, 1, c(1:n1:2,:,:))
- if (any(b /= c)) call abort
+ if (any(b /= c)) STOP 7
tb%i1 = -42
tb%i2 = -2*42
tb%i3 = -3*42
tb(1:n1:2,:,:) = cshift(ta(1:n1/2,:,:),sh1,1)
- if (any(tb%i1 /= b)) call abort
- if (any(tb%i2 /= 2*b)) call abort
- if (any(tb%i3 /= 3*b)) call abort
+ if (any(tb%i1 /= b)) STOP 8
+ if (any(tb%i2 /= 2*b)) STOP 9
+ if (any(tb%i3 /= 3*b)) STOP 10
9000 format (99(3(I3,1X),2X))
end program main
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = cshift (a, 1_k, 1_k)
if (any (a .ne. reshape ((/2_k, 3_k, 1_k, 5_k, 6_k, 4_k, 8_k, 9_k, 7_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 1
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = cshift (a, -2_k, dim = 2_k)
if (any (a .ne. reshape ((/4_k, 5_k, 6_k, 7_k, 8_k, 9_k, 1_k, 2_k, 3_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 2
! Array shift
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = cshift (a, (/1_k, 0_k, -1_k/))
if (any (a .ne. reshape ((/2_k, 3_k, 1_k, 4_k, 5_k, 6_k, 9_k, 7_k, 8_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 3
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = cshift (a, (/2_k, -2_k, 0_k/), dim = 2_k)
if (any (a .ne. reshape ((/7_k, 5_k, 3_k, 1_k, 8_k, 6_k, 4_k, 2_k, 9_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 4
! Test arrays > rank 2
b = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k, 11_k, 12_k, 13_k, 14_k, 15_k, 16_k, 17_k,&
b = cshift (b, 1_k)
if (any (b .ne. reshape ((/2_k, 3_k, 1_k, 5_k, 6_k, 4_k, 8_k, 9_k, 7_k, 12_k, 13_k, 11_k, 15_k,&
16_k, 14_k, 18_k, 19_k, 17_k/), (/3_k, 3_k, 2_k/)))) &
- call abort
+ STOP 5
b = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k, 11_k, 12_k, 13_k, 14_k, 15_k, 16_k, 17_k,&
18_k, 19_k/), (/3_k, 3_k, 2_k/))
b = cshift (b, reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/)), 3_k)
if (any (b .ne. reshape ((/11_k, 2_k, 13_k, 4_k, 15_k, 6_k, 17_k, 8_k, 19_k, 1_k, 12_k, 3_k,&
14_k, 5_k, 16_k, 7_k, 18_k, 9_k/), (/3_k, 3_k, 2_k/)))) &
- call abort
+ STOP 6
end program
u%b = (/(i,i=-1,-4,-1)/)
v(1:3:2) = cshift(u(1:3:2),1)
v(2:4:2) = cshift(u(2:4:2),-1)
- if (any(v%a /= (/-5242880, -3145728, 2142240768, 2144337920 /))) call abort
- if (any(v%b /= (/-3, -4, -1, -2/))) call abort
+ if (any(v%a /= (/-5242880, -3145728, 2142240768, 2144337920 /))) STOP 1
+ if (any(v%b /= (/-3, -4, -1, -2/))) STOP 2
end program main
z = cmplx(0.707106, -0.707106)
x = cmplx(0.0,-1.0)
y = sqrt(x)
- if (abs(y - z) / abs(z) > 1.e-4) call abort
+ if (abs(y - z) / abs(z) > 1.e-4) STOP 1
x = cmplx(tiny(1.),-1.0)
y = sqrt(x)
- if (abs(y - z) / abs(z) > 1.e-4) call abort
+ if (abs(y - z) / abs(z) > 1.e-4) STOP 2
x = cmplx(-tiny(1.),-1.0)
y = sqrt(x)
- if (abs(y - z) / abs(z) > 1.e-4) call abort
+ if (abs(y - z) / abs(z) > 1.e-4) STOP 3
end
data a(3:5) / myint(1), myint(3), myint(1) /
data c / mychar(1), mychar(2), mychar(3), mychar(1), mychar(2) /
buffer = ""
- if (any(a.ne.[1,3,4,2,4])) call abort
+ if (any(a.ne.[1,3,4,2,4])) STOP 1
write(buffer,'(5(a))')c
- if (buffer.ne."abc def ghi abc def ") call abort
+ if (buffer.ne."abc def ghi abc def ") STOP 2
end program chkdata
data b(:)(1:4), b(1)(5:5), b(2)(5:5) &
/'abcdefg', 'hi', 'j', 'k'/ ! { dg-warning "truncated" }
- if ((a(1) .ne. 'Hello') .or. (a(2) .ne. 'orld ')) call abort
- if ((b(1) .ne. 'abcdj') .or. (b(2) .ne. 'hi k')) call abort
+ if ((a(1) .ne. 'Hello') .or. (a(2) .ne. 'orld ')) STOP 1
+ if ((b(1) .ne. 'abcdj') .or. (b(2) .ne. 'hi k')) STOP 2
end program
DATA INTSTR / '0123456789' /
C1 = INTSTR(1:1)
-if(C1 .ne. '0') call abort()
+if(C1 .ne. '0') STOP 1
end
!
character(LEN=2) :: a(2)
data ((a(I)(k:k),I=1,2),k=1,2) /2*'a',2*'z'/
- IF (ANY(a.NE."az")) CALL ABORT()
+ IF (ANY(a.NE."az")) STOP 1
END
DATA e1 / t(1) /
DATA e2 / t(1.0) /
- if (abs(e1%r - 1.0) > 1e-6) call abort
- if (abs(e2%r - 1.0) > 1e-6) call abort
+ if (abs(e1%r - 1.0) > 1e-6) STOP 1
+ if (abs(e2%r - 1.0) > 1e-6) STOP 2
END
DATA ((TWO_ARRAY (K, J), K = 1, J-1), J = 1, 3) /3 * 1.0/
DATA ((TWO_ARRAY (K, J), K = J, 3), J = 1, 3) /6 * 2.0/
if (any (reshape (two_array, (/9/)) &
- .ne. (/2.0,2.0,2.0,1.0,2.0,2.0,1.0,1.0,2.0/))) call abort ()
+ .ne. (/2.0,2.0,2.0,1.0,2.0,2.0,1.0,1.0,2.0/))) STOP 1
END PROGRAM
j = 42
rewind(10)
read(10,nl)
- if (i /= 0 .or. j /= 1) call abort
+ if (i /= 0 .or. j /= 1) STOP 1
close(10)
end program
e1 = 'No error'
allocate(i(4))
deallocate(i, stat=n, errmsg=e1)
- if (trim(e1) /= 'No error') call abort
+ if (trim(e1) /= 'No error') STOP 1
e2 = 'No error'
allocate(i(4))
deallocate(i, stat=n, errmsg=e2)
- if (trim(e2) /= 'No error') call abort
+ if (trim(e2) /= 'No error') STOP 2
e1 = 'No error'
deallocate(i, stat=n, errmsg=e1)
- if (trim(e1) /= 'Attempt to deallocate an unallocated object') call abort
+ if (trim(e1) /= 'Attempt to deallocate an unallocated object') STOP 3
e2 = 'No error'
deallocate(i, stat=n, errmsg=e2)
- if (trim(e2) /= 'Attempt to deallocate an unall') call abort
+ if (trim(e2) /= 'Attempt to deallocate an unall') STOP 4
end program a
a1 = 1. ; a2 = 2. ; a3 = 3. ; a4 = 4. ; a5 = 5. ; a6 = 6. ; a7 = 7.
i = 13
- deallocate(a1, stat=i) ; if (i /= 0) call abort
- deallocate(a2, stat=i) ; if (i /= 0) call abort
- deallocate(a3, stat=i) ; if (i /= 0) call abort
- deallocate(a4, stat=i) ; if (i /= 0) call abort
- deallocate(a5, stat=i) ; if (i /= 0) call abort
- deallocate(a6, stat=i) ; if (i /= 0) call abort
- deallocate(a7, stat=i) ; if (i /= 0) call abort
+ deallocate(a1, stat=i) ; if (i /= 0) STOP 1
+ deallocate(a2, stat=i) ; if (i /= 0) STOP 2
+ deallocate(a3, stat=i) ; if (i /= 0) STOP 3
+ deallocate(a4, stat=i) ; if (i /= 0) STOP 4
+ deallocate(a5, stat=i) ; if (i /= 0) STOP 5
+ deallocate(a6, stat=i) ; if (i /= 0) STOP 6
+ deallocate(a7, stat=i) ; if (i /= 0) STOP 7
i = 14
- deallocate(a1, stat=i) ; if (i /= 1) call abort
- deallocate(a2, stat=i) ; if (i /= 1) call abort
- deallocate(a3, stat=i) ; if (i /= 1) call abort
- deallocate(a4, stat=i) ; if (i /= 1) call abort
- deallocate(a5, stat=i) ; if (i /= 1) call abort
- deallocate(a6, stat=i) ; if (i /= 1) call abort
- deallocate(a7, stat=i) ; if (i /= 1) call abort
+ deallocate(a1, stat=i) ; if (i /= 1) STOP 8
+ deallocate(a2, stat=i) ; if (i /= 1) STOP 9
+ deallocate(a3, stat=i) ; if (i /= 1) STOP 10
+ deallocate(a4, stat=i) ; if (i /= 1) STOP 11
+ deallocate(a5, stat=i) ; if (i /= 1) STOP 12
+ deallocate(a6, stat=i) ; if (i /= 1) STOP 13
+ deallocate(a7, stat=i) ; if (i /= 1) STOP 14
allocate(b1(2), b2(2,2), b3(2,2,2), b4(2,2,2,2), b5(2,2,2,2,2))
allocate(b6(2,2,2,2,2,2), b7(2,2,2,2,2,2,2))
b1 = 1. ; b2 = 2. ; b3 = 3. ; b4 = 4. ; b5 = 5. ; b6 = 6. ; b7 = 7.
i = 13
- deallocate(b1, stat=i) ; if (i /= 0) call abort
- deallocate(b2, stat=i) ; if (i /= 0) call abort
- deallocate(b3, stat=i) ; if (i /= 0) call abort
- deallocate(b4, stat=i) ; if (i /= 0) call abort
- deallocate(b5, stat=i) ; if (i /= 0) call abort
- deallocate(b6, stat=i) ; if (i /= 0) call abort
- deallocate(b7, stat=i) ; if (i /= 0) call abort
+ deallocate(b1, stat=i) ; if (i /= 0) STOP 15
+ deallocate(b2, stat=i) ; if (i /= 0) STOP 16
+ deallocate(b3, stat=i) ; if (i /= 0) STOP 17
+ deallocate(b4, stat=i) ; if (i /= 0) STOP 18
+ deallocate(b5, stat=i) ; if (i /= 0) STOP 19
+ deallocate(b6, stat=i) ; if (i /= 0) STOP 20
+ deallocate(b7, stat=i) ; if (i /= 0) STOP 21
i = 14
- deallocate(b1, stat=i) ; if (i /= 1) call abort
- deallocate(b2, stat=i) ; if (i /= 1) call abort
- deallocate(b3, stat=i) ; if (i /= 1) call abort
- deallocate(b4, stat=i) ; if (i /= 1) call abort
- deallocate(b5, stat=i) ; if (i /= 1) call abort
- deallocate(b6, stat=i) ; if (i /= 1) call abort
- deallocate(b7, stat=i) ; if (i /= 1) call abort
+ deallocate(b1, stat=i) ; if (i /= 1) STOP 22
+ deallocate(b2, stat=i) ; if (i /= 1) STOP 23
+ deallocate(b3, stat=i) ; if (i /= 1) STOP 24
+ deallocate(b4, stat=i) ; if (i /= 1) STOP 25
+ deallocate(b5, stat=i) ; if (i /= 1) STOP 26
+ deallocate(b6, stat=i) ; if (i /= 1) STOP 27
+ deallocate(b7, stat=i) ; if (i /= 1) STOP 28
allocate(a1(2), a2(2,2), a3(2,2,2), b4(2,2,2,2), b5(2,2,2,2,2))
a1 = 1. ; a2 = 2. ; a3 = 3. ; b4 = 4. ; b5 = 5. ; b6 = 6.
i = 13
- deallocate(a1, stat=i) ; if (i /= 0) call abort
- deallocate(a2, a1, stat=i) ; if (i /= 1) call abort
- deallocate(a1, a3, a2, stat=i) ; if (i /= 1) call abort
- deallocate(b4, stat=i) ; if (i /= 0) call abort
- deallocate(b4, b5, stat=i) ; if (i /= 1) call abort
- deallocate(b4, b5, b6, stat=i) ; if (i /= 1) call abort
+ deallocate(a1, stat=i) ; if (i /= 0) STOP 29
+ deallocate(a2, a1, stat=i) ; if (i /= 1) STOP 30
+ deallocate(a1, a3, a2, stat=i) ; if (i /= 1) STOP 31
+ deallocate(b4, stat=i) ; if (i /= 0) STOP 32
+ deallocate(b4, b5, stat=i) ; if (i /= 1) STOP 33
+ deallocate(b4, b5, b6, stat=i) ; if (i /= 1) STOP 34
end program deallocate_stat
str = repeat('X', len(str))
deallocate(a, stat=stat, errmsg=str)
!print *, stat, trim(str)
-if (stat == 0 .or. str /= "Attempt to deallocate an unallocated object") call abort()
+if (stat == 0 .or. str /= "Attempt to deallocate an unallocated object") STOP 1
str = repeat('Y', len(str))
deallocate(b, stat=stat, errmsg=str)
!print *, stat, trim(str)
-if (stat == 0 .or. str /= "Attempt to deallocate an unallocated object") call abort()
+if (stat == 0 .or. str /= "Attempt to deallocate an unallocated object") STOP 2
sstr = repeat('Q', len(sstr))
deallocate(a, stat=stat, errmsg=sstr)
!print *, stat, trim(sstr)
-if (stat == 0 .or. sstr /= "Attem") call abort()
+if (stat == 0 .or. sstr /= "Attem") STOP 3
sstr = repeat('P', len(sstr))
deallocate(b, stat=stat, errmsg=sstr)
!print *, stat, trim(sstr)
-if (stat == 0 .or. sstr /= "Attem") call abort()
+if (stat == 0 .or. sstr /= "Attem") STOP 4
end
subroutine c
integer*4 a_i, c_i
common /block/a_i, c_i
- if (a_i .ne. 2) call abort
- if (c_i .ne. 5) call abort
+ if (a_i .ne. 2) STOP 1
+ if (c_i .ne. 5) STOP 2
end subroutine c
program abc
call a
integer, intent(in) :: expected, actual
if (actual .ne. expected) then
write (*, '(A,I4,I4)') str, expected, actual
- call abort()
+ STOP 1
endif
end subroutine
do i=1,9
if (expected .ne. actual(i)) then
write (*, '(A,I8,I8)') str, expected, actual(i)
- call abort()
+ STOP 1
endif
enddo
end subroutine
character(*), intent(in) :: msg
if (rexp .ne. ract) then
write (*, '(A,F12.6,F12.6)') msg, rexp, ract
- call abort()
+ STOP 1
endif
end subroutine
character, intent(inout) :: c2
logical, intent(inout) :: l2
print *, i1, i2, l1, l2, ichar(c1), ichar(c2), r1, r2
- if ( i1 .ne. 0 .or. i2 .ne. 0 ) call abort()
- if ( l1 .or. l2 ) call abort()
- if ( c1 .ne. achar(0) .or. c2 .ne. achar(0) ) call abort()
- if ( r1 .ne. 0.0 .or. r2 .ne. 0.0 ) call abort()
+ if ( i1 .ne. 0 .or. i2 .ne. 0 ) STOP 1
+ if ( l1 .or. l2 ) STOP 2
+ if ( c1 .ne. achar(0) .or. c2 .ne. achar(0) ) STOP 3
+ if ( r1 .ne. 0.0 .or. r2 .ne. 0.0 ) STOP 4
end subroutine
structure /s3/
character, intent(inout) :: c2
logical, intent(inout) :: l2
print *, i1, i2, l1, l2, ichar(c1), ichar(c2), r1, r2
- if ( i1 .ne. 42 .or. i2 .ne. 42 ) call abort()
- if ( (.not. l1) .or. (.not. l2) ) call abort()
- if ( c1 .ne. achar(32) .or. c2 .ne. achar(32) ) call abort()
- if ( (.not. isnan(r1)) .or. (.not. isnan(r2)) ) call abort()
+ if ( i1 .ne. 42 .or. i2 .ne. 42 ) STOP 1
+ if ( (.not. l1) .or. (.not. l2) ) STOP 2
+ if ( c1 .ne. achar(32) .or. c2 .ne. achar(32) ) STOP 3
+ if ( (.not. isnan(r1)) .or. (.not. isnan(r2)) ) STOP 4
end subroutine
! Nb. the current implementation decides the -finit-* flags are meaningless
character, intent(inout) :: c2
logical, intent(inout) :: l2
print *, i1, i2, l1, l2, ichar(c1), ichar(c2), r1, r2
- if ( i1 .ne. 0 .or. i2 .ne. 0 ) call abort()
- if ( l1 .or. l2 ) call abort()
- if ( c1 .ne. achar(0) .or. c2 .ne. achar(0) ) call abort()
- if ( r1 .ne. 0.0 .or. r2 .ne. 0.0 ) call abort()
+ if ( i1 .ne. 0 .or. i2 .ne. 0 ) STOP 1
+ if ( l1 .or. l2 ) STOP 2
+ if ( c1 .ne. achar(0) .or. c2 .ne. achar(0) ) STOP 3
+ if ( r1 .ne. 0.0 .or. r2 .ne. 0.0 ) STOP 4
end subroutine
subroutine sub
call dummy (x.m11, x.m12, x.m13, x.m14, x.m24, x.m23, x.m22, x.m21)
print *, x.r.i
if ( x.r.i .ne. 0 ) then
- call abort ()
+ STOP 5
endif
end subroutine
! Initialized unions
if ( r2.i .ne. 8 ) then
print *, 'structure init'
- call abort()
+ STOP 1
endif
! Explicit initializations
if ( r2.x .ne. 1600 .or. r2.y .ne. 1800) then
r2.x = r2.y
print *, 'union explicit init'
- call abort()
+ STOP 2
endif
! Initialization from -finit-derived
if ( r2.h .ne. 0 ) then
r2.h = 135
print *, 'union default init'
- call abort()
+ STOP 3
endif
end subroutine
! Initialized unions
if ( r3.i .ne. 8 ) then
print *, 'structure init'
- call abort()
+ STOP 4
endif
! Explicit initializations
if ( r3.x .ne. 1600 .or. r3.y .ne. 1800) then
r3.x = r3.y
print *, 'union explicit init'
- call abort()
+ STOP 5
endif
! Initialization from -finit-derived
if ( r3.e .ne. 0 ) then
r3.e = 135
print *, 'union default init'
- call abort()
+ STOP 6
endif
end
inquire(unit=fd, carriagecontrol=cc_inq)
if (cc_inq .ne. cc) then
print *, '(', fd, ') cc expected ', cc, ' was ', cc_inq
- call abort()
+ STOP 1
endif
endsubroutine
inquire(unit=fd, share=share_inq)
if (share_inq .ne. share) then
print *, '(', fd, ') share expected ', share, ' was ', share_inq
- call abort()
+ STOP 2
endif
endsubroutine
inquire(unit=fd, action=acc_inq)
if (acc_inq .ne. acc) then
print *, '(', fd, ') access expected ', acc, ' was ', acc_inq
- call abort()
+ STOP 3
endif
endsubroutine
print *, expected
deallocate(buf)
close(unit=fd)
- call abort()
+ STOP 1
else
deallocate(buf)
close(unit=fd, status='delete')
print *, expected
deallocate(buf)
close(unit=fd)
- call abort()
+ STOP 1
else
deallocate(buf)
close(unit=fd, status='delete')
inquire(file=f, EXIST=exists)
if (.not. exists) then
print *, 'file was not protected by READONLY!'
- call abort()
+ STOP 1
endif
open(unit=fd,file=f,action='write')
if (i .ne. k) then
print *, "bad %loc value"
- call abort()
+ STOP 1
endif
end
if ( neqv_out .neqv. lxor_out ) then
print *, "(",in1,in2,") .neqv.: ",neqv_out," .xor.: ",lxor_out
- call abort()
+ STOP 1
endif
! make sure we didn't break xor() intrinsic
if ( ixor_out .ne. ieor_out ) then
print *, "(",in1,in2,") ieor(): ",ieor_out," xor(): ",ixor_out
- call abort()
+ STOP 2
endif
enddo
character(len=*), intent(in) :: str
if ( abs(f2 - f1) .gt. tolerance ) then
write (*, '(A,F12.6,F12.6)') str, f1, f2
- call abort()
+ STOP 1
endif
endsubroutine
character(len=*), intent(in) :: str
if ( dabs(d2 - d1) .gt. tolerance ) then
write (*, '(A,F12.6,F12.6)') str, d1, d2
- call abort()
+ STOP 2
endif
endsubroutine
if (x1 .ne. x2 .or. y1 .ne. y2
& .or. x1 .ne. y1 .or. x2 .ne. y2
& .or. y2 .ne. z2) then
- call abort()
+ STOP 1
endif
end
if (x1 .ne. x2 .or. y1 .ne. y2 &
.or. x1 .ne. y1 .or. x2 .ne. y2 &
.or. y2 .ne. z2) then
- call abort()
+ STOP 1
endif
end
character(*), intent(in) :: s
if (i1 .ne. i2) then
print *, s, ": expected ", i2, " but was ", i1
- call abort
+ STOP 1
endif
endsubroutine assert
character(*), intent(in) :: s
if (i1 .ne. i2) then
print *, s, ": expected ", i2, " but was ", i1
- call abort
+ STOP 1
endif
endsubroutine
subroutine aborts (s)
character(*), intent(in) :: s
print *, s
- call abort()
+ STOP 1
end subroutine
! Basic structure
! Nested access: struct has a member eq which has a member i
j = struct .eq. i ! struct%eq%i
-if ( j .ne. struct%eq%i ) call abort()
+if ( j .ne. struct%eq%i ) STOP 1
! User op: struct is compared to i with eq_func
j = (struct) .eq. i ! eq_func(struct, i) -> struct%eq%i + i
-if ( j .ne. struct%eq%i + i ) call abort()
+if ( j .ne. struct%eq%i + i ) STOP 2
! User op: struct has a member test which has a member i, but test is a uop
j = struct .test. i ! tstfunc(struct, i) -> struct%i + i
-if ( j .ne. struct%i + i ) call abort()
+if ( j .ne. struct%i + i ) STOP 3
! User op: struct is compared to i with eq_func
j = (struct) .test. i ! tstfunc(struct, i) -> struct%i + i
-if ( j .ne. struct%i + i ) call abort()
+if ( j .ne. struct%i + i ) STOP 4
! Deep nested access tests
r7.r6.r5.r4.r3.r2.i = 1337
j = r7.r6.r5.r4.r3.r2.i
-if ( j .ne. 1337 ) call abort()
+if ( j .ne. 1337 ) STOP 5
end
x.j = '34'
if (y.buf(1) .ne. '1') then
- call abort
+ STOP 1
endif
if (y.buf(2) .ne. '2') then
- call abort
+ STOP 2
endif
if (y.buf(5) .ne. '3') then
- call abort
+ STOP 3
endif
if (y.buf(6) .ne. '4') then
- call abort
+ STOP 4
endif
end
x.j = "34"
if (y.buf(1) .ne. '1') then
- call abort
+ STOP 1
endif
if (y.buf(2) .ne. '2') then
- call abort
+ STOP 2
endif
if (y.buf(5) .ne. '3') then
- call abort
+ STOP 3
endif
if (y.buf(6) .ne. '4') then
- call abort
+ STOP 4
endif
end
subroutine aborts (s)
character(*), intent(in) :: s
print *, s
- call abort()
+ STOP 1
end subroutine
! Basic structure
! r.c16_1 and r.c16_2 are in a union, thus share the same memory
! and the first 16 bytes of instr are overwritten
if ( r.c16_1 .ne. instr(17:32) .or. r.c16_2 .ne. instr(17:32) ) then
- call abort()
+ STOP 1
endif
end
subroutine aborts (s)
character(*), intent(in) :: s
print *, s
- call abort()
+ STOP 1
end subroutine
structure /s3/
subroutine aborts (s)
character(*), intent(in) :: s
print *, s
- call abort()
+ STOP 1
end subroutine
structure /s5/
subroutine aborts (s)
character(*), intent(in) :: s
print *, s
- call abort()
+ STOP 1
end subroutine
! Special regression where shared names within a module caused an ICE
subroutine aborts (s)
character(*), intent(in) :: s
print *, s
- call abort()
+ STOP 1
end subroutine
integer, parameter :: as = 3
subroutine aborts (s)
character(*), intent(in) :: s
print *, s
- call abort()
+ STOP 1
end subroutine
module dec_structure_7m
subroutine aborts (s)
character(*), intent(in) :: s
print *, s
- call abort()
+ STOP 1
end subroutine
subroutine sub ()
subroutine aborts (s)
character(*), intent(in) :: s
print *, s
- call abort()
+ STOP 1
end subroutine
! Empty union
subroutine aborts (s)
character(*), intent(in) :: s
print *, s
- call abort()
+ STOP 1
end subroutine
! Initialization expressions
subroutine aborts (s)
character(*), intent(in) :: s
print *, s
- call abort()
+ STOP 1
end subroutine
! Nested unions
subroutine aborts (s)
character(*), intent(in) :: s
print *, s
- call abort()
+ STOP 1
end subroutine
! Unions with arrays
program main
use test_default_format
- if (test (1.0_4, 0) /= 0) call abort
- if (test (tiny(0.0_4), 1) /= 0) call abort
- if (test (-tiny(0.0_4), -1) /= 0) call abort
- if (test (huge(0.0_4), -1) /= 0) call abort
- if (test (-huge(0.0_4), 1) /= 0) call abort
+ if (test (1.0_4, 0) /= 0) STOP 1
+ if (test (tiny(0.0_4), 1) /= 0) STOP 2
+ if (test (-tiny(0.0_4), -1) /= 0) STOP 3
+ if (test (huge(0.0_4), -1) /= 0) STOP 4
+ if (test (-huge(0.0_4), 1) /= 0) STOP 5
- if (test (1.0_8, 0) /= 0) call abort
- if (test (tiny(0.0_8), 1) /= 0) call abort
- if (test (-tiny(0.0_8), -1) /= 0) call abort
- if (test (huge(0.0_8), -1) /= 0) call abort
- if (test (-huge(0.0_8), 1) /= 0) call abort
+ if (test (1.0_8, 0) /= 0) STOP 6
+ if (test (tiny(0.0_8), 1) /= 0) STOP 7
+ if (test (-tiny(0.0_8), -1) /= 0) STOP 8
+ if (test (huge(0.0_8), -1) /= 0) STOP 9
+ if (test (-huge(0.0_8), 1) /= 0) STOP 10
end program main
!
program main
use test_default_format
- if (test (1.0_kl, 0) /= 0) call abort
- if (test (0.0_kl, 0) /= 0) call abort
- if (test (tiny(0.0_kl), 1) /= 0) call abort
- if (test (-tiny(0.0_kl), -1) /= 0) call abort
- if (test (huge(0.0_kl), -1) /= 0) call abort
- if (test (-huge(0.0_kl), 1) /= 0) call abort
+ if (test (1.0_kl, 0) /= 0) STOP 1
+ if (test (0.0_kl, 0) /= 0) STOP 2
+ if (test (tiny(0.0_kl), 1) /= 0) STOP 3
+ if (test (-tiny(0.0_kl), -1) /= 0) STOP 4
+ if (test (huge(0.0_kl), -1) /= 0) STOP 5
+ if (test (-huge(0.0_kl), 1) /= 0) STOP 6
end program main
!
program main
use test_default_format
- if (test (tiny(0.0_4), -1) /= 0) call abort
- if (test (-tiny(0.0_4), 1) /= 0) call abort
- if (test (0.0_4, 0) /= 0) call abort
+ if (test (tiny(0.0_4), -1) /= 0) STOP 1
+ if (test (-tiny(0.0_4), 1) /= 0) STOP 2
+ if (test (0.0_4, 0) /= 0) STOP 3
- if (test (tiny(0.0_8), -1) /= 0) call abort
- if (test (-tiny(0.0_8), 1) /= 0) call abort
- if (test (0.0_8, 0) /= 0) call abort
+ if (test (tiny(0.0_8), -1) /= 0) STOP 4
+ if (test (-tiny(0.0_8), 1) /= 0) STOP 5
+ if (test (0.0_8, 0) /= 0) STOP 6
end program main
!
program main
use test_default_format
- if (test (tiny(0.0_kl), -1) /= 0) call abort
- if (test (-tiny(0.0_kl), 1) /= 0) call abort
+ if (test (tiny(0.0_kl), -1) /= 0) STOP 1
+ if (test (-tiny(0.0_kl), 1) /= 0) STOP 2
end program main
!
integer val1 (6)
integer val2 (6)
call recfunc (1)
- if (any (val1 .ne. (/1, 2, 3, 1, 2, 3/))) call abort ()
- if (any (val2 .ne. (/1, 2, 3, 4, 4, 4/))) call abort ()
+ if (any (val1 .ne. (/1, 2, 3, 1, 2, 3/))) STOP 1
+ if (any (val2 .ne. (/1, 2, 3, 4, 4, 4/))) STOP 2
contains
recursive subroutine recfunc (ivalue)
end interface
type(myint) :: val1, val2
call func (1, val1, val2)
- if ((val1%bar .ne. 42) .or. (val2%bar .ne. 77)) call abort ()
+ if ((val1%bar .ne. 42) .or. (val2%bar .ne. 77)) STOP 3
call func (2, val1, val2)
- if ((val1%bar .ne. 42) .or. (val2%bar .ne. 999)) call abort ()
+ if ((val1%bar .ne. 42) .or. (val2%bar .ne. 999)) STOP 4
end subroutine other
USE M1
TYPE(T1) :: D1
D1=T1(3)
- if (F1(D1) .ne. 7) call abort ()
+ if (F1(D1) .ne. 7) STOP 5
D1=T1(3)
- if (E1(D1) .ne. 3) call abort ()
+ if (E1(D1) .ne. 3) STOP 6
END
! Run both tests.
end module good
use good
-if (t%x /= 42) call abort()
+if (t%x /= 42) STOP 1
t%x = 0
-if (t%x /= 0) call abort()
+if (t%x /= 0) STOP 2
end
type(data_all_t2) :: dum2
if (associated(dum%my_data%head)) then
- call abort()
+ STOP 1
else
print *, 'OK: do_job my_data%head is NOT associated'
end if
if (dum2%my_data%head%a /= 77) &
- call abort()
+ STOP 2
end subroutine
end module
!***************
! print '(3a)', '>',str(1),'<'
! print '(3a)', '>',str(2),'<'
! print '(3a)', '>',str(3),'<'
- if (any (str .ne. const)) call abort
+ if (any (str .ne. const)) STOP 1
end subroutine test
subroutine doit()
str = const
character(:), allocatable, dimension(:) :: array
array = (/'xx', 'yy', 'zz'/)
! print *, 'array=', array, len(array(1)), size(array)
- if (any (array .ne. ["xx", "yy", "zz"])) call abort
+ if (any (array .ne. ["xx", "yy", "zz"])) STOP 2
end subroutine
end
str = "abcdefghij"//char(0)
cptr = c_loc (str)
- if (len (C2FChar (cptr)) .ne. 10) call abort
- if (C2FChar (cptr) .ne. "abcdefghij") call abort
+ if (len (C2FChar (cptr)) .ne. 10) STOP 1
+ if (C2FChar (cptr) .ne. "abcdefghij") STOP 2
end
obj%string = 'foo'
p => toPointer(obj)
- If (len (p) .ne. 3) call abort
- If (p .ne. "foo") call abort
+ If (len (p) .ne. 3) STOP 1
+ If (p .ne. "foo") STOP 2
end program main
type(wrapper) :: mywrapper
call sub2(mywrapper%string)
- if (.not. allocated(mywrapper%string)) call abort
- if (trim(mywrapper%string) .ne. "test") call abort
+ if (.not. allocated(mywrapper%string)) STOP 1
+ if (trim(mywrapper%string) .ne. "test") STOP 2
end program test
subroutine do_something(this)
class(abc_type),intent(in)::this
- if (this%abc_function() .ne. "hello") call abort
+ if (this%abc_function() .ne. "hello") STOP 1
end subroutine do_something
end module abc
character(:), dimension(:), allocatable :: s
! Comment #1
allocate(character(1) :: s(10))
- if (size (s) .ne. 10) call abort
- if (len (s) .ne. 1) call abort
+ if (size (s) .ne. 10) STOP 1
+ if (len (s) .ne. 1) STOP 2
! Comment #4
call allocate_array(s4)
- if (size (s4) .ne. 2) call abort
- if (len (s4) .ne. 2) call abort
- if (any (s4 .ne. ["ab", "cd"])) call abort
+ if (size (s4) .ne. 2) STOP 3
+ if (len (s4) .ne. 2) STOP 4
+ if (any (s4 .ne. ["ab", "cd"])) STOP 5
end program
program tester
character(LEN=:), allocatable :: S
S= test(2)
- if (len(S) .ne. 4) call abort
- if (S .ne. "test") call abort
+ if (len(S) .ne. 4) STOP 1
+ if (S .ne. "test") STOP 2
if (allocated (S)) deallocate (S)
S= test2(2)
- if (len(S) .ne. 4) call abort
- if (S .ne. "test") call abort
+ if (len(S) .ne. 4) STOP 3
+ if (S .ne. "test") STOP 4
if (allocated (S)) deallocate (S)
contains
function test(alen)
end do
! This line would print nothing when compiled with -O1 and higher.
! print *, len(test),test
- if (len(test) .ne. 4) call abort
- if (test .ne. "test") call abort
+ if (len(test) .ne. 4) STOP 5
+ if (test .ne. "test") STOP 6
end function test
function test2(alen) result (test)
end do
! This worked before the fix.
! print *, len(test),test
- if (len(test) .ne. 4) call abort
- if (test .ne. "test") call abort
+ if (len(test) .ne. 4) STOP 7
+ if (test .ne. "test") STOP 8
end function test2
end program tester
CHARACTER(len=:), DIMENSION(:), POINTER :: cp
INTEGER :: i
ALLOCATE(CHARACTER(len=1) :: cp(1:6))
- if (SIZE(cp) /= 6 .or. LBOUND(cp,1) /= 1 .or. UBOUND(cp,1) /= 6) call abort()
+ if (SIZE(cp) /= 6 .or. LBOUND(cp,1) /= 1 .or. UBOUND(cp,1) /= 6) STOP 1
cp(1)='1'
cp(2)='2'
cp(3)='3'
cp(5)='5'
cp(6)='6'
write (res, *) cp
- if (res /= ' 123456') call abort()
+ if (res /= ' 123456') STOP 2
END PROGRAM main
! DO i=1,cant_lineas
! WRITE(*,*) array_lineas(i)
! ENDDO
- if (any (array_lineas .ne. array_fijo)) call abort
+ if (any (array_lineas .ne. array_fijo)) STOP 1
! The following are additional tests beyond that of the original.
!
! Check that allocation with source = another deferred length is OK
allocate (array_copia, source = array_lineas)
- if (any (array_copia .ne. array_fijo)) call abort
+ if (any (array_copia .ne. array_fijo)) STOP 2
deallocate (array_lineas, array_copia)
! Check that allocation with source = a non-deferred length is OK
allocate (array_lineas, source = array_fijo)
- if (any (array_lineas .ne. array_fijo)) call abort
+ if (any (array_lineas .ne. array_fijo)) STOP 3
deallocate (array_lineas)
! Check that allocation with MOLD = a non-deferred length is OK
allocate (array_copia, mold = [array_fijo(:)(1:2), array_fijo(:)(1:2)])
- if (size (array_copia, 1) .ne. 4) call abort
- if (LEN (array_copia, 1) .ne. 2) call abort
+ if (size (array_copia, 1) .ne. 4) STOP 4
+ if (LEN (array_copia, 1) .ne. 2) STOP 5
! Check that allocation with MOLD = another deferred length is OK
allocate (array_lineas, mold = array_copia)
- if (size (array_copia, 1) .ne. 4) call abort
- if (LEN (array_copia, 1) .ne. 2) call abort
+ if (size (array_copia, 1) .ne. 4) STOP 6
+ if (LEN (array_copia, 1) .ne. 2) STOP 7
deallocate (array_lineas, array_copia)
! READ(*,*)
allocate(character(3) :: test(2))
test(1) = 'abc'
test(2) = 'def'
- if (any (test .ne. ['abc', 'def'])) call abort
+ if (any (test .ne. ['abc', 'def'])) STOP 8
test = ['aa','bb','cc']
- if (any (test .ne. ['aa', 'bb', 'cc'])) call abort
+ if (any (test .ne. ['aa', 'bb', 'cc'])) STOP 9
end subroutine testdefchar
! print *, 'length main program after',len(my_string_type%name)
! print *, 'final result:',my_string_type%name
- if (my_string_type%name .ne. 'here the word is finally set') call abort
+ if (my_string_type%name .ne. 'here the word is finally set') STOP 1
contains
subroutine inputreadword1(word_intermediate)
strings = [ "A ", "C ", "ABCD", "V " ]
- if (len(strings) .ne. 4) call abort
- if (size(strings, 1) .ne. 4) call abort
- if (any (strings .ne. [character(len=4) :: "A", "C", "ABCD", "V"])) call abort
+ if (len(strings) .ne. 4) STOP 1
+ if (size(strings, 1) .ne. 4) STOP 2
+ if (any (strings .ne. [character(len=4) :: "A", "C", "ABCD", "V"])) STOP 3
strings = [character(len=4) :: "A", "C", "ABCDE", "V", "zzzz"]
- if (len(strings) .ne. 4) call abort
- if (size(strings, 1) .ne. 5) call abort
- if (any (strings .ne. [character(len=4) :: "A", "C", "ABCD", "V", "zzzz"])) call abort
+ if (len(strings) .ne. 4) STOP 4
+ if (size(strings, 1) .ne. 5) STOP 5
+ if (any (strings .ne. [character(len=4) :: "A", "C", "ABCD", "V", "zzzz"])) STOP 6
write (buffer, "(5a4)") strings
- if (buffer .ne. "A C ABCDV zzzz") call abort
+ if (buffer .ne. "A C ABCDV zzzz") STOP 7
end program chk_alloc_string
type(u) :: b
a%c = 'something'
call a%get (a = b%c)
- if (b%c .ne. 'something') call abort
+ if (b%c .ne. 'something') STOP 1
end program test
test_vary%string = str
- if (test_vary%string .ne. str) call abort
+ if (test_vary%string .ne. str) STOP 1
! This previously gave a blank string.
my_stuff%string = test_vary
- if (my_stuff%string .ne. str) call abort
+ if (my_stuff%string .ne. str) STOP 2
test_char = test_vary
- if (test_char .ne. str) call abort
+ if (test_char .ne. str) STOP 3
my_stuff = test_vary
- if (my_stuff%string .ne. str) call abort
+ if (my_stuff%string .ne. str) STOP 4
end program thistest
a1 = ["ABCDEFGH","abcdefgh"]
a2 = "_"//a1//chr//"_"
- if (any (a2 .ne. ["_ABCDEFGHIJKLMNOP_","_abcdefghIJKLMNOP_"])) call abort
+ if (any (a2 .ne. ["_ABCDEFGHIJKLMNOP_","_abcdefghIJKLMNOP_"])) STOP 1
! Check that the descriptor dtype is OK - the array write needs it.
write (buffer, "(2a18)") a2
- if (trim (buffer) .ne. "_ABCDEFGHIJKLMNOP__abcdefghIJKLMNOP_") call abort
+ if (trim (buffer) .ne. "_ABCDEFGHIJKLMNOP__abcdefghIJKLMNOP_") STOP 2
! Make sure scalars survived the fix!
b1 = "ABCDEFGH"
b2 = "_"//b1//chr//"_"
- if (b2 .ne. "_ABCDEFGHIJKLMNOP_") call abort
+ if (b2 .ne. "_ABCDEFGHIJKLMNOP_") STOP 3
! Check the dependency is detected and dealt with by generation of a temporary.
a1 = "?"//a1//"?"
- if (any (a1 .ne. ["?ABCDEFGH?","?abcdefgh?"])) call abort
+ if (any (a1 .ne. ["?ABCDEFGH?","?abcdefgh?"])) STOP 4
! With an array reference...
a1 = "?"//a1(1:2)//"?"
- if (any (a1 .ne. ["??ABCDEFGH??","??abcdefgh??"])) call abort
+ if (any (a1 .ne. ["??ABCDEFGH??","??abcdefgh??"])) STOP 5
!... together with a substring.
a1 = "?"//a1(1:1)(2:4)//"?"
- if (any (a1 .ne. ["??AB?"])) call abort
+ if (any (a1 .ne. ["??AB?"])) STOP 6
contains
end
end function
end interface
- if (f () .ne. "ABC") call abort
- if (any (g (["ab","cd"]) .ne. ["ab","cd","ef","gh"])) call abort
+ if (f () .ne. "ABC") STOP 1
+ if (any (g (["ab","cd"]) .ne. ["ab","cd","ef","gh"])) STOP 2
chr = h (["ABC","DEF","GHI"])
- if (any (chr .ne. ["abc","def","ghi"])) call abort
- if (any (return_string ("abcdefg") .ne. ["abcdefg","abcdefg"])) call abort
+ if (any (chr .ne. ["abc","def","ghi"])) STOP 3
+ if (any (return_string ("abcdefg") .ne. ["abcdefg","abcdefg"])) STOP 4
! Comment #23
allocate(character(3)::s(2))
s(1) = 'foo'
s(2) = 'bar'
write (buffer, '(2A3)') s
- if (buffer .ne. 'foobar') call abort
+ if (buffer .ne. 'foobar') STOP 5
end
character(:), allocatable :: str
integer :: i = 999
str = .ToString. i
- if (str .ne. " 999") call abort
+ if (str .ne. " 999") STOP 1
end
z = "cockatoo"
length = len (z)
z(:) = ''
- if (len(z) .ne. length) call abort
- if (trim (z) .ne. '') call abort
+ if (len(z) .ne. length) STOP 1
+ if (trim (z) .ne. '') STOP 2
z(:3) = "foo"
- if (len(z) .ne. length) call abort
- if (trim (z) .ne. "foo") call abort
+ if (len(z) .ne. length) STOP 3
+ if (trim (z) .ne. "foo") STOP 4
z(4:) = "__bar"
- if (len(z) .ne. length) call abort
- if (trim (z) .ne. "foo__bar") call abort
+ if (len(z) .ne. length) STOP 5
+ if (trim (z) .ne. "foo__bar") STOP 6
deallocate (z)
end
subroutine check (chr1, chr2)
character (*) :: chr1, chr2
- if (len(chr1) .ne. len (chr2)) call abort
- if (chr1 .ne. chr2) call abort
+ if (len(chr1) .ne. len (chr2)) STOP 1
+ if (chr1 .ne. chr2) STOP 2
end subroutine
end
subroutine check (chr1, chr2)
character (len=*,kind=4) :: chr1, chr2
- if (len(chr1) .ne. len (chr2)) call abort
- if (chr1 .ne. chr2) call abort
+ if (len(chr1) .ne. len (chr2)) STOP 1
+ if (chr1 .ne. chr2) STOP 2
end subroutine
end
character(len=:), pointer :: pstr
pstr => str
str = "abc"
- if(len(pstr) /= len(str) .or. len(str)/= 3) call abort()
+ if(len(pstr) /= len(str) .or. len(str)/= 3) STOP 1
str = "abcd"
- if(len(pstr) /= len(str) .or. len(str)/= 4) call abort()
+ if(len(pstr) /= len(str) .or. len(str)/= 4) STOP 2
end subroutine four
subroutine five()
! print *, len(str)
! print '(3a)', '>',str,'<'
if (i == 5) then
- if (str /= "12345" .or. len(str) /= 5) call abort ()
+ if (str /= "12345" .or. len(str) /= 5) STOP 1
else if (i == 7) then
- if (str /= "XXXXXXX" .or. len(str) /= 7) call abort ()
+ if (str /= "XXXXXXX" .or. len(str) /= 7) STOP 2
else
- call abort ()
+ STOP 3
end if
end subroutine
end
use mod1
character(len=:), allocatable :: str
str = c2fstring("ABCDEF"//c_null_char//"GHI")
-if (len(str) /= 6 .or. str /= "ABCDEF") call abort()
+if (len(str) /= 6 .or. str /= "ABCDEF") STOP 1
end
character(len=:), pointer :: s2
character(len=5), target :: fifeC = 'FIVEC'
call sub(s1, i)
- if (len(s1) /= 5) call abort()
- if (s1 /= "ZZZZZ") call abort()
+ if (len(s1) /= 5) STOP 1
+ if (s1 /= "ZZZZZ") STOP 2
s2 => subfunc()
- if (len(s2) /= 5) call abort()
- if (s2 /= "FIVEC") call abort()
+ if (len(s2) /= 5) STOP 3
+ if (s2 /= "FIVEC") STOP 4
s1 = addPrefix(subfunc())
- if (len(s1) /= 7) call abort()
- if (s1 /= "..FIVEC") call abort()
+ if (len(s1) /= 7) STOP 5
+ if (s1 /= "..FIVEC") STOP 6
contains
subroutine sub(str,j)
character(len=:), allocatable :: str
integer :: j
str = REPEAT("Z",j)
- if (len(str) /= 5) call abort()
- if (str /= "ZZZZZ") call abort()
+ if (len(str) /= 5) STOP 7
+ if (str /= "ZZZZZ") STOP 8
end subroutine sub
function subfunc() result(res)
character(len=:), pointer :: res
res => fifec
- if (len(res) /= 5) call abort()
- if (res /= "FIVEC") call abort()
+ if (len(res) /= 5) STOP 9
+ if (res /= "FIVEC") STOP 10
end function subfunc
function addPrefix(str) result(res)
character(len=:), pointer :: str
character(len=:),allocatable :: s
integer :: j=2
s = repeat ('x', j)
- if (len(repeat(' ',j)) /= 2) call abort()
- if (repeat('y',j) /= "yy") call abort()
- if (len(s) /= 2) call abort()
- if (s /= "xx") call abort()
+ if (len(repeat(' ',j)) /= 2) STOP 11
+ if (repeat('y',j) /= "yy") STOP 12
+ if (len(s) /= 2) STOP 13
+ if (s /= "xx") STOP 14
call test()
end program a
n = ceiling(11*rnd)
call hello(n, string)
! print '(A,1X,I0)', '>' // string // '<', len(string)
- if (n /= len (string) .or. string /= cmp(1:n)) call abort ()
+ if (n /= len (string) .or. string /= cmp(1:n)) STOP 1
end do
call test_PR53642()
character(:), allocatable :: trimmed
trimmed = trim(string)
- if (len_trim(string) /= len(trimmed)) call abort ()
- if (len(trimmed) /= 3) call abort ()
- if (trimmed /= "123") call abort ()
+ if (len_trim(string) /= len(trimmed)) STOP 2
+ if (len(trimmed) /= 3) STOP 3
+ if (trimmed /= "123") STOP 4
! print *,len_trim(string),len(trimmed)
! Clear
trimmed = "XXXXXX"
- if (trimmed /= "XXXXXX" .or. len(trimmed) /= 6) call abort ()
+ if (trimmed /= "XXXXXX" .or. len(trimmed) /= 6) STOP 5
trimmed = string(1:len_trim(string))
- if (len_trim(trimmed) /= 3) call abort ()
- if (trimmed /= "123") call abort ()
+ if (len_trim(trimmed) /= 3) STOP 6
+ if (trimmed /= "123") STOP 7
end subroutine test_PR53642
end PROGRAM helloworld
SUBROUTINE get (c_val)
CHARACTER( : ), INTENT( INOUT ), ALLOCATABLE, OPTIONAL :: c_val
CHARACTER( 10 ) :: c_val_tmp
- if(present(c_val)) call abort()
+ if(present(c_val)) STOP 1
END SUBROUTINE get
SUBROUTINE get2 (c_val)
CHARACTER( : ), INTENT( OUT ), ALLOCATABLE, OPTIONAL :: c_val
CHARACTER( 10 ) :: c_val_tmp
- if(present(c_val)) call abort()
+ if(present(c_val)) STOP 2
END SUBROUTINE get2
END PROGRAM main
subroutine doIt()
type(t) :: x
x%ppt => deferred_len
- if ("abc" /= x%ppt()) call abort()
+ if ("abc" /= x%ppt()) STOP 1
end subroutine doIt
end module test
character(:), allocatable :: temp
x%ppt => deferred_len
temp = deferred_len()
- if ("abc" /= temp) call abort()
+ if ("abc" /= temp) STOP 1
end subroutine doIt
end module test
! Test the reported problem.
infant0 = new_child()
- if (infant0%parent%foo%i .ne. 20) call abort
+ if (infant0%parent%foo%i .ne. 20) STOP 1
! Test the case of comment #1 of the PR.
infant1 = newchild1
- if (infant1%foo%i .ne. 21) call abort
+ if (infant1%foo%i .ne. 21) STOP 2
! Test the case of comment #2 of the PR.
infant2 = newchild2
- if (infant2%foo%i .ne. 2) call abort
+ if (infant2%foo%i .ne. 2) STOP 3
end
! print *, right%foo
left = right
! print *, left%foo
- if (left%foo%i /= 20) call abort()
+ if (left%foo%i /= 20) STOP 1
end
! print *, right%x%foo%i
left = right
! print *, left%x%foo%i
- if (left%x%foo%i /= 20) call abort()
+ if (left%x%foo%i /= 20) STOP 1
end
! Check that the INTENT(INOUT) of assign0 is respected and that the
! correct thing is done with allocatable components.
infant0 = new_child()
- if (infant0%parent%foo1%i .ne. 20) call abort
- if (infant0%foo2%i .ne. 21) call abort
- if (any (infant0%parent%foo1%j .ne. [99,199])) call abort
- if (any (infant0%foo2%j .ne. [199,299])) call abort
- if (infant0%foo2%i .ne. 21) call abort
- if (any (infant0%l .ne. [299,399])) call abort
+ if (infant0%parent%foo1%i .ne. 20) STOP 1
+ if (infant0%foo2%i .ne. 21) STOP 2
+ if (any (infant0%parent%foo1%j .ne. [99,199])) STOP 3
+ if (any (infant0%foo2%j .ne. [199,299])) STOP 4
+ if (infant0%foo2%i .ne. 21) STOP 5
+ if (any (infant0%l .ne. [299,399])) STOP 6
! Now, since the defined assignment depends on whether or not the 'i'
! component is the default initialization value, the result will be
! different.
infant0 = new_child()
- if (infant0%parent%foo1%i .ne. 40) call abort
- if (any (infant0%parent%foo1%j .ne. [99,199,198,398])) call abort
- if (any (infant0%foo2%j .ne. [199,299,398,598])) call abort
- if (infant0%foo2%i .ne. 42) call abort
- if (any (infant0%l .ne. [299,399])) call abort
+ if (infant0%parent%foo1%i .ne. 40) STOP 7
+ if (any (infant0%parent%foo1%j .ne. [99,199,198,398])) STOP 8
+ if (any (infant0%foo2%j .ne. [199,299,398,598])) STOP 9
+ if (infant0%foo2%i .ne. 42) STOP 10
+ if (any (infant0%l .ne. [299,399])) STOP 11
! Finally, make sure that normal components of the declared type survive.
- if (infant0%k .ne. 1001) call abort
+ if (infant0%k .ne. 1001) STOP 12
end
type(child) :: infant0, infant1(2)
infant0 = child([component(1),component(2)], 99)
- if (any (infant0%parent%foo%i .ne. [20, 20])) call abort
+ if (any (infant0%parent%foo%i .ne. [20, 20])) STOP 1
end
type(b) :: tt
type(b) :: tb1
tt = tb1
- if (tt%tc%ta%i .ne. 198) call abort
+ if (tt%tc%ta%i .ne. 198) STOP 1
end program assign
i = 3
j = 4
orphan(i:j) = child1(component1(777), 1)
- if (any (orphan%parent1%foo%i .ne. [0,0,30,30,0])) call abort
- if (any (orphan%j .ne. [7,7,1,1,7])) call abort
+ if (any (orphan%parent1%foo%i .ne. [0,0,30,30,0])) STOP 1
+ if (any (orphan%j .ne. [7,7,1,1,7])) STOP 2
! Check that allocatable lhs's work OK.
annie = [(child1(component1(k), 2*k), k = 1,3)]
- if (any (annie%parent1%foo%i .ne. [30,30,30])) call abort
- if (any (annie%j .ne. [2,4,6])) call abort
+ if (any (annie%parent1%foo%i .ne. [30,30,30])) STOP 3
+ if (any (annie%j .ne. [2,4,6])) STOP 4
end
print *, right%foo
left = right
print *, left%foo
- if (left%foo%i /= 42) call abort()
+ if (left%foo%i /= 42) STOP 1
end
! print *, right%foo
left = right
! print *, left%foo
- if (left%foo%i /= 20) call abort()
+ if (left%foo%i /= 20) STOP 1
end block
block
type(parent), allocatable :: left(:)
! print *, right%foo
left = right
! print *, left%foo
- if (any (left%foo%i /= 20)) call abort()
+ if (any (left%foo%i /= 20)) STOP 2
end block
end
real, dimension (3) :: a = (/1., 2., 3./), b, c
equivalence (a(2), b), (a(1), c)
b = a;
-if (any(b .ne. (/1., 2., 3./))) call abort ()
+if (any(b .ne. (/1., 2., 3./))) STOP 1
b = c
-if (any(b .ne. (/1., 1., 2./))) call abort ()
+if (any(b .ne. (/1., 1., 2./))) STOP 2
end
T(1:n,1)=(T(0:n-1,1)+T(1:n,1+1)+1d0)
- if (any (T(1:n,1) .ne. 1d0 )) call abort ()
+ if (any (T(1:n,1) .ne. 1d0 )) STOP 1
end program laplsolv
UDA(1)%IA(1:9) = UDA(1)%IA(9:1:-1)+1
DO J1 = 1,9
- if (UDA1R%IA(10-J1)+1 /= Uda(1)%IA(J1)) call abort()
+ if (UDA1R%IA(10-J1)+1 /= Uda(1)%IA(J1)) STOP 1
ENDDO
end
elsewhere
tla2l = -1
endwhere
- if (any (tla2l%i .ne. tda2l%i)) call abort
- if (any (tla2l%l .neqv. tda2l%l)) call abort
+ if (any (tla2l%i .ne. tda2l%i)) STOP 1
+ if (any (tla2l%l .neqv. tda2l%l)) STOP 2
end subroutine
end module rg0045_stuff
where (l)
a = p%i ! Comment #1 of PR38863 concerned WHERE assignment
end where
- if (any (a%j .ne. [101, 102, 103])) call abort
+ if (any (a%j .ne. [101, 102, 103])) STOP 1
a = p%i ! Ordinary assignment was wrong too.
- if (any (a%j .ne. [101, 102, 103])) call abort
+ if (any (a%j .ne. [101, 102, 103])) STOP 2
end subroutine
subroutine test_ti
where (l)
a = p%i
end where
- if (any (a%j .ne. 99)) call abort
+ if (any (a%j .ne. 99)) STOP 3
a = p%i
- if (any (a%j .ne. 99)) call abort
+ if (any (a%j .ne. 99)) STOP 4
end subroutine
end
Table%RealData(:,5) = Table%RealData(:,5) * CENTIMETER
! print *, Table%RealData
- if (any (abs(Table%RealData(:,4) - 1) > epsilon(1.0))) call abort ()
- if (any (abs(Table%RealData(:,[1,2,3,5]) - 42) > epsilon(1.0))) call abort ()
+ if (any (abs(Table%RealData(:,4) - 1) > epsilon(1.0))) STOP 1
+ if (any (abs(Table%RealData(:,[1,2,3,5]) - 42) > epsilon(1.0))) STOP 2
end program TestProgram
REAL :: a(3)
REAL :: b(3) = [1, 2, 3]
a=MATMUL(cell%h,b)
- if (ANY (INT (a) .ne. [30, 36, 42])) call abort
+ if (ANY (INT (a) .ne. [30, 36, 42])) STOP 1
END SUBROUTINE S1
END MODULE M1
t%data=(/(i,i=1,10)/)
d=>t%data(5:9)
call s1(t,d)
- if (any(d.ne.(/3,4,5,6,7/))) call abort()
+ if (any(d.ne.(/3,4,5,6,7/))) STOP 1
t%data=(/(i,i=1,10)/)
d=>t%data(1:5)
call s2(d,t)
- if (any(t%data.ne.(/1,2,1,2,3,4,5,8,9,10/))) call abort
+ if (any(t%data.ne.(/1,2,1,2,3,4,5,8,9,10/))) STOP 1
deallocate(t%data)
deallocate(t)
end program main
v1 = v0
v1(2:n-1) = v1(1:n-2) + v1(3:n)
- if (any(v1 /= result)) call abort
+ if (any(v1 /= result)) STOP 1
v1 = v0
v1(2:n-1) = v0(1:n-2) + v0(3:n)
- if (any(v1 /= result)) call abort
+ if (any(v1 /= result)) STOP 2
v1 = v0
v1(2:n-1) = v1(3:n) + v1(1:n-2)
- if (any(v1 /= result)) call abort
+ if (any(v1 /= result)) STOP 3
v1 = v0
v1(2:n-1) = v0(3:n) + v0(1:n-2)
- if (any(v1 /= result)) call abort
+ if (any(v1 /= result)) STOP 4
end program ala
! Same result when assigning to a or b
b(n+1:10:4) = a(n+2:8:2)
a(n+1:10:4) = a(n+2:8:2)
- if (any (a/=b)) call abort
+ if (any (a/=b)) STOP 1
end program main
q(4) = q(4) + p(1)
q(3) = q(3) + p(2)
q(1) = q(1) + p(3)
- if (any (q - r /= 0)) call abort
+ if (any (q - r /= 0)) STOP 1
end
i1 = [ 1, 2, 3 ]
i2 = [ 3, 2, 1 ]
a (i1,1) = a (i2,2)
- if (a(1,1) /= 6.0 .or. a(2,1) /= 5.0 .or. a(3,1) /= 4.0) call abort
- if (a(1,2) /= 4.0 .or. a(2,2) /= 5.0 .or. a(3,2) /= 6.0) call abort
+ if (a(1,1) /= 6.0 .or. a(2,1) /= 5.0 .or. a(3,1) /= 4.0) STOP 1
+ if (a(1,2) /= 4.0 .or. a(2,2) /= 5.0 .or. a(3,2) /= 6.0) STOP 2
end program main
res2 = y(k,:)
! print *, res1
! print *, res2
- if (any(res1 /= res2)) call abort ()
+ if (any(res1 /= res2)) STOP 1
end program prgm3
c(2) = '1234'
c(3) = 'wxyz'
c(:)(1:2) = c(2)(2:3) ! { dg-warning "array temporary" }
- if (c(3) .ne. '23yz') call abort
+ if (c(3) .ne. '23yz') STOP 1
end program main
words=[character(len=3) :: 'one', 'two']
words=[character(len=5) :: words, 'three']
- if (any(words /= [ "one ", "two ", "three"])) call abort
+ if (any(words /= [ "one ", "two ", "three"])) STOP 1
end program dusty_corner
words=[character(len=3) :: 'one', 'two']
n = 5
words=[character(len=n) :: words, 'three']
- if (any(words /= [ "one ", "two ", "three"])) call abort
+ if (any(words /= [ "one ", "two ", "three"])) STOP 1
end program dusty_corner
real :: x(size(xmin)+1) ! The declaration for r would be added
real :: r(size(x)-1) ! to the function before that of x
xmin = r
- if (size(r) .ne. 10) call abort ()
- if (size(x) .ne. 11) call abort ()
+ if (size(r) .ne. 10) STOP 1
+ if (size(x) .ne. 11) STOP 2
end subroutine foo1
subroutine foo2 (xmin) ! This version was OK because of the
real, intent(inout) :: xmin(:) ! renaming of r which pushed it up
real :: x(size(xmin)+3) ! the symtree.
real :: zr(size(x)-3)
xmin = zr
- if (size(zr) .ne. 10) call abort ()
- if (size(x) .ne. 13) call abort ()
+ if (size(zr) .ne. 10) STOP 3
+ if (size(x) .ne. 13) STOP 4
end subroutine foo2
subroutine foo3 (xmin)
real, intent(inout) :: xmin(:)
character(len(y)+3) :: z ! This did not work for any combination
real :: r(len(z)-5) ! of names.
xmin = r
- if (size(r) .ne. 10) call abort ()
- if (len(z) .ne. 15) call abort ()
+ if (size(r) .ne. 10) STOP 5
+ if (len(z) .ne. 15) STOP 6
end subroutine foo3
end program bar
v = t((/1, 2/), reshape (f, (/m/)), d, e);
if (any (v%a .ne. (/1, 2/)) .or. any (v%b .ne. (/3, 4/)) &
.or. any (v%c .ne. d) .or. .not. associated (v%p, e)) &
- call abort ()
+ STOP 1
deallocate(e)
end program
write (buf1, '(20i4)') foo
write (buf2, '(20i4)') (foo(i)%x, (foo(i)%y(j), j=1,3), foo(i)%z, i=1,4)
- if (buf1.ne.buf2) call abort
+ if (buf1.ne.buf2) STOP 1
end program main
write (buf1,*) foo
write (buf2,*) ((foo(i)%x(j),j=1,3), (foo(i)%y(j),j=1,4), (foo(i)%z(j),j=1,5), (foo(i)%a(j),j=1,3), i=1,2)
- if (buf1.ne.buf2) call abort
+ if (buf1.ne.buf2) STOP 1
end program main
! foo = foo_type("hello world ")
write (buf1,*) foo
write (buf2,*) (foo%name(i), i=1,13)
- if (buf1.ne.buf2) call abort
+ if (buf1.ne.buf2) STOP 1
end program main
v%p => i
i = 42
write (unit=s, fmt='(I2)') v ! { dg-error "POINTER components" }
- if (s .ne. '42') call abort ()
+ if (s .ne. '42') STOP 1
end program
b % i = 255
write(c,*) a
- if (trim(adjustl(c)) /= "31337") call abort
+ if (trim(adjustl(c)) /= "31337") STOP 1
write(c,*) b
- if (trim(adjustl(c)) /= "255") call abort
+ if (trim(adjustl(c)) /= "255") STOP 2
end subroutine test
end module m2
TYPE(T), POINTER :: P
TYPE(T), TARGET :: Q
P => Q
- if (P%I.ne.99) call abort ()
+ if (P%I.ne.99) STOP 1
END SUBROUTINE N
program test_pr15975
forall (i = 1:ndim) outputs_(i)%signal_number = ndim + 1 - i
used_ = (/.true., .false., .true., .true./)
call activate_gd_calcs (used_, outputs_)
- if (any (outputs_(ndim:1:-1)%used .neqv. used_)) call abort ()
+ if (any (outputs_(ndim:1:-1)%used .neqv. used_)) STOP 1
end
CONTAINS\r
SUBROUTINE set_bound(arg_name, test)\r
INTEGER, INTENT (IN) :: arg_name, test
- if (arg_name .ne. test) call abort ()\r
+ if (arg_name .ne. test) STOP 1\r
END SUBROUTINE set_bound\r
END MODULE cdf_aux_mod
\r
subroutine chk (i)
integer, intent(in) :: i
if (i .eq. 1) then
- if (chk_(i)% str .ne. "abcd") call abort ()
+ if (chk_(i)% str .ne. "abcd") STOP 1
else
- if (chk_(i)% str .ne. "efgh") call abort ()
+ if (chk_(i)% str .ne. "efgh") STOP 2
end if
end subroutine chk
integer :: i
real, dimension(2,2), parameter :: vy = reshape ((/1,2,3,4/),(/2,2/))
i = 1
- if (any (foo(vec(vy(i, :))) /= vy(i, :))) call abort ()
+ if (any (foo(vec(vy(i, :))) /= vy(i, :))) STOP 1
contains
if (DepEcoSystem%name /= "Gridxxxx" &
.or. DepEcoSystem%name(9:9) /= ' ' &
- .or. DepEcoSystem%name(10:10) /= ' ') call abort()
+ .or. DepEcoSystem%name(10:10) /= ' ') STOP 1
DepEcoSystem%name = 'ABCDEFGHIJ'
call Init_EcoSystems()
if (DepEcoSystem%name /= "StringYY" &
.or. DepEcoSystem%name(9:9) /= ' ' &
- .or. DepEcoSystem%name(10:10) /= ' ') call abort()
+ .or. DepEcoSystem%name(10:10) /= ' ') STOP 2
contains
subroutine Init_EcoSystems()
dat = date_m(1)
xx = file_info(date_m(-1)) ! This always worked - a constructor
- if (xx%date%month /= -1) call abort
+ if (xx%date%month /= -1) STOP 1
xx = file_info(dat) ! This was the original PR - a variable
- if (xx%date%month /= 1) call abort
+ if (xx%date%month /= 1) STOP 2
xx = file_info(foo(2)) ! ...functions were also broken
- if (xx%date%month /= 2) call abort
+ if (xx%date%month /= 2) STOP 3
xx = file_info(christmas) ! ...and parameters
- if (xx%date%month /= 12) call abort
+ if (xx%date%month /= 12) STOP 4
contains
type(two) :: wo = two(6)
-if (wo%a /= 6) call abort()
+if (wo%a /= 6) STOP 1
end
! scalar elemental function with structure constructor\r
prt_in = string_t(["D"])\r
tmpc = new_prt_spec2 (string_container_t(prt_in))\r
- if (any(tmpc%comp%chars .ne. ["D"])) call abort\r
+ if (any(tmpc%comp%chars .ne. ["D"])) STOP 1
deallocate (prt_in%chars)\r
deallocate(tmpc%comp%chars)\r
! Check that function arguments are OK too\r
tmpc = new_prt_spec2 (string_container_t(new_str_t(["h","e","l","l","o"])))\r
- if (any(tmpc%comp%chars .ne. ["h","e","l","l","o"])) call abort\r
+ if (any(tmpc%comp%chars .ne. ["h","e","l","l","o"])) STOP 1
deallocate(tmpc%comp%chars)\r
\r
end do\r
! Test without intermediary function
prt_in = string_t(["A"])
- if (.not. allocated(prt_in%chars)) call abort
- if (any(prt_in%chars .ne. "A")) call abort
+ if (.not. allocated(prt_in%chars)) STOP 1
+ if (any(prt_in%chars .ne. "A")) STOP 2
deallocate (prt_in%chars)
! scalar elemental function
prt_in = string_t(["B"])
- if (.not. allocated(prt_in%chars)) call abort
- if (any(prt_in%chars .ne. "B")) call abort
+ if (.not. allocated(prt_in%chars)) STOP 3
+ if (any(prt_in%chars .ne. "B")) STOP 4
tmp = new_prt_spec (prt_in)
- if (.not. allocated(prt_in%chars)) call abort
- if (any(prt_in%chars .ne. "B")) call abort
+ if (.not. allocated(prt_in%chars)) STOP 5
+ if (any(prt_in%chars .ne. "B")) STOP 6
deallocate (prt_in%chars)
deallocate (tmp%chars)
! array elemental function with array constructor
prt_in = string_t(["C"])
- if (.not. allocated(prt_in%chars)) call abort
- if (any(prt_in%chars .ne. "C")) call abort
+ if (.not. allocated(prt_in%chars)) STOP 7
+ if (any(prt_in%chars .ne. "C")) STOP 8
tmpa = new_prt_spec ([(prt_in, i=1,2)])
- if (.not. allocated(prt_in%chars)) call abort
- if (any(prt_in%chars .ne. "C")) call abort
+ if (.not. allocated(prt_in%chars)) STOP 9
+ if (any(prt_in%chars .ne. "C")) STOP 10
deallocate (prt_in%chars)
do j=1,n
deallocate (tmpa(j)%chars)
! scalar elemental function with structure constructor
prt_in = string_t(["D"])
- if (.not. allocated(prt_in%chars)) call abort
- if (any(prt_in%chars .ne. "D")) call abort
+ if (.not. allocated(prt_in%chars)) STOP 11
+ if (any(prt_in%chars .ne. "D")) STOP 12
tmpc = new_prt_spec2 (string_container_t(prt_in))
- if (.not. allocated(prt_in%chars)) call abort
- if (any(prt_in%chars .ne. "D")) call abort
+ if (.not. allocated(prt_in%chars)) STOP 13
+ if (any(prt_in%chars .ne. "D")) STOP 14
deallocate (prt_in%chars)
deallocate(tmpc%comp%chars)
! array elemental function of an array constructor of structure constructors
prt_in = string_t(["E"])
- if (.not. allocated(prt_in%chars)) call abort
- if (any(prt_in%chars .ne. "E")) call abort
+ if (.not. allocated(prt_in%chars)) STOP 15
+ if (any(prt_in%chars .ne. "E")) STOP 16
tmpca = new_prt_spec2 ([ (string_container_t(prt_in), i=1,2) ])
- if (.not. allocated(prt_in%chars)) call abort
- if (any(prt_in%chars .ne. "E")) call abort
+ if (.not. allocated(prt_in%chars)) STOP 17
+ if (any(prt_in%chars .ne. "E")) STOP 18
deallocate (prt_in%chars)
do j=1,n
deallocate (tmpca(j)%comp%chars)
! scalar elemental function with a structure constructor and a nested array constructor
prt_in = string_t(["F"])
- if (.not. allocated(prt_in%chars)) call abort
- if (any(prt_in%chars .ne. "F")) call abort
+ if (.not. allocated(prt_in%chars)) STOP 19
+ if (any(prt_in%chars .ne. "F")) STOP 20
tmpac = new_prt_spec3 (string_array_container_t([ (prt_in, i=1,2) ]))
- if (.not. allocated(prt_in%chars)) call abort
- if (any(prt_in%chars .ne. "F")) call abort
+ if (.not. allocated(prt_in%chars)) STOP 21
+ if (any(prt_in%chars .ne. "F")) STOP 22
deallocate (prt_in%chars)
do j=1,n
deallocate (tmpac%comp(j)%chars)
! array elemental function with an array constructor nested inside
! a structure constructor nested inside an array constructor
prt_in = string_t(["G"])
- if (.not. allocated(prt_in%chars)) call abort
- if (any(prt_in%chars .ne. "G")) call abort
+ if (.not. allocated(prt_in%chars)) STOP 23
+ if (any(prt_in%chars .ne. "G")) STOP 24
tmpaca = new_prt_spec3 ([ (string_array_container_t([ (prt_in, i=1,2) ]), j=1,2) ])
- if (.not. allocated(prt_in%chars)) call abort
- if (any(prt_in%chars .ne. "G")) call abort
+ if (.not. allocated(prt_in%chars)) STOP 25
+ if (any(prt_in%chars .ne. "G")) STOP 26
deallocate (prt_in%chars)
do j=1,n
do k=1,n
type(t) f
write (line1, *) f()
write (line2, *) 42_4
- if (line1 .ne. line2) call abort
+ if (line1 .ne. line2) STOP 1
end
type(s) :: x(2)
allocate(p, q(2,2))
- if (p%a /= 3) call abort()
- if (any(q(:,:)%a /= 3)) call abort()
+ if (p%a /= 3) STOP 1
+ if (any(q(:,:)%a /= 3)) STOP 2
allocate(z%p2, z%p(2:3))
- if (z%p2%a /= 3) call abort()
- if (any(z%p(:)%a /= 3)) call abort()
+ if (z%p2%a /= 3) STOP 3
+ if (any(z%p(:)%a /= 3)) STOP 4
allocate(x(1)%p2, x(1)%p(2))
- if (x(1)%p2%a /= 3) call abort()
- if (any(x(1)%p(:)%a /= 3)) call abort()
+ if (x(1)%p2%a /= 3) STOP 5
+ if (any(x(1)%p(:)%a /= 3)) STOP 6
end program test
use dt\r
type(drv), intent(out) :: fa\r
\r
- if (any(fa%a /= [ 1, 2, 3 ])) call abort()\r
- if (fa%s /= "abc") call abort()\r
- if (associated(fa%p)) call abort()\r
+ if (any(fa%a /= [ 1, 2, 3 ])) STOP 1\r
+ if (fa%s /= "abc") STOP 2\r
+ if (associated(fa%p)) STOP 3\r
end subroutine sub
end module subs
ptr => tgt
call set_ptr (ptr)
- if (associated(ptr)) call abort()
+ if (associated(ptr)) STOP 1
contains
b = g2(a)
b = g2(a)
ans = g1(a)
- if (ans%f .ne. -1) call abort
+ if (ans%f .ne. -1) STOP 1
ans = g1(a)
- if (ans%f .ne. -1) call abort
+ if (ans%f .ne. -1) STOP 2
ans = g1a(a)
- if (ans%f .ne. -1) call abort
+ if (ans%f .ne. -1) STOP 3
ans = g1a(a)
- if (ans%f .ne. -1) call abort
+ if (ans%f .ne. -1) STOP 4
b = g3(a)
b = g3(a)
contains
if (res(j)%f == -1) then
res(j)%f = a%f - 1
else
- call abort
+ STOP 5
endif
enddo
end function g3
if (g2(j)%f == -1) then
g2(j)%f = a%f - 1
else
- call abort
+ STOP 6
endif
enddo
end function g2
function g1(a)
type(f) :: g1, a
- if (g1%f .ne. -1 ) call abort
+ if (g1%f .ne. -1 ) STOP 7
end function
function g1a(a) result(res)
type(f) :: res, a
- if (res%f .ne. -1 ) call abort
+ if (res%f .ne. -1 ) STOP 8
end function
end program test
real, target, dimension(10) :: rt
my_ast_obs%geopos => rt
- if (.not.associated (my_ast_obs%geopos)) call abort ()
+ if (.not.associated (my_ast_obs%geopos)) STOP 1
call get_null_ast_obs (my_ast_obs)
- if (associated (my_ast_obs%geopos)) call abort ()
+ if (associated (my_ast_obs%geopos)) STOP 2
CONTAINS
am%dummy = 0
call init(ap)
- if (ap%initialized .neqv. .false.) call abort()
+ if (ap%initialized .neqv. .false.) STOP 1
END
write(10,'(A)') "Hello"
rewind(10)
read(10,'(A)',end=100) foo
- call abort
+ STOP 1
100 continue
end
i2 = -4_2
i4 = 4_4
i8 = 10_8
- if (dfloat(i2) /= -4.d0) call abort() ! { dg-warning "non-default INTEGER" }
- if (dfloat(i4) /= 4.d0) call abort()
- if (dfloat(i8) /= 10.d0) call abort() ! { dg-warning "non-default INTEGER" }
- if (dfloat(i4*i2) /= -16.d0) call abort()
+ if (dfloat(i2) /= -4.d0) STOP 1 ! { dg-warning "non-default INTEGER" }
+ if (dfloat(i4) /= 4.d0) STOP 2
+ if (dfloat(i8) /= 10.d0) STOP 3 ! { dg-warning "non-default INTEGER" }
+ if (dfloat(i4*i2) /= -16.d0) STOP 4
- if (kind(dfloat(i4)) /= kind(1.0_8)) call abort
- if (kind(dfloat(i8)) /= kind(1.0_8)) call abort ! { dg-warning "non-default INTEGER" }
+ if (kind(dfloat(i4)) /= kind(1.0_8)) STOP 1
+ if (kind(dfloat(i8)) /= kind(1.0_8)) STOP 2! { dg-warning "non-default INTEGER" }
end program dfloat_1
r1 = sum(arr,dim=1)
write (unit=c2, fmt=fmt) r1
call print_sum(1,c1)
- if (c1 /= c2) call abort
+ if (c1 /= c2) STOP 1
r2 = sum(arr,dim=2)
write (unit=c2, fmt=fmt) r2
call print_sum(2,c1)
- if (c1 /= c2) call abort
+ if (c1 /= c2) STOP 2
call print_sum(5,c1)
contains
r1 = sum(arr,dim=1,mask=arr>23)
write (unit=c2, fmt=fmt) r1
call print_sum(1,c1)
- if (c1 /= c2) call abort
+ if (c1 /= c2) STOP 1
r2 = sum(arr,dim=2,mask=arr>23)
write (unit=c2, fmt=fmt) r2
call print_sum(2,c1)
- if (c1 /= c2) call abort
+ if (c1 /= c2) STOP 2
call print_sum(5,c1)
contains
r1 = sum(arr,dim=1,mask=.true.)
write (unit=c2, fmt=fmt) r1
call print_sum(1,c1)
- if (c1 /= c2) call abort
+ if (c1 /= c2) STOP 1
r2 = sum(arr,dim=2,mask=.true.)
write (unit=c2, fmt=fmt) r2
call print_sum(2,c1)
- if (c1 /= c2) call abort
+ if (c1 /= c2) STOP 2
call print_sum(5,c1)
contains
write (48,iostat = istat, rec = 3) bda1(nf1:nf10:nf2),
$ bda1(nf4:nf3), bda1(nf2:nf10:nf2)
if ( istat .ne. 0) then
- call abort
+ STOP 1
endif
istat = -314
read (48,iostat = istat, rec = np2+1) bda(nf1:nf9:nf2),
$ bda(nf4:nf3), bda(nf2:nf10:nf2)
if ( istat .ne. 0) then
- call abort
+ STOP 2
endif
do j1 = 1,10
bval = bda1(j1)
- if (bda(j1) .ne. bval) call abort
+ if (bda(j1) .ne. bval) STOP 3
enddo
end subroutine
read( 10, rec = 1, fmt = '( f6.4 )' ) a, b
!write( *, '( "partial record 2", t25, 2( f6.4, 1x ) )' ) a, b
- if (a /= 1.1111 .and. b /= 2.2222) call abort()
+ if (a /= 1.1111 .and. b /= 2.2222) STOP 1
a = -1.0
b = -1.0
read( 10, rec = 1, fmt = '( f12.4, /, f12.4 )' ) a, b
!write( *, '( "full record 1", t25, 2( f6.4, 1x ) )' ) a, b
- if (a /= 1.1111 .and. b /= 2.2222) call abort()
+ if (a /= 1.1111 .and. b /= 2.2222) STOP 2
a = -1.0
b = -1.0
read( 10, rec = 1, fmt = '( f12.4 )' ) a, b
!write( *, '( "full record 2", t25, 2( f6.4, 1x ) )' ) a, b
- if (a /= 1.1111 .and. b /= 2.2222) call abort()
+ if (a /= 1.1111 .and. b /= 2.2222) STOP 3
a = -1.0
b = -1.0
read( 10, rec = 1, fmt = '( f6.4, 6x, /, f6.4, 6x )' ) a, b
!write( *, '( "full record with 6x", t25, 2( f6.4, 1x ) )' ) a, b
- if (a /= 1.1111 .and. b /= 2.2222) call abort()
+ if (a /= 1.1111 .and. b /= 2.2222) STOP 4
a = -1.0
b = -1.0
read( 10, rec = 1, fmt = '( f6.4 )' ) a
read( 10, rec = 2, fmt = '( f6.4 )' ) b
!write( *, '( "record at a time", t25, 2( f6.4, 1x ) )' ) a, b
- if (a /= 1.1111 .and. b /= 2.2222) call abort()
+ if (a /= 1.1111 .and. b /= 2.2222) STOP 5
close( 10, status="delete")
end program da_good_now
do i = 1, 10
read(99,rec=i) dummy
- if (any (dummy /= vec1(:,i))) call abort()
+ if (any (dummy /= vec1(:,i))) STOP 1
read(99,rec=i+10) dummy
- if (any (dummy /= vec1(:,i+10))) call abort()
+ if (any (dummy /= vec1(:,i+10))) STOP 2
read(99,rec=i+20) dummy
- if (any (dummy /= vec1(:,i+20))) call abort() ! << aborted here for rec = 21
+ if (any (dummy /= vec1(:,i+20))) STOP 3 ! << aborted here for rec = 21
end do
close(99, status='delete')
IREC = IREC + 2
IRECCK = IRECCK + 2
READ(7, REC = IREC) IPROG, IFILE, ITOTR, IRLGN, IRECN, IEOF,IVON21, IVON22, IVON31, IVON32, IVON33, IVON34, IVON55, IVON56
- IF (IRECN .NE. IRECCK) CALL ABORT
+ IF (IRECN .NE. IRECCK) STOP 1
4134 CONTINUE
IRECCK = 216
IRECN = 0
IREC = IREC - 2
IRECCK = IRECCK - 2
READ(7, REC = IREC) IPROG, IFILE, ITOTR, IRLGN, IRECN, IEOF,IVON21, IVON22, IVON31, IVON32, IVON33, IVON34, IVON55, IVON56
- IF (IRECN .NE. IRECCK) CALL ABORT
+ IF (IRECN .NE. IRECCK) STOP 2
4135 CONTINUE
CLOSE(7, STATUS='DELETE')
STOP
C = (120.0,240.0)
WRITE(9,REC=1)C
READ(9,REC=1)D
- if (c /= d) call abort()
+ if (c /= d) STOP 1
E = (120.0,240.0)
WRITE(9,REC=1)E
READ(9,REC=1)F
- if (E /= F) call abort()
+ if (E /= F) STOP 2
CLOSE(UNIT=9,STATUS='DELETE')
END
write(10,rec=1) a
read (10,rec=2, iostat=ios) b
- if (ios == 0) call abort
+ if (ios == 0) STOP 1
read (10, rec=82641, iostat=ios) b ! This used to cause a segfault
- if (ios == 0) call abort
+ if (ios == 0) STOP 2
read(10, rec=1, iostat=ios) b
- if (ios /= 0) call abort
- if (a /= b) call abort
+ if (ios /= 0) STOP 3
+ if (a /= b) STOP 4
end program main
do j=1,100
read(unit=15, rec=a(j), iostat=ier) k
if (ier.ne.0) then
- call abort()
+ STOP 1
else
- if (a(j) /= k) call abort()
+ if (a(j) /= k) STOP 2
endif
enddo
close(unit=15, status="delete")
read(76, rec=1) as_read, byte, byte, byte, byte
read(76, rec=2, err=3) as_read, byte, byte, byte, byte
stop
- 3 call abort()
+ 3 STOP 1
end program test
msg = " "
backspace (95,iostat=ios,iomsg=msg)
if (ios == 0 .or. &
- msg /= "Cannot BACKSPACE a file opened for DIRECT access") call abort
+ msg /= "Cannot BACKSPACE a file opened for DIRECT access") STOP 1
ios = 0
msg = " "
endfile (95,iostat=ios,iomsg=msg)
if (ios == 0 .or. &
msg /= "Cannot perform ENDFILE on a file opened for DIRECT access") &
- call abort
+ STOP 2
ios = 0
msg = " "
rewind (95,iostat=ios,iomsg=msg)
if (ios == 0 .or. &
- msg /= "Cannot REWIND a file opened for DIRECT access ") call abort
+ msg /= "Cannot REWIND a file opened for DIRECT access ") STOP 3
close (95)
end program test
open(11,file="foo_direct_io_8.dat")
! Try a direct access read on a formatted sequential rile
READ (11, REC = I, ERR = 99) TEMP_CHANGES
- call abort
+ STOP 1
99 continue
! Variant 2: ir is ok, but does not jump to 99
READ (11, REC = I, IOSTAT = IR, ERR = 98) TEMP_CHANGES
- call abort
+ STOP 2
98 continue
if(ir == 0) then
- call abort
+ STOP 3
end if
close(11,status="delete")
end program main
$ action='readwrite')
- if (istat /= 0) call abort
+ if (istat /= 0) STOP 1
bda = 'xxxxxxxxx'
bda1 = 'yyyyyyyyy'
write (48,iostat = istat, rec = 10) bda1(4:3)
if ( istat .ne. 0) then
- call abort
+ STOP 2
endif
istat = -314
read (48,iostat = istat, rec=10) bda(4:3)
if ( istat .ne. 0) then
- call abort
+ STOP 3
endif
- if (any(bda1.ne.'yyyyyyyyy')) call abort
- if (any(bda.ne.'xxxxxxxxx')) call abort
+ if (any(bda1.ne.'yyyyyyyyy')) STOP 4
+ if (any(bda.ne.'xxxxxxxxx')) STOP 5
end
do i = HUGE(i) - 10, HUGE(i), 2
j = j + 1
end do
- if (j .ne. 6) call abort
+ if (j .ne. 6) STOP 1
j = 0
do i = HUGE(i) - 9, HUGE(i), 2
j = j + 1
end do
- if (j .ne. 5) call abort
+ if (j .ne. 5) STOP 2
! Same again, but unknown loop step
- if (test1(10, 1) .ne. 11) call abort
- if (test1(10, 2) .ne. 6) call abort
- if (test1(9, 2) .ne. 5) call abort
+ if (test1(10, 1) .ne. 11) STOP 3
+ if (test1(10, 2) .ne. 6) STOP 4
+ if (test1(9, 2) .ne. 5) STOP 5
! Zero iterations
j = 0
do i = 1, 0, 1 ! { dg-warning "executed zero times" }
j = j + 1
end do
- if (j .ne. 0) call abort
+ if (j .ne. 0) STOP 6
j = 0
do i = 1, 0, 2 ! { dg-warning "executed zero times" }
j = j + 1
end do
- if (j .ne. 0) call abort
+ if (j .ne. 0) STOP 7
j = 0
do i = 1, 2, -1 ! { dg-warning "executed zero times" }
j = j + 1
end do
- if (j .ne. 0) call abort
+ if (j .ne. 0) STOP 8
call test2 (0, 1)
call test2 (0, 2)
call test2 (2, -1)
do i = -HUGE(i), -HUGE(i), 10
j = j + 1
end do
- if (j .ne. 1) call abort
+ if (j .ne. 1) STOP 9
contains
! Returns the number of iterations performed.
function test1(r, step)
do n = 1, lim, step
k = k + 1
end do
- if (k .ne. 0) call abort
+ if (k .ne. 0) STOP 10
end subroutine
end program
#define TEST_LOOP(var,from,to,step,total,test,final) \
count = 0 ; do var = from, to, step ; count = count + 1 ; end do ; \
- if (count /= total) call abort ; \
- if (test (from, to, step, final) /= total) call abort
+ if (count /= total) STOP 1; \
+ if (test (from, to, step, final) /= total) STOP 2
! Integer loops
TEST_LOOP(i, 0, 0, 1, 1, test_i, 1)
do i = from, to, step
res = res + 1
end do
- if (i /= final) call abort
+ if (i /= final) STOP 3
end function test_i1
function test_i (from, to, step, final) result(res)
do i = from, to, step
res = res + 1
end do
- if (i /= final) call abort
+ if (i /= final) STOP 4
end function test_i
function test_r (from, to, step, final) result(res)
A(i,j) = i*j
end do
-if (any (A(:,1) /= [0, 2, 3, 4, 0])) call abort()
-if (any (A(:,2) /= [2, 0, 6, 8, 0])) call abort()
-if (any (A(:,3) /= [3, 6, 0, 12, 0])) call abort()
-if (any (A(:,4) /= [4, 8, 12, 0, 0])) call abort()
-if (any (A(:,5) /= [5, 10, 15, 20, 0])) call abort()
+if (any (A(:,1) /= [0, 2, 3, 4, 0])) STOP 1
+if (any (A(:,2) /= [2, 0, 6, 8, 0])) STOP 2
+if (any (A(:,3) /= [3, 6, 0, 12, 0])) STOP 3
+if (any (A(:,4) /= [4, 8, 12, 0, 0])) STOP 4
+if (any (A(:,5) /= [5, 10, 15, 20, 0])) STOP 5
A = -99
end if
end do
-if (any (A(:,1) /= [-99, 2, 3, 4, 5])) call abort ()
-if (any (A(:,2) /= [ 2, -99, 6, 8, 10])) call abort ()
-if (any (A(:,3) /= [ 3, 6, -99, 12, 15])) call abort ()
-if (any (A(:,4) /= [ 4, 8, 12, -99, 20])) call abort ()
-if (any (A(:,5) /= [-99, -99, -99, -99, -5])) call abort ()
+if (any (A(:,1) /= [-99, 2, 3, 4, 5])) STOP 6
+if (any (A(:,2) /= [ 2, -99, 6, 8, 10])) STOP 7
+if (any (A(:,3) /= [ 3, 6, -99, 12, 15])) STOP 8
+if (any (A(:,4) /= [ 4, 8, 12, -99, 20])) STOP 9
+if (any (A(:,5) /= [-99, -99, -99, -99, -5])) STOP 10
end
subroutine check_err(a, s)
real, dimension(:,:), intent(in) :: a
real, intent(in) :: s
- if (abs(sum(a) - s) > 1e-5) call abort
+ if (abs(sum(a) - s) > 1e-5) STOP 1
end subroutine check_err
end module test_mod
do i = HUGE(i) - 10, HUGE(i), 1 ! { dg-warning "is undefined as it overflows" }
j = j + 1
end do
- if (j .ne. 11) call abort
+ if (j .ne. 11) STOP 1
! limit=-HUGE(i)-1, step -1
j = 0
do i = -HUGE(i) + 10 - 1, -HUGE(i) - 1, -1 ! { dg-warning "is undefined as it underflows" }
j = j + 1
end do
- if (j .ne. 11) call abort
+ if (j .ne. 11) STOP 2
end program
i = 1
n = 5
line = 'PZ0R1'
- if (internal (1)) call abort ()
- if (m .ne. 4) call abort ()
+ if (internal (1)) STOP 1
+ if (m .ne. 4) STOP 2
contains
logical function internal (j)
intent(in) j
read (42,'(A)') c
close (42)
- if (c /= 'abcde') call abort
+ if (c /= 'abcde') STOP 1
end
character*20 line
line = '1234567890ABCDEFGHIJ'
write (line, '(A$)') 'asdf'
- if (line.ne.'asdf') call abort()
+ if (line.ne.'asdf') STOP 1
end
write (10,'(2A)') '1', achar(13)
rewind (10)
read (10,*) i
- if (i .ne. 1) call abort
+ if (i .ne. 1) STOP 1
close (10)
open (10,status='scratch')
rewind (10)
read (10,'(I4)') i
read (10,'(I5)') j
- if ((i .ne. 1) .or. (j .ne. 2)) call abort
+ if ((i .ne. 1) .or. (j .ne. 2)) STOP 2
end
INTEGER, PARAMETER :: p = DOT_PRODUCT(a, a)
INTEGER, PARAMETER :: e = DOT_PRODUCT(SHAPE(1), SHAPE(1))
- IF (p /= n) CALL abort()
- IF (e /= 0) CALL abort()
+ IF (p /= n) STOP 1
+ IF (e /= 0) STOP 2
END
!if (DOT_PRODUCT ((/ (1.0, 2.0), (2.0, 3.0) /), (/ (1.0, 1.0), (1.0, 4.0) /)) &
! /= SUM (CONJG ((/ (1.0, 2.0), (2.0, 3.0) /))*(/ (1.0, 1.0), (1.0, 4.0) /))) &
-! call abort ()
+! STOP 1
!
!if (ANY (MATMUL ((/ (1.0, 2.0), (2.0, 3.0) /), &
! RESHAPE ((/ (1.0, 1.0), (1.0, 4.0) /),(/2, 1/))) /= &
! SUM ((/ (1.0, 2.0), (2.0, 3.0) /)*(/ (1.0, 1.0), (1.0, 4.0) /)))) &
-! call abort ()
+! STOP 2
if (DOT_PRODUCT ((/ (1.0, 2.0), (2.0, 3.0) /), (/ (1.0, 1.0), (1.0, 4.0) /)) &
/= CONJG (cmplx(1.0, 2.0)) * cmplx(1.0, 1.0) &
+ CONJG (cmplx(2.0, 3.0)) * cmplx(1.0, 4.0)) &
- call abort ()
+ STOP 3
if (ANY (MATMUL ((/ (1.0, 2.0), (2.0, 3.0) /), &
RESHAPE ((/ (1.0, 1.0), (1.0, 4.0) /),(/2, 1/))) &
/= cmplx(1.0, 2.0) * cmplx(1.0, 1.0) &
+ cmplx(2.0, 3.0) * cmplx(1.0, 4.0))) &
- call abort ()
+ STOP 4
end
real, parameter :: b(0) = 1
complex, parameter :: c(0) = 1
logical, parameter :: d(0) = .true.
- if (dot_product(a,a) /= 0) call abort
- if (dot_product(b,b) /= 0) call abort
- if (dot_product(c,c) /= 0) call abort
- if (dot_product(d,d) .neqv. .false.) call abort
+ if (dot_product(a,a) /= 0) STOP 1
+ if (dot_product(b,b) /= 0) STOP 2
+ if (dot_product(c,c) /= 0) STOP 3
+ if (dot_product(d,d) .neqv. .false.) STOP 4
end
IOR(SHIFTL(I,BIT_SIZE(I)-SHIFT),SHIFTR(J,SHIFT))
#define CHECK(I,J,SHIFT) \
- if (dshiftl(I,J,SHIFT) /= RESL(I,J,SHIFT)) call abort ; \
- if (dshiftr(I,J,SHIFT) /= RESR(I,J,SHIFT)) call abort ; \
- if (run_dshiftl(I,J,SHIFT) /= RESL(I,J,SHIFT)) call abort ; \
- if (run_dshiftr(I,J,SHIFT) /= RESR(I,J,SHIFT)) call abort
+ if (dshiftl(I,J,SHIFT) /= RESL(I,J,SHIFT)) STOP 1; \
+ if (dshiftr(I,J,SHIFT) /= RESR(I,J,SHIFT)) STOP 2; \
+ if (run_dshiftl(I,J,SHIFT) /= RESL(I,J,SHIFT)) STOP 3; \
+ if (run_dshiftr(I,J,SHIFT) /= RESR(I,J,SHIFT)) STOP 4
CHECK(0_1,0_1,0)
CHECK(0_1,0_1,1)
IOR(SHIFTL(I,BIT_SIZE(I)-SHIFT),SHIFTR(J,SHIFT))
#define CHECK(I,J,SHIFT) \
- if (dshiftl(I,J,SHIFT) /= RESL(I,J,SHIFT)) call abort ; \
- if (dshiftr(I,J,SHIFT) /= RESR(I,J,SHIFT)) call abort ; \
- if (run_dshiftl(I,J,SHIFT) /= RESL(I,J,SHIFT)) call abort ; \
- if (run_dshiftr(I,J,SHIFT) /= RESR(I,J,SHIFT)) call abort
+ if (dshiftl(I,J,SHIFT) /= RESL(I,J,SHIFT)) STOP 1; \
+ if (dshiftr(I,J,SHIFT) /= RESR(I,J,SHIFT)) STOP 2; \
+ if (run_dshiftl(I,J,SHIFT) /= RESL(I,J,SHIFT)) STOP 3; \
+ if (run_dshiftr(I,J,SHIFT) /= RESR(I,J,SHIFT)) STOP 4
CHECK(0_16,0_16,0)
CHECK(0_16,0_16,1)
if (iostat.ne.0) iomsg = "Fail PWF DTzeroth"
endif
if (iotype.eq."DTtwo") then
- if (size(vlist).ne.2) call abort
+ if (size(vlist).ne.2) STOP 1
WRITE(udfmt,'(A,A,I1,A,I1,A)') '(', 'A', vlist(1),',I', vlist(2), ')'
WRITE(unit, FMT='(A8,I2)') dtv%name, dtv%age
if (iostat.ne.0) iomsg = "Fail PWF DTtwo"
if (iostat.ne.0) iomsg = "Fail PWF DTzeroth"
endif
if (iotype.eq."DTtwo") then
- if (size(vlist).ne.2) call abort
+ if (size(vlist).ne.2) STOP 2
WRITE(udfmt,'(A,A,I1,A,I1,A)') '(', 'A', vlist(1),',I', vlist(2), ')'
READ(unit, FMT='(A8,I2)') dtv%name, dtv%age
if (iostat.ne.0) iomsg = "Fail PWF DTtwo"
astring = "FAILURE"
write (10, "(DT'zeroth',3x, DT'three'(11,4,10),11x,DT'two'(8,2))", &
& iostat=myiostat, iomsg=astring) member, chairman, member
- if (myiostat.ne.0) call abort
- if (astring.ne."SUCCESS") call abort
+ if (myiostat.ne.0) STOP 3
+ if (astring.ne."SUCCESS") STOP 4
astring = "FAILURE"
write (10, *, iostat=myiostat, iomsg=astring) member, chairman, member
- if (myiostat.ne.0) call abort
- if (astring.ne."SUCCESS") call abort
+ if (myiostat.ne.0) STOP 5
+ if (astring.ne."SUCCESS") STOP 6
write(10,*) ! See note below
rewind(10)
chairman%name="bogus1"
member%age=66
astring = "FAILURE"
read(10,"(DT'zeroth',3x, DT'three'(11,4,10),11x,DT'two'(8,2))") member, chairman, member
- if (member%name.ne."George") call abort
- if (chairman%name.ne." Charlie") call abort
- if (member%age.ne.42) call abort
- if (chairman%age.ne.62) call abort
+ if (member%name.ne."George") STOP 7
+ if (chairman%name.ne." Charlie") STOP 8
+ if (member%age.ne.42) STOP 9
+ if (chairman%age.ne.62) STOP 10
chairman%name="bogus1"
chairman%age=99
member%name="bogus2"
! The user defined procedure reads to the end of the line/file, then finalizing the parent
! reads past, so we wrote a blank line above. User needs to address these nuances in their
! procedures. (subject to interpretation)
- if (astring.ne."SUCCESS") call abort
- if (member%name.ne."George") call abort
- if (chairman%name.ne."Charlie") call abort
- if (member%age.ne.42) call abort
- if (chairman%age.ne.62) call abort
+ if (astring.ne."SUCCESS") STOP 11
+ if (member%name.ne."George") STOP 12
+ if (chairman%name.ne."Charlie") STOP 13
+ if (member%age.ne.42) STOP 14
+ if (chairman%age.ne.62) STOP 15
END PROGRAM test
read (10, fmt='(dt)', advance='no', size=thesize, iostat=ios, &
& iomsg=errormsg) i, udt1
- if (ios.ne.5006) call abort
- if (errormsg(27:47).ne."intrinsic type passed") call abort
+ if (ios.ne.5006) STOP 1
+ if (errormsg(27:47).ne."intrinsic type passed") STOP 2
end program test1
call baby%write_formatted(10, "abcd", v, istat, msg) ! Call the dtio proc directly
rewind (10)
read (10, *) msg
- if (trim (msg) .ne. "99") call abort
+ if (trim (msg) .ne. "99") STOP 1
rewind (10)
baby%i = 42
write (10,"(DT)") baby ! Call the dtio proc via the library
rewind (10)
read (10, *) msg
- if (trim (msg) .ne. "42") call abort
+ if (trim (msg) .ne. "42") STOP 2
rewind (10)
write (10,"(DT)") child (77) ! The original testcase
rewind (10)
read (10, *) msg
- if (trim (msg) .ne. "77") call abort
+ if (trim (msg) .ne. "77") STOP 3
rewind (10)
write (10,40) child (77) ! Modified using format label
40 format(DT)
rewind (10)
read (10, *) msg
- if (trim (msg) .ne. "77") call abort
+ if (trim (msg) .ne. "77") STOP 4
close(10)
end
answer = chairman
! KIND=1 test
write (str1, *) chairman
- if (trim(str1).ne." Charlie 62") call abort
+ if (trim(str1).ne." Charlie 62") STOP 1
chairman%name="Bogus"
chairman%age=99
read (str1, *) chairman
- if (chairman%name.ne.answer%name) call abort
- if (chairman%age.ne.answer%age) call abort
+ if (chairman%name.ne.answer%name) STOP 2
+ if (chairman%age.ne.answer%age) STOP 3
! KIND=4 test
write (str4, *) chairman
- if (trim(str4).ne.4_" Charlie 62") call abort
+ if (trim(str4).ne.4_" Charlie 62") STOP 4
chairman%name="Bogus"
chairman%age=99
read (str4, *) chairman
- if (chairman%name.ne.answer%name) call abort
- if (chairman%age.ne.answer%age) call abort
+ if (chairman%name.ne.answer%name) STOP 5
+ if (chairman%age.ne.answer%age) STOP 6
END PROGRAM test
integer :: istat
character(len=256) :: imsg = ""
write( msg, "(DT)", iostat=istat) s
- if (istat /= 5018) call abort
+ if (istat /= 5018) STOP 1
end program p
chairman%age=62
inquire(iolength=rl) rl, kl, chairman, rl, chairman, tl
- if (rl.ne.64) call abort
+ if (rl.ne.64) STOP 1
END PROGRAM test
!print *, chairman
read(28, '(i10,i10,DT,i15,DT,i12)', advance='no', size=thesize) rl, &
& kl, chairman, rl, chairman, tl
- if (thesize.ne.91) call abort
+ if (thesize.ne.91) STOP 1
close(28)
END PROGRAM test
use object_interface
call assert (non_abstract_child1 (99))
- if (trim (buffer(1)) .ne. "write_formatted1 => 99") call abort
+ if (trim (buffer(1)) .ne. "write_formatted1 => 99") STOP 1
call assert (non_abstract_child2 (42.0))
- if (trim (buffer(1)) .ne. "write_formatted2 => 42.0") call abort
+ if (trim (buffer(1)) .ne. "write_formatted2 => 42.0") STOP 2
end
chairman%name="boggle"
chairman%age=1234
read (71) tmpstr1, chairman, tmpstr2
- if (tmpstr1.ne."abc") call abort
- if (tmpstr2.ne."efg") call abort
- if (chairman%name.ne."charlie") call abort
- if (chairman%age.ne.62) call abort
+ if (tmpstr1.ne."abc") STOP 1
+ if (tmpstr2.ne."efg") STOP 2
+ if (chairman%name.ne."charlie") STOP 3
+ if (chairman%age.ne.62) STOP 4
chairman%name="boggle"
chairman%age=1234
read (71) tmpstr1, chairman, tmpstr2
- if (tmpstr1.ne."hij") call abort
- if (tmpstr2.ne."klm") call abort
- if (chairman%name.ne."charlie") call abort
- if (chairman%age.ne.62) call abort
+ if (tmpstr1.ne."hij") STOP 5
+ if (tmpstr2.ne."klm") STOP 6
+ if (chairman%name.ne."charlie") STOP 7
+ if (chairman%age.ne.62) STOP 8
chairman%name="boggle"
chairman%age=1234
read (71) tmpstr1, chairman, tmpstr2
- if (tmpstr1.ne."nop") call abort
- if (tmpstr2.ne."qrs") call abort
- if (chairman%name.ne."charlie") call abort
- if (chairman%age.ne.62) call abort
+ if (tmpstr1.ne."nop") STOP 9
+ if (tmpstr2.ne."qrs") STOP 10
+ if (chairman%name.ne."charlie") STOP 11
+ if (chairman%age.ne.62) STOP 12
close (unit = 71, status='delete')
end program test
TYPE(t) :: x
WRITE (str, "(DT'a''b')") x
- if (str.ne."DTa'b") call abort
+ if (str.ne."DTa'b") STOP 1
END PROGRAM p
class(t), allocatable :: z
allocate(z)
write(buffer,"(DT)") z
- if (buffer /= "123") call abort()
+ if (buffer /= "123") STOP 1
end
type (dollar_type), parameter :: wage = dollar_type(15.10)
write (unit=*, fmt="(DT)", iostat=ios, iomsg=errormsg) wage
- if (ios.ne.5006) call abort
- if (errormsg(1:22).ne."Missing DTIO procedure") call abort
+ if (ios.ne.5006) STOP 1
+ if (errormsg(1:22).ne."Missing DTIO procedure") STOP 2
end program test_dollar
else
read (unit,*) dtv%c, comma, dtv%k
end if
- if (comma /= ',') call abort()
+ if (comma /= ',') STOP 1
end subroutine
end module
namelist /nml/ x
x = t('a', 5)
write (buffer, nml)
- if (buffer.ne.'&NML X=a, 5 /') call abort
+ if (buffer.ne.'&NML X=a, 5 /') STOP 1
x = t('x', 0)
read (buffer, nml)
- if (x%c.ne.'a'.or. x%k.ne.5) call abort
+ if (x%c.ne.'a'.or. x%k.ne.5) STOP 2
end
write(10,'(a)') 'hello'
rewind(10)
read(unit=10, fmt='(dt)', iostat=istat, iomsg=imsg) foo
- if (imsg.ne."End of record") call abort
+ if (imsg.ne."End of record") STOP 1
rewind(10)
read(unit=10, fmt=*, iostat=istat, iomsg=imsg) foo
- if (imsg.ne."End of record") call abort
+ if (imsg.ne."End of record") STOP 2
s = "hello"
read( unit=s, fmt='(dt)', iostat=istat, iomsg=imsg) foo
- if (imsg.ne."End of record") call abort
+ if (imsg.ne."End of record") STOP 3
read( unit=s, fmt=*, iostat=istat, iomsg=imsg) foo
- if (imsg.ne."End of record") call abort
+ if (imsg.ne."End of record") STOP 4
end program p
namelist /n1/ x
x = t('a')
write (buffer, n1)
- if (buffer(2) /= " X=a") call abort()
+ if (buffer(2) /= " X=a") STOP 1
end subroutine
subroutine test_class
namelist /n2/ y
y = t('b')
write (buffer, n2)
- if (buffer(2) /= " Y=b") call abort()
+ if (buffer(2) /= " Y=b") STOP 2
end subroutine
END
j=99
k=99
READ (unit, nml, iostat=iostatus)
- if (iostatus.ne.0) call abort
- if (j.ne.1 .or. k.ne.2 .or. x%c.ne.'a' .or. y%c.ne.'b' .or. z%c.ne.'c') call abort
+ if (iostatus.ne.0) STOP 1
+ if (j.ne.1 .or. k.ne.2 .or. x%c.ne.'a' .or. y%c.ne.'b' .or. z%c.ne.'c') STOP 2
!WRITE(*, nml)
END PROGRAM p
if (iostat.ne.0) iomsg = "Fail PWF DTzeroth"\r
endif\r
if (iotype.eq."DTtwo") then\r
- if (size(vlist).ne.2) call abort\r
+ if (size(vlist).ne.2) STOP 1
WRITE(udfmt,'(A,A,I1,A,I1,A)') '(', 'A', vlist(1),',I', vlist(2), ')'\r
WRITE(unit, FMT='(A8,I2)') dtv%name, dtv%age\r
if (iostat.ne.0) iomsg = "Fail PWF DTtwo"\r
if (iostat.ne.0) iomsg = "Fail PWF DTzeroth"\r
endif\r
if (iotype.eq."DTtwo") then\r
- if (size(vlist).ne.2) call abort\r
+ if (size(vlist).ne.2) STOP 1
WRITE(udfmt,'(A,A,I1,A,I1,A)') '(', 'A', vlist(1),',I', vlist(2), ')'\r
READ(unit, FMT='(A8,I2)') dtv%name, dtv%age\r
if (iostat.ne.0) iomsg = "Fail PWF DTtwo"\r
member%age=66\r
read (10, *, iostat=myiostat, iomsg=astring) member, chairman\r
if (astring.ne."SUCCESS") print *, astring\r
- if (member%name.ne."George") call abort\r
- if (chairman%name.ne."Charlie") call abort\r
- if (member%age.ne.42) call abort\r
- if (chairman%age.ne.62) call abort\r
+ if (member%name.ne."George") STOP 1
+ if (chairman%name.ne."Charlie") STOP 1
+ if (member%age.ne.42) STOP 1
+ if (chairman%age.ne.62) STOP 1
close(10, status='delete')\r
! Now we set next to point to member. This changes the code path\r
! in the pwf and prf procedures.\r
member%age=66\r
read (10,"(DT)", iomsg=astring) chairman\r
!print *, trim(astring)\r
- if (member%name.ne."George") call abort\r
- if (chairman%name.ne."Charlie") call abort\r
- if (member%age.ne.42) call abort\r
- if (chairman%age.ne.62) call abort\r
+ if (member%name.ne."George") STOP 1
+ if (chairman%name.ne."Charlie") STOP 1
+ if (member%age.ne.42) STOP 1
+ if (chairman%age.ne.62) STOP 1
close(10)\r
END PROGRAM test\r
read(10, nml)
write(str,*) w
if (str.ne." jr jr jr jr jr jr jr jr jr jr jr jr jr jr kr kr kr jr jr jr jr jr jr jr jr jr jr jr jr jr") &
- & call abort
+ & STOP 1
str = ""
write(str,"(*(DT))") w
- if (str.ne."jrjrjrjrjrjrjrjrjrjrjrjrjrjrkrkrkrjrjrjrjrjrjrjrjrjrjrjrjrjr") call abort
+ if (str.ne."jrjrjrjrjrjrjrjrjrjrjrjrjrjrkrkrkrjrjrjrjrjrjrjrjrjrjrjrjrjr") STOP 2
end program p
type(dollar_type), parameter :: wage = dollar_type(15.10)
character(len=10) str
write (str, fmt="(DT)") wage
- if(trim(adjustl(str)) /= '15.10') call abort
+ if(trim(adjustl(str)) /= '15.10') STOP 1
end program test_dollar
type(dollar_type), parameter :: wage = dollar_type(15.10)
character(len=10) str
write(str, fmt="(DT)") wage
- if (trim(adjustl(str)) /= '15.10') call abort
+ if (trim(adjustl(str)) /= '15.10') STOP 1
end program test_dollar
result_array = (/ (i, i = 1, 15) /)\r
more1%myarray = result_array\r
read (10, fmt='(dt)', advance='no', iomsg=iomsg) udt1\r
- if (iomsg.ne.'SUCCESS') call abort\r
- if (any(udt1%myarray.ne.result_array)) call abort\r
+ if (iomsg.ne.'SUCCESS') STOP 1
+ if (any(udt1%myarray.ne.result_array)) STOP 1
close(10)\r
open (10, form='formatted', status='scratch')\r
write (10, '(dt)') more1\r
rewind(10)\r
more1%myarray = 99\r
read (10, '(dt)', iostat=ios, iomsg=iomsg) more1\r
- if (iomsg.ne.'SUCCESS') call abort\r
- if (any(more1%myarray.ne.result_array)) call abort\r
+ if (iomsg.ne.'SUCCESS') STOP 1
+ if (any(more1%myarray.ne.result_array)) STOP 1
close (10)\r
end program test1\r
case(4)
print *, "too few values in stack"
end select
- call abort
+ STOP 1
end if
close(10)
if (iotype .ne. "DTmembers") iostat = 4
class default
- call abort
+ STOP 1
end select
end subroutine
END MODULE p
rewind (7)
read (7, "(DT'staff')", iostat = i) social_club%staff
- if (i .ne. 0) call abort
+ if (i .ne. 0) STOP 2
social_club%committee(2)%age = 33 ! Introduce an error
read (7, "(DT'officers')", iostat = i) social_club%committee
- if (i .ne. 2) call abort ! Pick up error
+ if (i .ne. 2) STOP 3! Pick up error
do j = 1, size (social_club%membership, 1)
read (7, "(DT'members')", iostat = i) social_club%membership(j)
- if (i .ne. 0) call abort
+ if (i .ne. 0) STOP 4
end do
close (7)
END PROGRAM test
! Straight comparisons fail at any level of optimization.
write(line, "(A7)") chairman%name
- if (trim (line) .ne. "Charlie") call abort
+ if (trim (line) .ne. "Charlie") STOP 1
line = " "
write(line, "(I4)") chairman%age
if (trim (line) .eq. " 62") print *, trim(line)
close (unit = 71)
write(line, "(I4)") chairman%id_no
- if (trim (line) .ne. " 1") call abort
+ if (trim (line) .ne. " 1") STOP 1
write(line, "(I4)") chairman%age
- if (trim (line) .ne. " 62") call abort
+ if (trim (line) .ne. " 62") STOP 2
end program
character(3) :: str
integer :: i(3) = (/1,2,3/)
str = p(i,mysize)
- if (len(str) .ne. 3) call abort
- if (str .ne. "BCD") call abort
+ if (len(str) .ne. 3) STOP 1
+ if (str .ne. "BCD") STOP 2
contains
function p(y,asz)
implicit none
end function cost
end interface
- if (any (cost([1d0,2d0]) /= [2.d0, 4.d0])) call abort ()
+ if (any (cost([1d0,2d0]) /= [2.d0, 4.d0])) STOP 1
icheck = icheck + 1
end subroutine
implicit none
call init()
- if (any (cost([3.d0,7.d0]) /= [6.d0, 14.d0])) call abort ()
- if (icheck /= 0) call abort ()
+ if (any (cost([3.d0,7.d0]) /= [6.d0, 14.d0])) STOP 2
+ if (icheck /= 0) STOP 3
call sol(cost)
- if (icheck /= 1) call abort ()
+ if (icheck /= 1) STOP 4
end program test
integer foo1, foo2, foo3, foo4
do i=1,10
if (foo1().ne.i) then
- call abort
+ STOP 1
end if
if (foo2().ne.i) then
- call abort
+ STOP 2
end if
if (foo3().ne.i) then
- call abort
+ STOP 3
end if
if (foo4().ne.i) then
- call abort
+ STOP 4
end if
end do
end program save_1
! { dg-do compile }
-! { dg-options "-fall-intrinsics -std=f95" }
+! { dg-options " -std=f95" }
program save_2
implicit none
integer i
integer foo1, foo2, foo3, foo4
do i=1,10
if (foo1().ne.i) then
- call abort
+ STOP 1
end if
if (foo2().ne.i) then
- call abort
+ STOP 2
end if
if (foo3().ne.i) then
- call abort
+ STOP 3
end if
if (foo4().ne.i) then
- call abort
+ STOP 4
end if
end do
end program save_2
type(t2), target :: c
type(l1), target :: d
a => b ! declared type
- if (a%real() .ne. real (42)) call abort
- if (a%prod() .ne. 42) call abort
- if (a%extract (2) .ne. 84) call abort
+ if (a%real() .ne. real (42)) STOP 1
+ if (a%prod() .ne. 42) STOP 2
+ if (a%extract (2) .ne. 84) STOP 3
a => c ! extension in module
- if (a%real() .ne. real (99)) call abort
- if (a%prod() .ne. 99) call abort
- if (a%extract (3) .ne. 297) call abort
+ if (a%real() .ne. real (99)) STOP 4
+ if (a%prod() .ne. 99) STOP 5
+ if (a%extract (3) .ne. 297) STOP 6
a => d ! extension in main
- if (a%real() .ne. real (42)) call abort
- if (a%prod() .ne. 42) call abort
- if (a%extract (4) .ne. 168) call abort
+ if (a%real() .ne. real (42)) STOP 7
+ if (a%prod() .ne. 42) STOP 8
+ if (a%extract (4) .ne. 168) STOP 9
end
use mod1 ! order of use statements is important
class(t1),allocatable :: a
allocate(a)
- if (a%get()/=1) call abort()
+ if (a%get()/=1) STOP 1
end
use TestResult_mod, only: TestResult
class (TestResult) :: result
call result%run()
- if (result%numRun /= 1) call abort()
+ if (result%numRun /= 1) STOP 1
end subroutine
end
a => b ! declared type
call a%real(r)
- if (r .ne. real (42)) call abort
+ if (r .ne. real (42)) STOP 1
call a%prod(i)
- if (i .ne. 42) call abort
+ if (i .ne. 42) STOP 2
call a%extract (2, i)
- if (i .ne. 84) call abort
+ if (i .ne. 84) STOP 3
a => c ! extension in module
call a%real(r)
- if (r .ne. real (99)) call abort
+ if (r .ne. real (99)) STOP 4
call a%prod(i)
- if (i .ne. 99) call abort
+ if (i .ne. 99) STOP 5
call a%extract (3, i)
- if (i .ne. 297) call abort
+ if (i .ne. 297) STOP 6
a => d ! extension in main
call a%real(r)
- if (r .ne. real (42)) call abort
+ if (r .ne. real (42)) STOP 7
call a%prod(i)
- if (i .ne. 42) call abort
+ if (i .ne. 42) STOP 8
call a%extract (4, i)
- if (i .ne. 168) call abort
+ if (i .ne. 168) STOP 9
end
type(t2), target :: c
type(l1), target :: d
a => b ! declared type in module m1
- if (a%real() .ne. real (42)) call abort
- if (a%prod() .ne. 42) call abort
- if (a%extract (2) .ne. 84) call abort
+ if (a%real() .ne. real (42)) STOP 1
+ if (a%prod() .ne. 42) STOP 2
+ if (a%extract (2) .ne. 84) STOP 3
a => c ! extension in module m2
- if (a%real() .ne. real (99)) call abort
- if (a%prod() .ne. 99) call abort
- if (a%extract (3) .ne. 297) call abort
+ if (a%real() .ne. real (99)) STOP 4
+ if (a%prod() .ne. 99) STOP 5
+ if (a%extract (3) .ne. 297) STOP 6
a => d ! extension in main
- if (a%real() .ne. real (42)) call abort
- if (a%prod() .ne. 42) call abort
- if (a%extract (4) .ne. 168) call abort
+ if (a%real() .ne. real (42)) STOP 7
+ if (a%prod() .ne. 42) STOP 8
+ if (a%extract (4) .ne. 168) STOP 9
end
class(foo), pointer :: a
a => b
call a%doit
- if (a%getit () .ne. 1) call abort
+ if (a%getit () .ne. 1) STOP 1
a => c
call a%doit
- if (a%getit () .ne. 2) call abort
+ if (a%getit () .ne. 2) STOP 2
a => d
call a%doit
- if (a%getit () .ne. 3) call abort
+ if (a%getit () .ne. 3) STOP 3
end
b%a => c
a => b
call a%scal (1.0_spk_, info)
- if (info .ne. 700) call abort
+ if (info .ne. 700) STOP 1
end
type(t2), target :: y
type(t3) :: z
z%a => x
- if ((z%sizeof() .ne. 1) .or. (z%a%sizeof() .ne. 1)) call abort
+ if ((z%sizeof() .ne. 1) .or. (z%a%sizeof() .ne. 1)) STOP 1
z%a => y
- if ((z%sizeof() .ne. 2) .or. (z%a%sizeof() .ne. 2)) call abort
+ if ((z%sizeof() .ne. 2) .or. (z%a%sizeof() .ne. 2)) STOP 2
end
allocate(foo :: a%a)
call a%doit()
! write(*,*) 'Getit value : ', a%getit()
- if (a%getit() .ne. 1) call abort
+ if (a%getit() .ne. 1) STOP 1
deallocate(a%a)
allocate(foo2 :: a%a)
call a%doit()
! write(*,*) 'Getit value : ', a%getit()
- if (a%getit() .ne. 3) call abort
+ if (a%getit() .ne. 3) STOP 2
end program testd10
allocate(o1)
allocate(o2)
- if (t1%gen(2.0) .ne. o1%gen(2.0)) call abort
- if (t1%gen(2.0) .ne. o2%gen(2.0)) call abort
- if (o2%gen(3) .ne. 9) call abort
+ if (t1%gen(2.0) .ne. o1%gen(2.0)) STOP 1
+ if (t1%gen(2.0) .ne. o2%gen(2.0)) STOP 2
+ if (o2%gen(3) .ne. 9) STOP 3
end
write(c1,"(e9.2)") r
write(c2,"(d9.2)") r
-if (trim(adjustl(c1)) .ne. "0.10E+01") call abort()
-if (trim(adjustl(c2)) .ne. "0.10D+01") call abort()
+if (trim(adjustl(c1)) .ne. "0.10E+01") STOP 1
+if (trim(adjustl(c2)) .ne. "0.10D+01") STOP 2
END
s = x
! G -> F format
write (s, '(G10.3,A)') 12.36, "z"
- if (s .ne. " 12.4 z") call abort
+ if (s .ne. " 12.4 z") STOP 1
s = x
! G -> E format
write (s, '(G10.3,A)') -0.0012346, "z"
- if (s .ne. "-0.123E-02z") call abort
+ if (s .ne. "-0.123E-02z") STOP 2
s = x
! Gw.eEe format
write (s, '(G10.3e1,a)') 12.34, "z"
- if (s .ne. " 12.3 z") call abort
+ if (s .ne. " 12.3 z") STOP 3
! E format with excessive precision
write (t, '(E199.192,A)') 1.5, "z"
- if ((t(1:7) .ne. " 0.1500") .or. (t(194:200) .ne. "00E+01z")) call abort
+ if ((t(1:7) .ne. " 0.1500") .or. (t(194:200) .ne. "00E+01z")) STOP 4
! EN format
s = x
write (s, '(EN15.3,A)') 12873.6, "z"
- if (s .ne. " 12.874E+03z") call abort
+ if (s .ne. " 12.874E+03z") STOP 5
! EN format, negative exponent
s = x
write (s, '(EN15.3,A)') 12.345e-6, "z"
- if (s .ne. " 12.345E-06z") call abort
+ if (s .ne. " 12.345E-06z") STOP 6
! ES format
s = x
write (s, '(ES10.3,A)') 16.235, "z"
- if (s .ne. " 1.624E+01z") call abort
+ if (s .ne. " 1.624E+01z") STOP 7
! F format, small number
s = x
write (s, '(F10.8,A)') 1.0e-20, "z"
- if (s .ne. "0.00000000z") call abort
+ if (s .ne. "0.00000000z") STOP 8
! E format, very large number.
! Used to overflow with positive scale factor
s = x
write (s, '(1PE10.3,A)') huge(0d0), "z"
! The actual value is target specific, so just do a basic check
if ((s(1:1) .eq. "*") .or. (s(7:7) .ne. "+") .or. &
- (s(11:11) .ne. "z")) call abort
+ (s(11:11) .ne. "z")) STOP 9
! F format, round up with carry to most significant digit.
s = x
write (s, '(F10.3,A)') 0.9999, "z"
- if (s .ne. " 1.000z") call abort
+ if (s .ne. " 1.000z") STOP 10
! F format, round up with carry to most significant digit < 0.1.
s = x
write (s, '(F10.3,A)') 0.0099, "z"
- if (s .ne. " 0.010z") call abort
+ if (s .ne. " 0.010z") STOP 11
! E format, round up with carry to most significant digit.
s = x
write (s, '(E10.3,A)') 0.9999, "z"
- if (s .ne. " 0.100E+01z") call abort
+ if (s .ne. " 0.100E+01z") STOP 12
! EN format, round up with carry to most significant digit.
s = x
write (s, '(EN15.3,A)') 999.9999, "z"
- if (s .ne. " 1.000E+03z") call abort
+ if (s .ne. " 1.000E+03z") STOP 13
! E format, positive scale factor
s = x
write (s, '(2PE10.4,A)') 1.2345, "z"
- if (s .ne. '12.345E-01z') call abort
+ if (s .ne. '12.345E-01z') STOP 14
! E format, negative scale factor
s = x
write (s, '(-2PE10.4,A)') 1.250001, "z"
- if (s .ne. '0.0013E+03z') call abort
+ if (s .ne. '0.0013E+03z') STOP 15
! E format, single digit precision
s = x
write (s, '(E10.1,A)') 1.1, "z"
- if (s .ne. ' 0.1E+01z') call abort
+ if (s .ne. ' 0.1E+01z') STOP 16
end
end function
end interface
- if (foo(42) .ne. 43) call abort
- if (any (foo([0,1]) .ne. [1,2])) call abort
+ if (foo(42) .ne. 43) STOP 1
+ if (any (foo([0,1]) .ne. [1,2])) STOP 2
end
b = a
CALL double (a, a) ! same range, no temporary
- IF (ANY(a /= 2*b)) CALL abort
+ IF (ANY(a /= 2*b)) STOP 1
b = a
CALL double (a+1, a) ! same range, no temporary
- IF (ANY(a /= 2*b+2)) CALL abort
+ IF (ANY(a /= 2*b+2)) STOP 2
b = a
CALL double ((a(1:sz)), a(1:sz)) ! same range, no temporary
- IF (ANY(a /= 2*b)) CALL abort
+ IF (ANY(a /= 2*b)) STOP 3
b = a
CALL double((a(1:sz-1)), a(2:sz)) ! paren expression, temporary created
! { dg-final { scan-tree-dump-times "A\.16\\\[4\\\]" 1 "original" } }
- IF (ANY(a /= (/ b(1), (2*b(i), i=1,sz-1) /))) CALL abort
+ IF (ANY(a /= (/ b(1), (2*b(i), i=1,sz-1) /))) STOP 4
b = a
CALL double(a(1:sz-1)+1, a(2:sz)) ! op expression, temporary created
! { dg-final { scan-tree-dump-times "A\.25\\\[4\\\]" 1 "original" } }
- IF (ANY(a /= (/ b(1), (2*b(i)+2, i=1,sz-1) /))) CALL abort
+ IF (ANY(a /= (/ b(1), (2*b(i)+2, i=1,sz-1) /))) STOP 5
b = a
CALL double(self(a), a) ! same range, no temporary
- IF (ANY(a /= 2*b)) CALL abort
+ IF (ANY(a /= 2*b)) STOP 6
b = a
CALL double(self(a(1:sz-1)), a(2:sz)) ! function expr, temporary created
! { dg-final { scan-tree-dump-times "A\.37\\\[4\\\]" 1 "original" } }
- IF (ANY(a /= (/ b(1), (2*b(i), i=1,sz-1) /))) CALL abort
+ IF (ANY(a /= (/ b(1), (2*b(i), i=1,sz-1) /))) STOP 7
CONTAINS
! Original testcase
array = Nick(index,array)
- If (any (array .ne. array(1))) call abort
+ If (any (array .ne. array(1))) STOP 1
array = (/ (i+0.0, i = 1,5) /)
! This should not create a temporary
array = Charles(array)
- If (any (array .ne. index)) call abort
+ If (any (array .ne. index)) STOP 2
! { dg-final { scan-tree-dump-times "array\\\[\[^\\\]\]*\\\]\\s*=\\s*charles\\s*\\(&array\\\[\[^\\\]\]*\\\]\\);" 1 "original" } }
! Check use association of the function works correctly.
arraym = Bill(index,arraym)
- if (any (arraym .ne. arraym(1))) call abort
+ if (any (arraym .ne. arraym(1))) STOP 3
! Check siblings interact correctly.
array = (/ (i+0.0, i = 1,5) /)
array = Henry(index)
- if (any (array .ne. array(1))) call abort
+ if (any (array .ne. array(1))) STOP 4
array = (/ (i+0.0, i = 1,5) /)
! This should not create a temporary
array = index + Henry2(0) - array
! { dg-final { scan-tree-dump-times "array\\\[\[^\\\]\]*\\\]\\s*=\\s*\\(\\(real\\(kind=4\\)\\)\\s*index\\\[\[^\\\]\]*\\\]\\s*\\+\\s*D.\\d*\\)\\s*-\\s*array\\\[\[^\\\]\]*\\\];" 1 "original" } }
- if (any (array .ne. 15.0)) call abort
+ if (any (array .ne. 15.0)) STOP 5
arraym = (/ (i+0.0, i = 1,5) /)
arraym = Peter(index, arraym)
- if (any (arraym .ne. 15.0)) call abort
+ if (any (arraym .ne. 15.0)) STOP 6
array = (/ (i+0.0, i = 1,5) /)
array = Robert(index)
- if (any (arraym .ne. 15.0)) call abort
+ if (any (arraym .ne. 15.0)) STOP 7
missme => Robert2
array = (/ (i+0.0, i = 1,5) /)
array = David(index)
- if (any (arraym .ne. 15.0)) call abort
+ if (any (arraym .ne. 15.0)) STOP 8
array = (/ (i+0.0, i = 1,5) /)
array = James(index)
- if (any (arraym .ne. 15.0)) call abort
+ if (any (arraym .ne. 15.0)) STOP 9
array = (/ (i+0.0, i = 1,5) /)
array = Romeo(index)
- if (any (arraym .ne. 15.0)) call abort
+ if (any (arraym .ne. 15.0)) STOP 10
CONTAINS
ELEMENTAL FUNCTION Nick (n, x)
INTEGER :: i, index(5) = (/ (i, i = 1,5) /)
array%f = array%tbp(index)
- if (any (array%f .ne. array(1)%f)) call abort
+ if (any (array%f .ne. array(1)%f)) STOP 1
array%f = index
call Jack(array)
CLASS(t) :: dummy(:)
dummy%f = dummy%tbp(index)
!print *, dummy%f
- if (any (dummy%f .ne. 15.0)) call abort
+ if (any (dummy%f .ne. 15.0)) STOP 2
END SUBROUTINE
END PROGRAM Main
c = t(13)
c = plus(c(1), b)
! print *, c
- if (any(c%c /= 20)) call abort
+ if (any(c%c /= 20)) STOP 1
contains
rr=f1(aa,1)
! WRITE(*,*) ' rr(1)=', rr(1), ' rr(2)=', rr(2)
- IF (ANY(rr /= (/ 110, 132 /))) CALL ABORT
+ IF (ANY(rr /= (/ 110, 132 /))) STOP 1
rr=0
rr=ff(aa,1)
! WRITE(*,*) ' rr(1)=', rr(1), ' rr(2)=', rr(2)
- IF (ANY(rr /= (/ 110, 132 /))) CALL ABORT
+ IF (ANY(rr /= (/ 110, 132 /))) STOP 2
! WRITE(*,*) 'But only f1 works if the optional parameter is absent:'
rr=0
rr=f1(aa)
! WRITE(*,*) ' rr(1)=', rr(1), ' rr(2)=', rr(2)
- IF (ANY(rr /= (/ 110, 132 /))) CALL ABORT
+ IF (ANY(rr /= (/ 110, 132 /))) STOP 3
rr = 0
rr=ff(aa)
! WRITE(*,*) ' rr(1)=', rr(1), ' rr(2)=', rr(2)
- IF (ANY(rr /= (/ 110, 132 /))) CALL ABORT
+ IF (ANY(rr /= (/ 110, 132 /))) STOP 4
CONTAINS
rr=f1(aa,b)
! WRITE(*,*) ' rr(1)=', rr(1), ' rr(2)=', rr(2)
- IF (ANY(rr /= (/ 110, 132 /))) CALL ABORT
+ IF (ANY(rr /= (/ 110, 132 /))) STOP 1
rr=0
rr=ff(aa,b)
! WRITE(*,*) ' rr(1)=', rr(1), ' rr(2)=', rr(2)
- IF (ANY(rr /= (/ 110, 132 /))) CALL ABORT
+ IF (ANY(rr /= (/ 110, 132 /))) STOP 2
b => NULL()
rr=0
rr=f1(aa, b)
! WRITE(*,*) ' rr(1)=', rr(1), ' rr(2)=', rr(2)
- IF (ANY(rr /= (/ 110, 132 /))) CALL ABORT
+ IF (ANY(rr /= (/ 110, 132 /))) STOP 3
rr = 0
rr=ff(aa, b)
! WRITE(*,*) ' rr(1)=', rr(1), ' rr(2)=', rr(2)
- IF (ANY(rr /= (/ 110, 132 /))) CALL ABORT
+ IF (ANY(rr /= (/ 110, 132 /))) STOP 4
CONTAINS
rr=f1(aa,b)
! WRITE(*,*) ' rr(1)=', rr(1), ' rr(2)=', rr(2)
- IF (ANY(rr /= (/ 110, 132 /))) CALL ABORT
+ IF (ANY(rr /= (/ 110, 132 /))) STOP 1
rr=0
rr=ff(aa,b)
! WRITE(*,*) ' rr(1)=', rr(1), ' rr(2)=', rr(2)
- IF (ANY(rr /= (/ 110, 132 /))) CALL ABORT
+ IF (ANY(rr /= (/ 110, 132 /))) STOP 2
DEALLOCATE(b)
rr=0
rr=f1(aa, b)
! WRITE(*,*) ' rr(1)=', rr(1), ' rr(2)=', rr(2)
- IF (ANY(rr /= (/ 110, 132 /))) CALL ABORT
+ IF (ANY(rr /= (/ 110, 132 /))) STOP 3
rr = 0
rr=ff(aa, b)
! WRITE(*,*) ' rr(1)=', rr(1), ' rr(2)=', rr(2)
- IF (ANY(rr /= (/ 110, 132 /))) CALL ABORT
+ IF (ANY(rr /= (/ 110, 132 /))) STOP 4
CONTAINS
call sub1 (s, x%a, .false.)
call sub1 (v, x%a, .false.)
!print *, s, v
-if (s /= 3) call abort()
-if (any (v /= [9, 33])) call abort()
+if (s /= 3) STOP 1
+if (any (v /= [9, 33])) STOP 2
call sub1 (s, x%p, .false.)
call sub1 (v, x%p, .false.)
!print *, s, v
-if (s /= 3) call abort()
-if (any (v /= [9, 33])) call abort()
+if (s /= 3) STOP 3
+if (any (v /= [9, 33])) STOP 4
! SCALAR COMPONENTS: alloc/assoc
call sub1 (s, x%a, .true.)
call sub1 (v, x%a, .true.)
!print *, s, v
-if (s /= 4*2) call abort()
-if (any (v /= [4*2, 4*2])) call abort()
+if (s /= 4*2) STOP 5
+if (any (v /= [4*2, 4*2])) STOP 6
call sub1 (s, x%p, .true.)
call sub1 (v, x%p, .true.)
!print *, s, v
-if (s /= 5*2) call abort()
-if (any (v /= [5*2, 5*2])) call abort()
+if (s /= 5*2) STOP 7
+if (any (v /= [5*2, 5*2])) STOP 8
! ARRAY COMPONENTS: Non alloc/assoc
call sub1 (v, x%a2, .false.)
!print *, v
-if (any (v /= [9, 33])) call abort()
+if (any (v /= [9, 33])) STOP 9
call sub1 (v, x%p2, .false.)
!print *, v
-if (any (v /= [9, 33])) call abort()
+if (any (v /= [9, 33])) STOP 10
! ARRAY COMPONENTS: alloc/assoc
call sub1 (v, x%a2, .true.)
!print *, v
-if (any (v /= [84*2, 82*2])) call abort()
+if (any (v /= [84*2, 82*2])) STOP 11
call sub1 (v, x%p2, .true.)
!print *, v
-if (any (v /= [35*2, 58*2])) call abort()
+if (any (v /= [35*2, 58*2])) STOP 12
! =============== sub_t ==================
call sub_t (s, ta, .false.)
call sub_t (v, ta, .false.)
!print *, s, v
-if (s /= 3) call abort()
-if (any (v /= [9, 33])) call abort()
+if (s /= 3) STOP 13
+if (any (v /= [9, 33])) STOP 14
call sub_t (s, tp, .false.)
call sub_t (v, tp, .false.)
!print *, s, v
-if (s /= 3) call abort()
-if (any (v /= [9, 33])) call abort()
+if (s /= 3) STOP 15
+if (any (v /= [9, 33])) STOP 16
call sub_t (s, ca, .false.)
call sub_t (v, ca, .false.)
!print *, s, v
-if (s /= 3) call abort()
-if (any (v /= [9, 33])) call abort()
+if (s /= 3) STOP 17
+if (any (v /= [9, 33])) STOP 18
call sub_t (s, cp, .false.)
call sub_t (v, cp, .false.)
!print *, s, v
-if (s /= 3) call abort()
-if (any (v /= [9, 33])) call abort()
+if (s /= 3) STOP 19
+if (any (v /= [9, 33])) STOP 20
! SCALAR COMPONENTS: alloc/assoc
call sub_t (s, ta, .true.)
call sub_t (v, ta, .true.)
!print *, s, v
-if (s /= 4*2) call abort()
-if (any (v /= [4*2, 4*2])) call abort()
+if (s /= 4*2) STOP 21
+if (any (v /= [4*2, 4*2])) STOP 22
call sub_t (s, tp, .true.)
call sub_t (v, tp, .true.)
!print *, s, v
-if (s /= 5*2) call abort()
-if (any (v /= [5*2, 5*2])) call abort()
+if (s /= 5*2) STOP 23
+if (any (v /= [5*2, 5*2])) STOP 24
call sub_t (s, ca, .true.)
call sub_t (v, ca, .true.)
!print *, s, v
-if (s /= 6*2) call abort()
-if (any (v /= [6*2, 6*2])) call abort()
+if (s /= 6*2) STOP 25
+if (any (v /= [6*2, 6*2])) STOP 26
call sub_t (s, cp, .true.)
call sub_t (v, cp, .true.)
!print *, s, v
-if (s /= 7*2) call abort()
-if (any (v /= [7*2, 7*2])) call abort()
+if (s /= 7*2) STOP 27
+if (any (v /= [7*2, 7*2])) STOP 28
! ARRAY COMPONENTS: Non alloc/assoc
call sub_t (v, taa, .false.)
!print *, v
-if (any (v /= [9, 33])) call abort()
+if (any (v /= [9, 33])) STOP 29
call sub_t (v, tpa, .false.)
!print *, v
-if (any (v /= [9, 33])) call abort()
+if (any (v /= [9, 33])) STOP 30
call sub_t (v, caa, .false.)
!print *, v
-if (any (v /= [9, 33])) call abort()
+if (any (v /= [9, 33])) STOP 31
call sub_t (v, cpa, .false.)
!print *, v
-if (any (v /= [9, 33])) call abort()
+if (any (v /= [9, 33])) STOP 32
deallocate(ta, tp, ca, cp)
select type (caa)
type is (t)
- if (any (caa(:)%a /= [66, 666])) call abort()
+ if (any (caa(:)%a /= [66, 666])) STOP 33
end select
select type (cpa)
type is (t)
- if (any (cpa(:)%a /= [77, 777])) call abort()
+ if (any (cpa(:)%a /= [77, 777])) STOP 34
end select
call sub_t (v, taa, .true.)
!print *, v
-if (any (v /= [44*2, 444*2])) call abort()
+if (any (v /= [44*2, 444*2])) STOP 35
call sub_t (v, tpa, .true.)
!print *, v
-if (any (v /= [55*2, 555*2])) call abort()
+if (any (v /= [55*2, 555*2])) STOP 36
call sub_t (v, caa, .true.)
!print *, v
-if (any (v /= [66*2, 666*2])) call abort()
+if (any (v /= [66*2, 666*2])) STOP 37
call sub_t (v, cpa, .true.)
!print *, v
-if (any (v /= [77*2, 777*2])) call abort()
+if (any (v /= [77*2, 777*2])) STOP 38
deallocate (taa, tpa, caa, cpa)
integer, optional :: arg1(:)
integer :: arg2(:)
! print *, fun1 (arg1, arg2)
- if (size (fun1 (arg1, arg2)) /= 2) call abort() ! { dg-warning "is an array and OPTIONAL" }
- if (any (fun1 (arg1, arg2) /= [1,2])) call abort() ! { dg-warning "is an array and OPTIONAL" }
+ if (size (fun1 (arg1, arg2)) /= 2) STOP 1 ! { dg-warning "is an array and OPTIONAL" }
+ if (any (fun1 (arg1, arg2) /= [1,2])) STOP 2 ! { dg-warning "is an array and OPTIONAL" }
end subroutine
elemental function fun1 (arg1, arg2)
integer, optional :: arg1(:)
integer, optional :: arg2(:)
! print *, fun2 (arg1, arg2)
- if (size (fun2 (arg1, arg2)) /= 2) call abort() ! { dg-warning "is an array and OPTIONAL" }
- if (any (fun2 (arg1, arg2) /= [1,2])) call abort() ! { dg-warning "is an array and OPTIONAL" }
+ if (size (fun2 (arg1, arg2)) /= 2) STOP 3 ! { dg-warning "is an array and OPTIONAL" }
+ if (any (fun2 (arg1, arg2) /= [1,2])) STOP 4 ! { dg-warning "is an array and OPTIONAL" }
end subroutine
elemental function fun2 (arg1,arg2)
integer :: b(n)
b = five(a, nonopt2=i, opt2=opt)
- if (any(b /= 5)) call abort
+ if (any(b /= 5)) STOP 1
end subroutine do_test
end
type(polar_t), dimension(3) :: b
b = polar_t (2.0,0.5)
b(:) = b(:)/b(1)
- if (any (b .ne. one)) call abort
+ if (any (b .ne. one)) STOP 1
end subroutine test_member
subroutine test_other
type(polar_t), dimension(3) :: b
b = polar_t (3.0,1.0)
c = polar_t (3.0,1.0)
b(:) = b(:)/c(1)
- if (any (b .ne. one)) call abort
+ if (any (b .ne. one)) STOP 2
end subroutine test_other
subroutine test_scalar
type(polar_t), dimension(3) :: b
b = polar_t (4.0,1.5)
c = b(1)
b(:) = b(:)/c
- if (any (b .ne. one)) call abort
+ if (any (b .ne. one)) STOP 3
end subroutine test_scalar
subroutine test_real
real,dimension(3) :: b
b = 2.0
real_one = b(2)/b(1)
b(:) = b(:)/b(1)
- if (any (b .ne. real_one)) call abort
+ if (any (b .ne. real_one)) STOP 4
end subroutine test_real
end program main
integer :: j = 64
character (len = 2) :: chr1 = "lm"
character (len = 1), dimension (2) :: chr2 = ["r", "s"]
- if (any (foo (i, bar()) .ne. ["a", "b"])) call abort ! This would fail
- if (any (foo (i, "xy") .ne. ["x", "y"])) call abort ! OK - not a function
- if (any (foo (i, chr1) .ne. ["l", "m"])) call abort ! ditto
- if (any (foo (i, char (j)) .ne. ["A", "B"])) call abort ! This would fail
- if (any (foo (i, chr2) .ne. ["s", "u"])) call abort ! OK - not a scalar
- if (any (foo (i, bar2()) .ne. ["e", "g"])) call abort ! OK - not a scalar function
+ if (any (foo (i, bar()) .ne. ["a", "b"])) STOP 1! This would fail
+ if (any (foo (i, "xy") .ne. ["x", "y"])) STOP 2! OK - not a function
+ if (any (foo (i, chr1) .ne. ["l", "m"])) STOP 3! ditto
+ if (any (foo (i, char (j)) .ne. ["A", "B"])) STOP 4! This would fail
+ if (any (foo (i, chr2) .ne. ["s", "u"])) STOP 5! OK - not a scalar
+ if (any (foo (i, bar2()) .ne. ["e", "g"])) STOP 6! OK - not a scalar function
contains
elemental character(len = 1) function foo (arg1, arg2)
integer, intent (in) :: arg1
! Check the various combinations of scalar and array.
call foobar (x, y)
- if (any(y.ne.-x)) call abort ()
+ if (any(y.ne.-x)) STOP 1
call foobar (u, y)
- if (any(y.ne.-42.0)) call abort ()
+ if (any(y.ne.-42.0)) STOP 2
call foobar (u, v)
- if (v.ne.-42.0) call abort ()
+ if (v.ne.-42.0) STOP 3
v = 2.0
call foobar (v, x)
- if (any(x /= -2.0)) call abort ()
+ if (any(x /= -2.0)) STOP 4
! Test an expression in the INTENT(IN) argument
x = (/1.0, 2.0/)
call foobar (cos (x) + u, y)
- if (any(abs (y + cos (x) + u) .gt. 4.0e-6)) call abort ()
+ if (any(abs (y + cos (x) + u) .gt. 4.0e-6)) STOP 5
contains
name = 'test'
call ast%assertion_array_character ( name, 5 )
call ast%write (line)
- if (line(2:len (line)) .ne. "testtesttesttesttest") call abort
+ if (line(2:len (line)) .ne. "testtesttesttesttest") STOP 1
end program main
return
end if
pdg_abs = abs (pdg)
- if (lbound(model%field, 1) /= 1) call abort()
- if (ubound(model%field, 1) /= 19) call abort()
+ if (lbound(model%field, 1) /= 1) STOP 1
+ if (ubound(model%field, 1) /= 19) STOP 2
do i = 1, size (model%field)
if (model%field(i)%get_pdg () == pdg_abs) then
ptr => model%field(i)
class(model_data_t), intent(in), target :: model
integer, intent(in) :: i
type(field_data_t), pointer :: ptr
- if (lbound(model%field, 1) /= 1) call abort()
- if (ubound(model%field, 1) /= 19) call abort()
+ if (lbound(model%field, 1) /= 1) STOP 3
+ if (ubound(model%field, 1) /= 19) STOP 4
ptr => model%field(i)
end function model_data_get_field_ptr_index
class(model_data_t), intent(in), target :: model
! Check the field l/ubound at various stages, because w/o the patch
! the bounds get mixed up.
- if (lbound(model%field, 1) /= 1) call abort()
- if (ubound(model%field, 1) /= 19) call abort()
+ if (lbound(model%field, 1) /= 1) STOP 5
+ if (ubound(model%field, 1) /= 19) STOP 6
flv%f = f
flv%field_data => model%get_field_ptr (f, check=.true.)
end subroutine flavor_init0_model
forall (j = 1:2, k = 1:2)
i(j, k) = i_from_itype (x (j, k))
end forall
- if (any(reshape (i, (/4/)).ne.(/1,2,3,4/))) call abort ()
+ if (any(reshape (i, (/4/)).ne.(/1,2,3,4/))) STOP 1
! Check the interface assignment (not part of the patch).
x = reshape ((/(itype (j**2, "b"), j = 1,4)/), (/2,2/))
i = x
- if (any(reshape (i, (/4/)).ne.(/1,4,9,16/))) call abort ()
+ if (any(reshape (i, (/4/)).ne.(/1,4,9,16/))) STOP 2
! Use the interface assignment within a forall block.
x = reshape ((/(itype (j**3, "c"), j = 1,4)/), (/2,2/))
forall (j = 1:2, k = 1:2)
i(j, k) = x (j, k)
end forall
- if (any(reshape (i, (/4/)).ne.(/1,8,27,64/))) call abort ()
+ if (any(reshape (i, (/4/)).ne.(/1,8,27,64/))) STOP 3
end program test_assign
type(mytype) :: z(2, 3)
! The original case - dependency between lhs and rhs.
x = x((/2,3,1,4,5,6/))
- if (any(x%x .ne. (/40, 600, 2, 8000, 100000, 2000000/))) call abort ()
+ if (any(x%x .ne. (/40, 600, 2, 8000, 100000, 2000000/))) STOP 1
! Slightly more elborate case with non-trivial array ref on lhs.
x(4:1:-1) = x((/1,3,2,4/))
- if (any(x%x .ne. (/16000, 1200, 4, 80, 100000, 2000000/))) call abort ()
+ if (any(x%x .ne. (/16000, 1200, 4, 80, 100000, 2000000/))) STOP 2
! Check that no-dependence case works....
y = x
- if (any(y%x .ne. (/32000, 2400, 8, 160, 200000, 4000000/))) call abort ()
+ if (any(y%x .ne. (/32000, 2400, 8, 160, 200000, 4000000/))) STOP 3
! ...and now a case that caused headaches during the preparation of the patch
x(2:5) = x(1:4)
- if (any(x%x .ne. (/16000, 32000, 2400, 8, 160, 2000000/))) call abort ()
+ if (any(x%x .ne. (/16000, 32000, 2400, 8, 160, 2000000/))) STOP 4
! Check offsets are done correctly in multi-dimensional cases
z = reshape (x, (/2,3/))
z(:, 3:2:-1) = z(:, 1:2)
y = reshape (z, (/6/))
- if (any(y%x .ne. (/ 64000, 128000, 19200, 64, 128000, 256000/))) call abort ()
+ if (any(y%x .ne. (/ 64000, 128000, 19200, 64, 128000, 256000/))) STOP 5
end program test
q = 0
call tq_tvgh (q(k_lev:), p(k_lev:))
- if (any (p /= q)) call abort
+ if (any (p /= q)) STOP 1
q = 0
call tq_tvgh (q(k_lev:), (p(k_lev:)))
- if (any (p /= q)) call abort
+ if (any (p /= q)) STOP 2
q = 0
call tq_tvgh (q(k_lev:), (p(p(k_lev:))))
- if (any (p(p) /= q)) call abort
+ if (any (p(p) /= q)) STOP 3
deallocate (q)
str_aux = str
! Compiled but did not give correct result
- if (any (str_cmp((/'aaa','bbb'/), str) .neqv. [.FALSE.,.TRUE.])) call abort
+ if (any (str_cmp((/'aaa','bbb'/), str) .neqv. [.FALSE.,.TRUE.])) STOP 1
! Did not compile
- if (any (str_cmp((/'bbb', 'aaa'/), str_aux) .neqv. [.TRUE.,.FALSE.])) call abort
+ if (any (str_cmp((/'bbb', 'aaa'/), str_aux) .neqv. [.TRUE.,.FALSE.])) STOP 2
! Verify patch
- if (any (str_cmp((/'bbb', 'aaa'/), str3) .neqv. [.FALSE.,.FALSE.])) call abort
- if (any (str_cmp((/'bbb', 'aaa'/), 'aaa') .neqv. [.FALSE.,.TRUE.])) call abort
+ if (any (str_cmp((/'bbb', 'aaa'/), str3) .neqv. [.FALSE.,.FALSE.])) STOP 3
+ if (any (str_cmp((/'bbb', 'aaa'/), 'aaa') .neqv. [.FALSE.,.TRUE.])) STOP 4
end subroutine y
write (io_unit, '(A)') "Line3"
rewind (io_unit)
read (io_unit,'(A)') str
- if (str .ne. "Line1") call abort
+ if (str .ne. "Line1") STOP 1
read (io_unit,'()')
read (io_unit,'(A)') str
- if (str .ne. "Line3") call abort
+ if (str .ne. "Line3") STOP 2
close(unit=io_unit)
end
open(unit=11,status='scratch',form='unformatted')
write(11)data
read(11,end=1000 )data
- call abort()
+ STOP 1
1000 continue
rewind (11)
read(11)data
1001 continue
- if(data.ne.-1) call abort
+ if(data.ne.-1) STOP 1
end
read (10,'(I4)',end=99) j
end do
! should never get here
- call abort
+ STOP 1
99 continue ! end of file
- if (j.ne.10) call abort
+ if (j.ne.10) STOP 2
close(10,status='delete')
end
endfile(8)
rewind(8)
read(8,end=0023)i
- call abort ! should never get here
+ STOP 1! should never get here
stop
0023 continue
close(8,status='delete')
subroutine foo(a, b)
integer a, b
logical, save :: was_foo = .false.
- if ((a .ne. 3) .or. (b .ne. 4)) call abort
+ if ((a .ne. 3) .or. (b .ne. 4)) STOP 1
was_foo = .true.
entry bar(a)
if (was_foo) then
- if ((a .ne. 3) .or. (b .ne. 4)) call abort
+ if ((a .ne. 3) .or. (b .ne. 4)) STOP 2
else
- if (a .ne. 5) call abort
+ if (a .ne. 5) STOP 3
end if
was_foo = .false.
end subroutine
end module
use a
- if (b (1.0) .ne. 1.0) call abort ()
- if (b (1 ) .ne. 2.0) call abort ()
- if (e (1.0) .ne. 3.0) call abort ()
- if (f (1 ) .ne. 4.0) call abort ()
+ if (b (1.0) .ne. 1.0) STOP 1
+ if (b (1 ) .ne. 2.0) STOP 2
+ if (e (1.0) .ne. 3.0) STOP 3
+ if (f (1 ) .ne. 4.0) STOP 4
end
use ksbin1_aux_mod
if (any ((/foo (), bar (99), foobar (), foobar (99), j (), k (99)/) .ne. &
- (/1, 2, 1, 2, 1, 2/))) Call abort ()
+ (/1, 2, 1, 2, 1, 2/))) STOP 1
end
type(z) z1
z1 = x1//y1
- if (abs(z1%x - (19.0_4 + 7.0_4)) > epsilon(x1%x)) call abort ()
+ if (abs(z1%x - (19.0_4 + 7.0_4)) > epsilon(x1%x)) STOP 1
z1 = y1//x1
- if (abs(z1%x - (19.0_4 - 7.0_4)) > epsilon(x1%x)) call abort ()
+ if (abs(z1%x - (19.0_4 - 7.0_4)) > epsilon(x1%x)) STOP 2
z1 = x1==y1
- if (abs(z1%x - 19.0_4/7.0_4) > epsilon(x1%x)) call abort ()
+ if (abs(z1%x - 19.0_4/7.0_4) > epsilon(x1%x)) STOP 3
z1 = y1==x1
- if (abs(z1%x - 19.0_4/7.0_4) > epsilon(x1%x)) call abort ()
+ if (abs(z1%x - 19.0_4/7.0_4) > epsilon(x1%x)) STOP 4
end program test
subroutine test1()
use m1
implicit none
- if(func(3) /= 12) call abort()
- if(abs(ent(7) + 14.0) > tiny(1.0)) call abort()
+ if(func(3) /= 12) STOP 1
+ if(abs(ent(7) + 14.0) > tiny(1.0)) STOP 2
end subroutine test1
subroutine test2()
use m2
implicit none
- if(func(9) /= 72) call abort()
- if(abs(ent(11) + 44.0) > tiny(1.0)) call abort()
+ if(func(9) /= 72) STOP 3
+ if(abs(ent(11) + 44.0) > tiny(1.0)) STOP 4
end subroutine test2
subroutine test3()
use m3
implicit none
- if(func(13) /= 156) call abort()
- if(abs(ent(17) + 102.0) > tiny(1.0)) call abort()
+ if(func(13) /= 156) STOP 5
+ if(abs(ent(17) + 102.0) > tiny(1.0)) STOP 6
end subroutine test3
subroutine test4()
use m4
implicit none
- if(func(23) /= 368) call abort()
- if(abs(ent(27) + 216.0) > tiny(1.0)) call abort()
+ if(func(23) /= 368) STOP 7
+ if(abs(ent(27) + 216.0) > tiny(1.0)) STOP 8
end subroutine test4
end program main
type(cx) :: a = cx (1, 2), c, d
logical :: f
integer :: b = 3
- if (.not.((a + b) .eq. (b + a))) call abort ()
- if (.not.((a + b) .eq. cx (4, 2))) call abort ()
+ if (.not.((a + b) .eq. (b + a))) STOP 1
+ if (.not.((a + b) .eq. cx (4, 2))) STOP 2
end
integer :: a(2)
a = 0
call foo(a)
- if (any (a .ne. (/1, 2/))) call abort
+ if (any (a .ne. (/1, 2/))) STOP 1
call bar(a)
- if (any (a .ne. (/3, 4/))) call abort
+ if (any (a .ne. (/3, 4/))) STOP 2
end program
end function c1
end module foo
use foo
- if (n1(9) .ne. 729) call abort ()
- if (n2(2) .ne. 324) call abort ()
- if (n3(19) .ne. 200564019) call abort ()
- if (c1("lmno") .ne. "lmno") call abort ()
- if (c1("abcd") .ne. "ABCD") call abort ()
- if (c2("lmno") .ne. "lmno") call abort ()
- if (c2("wxyz") .ne. "WXYZ") call abort ()
- if (z1((3,4)) .ne. (-5, 10)) call abort ()
- if (z2((5,6)) .ne. (-9, 38)) call abort ()
+ if (n1(9) .ne. 729) STOP 1
+ if (n2(2) .ne. 324) STOP 2
+ if (n3(19) .ne. 200564019) STOP 3
+ if (c1("lmno") .ne. "lmno") STOP 4
+ if (c1("abcd") .ne. "ABCD") STOP 5
+ if (c2("lmno") .ne. "lmno") STOP 6
+ if (c2("wxyz") .ne. "WXYZ") STOP 7
+ if (z1((3,4)) .ne. (-5, 10)) STOP 8
+ if (z2((5,6)) .ne. (-9, 38)) STOP 9
end
program main
use m1
- if (E1(5) /= -5) call abort()
- if (F2(4) /= -4) call abort()
- if (F1(1) /= -1) call abort()
+ if (E1(5) /= -5) STOP 1
+ if (F2(4) /= -4) STOP 2
+ if (F1(1) /= -1) STOP 3
end program main
real a(10)
a(1) = 999.
call x
- if (j .ne. 1) call abort ()
+ if (j .ne. 1) STOP 1
call y(a,10)
- if (j .ne. 2) call abort ()
+ if (j .ne. 2) STOP 2
stop
end
subroutine x
enumerator :: red, black
enumerator blue
end enum
- if (red /= 0) call abort
+ if (red /= 0) STOP 1
end program main
enumerator :: red, black = 127
enumerator blue
end enum
- if (red /= 0) call abort
- if (black /= 127) call abort
- if (blue /= 128) call abort
+ if (red /= 0) STOP 1
+ if (black /= 127) STOP 2
+ if (blue /= 128) STOP 3
end program main
write (11, '(a)') "Hello"
rewind(11)
read(11, *) s
- if (s .ne. "Hello") call abort
+ if (s .ne. "Hello") STOP 1
read(11, '(a5)', end=10) s
- call abort
+ STOP 2
10 continue
close (11)
end
open (11, status="SCRATCH")
ierr = 0
read (11, *, end=10, iostat=ierr) i
- call abort
+ STOP 1
10 continue
- if (ierr .ge. 0) call abort
+ if (ierr .ge. 0) STOP 2
end program
! Test character kind
open(99, file="test.dat")
read (99,*, iostat=stat) cvar
-if (stat /= 0 .or. cvar /= "1") call abort()
+if (stat /= 0 .or. cvar /= "1") STOP 1
read (99,*, iostat=stat) cvar
-if (stat /= 0 .or. cvar /= "2") call abort()
+if (stat /= 0 .or. cvar /= "2") STOP 2
read (99,*, iostat=stat) cvar ! << FAILS: stat /= 0
-if (stat /= 0 .or. cvar /= "3") call abort() ! << aborts here
+if (stat /= 0 .or. cvar /= "3") STOP 3 ! << aborts here
! Test real kind
rewind(99)
read (99,*, iostat=stat) var
-if (stat /= 0 .or. var /= 1.0) call abort()
+if (stat /= 0 .or. var /= 1.0) STOP 4
read (99,*, iostat=stat) var
-if (stat /= 0 .or. var /= 2.0) call abort()
+if (stat /= 0 .or. var /= 2.0) STOP 5
read (99,*, iostat=stat) var ! << FAILS: stat /= 0
-if (stat /= 0 .or. var /= 3.0) call abort()
+if (stat /= 0 .or. var /= 3.0) STOP 6
close(99, status="delete")
! Test real kind with exponents
open(99, file="test.dat")
read (99,*, iostat=stat) var
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 7
read (99,*, iostat=stat) var
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 8
read (99,*) var ! << FAILS: stat /= 0
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 9
close(99, status="delete")
! Test logical kind
open(99, file="test.dat")
read (99,*, iostat=stat) lvar
-if (stat /= 0 .or. (.not.lvar)) call abort()
+if (stat /= 0 .or. (.not.lvar)) STOP 10
read (99,*, iostat=stat) lvar
-if (stat /= 0 .or. lvar) call abort()
+if (stat /= 0 .or. lvar) STOP 11
read (99,*) lvar ! << FAILS: stat /= 0
-if (stat /= 0 .or. (.not.lvar)) call abort()
+if (stat /= 0 .or. (.not.lvar)) STOP 12
close(99, status="delete")
! Test combinations of Inf and Nan
open(99, file="test.dat")
read (99,*, iostat=stat) var
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 13
read (99,*, iostat=stat) var
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 14
read (99,*) var ! << FAILS: stat /= 0
-if (stat /= 0) call abort ! << aborts here
+if (stat /= 0) STOP 1! << aborts here
close(99, status="delete")
open(99, file="test.dat", access="stream", form="unformatted", status="new")
open(99, file="test.dat")
read (99,*, iostat=stat) var
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 15
read (99,*, iostat=stat) var
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 16
read (99,*) var ! << FAILS: stat /= 0
-if (stat /= 0) call abort ! << aborts here
+if (stat /= 0) STOP 2! << aborts here
close(99, status="delete")
open(99, file="test.dat", access="stream", form="unformatted", status="new")
open(99, file="test.dat")
read (99,*, iostat=stat) var
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 17
read (99,*, iostat=stat) var
-if (stat /= 0) call abort()
+if (stat /= 0) STOP 18
read (99,*) var ! << FAILS: stat /= 0
-if (stat /= 0) call abort ! << aborts here
+if (stat /= 0) STOP 3! << aborts here
close(99, status="delete")
! Test complex kind
open(99, file="test.dat")
read (99,*, iostat=stat) cval
-if (stat /= 0 .or. cval /= cmplx(1,2)) call abort()
+if (stat /= 0 .or. cval /= cmplx(1,2)) STOP 19
read (99,*, iostat=stat) cval
-if (stat /= 0 .or. cval /= cmplx(2,3)) call abort()
+if (stat /= 0 .or. cval /= cmplx(2,3)) STOP 20
read (99,*, iostat=stat) cval ! << FAILS: stat /= 0, value is okay
-if (stat /= 0 .or. cval /= cmplx(4,5)) call abort()
+if (stat /= 0 .or. cval /= cmplx(4,5)) STOP 21
close(99, status="delete")
end
real :: a1, a2, a3, a4
read(inp2,*,iostat=ios) a1, a2, a3, a4
- if (ios /= 0) call abort ()
+ if (ios /= 0) STOP 1
read(inp,*,iostat=ios) a1, a2, a3, a4
- if (ios == 0) call abort ()
+ if (ios == 0) STOP 2
! write(*,*) 'IOSTAT=',ios
end program iotest
i = 42
j = 42
read(77,'(/2i2)') i,j
- if (i /= 0 .or. j /= 0) call abort
+ if (i /= 0 .or. j /= 0) STOP 1
close(77)
end program main
rewind(77)
read(77,'(10A1)'), c1 ! { dg-warning "Comma before i/o item list" }
read(77,'(10A1)'), c2 ! { dg-warning "Comma before i/o item list" }
- if (c1(1) /= 'L' .or. c2(1) /= 'L') call abort
+ if (c1(1) /= 'L' .or. c2(1) /= 'L') STOP 1
close(77)
end program main
write (77,'(A)') '123','456'
rewind(77)
read(77,'(2I2)',advance='no',eor=100) i1,i2
- call abort
+ STOP 1
100 continue
- if (i1 /= 12 .or. i2 /= 3) call abort
+ if (i1 /= 12 .or. i2 /= 3) STOP 2
close(77)
end program main
read(5,'(80a1)') a
if (a(1) == 's') goto 100
end do
- call abort
+ STOP 1
100 continue
end program main
integer :: k,k2
character(len=*), parameter :: f="(a)"
open(11,status="scratch", iostat=k)
- if (k /= 0) call abort
+ if (k /= 0) STOP 1
write(11,f) "x"
rewind (11)
read(11, f, advance="no", iostat=k) c
- if (k /= 0) call abort
+ if (k /= 0) STOP 2
read(11, f, advance="no", iostat=k) c
- if (k >= 0) call abort
+ if (k >= 0) STOP 3
read(11, f, advance="no", iostat=k2) c
- if (k2 >= 0 .or. k == k2) call abort
+ if (k2 >= 0 .or. k == k2) STOP 4
end program fc002
call eoshift_0 (a, shift=shift, dim=dim, res=c)
if (any (b /= c)) then
print *,"dim = ", dim, "shift = ", shift
- call abort
+ STOP 1
end if
end do
end do
do shift=-shift_lim, shift_lim
b(1:n1:2,:,:) = eoshift(a(1:n1/2,:,:),shift,dim=dim)
call eoshift_0 (a(1:n1/2,:,:), shift=shift, dim=dim, res=c(1:n1:2,:,:))
- if (any (b /= c)) call abort
+ if (any (b /= c)) STOP 2
end do
end do
print *,"dim = ", dim, "shift = ", shift
print *,b
print *,c
- call abort
+ STOP 1
end if
a2 = 42.
a2(1:2*n1:2,:,:) = a
b = eoshift(a2(1:2*n1:2,:,:), shift, dim=dim, boundary=bp)
if (any (b /= c)) then
- call abort
+ STOP 2
end if
c2 = 43.
c2(1:2*n1:2,:,:) = eoshift(a,shift,dim=dim, boundary=bp)
if (any(c2(1:2*n1:2,:,:) /= c)) then
- call abort
+ STOP 3
end if
if (any(c2(2:2*n1:2,:,:) /= 43)) then
- call abort
+ STOP 4
end if
end do
end do
print *,"sp = ", sp
print '(99F8.4)',b
print '(99F8.4)',c
- call abort
+ STOP 1
end if
a2 = 42.
a2(1:2*n1:2,:,:) = a
b = eoshift(a2(1:2*n1:2,:,:), shift=sp, dim=dim, boundary=-0.5)
if (any(b /= c)) then
- call abort
+ STOP 2
end if
c2 = 43.
c2(1:2*n1:2,:,:) = eoshift(a, shift=sp, dim=dim, boundary=-0.5)
if (any(c2(1:2*n1:2,:,:) /= c)) then
- call abort
+ STOP 3
end if
if (any(c2(2:2*n1:2,:,:) /= 43.)) then
- call abort
+ STOP 4
end if
end do
end program main
b = eoshift(a,shift=sp,dim=dim,boundary=bp)
call eoshift_3 (a, shift=sp, dim=dim, boundary=bp,res=c)
if (any (b /= c)) then
- call abort
+ STOP 1
end if
a2 = 42.
a2(1:2*n1:2,:,:) = a
b = eoshift(a2(1:2*n1:2,:,:), shift=sp, dim=dim, boundary=bp)
if (any(b /= c)) then
- call abort
+ STOP 2
end if
c2 = 43.
c2(1:2*n1:2,:,:) = eoshift(a, shift=sp, dim=dim, boundary=bp)
if (any(c2(1:2*n1:2,:,:) /= c)) then
- call abort
+ STOP 3
end if
if (any(c2(2:2*n1:2,:,:) /= 43.)) then
- call abort
+ STOP 4
end if
end do
end program main
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = eoshift (a, 1_k, 99_k, 1_k)
if (any (a .ne. reshape ((/2_k, 3_k, 99_k, 5_k, 6_k, 99_k, 8_k, 9_k, 99_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 1
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = eoshift (a, 9999_k, 99_k, 1_k)
- if (any (a .ne. 99_k)) call abort
+ if (any (a .ne. 99_k)) STOP 2
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = eoshift (a, -2_k, dim = 2_k)
if (any (a .ne. reshape ((/0_k, 0_k, 0_k, 0_k, 0_k, 0_k, 1_k, 2_k, 3_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 3
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = eoshift (a, -9999_k, 99_k, 1_k)
- if (any (a .ne. 99_k)) call abort
+ if (any (a .ne. 99_k)) STOP 4
! Array shift and scalar bound.
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = eoshift (a, (/1_k, 0_k, -1_k/), 99_k, 1_k)
if (any (a .ne. reshape ((/2_k, 3_k, 99_k, 4_k, 5_k, 6_k, 99_k, 7_k, 8_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 5
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = eoshift (a, (/9999_k, 0_k, -9999_k/), 99_k, 1_k)
if (any (a .ne. reshape ((/99_k, 99_k, 99_k, 4_k, 5_k, 6_k, 99_k, 99_k, 99_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 6
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = eoshift (a, (/2_k, -2_k, 0_k/), dim = 2_k)
if (any (a .ne. reshape ((/7_k, 0_k, 3_k, 0_k, 0_k, 6_k, 0_k, 2_k, 9_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 7
! Scalar shift and array bound.
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = eoshift (a, 1_k, (/99_k, -1_k, 42_k/), 1_k)
if (any (a .ne. reshape ((/2_k, 3_k, 99_k, 5_k, 6_k, -1_k, 8_k, 9_k, 42_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 8
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = eoshift (a, 9999_k, (/99_k, -1_k, 42_k/), 1_k)
if (any (a .ne. reshape ((/99_k, 99_k, 99_k, -1_k, -1_k, -1_k, 42_k, 42_k, 42_k/), &
- (/3_k, 3_k/)))) call abort
+ (/3_k, 3_k/)))) STOP 9
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = eoshift (a, -9999_k, (/99_k, -1_k, 42_k/), 1_k)
if (any (a .ne. reshape ((/99_k, 99_k, 99_k, -1_k, -1_k, -1_k, 42_k, 42_k, 42_k/), &
- (/3_k, 3_k/)))) call abort
+ (/3_k, 3_k/)))) STOP 10
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = eoshift (a, -2_k, (/99_k, -1_k, 42_k/), 2_k)
if (any (a .ne. reshape ((/99_k, -1_k, 42_k, 99_k, -1_k, 42_k, 1_k, 2_k, 3_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 11
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
bo = (/99_k, -1_k, 42_k/)
a = eoshift (a, -2_k, bo, 2_k)
if (any (a .ne. reshape ((/99_k, -1_k, 42_k, 99_k, -1_k, 42_k, 1_k, 2_k, 3_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 12
! Array shift and array bound.
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = eoshift (a, (/1_k, 0_k, -1_k/), (/99_k, -1_k, 42_k/), 1_k)
if (any (a .ne. reshape ((/2_k, 3_k, 99_k, 4_k, 5_k, 6_k, 42_k, 7_k, 8_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 13
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = eoshift (a, (/2_k, -2_k, 0_k/), (/99_k, -1_k, 42_k/), 2_k)
if (any (a .ne. reshape ((/7_k, -1_k, 3_k, 99_k, -1_k, 6_k, 99_k, 2_k, 9_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 14
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
sh = (/ 3_k, -1_k, -3_k /)
bo = (/-999_k, -99_k, -9_k /)
a = eoshift(a, shift=sh, boundary=bo)
if (any (a .ne. reshape ((/ -999_k, -999_k, -999_k, -99_k, 4_k, 5_k, -9_k, -9_k, -9_k /), &
- shape(a)))) call abort
+ shape(a)))) STOP 15
a = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
a = eoshift (a, (/9999_k, -9999_k, 0_k/), (/99_k, -1_k, 42_k/), 2_k)
if (any (a .ne. reshape ((/99_k, -1_k, 3_k, 99_k, -1_k, 6_k, 99_k, -1_k, 9_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 16
! Test arrays > rank 2
b(:, :, 1_k) = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
b(:, :, 2_k) = 10_k + reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k, 7_k, 8_k, 9_k/), (/3_k, 3_k/))
b = eoshift (b, 1_k, 99_k, 1_k)
if (any (b(:, :, 1_k) .ne. reshape ((/2_k, 3_k, 99_k, 5_k, 6_k, 99_k, 8_k, 9_k, 99_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 17
if (any (b(:, :, 2_k) .ne. reshape ((/12_k, 13_k, 99_k, 15_k, 16_k, 99_k, 18_k, 19_k, 99_k/), (/3_k, 3_k/)))) &
- call abort
+ STOP 18
! TODO: Test array sections
end program
call set_array_listpr (listpr)
call set_array_lisbit (lisbit)
- if (any (listpr.ne.lischk)) call abort ()
+ if (any (listpr.ne.lischk)) STOP 1
call sub1
call sub2
call sub3
(listpr(10),lispat(1))
call set_array_listpr (listpr)
call set_array_lisbit (lisbit)
- if (any (listpr .ne. lischk)) call abort ()
+ if (any (listpr .ne. lischk)) STOP 2
end
!
! Equivalences not in COMMON
(mwkx(10),lisbit(1),listpr(10))
call set_array_listpr (listpr)
call set_array_lisbit (lisbit)
- if (any (listpr .ne. lischk)) call abort ()
+ if (any (listpr .ne. lischk)) STOP 3
end
! This gave correct results because the order in which the
! equivalences are taken is different and was given in the PR.
(lispat(1),listpr(10))
call set_array_listpr (listpr)
call set_array_lisbit (lisbit)
- if (any (listpr .ne. lischk)) call abort ()
+ if (any (listpr .ne. lischk)) STOP 4
end
subroutine set_array_listpr (listpr)
! Thanks Dominique d'Humieres:)
!
if (bigendian) then
- if (d1mach_little (1) .ne. transfer ((/0_4, 1048576_4/), 1d0)) call abort ()
- if (d1mach_little (2) .ne. transfer ((/-1_4,2146435071_4/), 1d0)) call abort ()
+ if (d1mach_little (1) .ne. transfer ((/0_4, 1048576_4/), 1d0)) STOP 1
+ if (d1mach_little (2) .ne. transfer ((/-1_4,2146435071_4/), 1d0)) STOP 2
else
- if (d1mach_big (1) .ne. transfer ((/1048576_4, 0_4/), 1d0)) call abort ()
- if (d1mach_big (2) .ne. transfer ((/2146435071_4,-1_4/), 1d0)) call abort ()
+ if (d1mach_big (1) .ne. transfer ((/1048576_4, 0_4/), 1d0)) STOP 3
+ if (d1mach_big (2) .ne. transfer ((/2146435071_4,-1_4/), 1d0)) STOP 4
end if
!
contains
equivalence (b,a(3))
data b/3/
data (a(i), i=1,2) /1,2/, a(4) /4/
- if (any (a .ne. (/1, 2, 3, 4/))) call abort ()
+ if (any (a .ne. (/1, 2, 3, 4/))) STOP 5
end subroutine int4_int4
subroutine real4_real4
real(4) a(4)
data (a(i), i=1,2) /1.0_4, 2.0_4/, &
a(4) /4.0_4/
if (sum (abs (a - &
- (/1.0_4, 2.0_4, 3.0_4, 4.0_4/))) > 1.0e-6) call abort ()
+ (/1.0_4, 2.0_4, 3.0_4, 4.0_4/))) > 1.0e-6) STOP 6
end subroutine real4_real4
subroutine complex_real
complex(4) a(4)
data (a(i), i=1,2) /(0.0_4, 1.0_4),(2.0_4,0.0_4)/, &
a(4) /(0.0_4,5.0_4)/
if (sum (abs (a - (/(0.0_4, 1.0_4),(2.0_4, 0.0_4), &
- (3.0_4, 4.0_4),(0.0_4, 5.0_4)/))) > 1.0e-6) call abort ()
+ (3.0_4, 4.0_4),(0.0_4, 5.0_4)/))) > 1.0e-6) STOP 7
end subroutine complex_real
subroutine check_block_data
common /global/ ca (4)
equivalence (ca(3), cb)
integer(4) ca
- if (any (ca .ne. (/42, 43, 99, 44/))) call abort ()
+ if (any (ca .ne. (/42, 43, 99, 44/))) STOP 8
end subroutine check_block_data
function d1mach_little(i) result(d1mach)
implicit none
TYPE(T1) :: a1
TYPE(T2) :: a2
EQUIVALENCE(a1,a2) ! { dg-warning="mixed|components" }
- if (a1%chr .ne. "wxy") call abort ()
- if (a1%i .ne. 1) call abort ()
- if (a1%j .ne. 4) call abort ()
+ if (a1%chr .ne. "wxy") STOP 9
+ if (a1%i .ne. 1) STOP 10
+ if (a1%j .ne. 4) STOP 11
end subroutine derived_types
end
subroutine another()
use constant, only : x2
implicit none
- if (x2 /= 2) call abort
+ if (x2 /= 2) STOP 1
end subroutine
INTEGER :: J = 7
TYPE(data_type) :: dd
EQUIVALENCE(dd,J)
-if (dd%i.ne.7) call abort ()
+if (dd%i.ne.7) STOP 1
END
subroutine check_r4 (a, b)
real(kind=4), intent(in) :: a, b
- if (abs(a - b) > 10 * spacing(a)) call abort
+ if (abs(a - b) > 10 * spacing(a)) STOP 1
end subroutine
subroutine check_r8 (a, b)
real(kind=8), intent(in) :: a, b
- if (abs(a - b) > 10 * spacing(a)) call abort
+ if (abs(a - b) > 10 * spacing(a)) STOP 2
end subroutine
end program test
subroutine check (a, b)
real(kind=qp), intent(in) :: a, b
print *, abs(a-b) / spacing(a)
- if (abs(a - b) > 10 * spacing(a)) call abort
+ if (abs(a - b) > 10 * spacing(a)) STOP 1
end subroutine
end program test
contains
subroutine check_r4 (a, b)
real(kind=4), intent(in) :: a, b
- if (abs(a - b) > 1.e-5 * abs(b)) call abort
+ if (abs(a - b) > 1.e-5 * abs(b)) STOP 1
end subroutine
subroutine check_r8 (a, b)
real(kind=8), intent(in) :: a, b
- if (abs(a - b) > 1.e-7 * abs(b)) call abort
+ if (abs(a - b) > 1.e-7 * abs(b)) STOP 2
end subroutine
end program test
integer :: i
write (c, fmt, iostat=i) 42
! print *, i
- if (i==0) call abort()
+ if (i==0) STOP 1
write (c, fmt, err=100) 42
- call abort()
+ STOP 2
100 continue
end subroutine
read(10,'(T7,2F9.3)', iostat=ii, end=666) x,y
end do
666 continue
- if (i /= 12) call abort
- if (x /= 379.76901 .and. y /= 231.22600) call abort
+ if (i /= 12) STOP 1
+ if (x /= 379.76901 .and. y /= 231.22600) STOP 2
close(10)
end program pr34411
! This should fail, set CMDSTAT to nonzero value, and an error message
! in CMDMSG.
call execute_command_line ("/nosuchfile", exitstat=s, cmdstat=c, cmdmsg=msg)
- if (c == 0) call abort
- if (len_trim(msg) == 0) call abort
+ if (c == 0) STOP 1
+ if (len_trim(msg) == 0) STOP 2
end
msg='' ! seems to only be defined if exitstatus.ne.0
! ok -- these work
call execute_command_line(command , wait=.false., exitstat=i, cmdstat=j, cmdmsg=msg)
- if (j /= 0 .or. msg /= '') call abort
+ if (j /= 0 .or. msg /= '') STOP 1
call execute_command_line(command , exitstat=i, cmdstat=j, cmdmsg=msg )
- if (j /= 3 .or. msg /= "Invalid command line" ) call abort
+ if (j /= 3 .or. msg /= "Invalid command line" ) STOP 2
msg = ''
call execute_command_line(command , wait=.false., exitstat=i, cmdmsg=msg )
- if (j /= 3) call abort
+ if (j /= 3) STOP 3
call execute_command_line(command , wait=.false., exitstat=i )
- if (msg /= '') call abort
+ if (msg /= '') STOP 4
call execute_command_line(command , exitstat=i, cmdstat=j )
end program boom
! { dg-do run }
-! { dg-options "-std=f2008 -fall-intrinsics" }
+! { dg-options "-std=f2008 " }
! PR fortran/44709
! Check that exit and cycle from within a BLOCK works for loops as expected.
BLOCK
EXIT
END BLOCK
- CALL abort ()
+ STOP 1
END DO
! Cycle without loop name.
BLOCK
CYCLE
END BLOCK
- CALL abort ()
+ STOP 2
END DO
! Exit loop by name from within a BLOCK.
BLOCK
EXIT loop1
END BLOCK
- CALL abort ()
+ STOP 3
END DO
- CALL abort ()
+ STOP 4
END DO loop1
! Cycle loop by name from within a BLOCK.
BLOCK
CYCLE loop2
END BLOCK
- CALL abort ()
+ STOP 5
END DO loop3
- CALL abort ()
+ STOP 6
END DO loop2
END PROGRAM main
! { dg-do run }
-! { dg-options "-std=f2008 -fall-intrinsics" }
+! { dg-options "-std=f2008 " }
! PR fortran/44602
! Check for correct behavior of EXIT / CYCLE combined with non-loop
i = 2
myif: IF (i == 1) THEN
- CALL abort ()
+ STOP 1
EXIT myif
ELSE IF (i == 2) THEN
EXIT myif
- CALL abort ()
+ STOP 2
ELSE
- CALL abort ()
+ STOP 3
EXIT myif
END IF myif
mysel: SELECT CASE (i)
CASE (1)
- CALL abort ()
+ STOP 4
EXIT mysel
CASE (2)
EXIT mysel
- CALL abort ()
+ STOP 5
CASE DEFAULT
- CALL abort ()
+ STOP 6
EXIT mysel
END SELECT mysel
mycharsel: SELECT CASE ("foobar")
CASE ("abc")
- CALL abort ()
+ STOP 7
EXIT mycharsel
CASE ("xyz")
- CALL abort ()
+ STOP 8
EXIT mycharsel
CASE DEFAULT
EXIT mycharsel
- CALL abort ()
+ STOP 9
END SELECT mycharsel
myblock: BLOCK
EXIT myblock
- CALL abort ()
+ STOP 10
END BLOCK myblock
myassoc: ASSOCIATE (x => 5 + 2)
EXIT myassoc
- CALL abort ()
+ STOP 11
END ASSOCIATE myassoc
ALLOCATE (t :: var)
mytypesel: SELECT TYPE (var)
TYPE IS (t)
EXIT mytypesel
- CALL abort ()
+ STOP 12
CLASS DEFAULT
- CALL abort ()
+ STOP 13
EXIT mytypesel
END SELECT mytypesel
outer: BLOCK
inner: IF (.TRUE.) THEN
EXIT outer
- CALL abort ()
+ STOP 14
END IF inner
- CALL abort ()
+ STOP 15
END BLOCK outer
END PROGRAM main
real, parameter :: one = 1.0
real :: a = one
- if (fraction(a) /= 0.5) call abort
- if (fraction(one) /= 0.5) call abort
- if (fraction(1.0) /= 0.5) call abort
+ if (fraction(a) /= 0.5) STOP 1
+ if (fraction(one) /= 0.5) STOP 2
+ if (fraction(1.0) /= 0.5) STOP 3
- if (exponent(a) /= 1.0) call abort
- if (exponent(one) /= 1.0) call abort
- if (exponent (1.0) /= 1.0) call abort
+ if (exponent(a) /= 1.0) STOP 4
+ if (exponent(one) /= 1.0) STOP 5
+ if (exponent (1.0) /= 1.0) STOP 6
- if (scale(fraction(a), exponent(a)) / a /= 1.) call abort
- if (scale(fraction(one), exponent(one)) / one /= 1.) call abort
- if (scale(fraction(1.0), exponent(1.0)) / 1.0 /= 1.) call abort
+ if (scale(fraction(a), exponent(a)) / a /= 1.) STOP 7
+ if (scale(fraction(one), exponent(one)) / one /= 1.) STOP 8
+ if (scale(fraction(1.0), exponent(1.0)) / 1.0 /= 1.) STOP 9
end program gfcbug36
integer i
real x
x = 3.0
-if (2 /= exponent(x)) call abort
+if (2 /= exponent(x)) STOP 1
i = exponent (x)
-if (i /= 2) call abort
+if (i /= 2) STOP 2
end
a1 = c1 > c2;
call setval(c1, c2)
a2 = c1 > c2
- if (a1 .neqv. a2) call abort
+ if (a1 .neqv. a2) STOP 1
end
subroutine setval(c1, c2)
recruit => entry ("John Smith", 123456, 1, "Bog Hill High School", &
99, "Records", supervisor)
- if (trim (recruit%name) /= "John Smith") call abort
- if (recruit%name /= recruit%service%name) call abort
- if (recruit%supervisor%ss /= 123455) call abort
- if (recruit%supervisor%ss /= supervisor%person%ss) call abort
+ if (trim (recruit%name) /= "John Smith") STOP 1
+ if (recruit%name /= recruit%service%name) STOP 2
+ if (recruit%supervisor%ss /= 123455) STOP 3
+ if (recruit%supervisor%ss /= supervisor%person%ss) STOP 4
deallocate (supervisor)
deallocate (recruit)
\r
type(Grandchild), parameter :: object = Grandchild(23, 42, -99)\r
\r
- if (object%member1 /= 23) call abort\r
- if (object%member2 /= 42) call abort\r
- if (object%member3 /= -99) call abort\r
+ if (object%member1 /= 23) STOP 1
+ if (object%member2 /= 42) STOP 1
+ if (object%member3 /= -99) STOP 1
\r
end\r
recruit => entry ("John Smith", 123456, 1, "Bog Hill High School", &
99, "Records", supervisor)
- if (trim (recruit%name) /= "John Smith") call abort
- if (recruit%name /= recruit%service%name) call abort
- if (recruit%supervisor%ss /= 123455) call abort
- if (recruit%supervisor%ss /= supervisor%person%ss) call abort
+ if (trim (recruit%name) /= "John Smith") STOP 1
+ if (recruit%name /= recruit%service%name) STOP 2
+ if (recruit%supervisor%ss /= 123455) STOP 3
+ if (recruit%supervisor%ss /= supervisor%person%ss) STOP 4
deallocate (supervisor)
deallocate (recruit)
recruit => entry ("John Smith", 123456, 1, "Bog Hill High School", &
99, "Records", supervisor)
- if (supervisor%ss /= 123455) call abort
- if (trim (supervisor%name) /= "Joe Honcho") call abort
- if (trim (supervisor%institution) /= "") call abort
- if (supervisor%attainment /= 0) call abort
+ if (supervisor%ss /= 123455) STOP 1
+ if (trim (supervisor%name) /= "Joe Honcho") STOP 2
+ if (trim (supervisor%institution) /= "") STOP 3
+ if (supervisor%attainment /= 0) STOP 4
- if (trim (recruit%name) /= "John Smith") call abort
- if (recruit%name /= recruit%service%name) call abort
- if (recruit%supervisor%ss /= 123455) call abort
- if (recruit%supervisor%ss /= supervisor%person%ss) call abort
+ if (trim (recruit%name) /= "John Smith") STOP 5
+ if (recruit%name /= recruit%service%name) STOP 6
+ if (recruit%supervisor%ss /= 123455) STOP 7
+ if (recruit%supervisor%ss /= supervisor%person%ss) STOP 8
deallocate (supervisor)
deallocate (recruit)
end function
subroutine check_b (arg)
type(b) :: arg
- if (any (arg%x /= [10.0, 20.0])) call abort
- if (arg%i /= 1) call abort
+ if (any (arg%x /= [10.0, 20.0])) STOP 1
+ if (arg%i /= 1) STOP 2
end subroutine
end module mymod
type(d) :: q
p = f (x = [1.0, 2.0], if = 3)
- if (any (p%e%x /= [1.0, 2.0])) call abort
+ if (any (p%e%x /= [1.0, 2.0])) STOP 3
q%b = set_b ()
call check_b (q%b)
c2 => y
z%cc => y
- if (.not. extends_type_of (c1, c1)) call abort()
- if ( extends_type_of (c1, c2)) call abort()
- if (.not. extends_type_of (c2, c1)) call abort()
+ if (.not. extends_type_of (c1, c1)) STOP 1
+ if ( extends_type_of (c1, c2)) STOP 2
+ if (.not. extends_type_of (c2, c1)) STOP 3
- if (.not. extends_type_of (x, x)) call abort()
- if ( extends_type_of (x, y)) call abort()
- if (.not. extends_type_of (y, x)) call abort()
+ if (.not. extends_type_of (x, x)) STOP 4
+ if ( extends_type_of (x, y)) STOP 5
+ if (.not. extends_type_of (y, x)) STOP 6
- if (.not. extends_type_of (c1, x)) call abort()
- if ( extends_type_of (c1, y)) call abort()
- if (.not. extends_type_of (x, c1)) call abort()
- if (.not. extends_type_of (y, c1)) call abort()
+ if (.not. extends_type_of (c1, x)) STOP 7
+ if ( extends_type_of (c1, y)) STOP 8
+ if (.not. extends_type_of (x, c1)) STOP 9
+ if (.not. extends_type_of (y, c1)) STOP 10
- if (.not. extends_type_of (z, c1)) call abort()
- if ( extends_type_of (z%cc, z)) call abort()
+ if (.not. extends_type_of (z, c1)) STOP 11
+ if ( extends_type_of (z%cc, z)) STOP 12
end
b1 => NULL()
b11 => NULL()
-if (.not. extends_type_of(b1 , a1)) call abort()
-if (.not. extends_type_of(b11, a1)) call abort()
-if (.not. extends_type_of(b11,a11)) call abort()
+if (.not. extends_type_of(b1 , a1)) STOP 1
+if (.not. extends_type_of(b11, a1)) STOP 2
+if (.not. extends_type_of(b11,a11)) STOP 3
b1 => a1
b11 => a11
-if (.not. extends_type_of(b1 , a1)) call abort()
-if (.not. extends_type_of(b11, a1)) call abort()
-if (.not. extends_type_of(b11,a11)) call abort()
+if (.not. extends_type_of(b1 , a1)) STOP 4
+if (.not. extends_type_of(b11, a1)) STOP 5
+if (.not. extends_type_of(b11,a11)) STOP 6
end
if (same_type_as(b1,b1) .neqv. .true.) call should_not_exist()
! Not (trivially) compile-time simplifiable:
-if (same_type_as(b1,a1) .neqv. .true.) call abort()
-if (same_type_as(b1,a11) .neqv. .false.) call abort()
+if (same_type_as(b1,a1) .neqv. .true.) STOP 1
+if (same_type_as(b1,a11) .neqv. .false.) STOP 2
allocate(t1 :: b1)
-if (same_type_as(b1,a1) .neqv. .true.) call abort()
-if (same_type_as(b1,a11) .neqv. .false.) call abort()
+if (same_type_as(b1,a1) .neqv. .true.) STOP 3
+if (same_type_as(b1,a11) .neqv. .false.) STOP 4
deallocate(b1)
allocate(t11 :: b1)
-if (same_type_as(b1,a1) .neqv. .false.) call abort()
-if (same_type_as(b1,a11) .neqv. .true.) call abort()
+if (same_type_as(b1,a1) .neqv. .false.) STOP 5
+if (same_type_as(b1,a11) .neqv. .true.) STOP 6
deallocate(b1)
! Special case, simplified at tree folding:
-if (extends_type_of(b1,b1) .neqv. .true.) call abort()
+if (extends_type_of(b1,b1) .neqv. .true.) STOP 7
! All other possibilities are not compile-time checkable
-if (extends_type_of(b11,b1) .neqv. .true.) call abort()
-if (extends_type_of(b1,b11) .neqv. .false.) call abort()
-if (extends_type_of(a11,b11) .neqv. .true.) call abort()
+if (extends_type_of(b11,b1) .neqv. .true.) STOP 8
+if (extends_type_of(b1,b11) .neqv. .false.) STOP 9
+if (extends_type_of(a11,b11) .neqv. .true.) STOP 10
allocate(t11 :: b11)
-if (extends_type_of(a11,b11) .neqv. .true.) call abort()
+if (extends_type_of(a11,b11) .neqv. .true.) STOP 11
deallocate(b11)
allocate(t111 :: b11)
-if (extends_type_of(a11,b11) .neqv. .false.) call abort()
+if (extends_type_of(a11,b11) .neqv. .false.) STOP 12
deallocate(b11)
allocate(t11 :: b1)
-if (extends_type_of(a11,b1) .neqv. .true.) call abort()
+if (extends_type_of(a11,b1) .neqv. .true.) STOP 13
deallocate(b1)
allocate(t11::b1)
-if (extends_type_of(b1,a11) .neqv. .true.) call abort()
+if (extends_type_of(b1,a11) .neqv. .true.) STOP 14
deallocate(b1)
allocate(b1,source=a11)
-if (extends_type_of(b1,a11) .neqv. .true.) call abort()
+if (extends_type_of(b1,a11) .neqv. .true.) STOP 15
deallocate(b1)
allocate( b1,source=a1)
-if (extends_type_of(b1,a11) .neqv. .false.) call abort()
+if (extends_type_of(b1,a11) .neqv. .false.) STOP 16
deallocate(b1)
end
-! { dg-final { scan-tree-dump-times "abort" 16 "original" } }
+! { dg-final { scan-tree-dump-times "stop_numeric" 16 "original" } }
! { dg-final { scan-tree-dump-times "should_not_exist" 0 "original" } }
common // chr
character(8) :: chr
call foo (foobar1)
- if (chr .ne. "foobar1") call abort ()
+ if (chr .ne. "foobar1") STOP 1
call foo (foobar2)
- if (chr .ne. "foobar2") call abort ()
+ if (chr .ne. "foobar2") STOP 2
end
& pending=vpending, asynchronous=sasynchronous, decimal=sdecimal, &
& encoding=sencoding)
-if (ssign.ne."PLUS") call abort
-if (sasynchronous.ne."YES") call abort
-if (sdecimal.ne."COMMA") call abort
-if (sencoding.ne."UTF-8") call abort
-if (vpending) call abort
+if (ssign.ne."PLUS") STOP 1
+if (sasynchronous.ne."YES") STOP 2
+if (sdecimal.ne."COMMA") STOP 3
+if (sencoding.ne."UTF-8") STOP 4
+if (vpending) STOP 5
close(10, status="delete")
end
write(10,'(10f8.3)', asynchronous="yes", decimal="comma", id=j) a
rewind(10)
read(10,'(10f8.3)', asynchronous="yes", decimal="comma", blank="zero") b
-if (any(b.ne.23.45)) call abort
+if (any(b.ne.23.45)) STOP 1
c = 3.14
write(msg, *, decimal="comma") c
-if (msg(1:7).ne." 3,14") call abort
+if (msg(1:7).ne." 3,14") STOP 2
b = 0.0
rewind(10)
write(10,'(10f8.3)', asynchronous="yes", decimal="point") a
rewind(10)
read(10,'(10f8.3)', asynchronous="yes", decimal="point") b
-if (any(b.ne.23.45)) call abort
+if (any(b.ne.23.45)) STOP 3
wait(unit=10, err=25, iostat=istat, iomsg=msg, end=35, id=j)
a = 0.0
rewind(99)
read(99,'(10f8.3)') a
-if (any(a.ne.43.21)) call abort
+if (any(a.ne.43.21)) STOP 1
write(msg,'(dp,f8.3,dc,f8.2,dp,f8.3)', decimal="comma") a(1), b(1), c(1)
-if (trim(msg).ne." 43.210 3,13 5.432") call abort
+if (trim(msg).ne." 43.210 3,13 5.432") STOP 2
close(99)
open(99, decimal="comma", status="scratch")
b = 0.0
rewind(99)
read(99,nml=mynml)
-if (any(a.ne.43.21)) call abort
-if (any(b.ne.3.131)) call abort
+if (any(a.ne.43.21)) STOP 3
+if (any(b.ne.3.131)) STOP 4
close(99)
end
a = 5.55
rewind(99)
read(99,nml=nm,decimal="comma")
-if (any (a /= [ (i*1.3, i=1,10) ])) call abort
+if (any (a /= [ (i*1.3, i=1,10) ])) STOP 1
close(99, status="delete")
c = (3.123,4.456)
write(complex,*,decimal="comma") c
-if (complex.ne." (3,12299991;4,45599985)") call abort
+if (complex.ne." (3,12299991;4,45599985)") STOP 2
c = (0.0, 0.0)
read(complex,*,decimal="comma") c
-if (complex.ne." (3,12299991;4,45599985)") call abort
+if (complex.ne." (3,12299991;4,45599985)") STOP 3
end
character(len=30) :: str = '&nm a = 1,3; 4, 5; 5; 7; /'
namelist /nm/ a
read(str,nml=nm,decimal='comma')
-if (any(a.ne.[ 1.3, 4.0, 5.0, 5.0, 7.0, 0.0 ])) call abort
+if (any(a.ne.[ 1.3, 4.0, 5.0, 5.0, 7.0, 0.0 ])) STOP 1
end
real(kind=8), dimension(3) :: b
!
write(a,'(f10.3,s,f10.3,sp,f10.3,ss,f10.3)',SIGN='PLUS') pi, pi, pi, pi
- if (a /= " +3.142 3.142 +3.142 3.142") call abort
+ if (a /= " +3.142 3.142 +3.142 3.142") STOP 1
!
open(8,sign="plus")
write(8,'(f10.3,dc,f10.3,dp,f10.3)',DECIMAL='COMMA',&
& sign="suppress") pi, pi, pi
rewind(8)
read(8,'(a)') a
- if (a /= " 3,142 3,142 3.142") call abort
+ if (a /= " 3,142 3,142 3.142") STOP 2
close(8,status="delete")
!
! "123456789 123456789 12345678901
write(a,'(a)') "53 256.84, 2 2 2. ; 33.3 3 1 "
read(a, '(f9.2,1x,f8.2,2x,f11.7)', blank="zero") b(1),b(2),b(3)
- if (any(abs(b - [530256.84, 20202.00, 33.3030001]) > .03)) call abort
+ if (any(abs(b - [530256.84, 20202.00, 33.3030001]) > .03)) STOP 3
end program iotests
double precision z, w
x = 8.625
- if (x /= f(x)) call abort ()
+ if (x /= f(x)) STOP 1
y = f(x)
- if (x /= y) call abort ()
+ if (x /= y) STOP 2
a = 1.
b = -1.
- if (c(a,b) /= cmplx(a,b)) call abort ()
+ if (c(a,b) /= cmplx(a,b)) STOP 3
z = 1.
w = -1.
- if (d(z,w) /= cmplx(z,w, kind(z))) call abort ()
+ if (d(z,w) /= cmplx(z,w, kind(z))) STOP 4
end subroutine test_with_interface
external f, c, d
double precision z, w
x = 8.625
-if (x /= f(x)) call abort ()
+if (x /= f(x)) STOP 5
y = f(x)
-if (x /= y) call abort ()
+if (x /= y) STOP 6
a = 1.
b = -1.
-if (c(a,b) /= cmplx(a,b)) call abort ()
+if (c(a,b) /= cmplx(a,b)) STOP 7
z = 1.
w = -1.
-if (d(z,w) /= cmplx(z,w, kind(z))) call abort ()
+if (d(z,w) /= cmplx(z,w, kind(z))) STOP 8
call test_with_interface ()
end
double complex d
x = 2.
-if ((sqrt(x) - 1.41)**2 > 1.e-4) call abort ()
+if ((sqrt(x) - 1.41)**2 > 1.e-4) STOP 1
x = 1.
-if ((atan(x) - 3.14/4) ** 2 > 1.e-4) call abort ()
+if ((atan(x) - 3.14/4) ** 2 > 1.e-4) STOP 2
c = (-1.,0.)
-if (sqrt(c) /= (0., 1.)) call abort ()
+if (sqrt(c) /= (0., 1.)) STOP 3
d = c
-if (sqrt(d) /= (0._8, 1._8)) call abort ()
+if (sqrt(d) /= (0._8, 1._8)) STOP 4
end
f = 1.0
q=>f
g = foo(q)
- if (g .ne. 1.0) call abort
+ if (g .ne. 1.0) STOP 1
contains
function foo (p)
real, pointer :: foo
! Return COMPLEX arg - call C routines from Fortran
c = cmplx(1234.0,5678.0)
z = dcmplx(1234.0d0,5678.0d0)
- if ( c .ne. f2c_4k(c) ) call abort
- if ( c .ne. f2c_4l(i,c) ) call abort
- if ( z .ne. f2c_4m(z) ) call abort
- if ( z .ne. f2c_4n(i,z) ) call abort
+ if ( c .ne. f2c_4k(c) ) STOP 1
+ if ( c .ne. f2c_4l(i,c) ) STOP 2
+ if ( z .ne. f2c_4m(z) ) STOP 3
+ if ( z .ne. f2c_4n(i,z) ) STOP 4
end
z = (1.,0.)
p => c()
z = (2.,0.)
-if (p /= z) call abort ()
+if (p /= z) STOP 1
NULLIFY(p)
p => d()
z = (3.,0.)
-if (p /= z) call abort ()
+if (p /= z) STOP 2
NULLIFY(p)
p => e()
z = (4.,0.)
-if (p /= z) call abort ()
+if (p /= z) STOP 3
NULLIFY(p)
p => f()
z = (5.,0.)
-if (p /= z) call abort ()
+if (p /= z) STOP 4
end
end interface
complex z(5)
z = c()
-if (any(z /= 0.)) call abort ()
+if (any(z /= 0.)) STOP 1
z = d()
-if (any(z /= 1.)) call abort ()
+if (any(z /= 1.)) STOP 2
end subroutine test_without_result
subroutine test_with_result
end interface
complex z(5)
z = c()
-if (any(z /= 0.)) call abort ()
+if (any(z /= 0.)) STOP 3
z = d()
-if (any(z /= 1.)) call abort ()
+if (any(z /= 1.)) STOP 4
end subroutine test_with_result
call test_without_result
contains
subroutine check (a, b)
real(8), intent(in) :: a, b
- if (abs(a - b) > 1.e-10_8) call abort
+ if (abs(a - b) > 1.e-10_8) STOP 1
end subroutine check
end program test
write(10,"(A)") "abcde"
rewind(10)
call fgetc(10,s,st)
- if ((st /= 0) .or. (s /= "a ")) call abort
+ if ((st /= 0) .or. (s /= "a ")) STOP 1
call fgetc(10,s,st)
close(10)
open(10,status="scratch")
s = "12345"
call fputc(10,s,st)
- if (st /= 0) call abort
+ if (st /= 0) STOP 2
call fputc(10,"2",st)
- if (st /= 0) call abort
+ if (st /= 0) STOP 3
call fputc(10,"3 ",st)
- if (st /= 0) call abort
+ if (st /= 0) STOP 4
rewind(10)
call fgetc(10,s)
- if (s(1:1) /= "1") call abort
+ if (s(1:1) /= "1") STOP 5
call fgetc(10,s)
- if (s(1:1) /= "2") call abort
+ if (s(1:1) /= "2") STOP 6
call fgetc(10,s,st)
- if ((s(1:1) /= "3") .or. (st /= 0)) call abort
+ if ((s(1:1) /= "3") .or. (st /= 0)) STOP 7
call fgetc(10,s,st)
- if (st /= -1) call abort
+ if (st /= -1) STOP 8
close (10)
! FGETC and FPUTC on units not opened should not work
call fgetc(12,s,st)
- if (st /= -1) call abort
+ if (st /= -1) STOP 9
call fputc(12,s,st)
- if (st /= -1) call abort
+ if (st /= -1) STOP 10
end
write(10,"(A)") "abcde"
rewind(10)
st = fgetc(10,s)
- if ((st /= 0) .or. (s /= "a ")) call abort
+ if ((st /= 0) .or. (s /= "a ")) STOP 1
st = fgetc(10,s)
close(10)
open(10,status="scratch")
s = "12345"
st = fputc(10,s)
- if (st /= 0) call abort
+ if (st /= 0) STOP 2
st = fputc(10,"2")
- if (st /= 0) call abort
+ if (st /= 0) STOP 3
st = fputc(10,"3 ")
- if (st /= 0) call abort
+ if (st /= 0) STOP 4
rewind(10)
st = fgetc(10,s)
- if (s(1:1) /= "1") call abort
+ if (s(1:1) /= "1") STOP 5
st = fgetc(10,s)
- if (s(1:1) /= "2") call abort
+ if (s(1:1) /= "2") STOP 6
st = fgetc(10,s)
- if ((s(1:1) /= "3") .or. (st /= 0)) call abort
+ if ((s(1:1) /= "3") .or. (st /= 0)) STOP 7
st = fgetc(10,s)
- if (st /= -1) call abort
+ if (st /= -1) STOP 8
close (10)
! FGETC and FPUTC on units not opened should not work
st = fgetc(12,s)
- if (st /= -1) call abort
+ if (st /= -1) STOP 9
st = fputc(12,s)
- if (st /= -1) call abort
+ if (st /= -1) STOP 10
end
logical :: l
open(10, file=s)
inquire(unit=10, name=r)
- if (r /= s2) call abort()
+ if (r /= s2) STOP 1
inquire(file=s2, exist=l)
- if (.not. l) call abort()
+ if (.not. l) STOP 2
close(10, status="delete")
end program filename_null
subroutine fini(x)
type(t) :: x
!print *, 'fini:',x%i
- if (global_count1 == -1) call abort ()
- if (x%i /= 42) call abort()
+ if (global_count1 == -1) STOP 1
+ if (x%i /= 42) STOP 2
x%i = 33
global_count1 = global_count1 + 1
end subroutine fini
subroutine fini2(x)
type(t) :: x(:)
!print *, 'fini2', x%i
- if (global_count2 == -1) call abort ()
- if (size(x) /= 5) call abort()
- if (any (x%i /= [1,2,3,4,5]) .and. any (x%i /= [6,7,8,9,10])) call abort()
+ if (global_count2 == -1) STOP 3
+ if (size(x) /= 5) STOP 4
+ if (any (x%i /= [1,2,3,4,5]) .and. any (x%i /= [6,7,8,9,10])) STOP 5
x%i = 33
global_count2 = global_count2 + 10
end subroutine fini2
yca%i = [1,2,3,4,5]
call foo(ya, yc, yaa, yca)
- if (global_count1 /= 2) call abort ()
- if (global_count2 /= 20) call abort ()
+ if (global_count1 /= 2) STOP 6
+ if (global_count2 /= 20) STOP 7
! Coarray finalization
allocate (ca[*], cc[*], caa(5)[*], cca(5)[*])
caa%i = [1,2,3,4,5]
cca%i = [1,2,3,4,5]
deallocate (ca, cc, caa, cca)
- if (global_count1 /= 2) call abort ()
- if (global_count2 /= 20) call abort ()
+ if (global_count1 /= 2) STOP 8
+ if (global_count2 /= 20) STOP 9
global_count1 = -1
global_count2 = -1
zca%i = [1,2,3,4,5]
call foo(za, zc, zaa, zca)
- if (global_count1 /= 2) call abort ()
- if (global_count2 /= 20) call abort ()
+ if (global_count1 /= 2) STOP 10
+ if (global_count2 /= 20) STOP 11
! Test intent(out) finalization with optional
call foo_opt()
zca%i = [1,2,3,4,5]
call foo_opt(za, zc, zaa, zca)
- if (global_count1 /= 2) call abort ()
- if (global_count2 /= 20) call abort ()
+ if (global_count1 /= 2) STOP 12
+ if (global_count2 /= 20) STOP 13
! Test DEALLOCATE finalization
allocate (za, zc, zaa(5), zca(5))
zaa%i = [1,2,3,4,5]
zca%i = [6,7,8,9,10]
deallocate (za, zc, zaa, zca)
- if (global_count1 /= 2) call abort ()
- if (global_count2 /= 20) call abort ()
+ if (global_count1 /= 2) STOP 14
+ if (global_count2 /= 20) STOP 15
! Test end-of-scope finalization
allocate (za, zc, zaa(5), zca(5))
zca%i = [6,7,8,9,10]
end block
- if (global_count1 /= 2) call abort ()
- if (global_count2 /= 20) call abort ()
+ if (global_count1 /= 2) STOP 16
+ if (global_count2 /= 20) STOP 17
! Test that no end-of-scope finalization occurs
! for SAVED variable in main
if (.not. present(xa)) &
return
- if (allocated (xa)) call abort ()
- if (allocated (xc)) call abort ()
- if (allocated (xaa)) call abort ()
- if (allocated (xca)) call abort ()
+ if (allocated (xa)) STOP 18
+ if (allocated (xc)) STOP 19
+ if (allocated (xaa)) STOP 20
+ if (allocated (xca)) STOP 21
end subroutine foo_opt
subroutine foo(xa, xc, xaa, xca)
type(t), allocatable, intent(out) :: xa
class(t), allocatable, intent(out) :: xc
type(t), allocatable, intent(out) :: xaa(:)
class(t), allocatable, intent(out) :: xca(:)
- if (allocated (xa)) call abort ()
- if (allocated (xc)) call abort ()
- if (allocated (xaa)) call abort ()
- if (allocated (xca)) call abort ()
+ if (allocated (xa)) STOP 22
+ if (allocated (xc)) STOP 23
+ if (allocated (xaa)) STOP 24
+ if (allocated (xca)) STOP 25
end subroutine foo
end program
contains
subroutine fini2 (x)
type(t), intent(in), contiguous :: x(:,:)
- if (.not. rank2_call) call abort ()
- if (size(x,1) /= 2 .or. size(x,2) /= 3) call abort()
+ if (.not. rank2_call) STOP 1
+ if (size(x,1) /= 2 .or. size(x,2) /= 3) STOP 2
!print *, 'fini2:', x%i
- if (any (x%i /= reshape([11, 12, 21, 22, 31, 32], [2,3]))) call abort()
+ if (any (x%i /= reshape([11, 12, 21, 22, 31, 32], [2,3]))) STOP 3
fini_call = fini_call + 1
end subroutine
subroutine fini3 (x)
type(t), intent(in) :: x(2,2,*)
integer :: i,j,k
- if (.not. elem_call) call abort ()
- if (.not. rank3_call) call abort ()
- if (cnt2 /= 9) call abort()
- if (cnt /= 1) call abort()
+ if (.not. elem_call) STOP 4
+ if (.not. rank3_call) STOP 5
+ if (cnt2 /= 9) STOP 6
+ if (cnt /= 1) STOP 7
do i = 1, 2
do j = 1, 2
do k = 1, 2
!print *, k,j,i,x(k,j,i)%i
- if (x(k,j,i)%i /= k+10*j+100*i) call abort()
+ if (x(k,j,i)%i /= k+10*j+100*i) STOP 8
end do
end do
end do
impure elemental subroutine fini_elm (x)
type(t), intent(in) :: x
- if (.not. elem_call) call abort ()
- if (rank3_call) call abort ()
- if (cnt2 /= 6) call abort()
- if (cnt /= x%i) call abort()
+ if (.not. elem_call) STOP 9
+ if (rank3_call) STOP 10
+ if (cnt2 /= 6) STOP 11
+ if (cnt /= x%i) STOP 12
!print *, 'fini_elm:', cnt, x%i
fini_call = fini_call + 1
cnt = cnt + 1
subroutine f2ini2 (x)
type(t2), intent(in), target :: x(:,:)
- if (.not. rank2_call) call abort ()
- if (size(x,1) /= 2 .or. size(x,2) /= 3) call abort()
+ if (.not. rank2_call) STOP 13
+ if (size(x,1) /= 2 .or. size(x,2) /= 3) STOP 14
!print *, 'f2ini2:', x%i
!print *, 'f2ini2:', x%j
- if (any (x%i /= reshape([11, 12, 21, 22, 31, 32], [2,3]))) call abort()
- if (any (x%j /= 100*reshape([11, 12, 21, 22, 31, 32], [2,3]))) call abort()
+ if (any (x%i /= reshape([11, 12, 21, 22, 31, 32], [2,3]))) STOP 15
+ if (any (x%j /= 100*reshape([11, 12, 21, 22, 31, 32], [2,3]))) STOP 16
fini_call = fini_call + 1
end subroutine
integer, parameter :: exprected(*) &
= [111, 112, 121, 122, 211, 212, 221, 222]
- if (.not. elem_call) call abort ()
+ if (.not. elem_call) STOP 17
!print *, 'f2ini_elm:', cnt2, x%i, x%j
if (rank3_call) then
- if (x%i /= exprected(cnt2)) call abort ()
- if (x%j /= 1000*exprected(cnt2)) call abort ()
+ if (x%i /= exprected(cnt2)) STOP 18
+ if (x%j /= 1000*exprected(cnt2)) STOP 19
else
- if (cnt2 /= x%i .or. cnt2*10 /= x%j) call abort()
+ if (cnt2 /= x%i .or. cnt2*10 /= x%j) STOP 20
end if
cnt2 = cnt2 + 1
fini_call = fini_call + 1
fini_call = 0
elem_call = .true.
deallocate (y)
- if (fini_call /= 10) call abort ()
+ if (fini_call /= 10) STOP 21
elem_call = .false.
rank2_call = .false.
fini_call = 0
rank2_call = .true.
deallocate (z)
- if (fini_call /= 2) call abort ()
+ if (fini_call /= 2) STOP 22
elem_call = .false.
rank2_call = .false.
rank3_call = .true.
elem_call = .true.
deallocate (zz)
- if (fini_call /= 2*2*2+1) call abort ()
+ if (fini_call /= 2*2*2+1) STOP 23
end program test
type(t1), intent(inout) :: x
integer :: i, j, i2, j2
- if (cnt1e /= 5*4) call abort ()
+ if (cnt1e /= 5*4) STOP 1
j = mod (cnt1,5)+1
i = cnt1/5 + 1
i2 = (i-1)*3 + 1
j2 = (j-1)*2 + 1
- if (x%i /= j2 + 100*i2) call abort ()
+ if (x%i /= j2 + 100*i2) STOP 2
x%i = x%i * (-13)
cnt1 = cnt1 + 1
end subroutine fini_elem
i = cnt1e/5 + 1
i2 = (i-1)*3 + 1
j2 = (j-1)*2 + 1
- if (x%i /= j2 + 100*i2) call abort ()
- if (x%j /= (j2 + 100*i2)*100) call abort ()
+ if (x%i /= j2 + 100*i2) STOP 3
+ if (x%j /= (j2 + 100*i2)*100) STOP 4
x%j = x%j * (-13)
cnt1e = cnt1e + 1
end subroutine fini_elem2
subroutine fini_shape(x)
type(t2) :: x(:,:)
- if (cnt2e /= 1 .or. cnt2 /= 0) call abort ()
+ if (cnt2e /= 1 .or. cnt2 /= 0) STOP 5
call check_var_sec(x%i, 1)
x%i = x%i * (-13)
cnt2 = cnt2 + 1
subroutine fini_explicit(x)
type(t3) :: x(5,4)
- if (cnt3e /= 1 .or. cnt3 /= 0) call abort ()
+ if (cnt3e /= 1 .or. cnt3 /= 0) STOP 6
call check_var_sec(x%i, 1)
x%i = x%i * (-13)
cnt3 = cnt3 + 1
subroutine fin_test_3(x)
class(t3), intent(out) :: x(:,:)
- if (any (shape(x) /= [5,4])) call abort ()
+ if (any (shape(x) /= [5,4])) STOP 7
end subroutine fin_test_3
subroutine check_var_sec(x, factor)
i2 = (i-1)*3 + 1
do j = 1, 5
j2 = (j-1)*2 + 1
- if (x(j,i) /= (j2 + 100*i2)*factor) call abort ()
+ if (x(j,i) /= (j2 + 100*i2)*factor) STOP 8
end do
end do
end subroutine check_var_sec
end do
end select
- if (cnt1 + cnt1e + cnt2 + cnt2e + cnt3 + cnt3e /= 0) call abort()
+ if (cnt1 + cnt1e + cnt2 + cnt2e + cnt3 + cnt3e /= 0) STOP 9
call fin_test_1(x(::2,::3))
- if (cnt1 /= 5*4) call abort ()
- if (cnt1e /= 5*4) call abort ()
+ if (cnt1 /= 5*4) STOP 10
+ if (cnt1e /= 5*4) STOP 11
cnt1 = 0; cnt1e = 0
- if (cnt2 + cnt2e + cnt3 + cnt3e /= 0) call abort()
+ if (cnt2 + cnt2e + cnt3 + cnt3e /= 0) STOP 12
call fin_test_2(y(::2,::3))
- if (cnt2 /= 1) call abort ()
- if (cnt2e /= 1) call abort ()
+ if (cnt2 /= 1) STOP 13
+ if (cnt2e /= 1) STOP 14
cnt2 = 0; cnt2e = 0
- if (cnt1 + cnt1e + cnt3 + cnt3e /= 0) call abort()
+ if (cnt1 + cnt1e + cnt3 + cnt3e /= 0) STOP 15
call fin_test_3(z(::2,::3))
- if (cnt3 /= 1) call abort ()
- if (cnt3e /= 1) call abort ()
+ if (cnt3 /= 1) STOP 16
+ if (cnt3e /= 1) STOP 17
cnt3 = 0; cnt3e = 0
- if (cnt1 + cnt1e + cnt2 + cnt2e /= 0) call abort()
+ if (cnt1 + cnt1e + cnt2 + cnt2e /= 0) STOP 18
select type(x)
type is (t1e)
do i = 1, 10
do j = 1, 10
if (mod (j-1, 2) == 0 .and. mod (i-1, 3) == 0) then
- if (x(j,i) /= val) call abort ()
+ if (x(j,i) /= val) STOP 19
else
- if (x(j,i) /= (j + 100*i)*factor) call abort ()
+ if (x(j,i) /= (j + 100*i)*factor) STOP 20
end if
end do
end do
contains
impure elemental subroutine finit(x)
type(t), intent(in) :: x
- if (called_final == -1) call abort ()
+ if (called_final == -1) STOP 1
called_final = called_final + 1
- if (called_final /= x%i) call abort ()
+ if (called_final /= x%i) STOP 2
end subroutine finit
end module m
x3%i = -6
called_final = 0
end block
- if (called_final /= 3) call abort
+ if (called_final /= 3) STOP 1
called_final = -1
y2%i = [-7, -8]
x2%i = -9
contains
subroutine fini(x)
type(t) :: x
- if (cnt == -1) call abort ()
+ if (cnt == -1) STOP 1
cnt = cnt + 1
end subroutine fini
end module m
cnt = 0
call ndm(x)
- if (cnt /= 2) call abort()
+ if (cnt /= 2) STOP 1
cnt = 0
call ndm2()
- if (cnt /= 3) call abort()
+ if (cnt /= 3) STOP 2
contains
subroutine ndm2
type(nde2) :: s,i
call ten_init(x_ten(::2, ::3))
- if (ten_fin_counts /= 6) call abort()
+ if (ten_fin_counts /= 6) STOP 1
if (tee_fin_counts + tne_fin_counts + tnn_fin_counts + tae_fin_counts + &
tan_fin_counts + tge_scalar_fin_counts + tge_array_fin_counts + &
- tgn_scalar_fin_counts + tgn_array_fin_counts /= 0) call abort()
+ tgn_scalar_fin_counts + tgn_array_fin_counts /= 0) STOP 2
ten_fin_counts = 0
call tee_init(x_tee(::2, ::3))
- if (tee_fin_counts /= 6) call abort()
+ if (tee_fin_counts /= 6) STOP 3
if (ten_fin_counts + tne_fin_counts + tnn_fin_counts + tae_fin_counts + &
tan_fin_counts + tge_scalar_fin_counts + tge_array_fin_counts + &
- tgn_scalar_fin_counts + tgn_array_fin_counts /= 0) call abort()
+ tgn_scalar_fin_counts + tgn_array_fin_counts /= 0) STOP 4
tee_fin_counts = 0
call tne_init(x_tne(::2, ::3))
- if (tne_fin_counts /= 6) call abort()
+ if (tne_fin_counts /= 6) STOP 5
if (ten_fin_counts + tee_fin_counts + tnn_fin_counts + tae_fin_counts + &
tan_fin_counts + tge_scalar_fin_counts + tge_array_fin_counts + &
- tgn_scalar_fin_counts + tgn_array_fin_counts /= 0) call abort()
+ tgn_scalar_fin_counts + tgn_array_fin_counts /= 0) STOP 6
tne_fin_counts = 0
call tnn_init(x_tnn(::2, ::3))
- if (tnn_fin_counts /= 0) call abort()
+ if (tnn_fin_counts /= 0) STOP 7
if (ten_fin_counts + tee_fin_counts + tne_fin_counts + tae_fin_counts + &
tan_fin_counts + tge_scalar_fin_counts + tge_array_fin_counts + &
- tgn_scalar_fin_counts + tgn_array_fin_counts /= 0) call abort()
+ tgn_scalar_fin_counts + tgn_array_fin_counts /= 0) STOP 8
call tae_init(x_tae(::2, ::3))
- if (tae_fin_counts /= 0) call abort()
+ if (tae_fin_counts /= 0) STOP 9
if (ten_fin_counts + tee_fin_counts + tne_fin_counts + tnn_fin_counts + &
tan_fin_counts + tge_scalar_fin_counts + tge_array_fin_counts + &
- tgn_scalar_fin_counts + tgn_array_fin_counts /= 0) call abort()
+ tgn_scalar_fin_counts + tgn_array_fin_counts /= 0) STOP 10
call tan_init(x_tan(::2, ::3))
- if (tan_fin_counts /= 1) call abort()
+ if (tan_fin_counts /= 1) STOP 11
if (ten_fin_counts + tee_fin_counts + tne_fin_counts + tnn_fin_counts + &
tae_fin_counts + tge_scalar_fin_counts + tge_array_fin_counts + &
- tgn_scalar_fin_counts + tgn_array_fin_counts /= 0) call abort()
+ tgn_scalar_fin_counts + tgn_array_fin_counts /= 0) STOP 12
tan_fin_counts = 0
call tge_init(x_tge(::2, ::3))
- if (tge_scalar_fin_counts /= 6) call abort()
+ if (tge_scalar_fin_counts /= 6) STOP 13
if (ten_fin_counts + tee_fin_counts + tne_fin_counts + tnn_fin_counts + &
tae_fin_counts + tan_fin_counts + tgn_array_fin_counts + &
- tgn_scalar_fin_counts + tgn_array_fin_counts /= 0) call abort()
+ tgn_scalar_fin_counts + tgn_array_fin_counts /= 0) STOP 14
tge_scalar_fin_counts = 0
call tgn_init(x_tgn(::2, ::3))
- if (tgn_array_fin_counts /= 1) call abort()
+ if (tgn_array_fin_counts /= 1) STOP 15
if (ten_fin_counts + tee_fin_counts + tne_fin_counts + tnn_fin_counts + &
tae_fin_counts + tan_fin_counts + tge_scalar_fin_counts + &
- tge_array_fin_counts + tgn_scalar_fin_counts /= 0) call abort()
+ tge_array_fin_counts + tgn_scalar_fin_counts /= 0) STOP 16
tgn_array_fin_counts = 0
if (any (reshape (x_ten%i, [25]) /= [[40, 1, 40, 1, 40], [1, 1, 1, 1, 1],&
- [1, 1, 1, 1, 1], [40, 1, 40, 1, 40], [1, 1, 1, 1, 1]])) call abort()
+ [1, 1, 1, 1, 1], [40, 1, 40, 1, 40], [1, 1, 1, 1, 1]])) STOP 17
if (any (reshape (x_tee%i, [25]) /= [[41, 2, 41, 2, 41], [2, 2, 2, 2, 2],&
- [2, 2, 2, 2, 2], [41, 2, 41, 2, 41], [2, 2, 2, 2, 2]])) call abort()
+ [2, 2, 2, 2, 2], [41, 2, 41, 2, 41], [2, 2, 2, 2, 2]])) STOP 18
if (any (reshape (x_tne%i, [25]) /= [[42, 3, 42, 3, 42], [3, 3, 3, 3, 3],&
- [3, 3, 3, 3, 3], [42, 3, 42, 3, 42], [3, 3, 3, 3, 3]])) call abort()
+ [3, 3, 3, 3, 3], [42, 3, 42, 3, 42], [3, 3, 3, 3, 3]])) STOP 19
if (any (reshape (x_tnn%i, [25]) /= [[43, 4, 43, 4, 43], [4, 4, 4, 4, 4],&
- [4, 4, 4, 4, 4], [43, 4, 43, 4, 43], [4, 4, 4, 4, 4]])) call abort()
+ [4, 4, 4, 4, 4], [43, 4, 43, 4, 43], [4, 4, 4, 4, 4]])) STOP 20
if (any (reshape (x_tae%i, [25]) /= [[44, 5, 44, 5, 44], [5, 5, 5, 5, 5],&
- [5, 5, 5, 5, 5], [44, 5, 44, 5, 44], [5, 5, 5, 5, 5]])) call abort()
+ [5, 5, 5, 5, 5], [44, 5, 44, 5, 44], [5, 5, 5, 5, 5]])) STOP 21
if (any (reshape (x_tan%i, [25]) /= [[45, 6, 45, 6, 45], [6, 6, 6, 6, 6],&
- [6, 6, 6, 6, 6], [45, 6, 45, 6, 45], [6, 6, 6, 6, 6]])) call abort()
+ [6, 6, 6, 6, 6], [45, 6, 45, 6, 45], [6, 6, 6, 6, 6]])) STOP 22
if (any (reshape (x_tge%i, [25]) /= [[46, 7, 46, 7, 46], [7, 7, 7, 7, 7],&
- [7, 7, 7, 7, 7], [46, 7, 46, 7, 46], [7, 7, 7, 7, 7]])) call abort()
+ [7, 7, 7, 7, 7], [46, 7, 46, 7, 46], [7, 7, 7, 7, 7]])) STOP 23
if (any (reshape (x_tgn%i, [25]) /= [[47, 8, 47, 8, 47], [8, 8, 8, 8, 8],&
- [8, 8, 8, 8, 8], [47, 8, 47, 8, 47], [8, 8, 8, 8, 8]])) call abort()
+ [8, 8, 8, 8, 8], [47, 8, 47, 8, 47], [8, 8, 8, 8, 8]])) STOP 24
end program finalize_29
subroutine Finalize ( C )
type ( CommunicatorForm ) :: C
! should not be called
- call abort()
+ STOP 1
end subroutine
end module
integer(2) :: i2 = 1
integer(4) :: i4 = 1
integer(8) :: i8 = 1
- if (float(i1) /= 1.) call abort ! { dg-warning "non-default INTEGER" }
- if (float(i2) /= 1.) call abort ! { dg-warning "non-default INTEGER" }
- if (float(i4) /= 1.) call abort
- if (float(i8) /= 1.) call abort ! { dg-warning "non-default INTEGER" }
+ if (float(i1) /= 1.) STOP 1! { dg-warning "non-default INTEGER" }
+ if (float(i2) /= 1.) STOP 2! { dg-warning "non-default INTEGER" }
+ if (float(i4) /= 1.) STOP 3
+ if (float(i8) /= 1.) STOP 4! { dg-warning "non-default INTEGER" }
- if (kind(float(i4)) /= kind(1.0)) call abort
- if (kind(float(i8)) /= kind(1.0)) call abort ! { dg-warning "non-default INTEGER" }
+ if (kind(float(i4)) /= kind(1.0)) STOP 5
+ if (kind(float(i8)) /= kind(1.0)) STOP 6! { dg-warning "non-default INTEGER" }
end program test_float
write (10, *) 42
flush(unit=10, iostat=ios)
- if (ios /= 0) call abort
+ if (ios /= 0) STOP 1
write (10, *) 42
flush (unit=10, err=20)
goto 30
-20 call abort
+20 STOP 2
30 continue
call flush(10)
f = 0.0
read (a,'(BZ,E11.0)') f
- if (f .ne. 2003.0) call abort
+ if (f .ne. 2003.0) STOP 1
f = 0.0
read (a,'(BN,E11.0)') f
- if (f .ne. 2300.0) call abort
+ if (f .ne. 2300.0) STOP 2
f = 0.0
read (b,'(BN,E11.0)') f
- if (f .ne. 2003.0) call abort
+ if (f .ne. 2003.0) STOP 3
f = 0.0
read (c,'(E11.0)') f
- if (f .ne. 20.020) call abort
+ if (f .ne. 20.020) STOP 4
f = 0.0
read (c,'(BZ,E11.0)') f
- if (f .ne. 2.002e10) call abort
+ if (f .ne. 2.002e10) STOP 5
end
c end of program
r = 3.14159d0
ok=.true.
read(temp,'(f20.0)',err=8888) r
- call abort
+ STOP 1
8888 continue
end
rewind 10
teststring = ""
read(10,'(a)') teststring
- if (teststring.ne." arlxca = 0.00000 arlxcc =")call abort
+ if (teststring.ne." arlxca = 0.00000 arlxcc =")STOP 1
teststring = ""
read(10,'(a)') teststring
- if (teststring.ne." arlxca = 0.00000 arlxcc =")call abort
+ if (teststring.ne." arlxca = 0.00000 arlxcc =")STOP 2
close(10, status='delete')
end program astap
loopcounter = j
enddo
close(10)
- if (loopcounter /= 74) call abort
+ if (loopcounter /= 74) STOP 1
end
rewind (66)
read (66, '(a)') str
close (66)
- if (any (str /= " ===== end of level 1 =====")) call abort()
+ if (any (str /= " ===== end of level 1 =====")) STOP 1
end program test
character(30) :: astring
WRITE(astring, 10) i
10 FORMAT('i =',I2:' this should not print')
- if (astring.ne."i = 1") call abort
+ if (astring.ne."i = 1") STOP 1
write(astring, 20) i, i
20 format('i =',I2:' this should print',I2)
- if (astring.ne."i = 1 this should print 1") call abort
+ if (astring.ne."i = 1 this should print 1") STOP 2
END PROGRAM test
\ No newline at end of file
program test
character(25) :: s
write(s, '(1pe5.0e1)') 1.e-4
- if (s.ne."1.E-4") call abort
+ if (s.ne."1.E-4") STOP 1
write(s, '(e5.1e1)') 1.e12
- if (s.ne."*****") call abort
+ if (s.ne."*****") STOP 2
end
call checkfmt("(en15.6)", -2.9296875E-03," -2.929688E-03")
! print *, n_tst, n_cnt, n_skip
- if (n_cnt /= 0) call abort
+ if (n_cnt /= 0) STOP 1
if (all(.not. l_skip)) write (10, *) "All kinds rounded to nearest"
close (10)
x = 555.25
write (line,str,iostat=istat, iomsg=msg) 1.0d0, 1.234
- if (istat.ne.0) call abort
- if (line.ne." 1.000000000000000D+001.E+00") call abort
+ if (istat.ne.0) STOP 1
+ if (line.ne." 1.000000000000000D+001.E+00") STOP 2
write (line,'(1pd24.15e6)',iostat=istat, iomsg=msg) 1.0d0, 1.234 ! { dg-warning "Period required" }
- if (istat.ne.0) call abort
- if (line.ne." 1.000000000000000D+001.E+00") call abort
+ if (istat.ne.0) STOP 3
+ if (line.ne." 1.000000000000000D+001.E+00") STOP 4
str = '(1pd0.15)'
write (line,str,iostat=istat, iomsg=msg) 1.0d0
- if (istat.ne.5006 .or. msg(1:15).ne."Positive width ") call abort
+ if (istat.ne.5006 .or. msg(1:15).ne."Positive width ") STOP 5
read (*,str,iostat=istat, iomsg=msg) x
- if (istat.ne.5006 .or. msg(1:15).ne."Positive width ") call abort
- if (x.ne.555.25) call abort
+ if (istat.ne.5006 .or. msg(1:15).ne."Positive width ") STOP 6
+ if (x.ne.555.25) STOP 7
write (line,'(1pd24.15e11.3)') 1.0d0, 1.234
- if (line.ne." 1.000000000000000D+00 1.234E+00") call abort
+ if (line.ne." 1.000000000000000D+00 1.234E+00") STOP 8
end
x = 555.25
write (line,str,iostat=istat, iomsg=msg) 1.0d0, 1.234
- if (istat.ne.5006 .or. msg(1:15).ne."Period required") call abort
- if (line.ne."initial string") call abort
+ if (istat.ne.5006 .or. msg(1:15).ne."Period required") STOP 1
+ if (line.ne."initial string") STOP 2
str = '(1pf0.15)'
write (line,str,iostat=istat, iomsg=msg) 1.0d0
- if (istat.ne.0) call abort
+ if (istat.ne.0) STOP 3
read (*,str,iostat=istat, iomsg=msg) x
- if (istat.ne.5006 .or. msg(1:15).ne."Positive width ") call abort
- if (x.ne.555.25) call abort
+ if (istat.ne.5006 .or. msg(1:15).ne."Positive width ") STOP 4
+ if (x.ne.555.25) STOP 5
write (line,'(1pd24.15e11.3)') 1.0d0, 1.234
- if (line.ne." 1.000000000000000D+00 1.234E+00") call abort
+ if (line.ne." 1.000000000000000D+00 1.234E+00") STOP 6
str = '(1p2d24.15)'
msg = " 1.000000000000000D+00 1.233999967575073D+00That's it!"
n = 1
open(10, status="scratch")
write(10,"(i7,(' abcd'))", err=10) n, n
- call abort()
+ STOP 1
10 close(10)
end program test
CHARACTER(80) :: str
x = 0.0
write (str,'(f0.0)') x
- if (str.ne."0.") call abort
+ if (str.ne."0.") STOP 1
write (str,'(f0.1)') x
- if (str.ne.".0") call abort
+ if (str.ne.".0") STOP 2
write (str,'(f0.2)') x
- if (str.ne.".00") call abort
+ if (str.ne.".00") STOP 3
write (str,'(f0.3)') x
- if (str.ne.".000") call abort
+ if (str.ne.".000") STOP 4
write (str,'(f0.4)') x
- if (str.ne.".0000") call abort
+ if (str.ne.".0000") STOP 5
write (str,'(F0.0)') 0.0
- if (str.ne."0.") call abort
+ if (str.ne."0.") STOP 6
write (str,'(F0.0)') 0.001
- if (str.ne."0.") call abort
+ if (str.ne."0.") STOP 7
write (str,'(F0.0)') 0.01
- if (str.ne."0.") call abort
+ if (str.ne."0.") STOP 8
write (str,'(F0.0)') 0.1
- if (str.ne."0.") call abort
+ if (str.ne."0.") STOP 9
write (str,'(F1.0)') -0.0
- if (str.ne."*") call abort
+ if (str.ne."*") STOP 10
write (str,'(F1.0)') 0.001
- if (str.ne."*") call abort
+ if (str.ne."*") STOP 11
write (str,'(F1.0)') 0.01
- if (str.ne."*") call abort
+ if (str.ne."*") STOP 12
write (str,'(F1.0)') 0.1
- if (str.ne."*") call abort
+ if (str.ne."*") STOP 13
write (str,'(F2.0)') -0.001
- if (str.ne."**") call abort
+ if (str.ne."**") STOP 14
write (str,'(F2.0)') -0.01
- if (str.ne."**") call abort
+ if (str.ne."**") STOP 15
write (str,'(F2.0)') -0.1
- if (str.ne."**") call abort
+ if (str.ne."**") STOP 16
write (str,'(F0.2)') 0.0
- if (str.ne.".00") call abort
+ if (str.ne.".00") STOP 17
write (str,'(F0.0)') -0.0
- if (str.ne."-0.") call abort
+ if (str.ne."-0.") STOP 18
write (str,'(F0.1)') -0.0
- if (str.ne."-.0") call abort
+ if (str.ne."-.0") STOP 19
write (str,'(F0.2)') -0.0
- if (str.ne."-.00") call abort
+ if (str.ne."-.00") STOP 20
write (str,'(F0.3)') -0.0
- if (str.ne."-.000") call abort
+ if (str.ne."-.000") STOP 21
write (str,'(F3.0)') -0.0
- if (str.ne."-0.") call abort
+ if (str.ne."-0.") STOP 22
write (str,'(F2.0)') -0.0
- if (str.ne."**") call abort
+ if (str.ne."**") STOP 23
write (str,'(F1.0)') -0.0
- if (str.ne."*") call abort
+ if (str.ne."*") STOP 24
write (str,'(F0.1)') -0.0
- if (str.ne."-.0") call abort
+ if (str.ne."-.0") STOP 25
write (str,'(F3.1)') -0.0
- if (str.ne."-.0") call abort
+ if (str.ne."-.0") STOP 26
write (str,'(F2.1)') -0.0
- if (str.ne."**") call abort
+ if (str.ne."**") STOP 27
write (str,'(F1.1)') -0.0
- if (str.ne."*") call abort
+ if (str.ne."*") STOP 28
END
character(28) string
write(string,1) 3742. , 0.3742
1 format ( f14.0, 4pf14.0 )
- if (string.ne." 3742. 3742.") call abort
+ if (string.ne." 3742. 3742.") STOP 1
end program f_and_p
fmt_len = len_trim(fmt)\r
\r
!print *, "print '", fmt(:fmt_len), "', ", x, " ! => ", str(:len), ": ", reason\r
- call abort\r
+ STOP 1
end subroutine\r
character(len=50) :: buffer
WRITE(buffer,"(G0.5,'<')") -10000.
- if (buffer.ne."-10000.<") call abort
+ if (buffer.ne."-10000.<") STOP 1
WRITE(buffer,"(G1.5E5,'<')") -10000.
- if (buffer.ne."*<") call abort
+ if (buffer.ne."*<") STOP 2
WRITE(buffer,"(G2.5E5,'<')") -10000.
- if (buffer.ne."**<") call abort
+ if (buffer.ne."**<") STOP 3
WRITE(buffer,"(G3.5E5,'<')") -10000.
- if (buffer.ne."***<") call abort
+ if (buffer.ne."***<") STOP 4
WRITE(buffer,"(G4.5E5,'<')") -10000.
- if (buffer.ne."****<") call abort
+ if (buffer.ne."****<") STOP 5
WRITE(buffer,"(G5.5E5,'<')") -10000.
- if (buffer.ne."*****<") call abort
+ if (buffer.ne."*****<") STOP 6
WRITE(buffer,"(G6.5E5,'<')") -10000.
- if (buffer.ne."******<") call abort
+ if (buffer.ne."******<") STOP 7
WRITE(buffer,"(G7.5E5,'<')") -10000.
- if (buffer.ne."*******<") call abort
+ if (buffer.ne."*******<") STOP 8
WRITE(buffer,"(G8.5E5,'<')") -10000.
- if (buffer.ne."********<") call abort
+ if (buffer.ne."********<") STOP 9
WRITE(buffer,"(G9.5E5,'<')") -10000.
- if (buffer.ne."*********<") call abort
+ if (buffer.ne."*********<") STOP 10
WRITE(buffer,"(G10.5E5,'<')") -10000.
- if (buffer.ne."**********<") call abort
+ if (buffer.ne."**********<") STOP 11
WRITE(buffer,"(G11.5E5,'<')") -10000.
- if (buffer.ne."***********<") call abort
+ if (buffer.ne."***********<") STOP 12
WRITE(buffer,"(G12.5E5,'<')") -10000.
- if (buffer.ne."************<") call abort
+ if (buffer.ne."************<") STOP 13
WRITE(buffer,"(G13.5E5,'<')") -10000.
- if (buffer.ne."*************<") call abort
+ if (buffer.ne."*************<") STOP 14
WRITE(buffer,"(G14.5E5,'<')") -10000.
- if (buffer.ne."-10000. <") call abort
+ if (buffer.ne."-10000. <") STOP 15
WRITE(buffer,"(G15.5E5,'<')") -10000.
- if (buffer.ne." -10000. <") call abort
+ if (buffer.ne." -10000. <") STOP 16
WRITE(buffer,"(G16.5E5,'<')") -10000.
- if (buffer.ne." -10000. <") call abort
+ if (buffer.ne." -10000. <") STOP 17
STOP
END
character(25) :: string = "(g0,g0,g0)"
character(50) :: buffer
write(buffer, '(g0,g0,g0)') ':',12340,':'
- if (buffer.ne.":12340:") call abort
+ if (buffer.ne.":12340:") STOP 1
write(buffer, string) ':',0,':'
- if (buffer.ne.":0:") call abort
+ if (buffer.ne.":0:") STOP 2
write(buffer, string) ':',1.0_8/3.0_8,':'
- if (buffer.ne.":0.33333333333333331:") call abort
+ if (buffer.ne.":0.33333333333333331:") STOP 3
write(buffer, '(1x,a,g0,a)') ':',1.0_8/3.0_8,':'
- if (buffer.ne." :0.33333333333333331:") call abort
+ if (buffer.ne." :0.33333333333333331:") STOP 4
write(buffer, string) ':',"hello",':'
- if (buffer.ne.":hello:") call abort
+ if (buffer.ne.":hello:") STOP 5
write(buffer, "(g0,g0,g0,g0)") ':',.true.,.false.,':'
- if (buffer.ne.":TF:") call abort
+ if (buffer.ne.":TF:") STOP 6
write(buffer, "(g0,g0,',',g0,g0)") '(',( 1.2345_8, 2.4567_8 ),')'
- if (buffer.ne."(1.2344999999999999,2.4567000000000001)") call abort
+ if (buffer.ne."(1.2344999999999999,2.4567000000000001)") STOP 7
end
! { dg-do run }
-! { dg-options "-std=f95 -pedantic -fall-intrinsics" }
+! { dg-options "-std=f95 -pedantic " }
! { dg-shouldfail "Zero width in format descriptor" }
! PR36420 Fortran 2008: g0 edit descriptor
! Test case provided by Jerry DeLisle <jvdelisle@gcc.gnu.org>
character(25) :: string = "(g0,g0,g0)"
character(33) :: buffer
write(buffer, string) ':',0,':'
- if (buffer.ne.":0:") call abort
+ if (buffer.ne.":0:") STOP 1
end
! { dg-output "Fortran runtime error: Zero width in format descriptor(\n|\r\n|\r)" }
! PR36725 Compile time error for g0 edit descriptor
character(30) :: line
write(line, '(g0.3)') 0.1
-if (line.ne." 1.000E-01") call abort
+if (line.ne." 1.000E-01") STOP 1
write(line, '(g0.9)') 1.0
-if (line.ne."1.000000000E+00") call abort
+if (line.ne."1.000000000E+00") STOP 2
write(line, '(g0.5)') 29.23
-if (line.ne." 2.92300E+01") call abort
+if (line.ne." 2.92300E+01") STOP 3
write(line, '(g0.8)') -28.4
-if (line.ne."-2.83999996E+01") call abort
+if (line.ne."-2.83999996E+01") STOP 4
write(line, '(g0.8)') -0.0001
-if (line.ne."-9.99999975E-05") call abort
+if (line.ne."-9.99999975E-05") STOP 5
end
write(s1, fmt1) r
write(s2, fmt2) r
- if (s1 /= s2) call abort
+ if (s1 /= s2) STOP 1
!if (s1 /= s2) print "(6a)", trim(fmt1), ": '", trim(s1), "' /= '", trim(s2), "'"
!print "(6a)", trim(fmt1), ": '", trim(s1), "' /= '", trim(s2), "'"
end subroutine check_equal
end if
write(s_g, "('''', " // trim(fmt_g) // ",'''')") val
write(s_f, "('''', " // trim(fmt_f) // ",'''')") val
- if (s_g /= s_f) call abort
+ if (s_g /= s_f) STOP 1
!if (s_g /= s_f) then
!print "(a,g0,a,g0)", "lower=", lower, " upper=", upper
! print "(a, ' /= ', a, ' ', a, '/', a, ':', g0)", trim(s_g), trim(s_f), trim(fmt_g), trim(fmt_f), val
end if
end if
end do
- if (n /= 0) call abort
+ if (n /= 0) STOP 1
end program
write (buffer ,'(6(1X,1PG9.0e2))') 0.0, 0.04, 0.06, 0.4, 0.6, 243.0
write (buffer1,'(6(1X,1PE9.0e2))') 0.0, 0.04, 0.06, 0.4, 0.6, 243.0
- if (buffer /= buffer1) call abort
+ if (buffer /= buffer1) STOP 1
end
value = -9223372036854775807_i8_ -1
write(str_value, format_IntAd) value
- if (str_value.ne." -9223372036854775808") call abort
+ if (str_value.ne." -9223372036854775808") STOP 1
end program IntAdtest
l1 = .true.
write (str,"(L)") l1 ! { dg-warning "Extension: Missing positive width after L descriptor" }
read (str,"(L)") l1 ! { dg-warning "Extension: Missing positive width after L descriptor" }
- if (l1 .neqv. .true.) call abort
+ if (l1 .neqv. .true.) STOP 1
l2 = .true.
write (str,"(L)") l2 ! { dg-warning "Extension: Missing positive width after L descriptor" }
read (str,"(L)") l2 ! { dg-warning "Extension: Missing positive width after L descriptor" }
- if (l2 .neqv. .true.) call abort
+ if (l2 .neqv. .true.) STOP 2
l4 = .true.
write (str,"(L)") l4 ! { dg-warning "Extension: Missing positive width after L descriptor" }
read (str,"(L)") l4 ! { dg-warning "Extension: Missing positive width after L descriptor" }
- if (l4 .neqv. .true.) call abort
+ if (l4 .neqv. .true.) STOP 3
l8 = .true.
write (str,"(L)") l8 ! { dg-warning "Extension: Missing positive width after L descriptor" }
read (str,"(L)") l8 ! { dg-warning "Extension: Missing positive width after L descriptor" }
- if (l8 .neqv. .true.) call abort
+ if (l8 .neqv. .true.) STOP 4
l1 = .false.
write (str,"(L)") l1 ! { dg-warning "Extension: Missing positive width after L descriptor" }
read (str,"(L)") l1 ! { dg-warning "Extension: Missing positive width after L descriptor" }
- if (l1 .neqv. .false.) call abort
+ if (l1 .neqv. .false.) STOP 5
l2 = .false.
write (str,"(L)") l2 ! { dg-warning "Extension: Missing positive width after L descriptor" }
read (str,"(L)") l2 ! { dg-warning "Extension: Missing positive width after L descriptor" }
- if (l2 .neqv. .false.) call abort
+ if (l2 .neqv. .false.) STOP 6
l4 = .false.
write (str,"(L)") l4 ! { dg-warning "Extension: Missing positive width after L descriptor" }
read (str,"(L)") l4 ! { dg-warning "Extension: Missing positive width after L descriptor" }
- if (l4 .neqv. .false.) call abort
+ if (l4 .neqv. .false.) STOP 7
l8 = .false.
write (str,"(L)") l8 ! { dg-warning "Extension: Missing positive width after L descriptor" }
read (str,"(L)") l8 ! { dg-warning "Extension: Missing positive width after L descriptor" }
- if (l8 .neqv. .false.) call abort
+ if (l8 .neqv. .false.) STOP 8
end program test_l
! { dg-output "At line 14 of file.*" }
character(6) :: str = "xyz"
character(12) :: input = "1234abcdef"
read(input,'(f4,a6)') aval, str
- if (aval.ne.1234.0) call abort()
- if (str.ne."abcdef") call abort()
+ if (aval.ne.1234.0) STOP 1
+ if (str.ne."abcdef") STOP 2
aval = 0.0
str = "xyz"
read(input,'(d4,a6)') aval, str
- if (aval.ne.1234.0) call abort()
- if (str.ne."abcdef") call abort()
+ if (aval.ne.1234.0) STOP 3
+ if (str.ne."abcdef") STOP 4
end
aval = 0.0
str = "xyz"
read(input,fmtstr) aval, str
- if (aval.ne.1234.0) call abort()
- if (str.ne."abcdef") call abort()
+ if (aval.ne.1234.0) STOP 1
+ if (str.ne."abcdef") STOP 2
end
real(8) :: x = 1.0e-100_8
character(50) :: outstr
write (outstr,'(1X,2E12.3)') x, 2 * x
- if (outstr.ne." 0.100E-99 0.200E-99") call abort
+ if (outstr.ne." 0.100E-99 0.200E-99") STOP 1
! Before patch 2 * x was put out wrong
write (outstr,'(1X,1P,2E12.3)') x, 2 * x
- if (outstr.ne." 1.000-100 2.000-100") call abort
+ if (outstr.ne." 1.000-100 2.000-100") STOP 2
end program gfcbug66
call checkfmt("(rp, 0pf18.3)", -643.125, " -643.125")
! print *, n_tst, n_cnt, n_skip
- if (n_cnt /= 0) call abort
+ if (n_cnt /= 0) STOP 1
if (all(.not. l_skip)) print *, "All kinds rounded to nearest"
contains
rewind(7)
read(7,'(F15.5)') a,b
! note the read format is wider than the write
- if (abs(a-1.0) .gt. 1e-5) call abort
- if (abs(b-2.0) .gt. 1e-5) call abort
+ if (abs(a-1.0) .gt. 1e-5) STOP 1
+ if (abs(b-2.0) .gt. 1e-5) STOP 2
end
WRITE(ODATA, 20) I1(1,2), IVI, A1(3), JVI, KVI, A1(2), AVS, A1(1)
20 FORMAT (2I5, 1X, E10.5, BN, 2I5, F6.1, BZ, F6.2, BN, 1X, E8.3, I5)
-if (ODATA /= CORRECT1) call abort
+if (ODATA /= CORRECT1) STOP 1
ODATA=""
READ(IDATA2, 30) I2(1,2,1), A1(3), AVS, IVI, I1(1,1), JVI, BVS, A1(2), I2(1,1,1)
WRITE(ODATA, 40) I2(1,2,1), A1(3), AVS, IVI, I1(1,1), JVI, BVS, A1(2), I2(1,1,1)
40 FORMAT (I5, F7.0, BZ, 1X, F5.2, 2(1X,I4),I5, F7.0, BZ, 1X, F5.2, 1X, I4)
-if (ODATA /= CORRECT2) call abort
+if (ODATA /= CORRECT2) STOP 2
ODATA=""
READ(IDATA3, 50) A2
WRITE(ODATA,60) A2
60 FORMAT (4D20.10)
-if (ODATA /= CORRECT3) call abort
+if (ODATA /= CORRECT3) STOP 3
end program test_bn
rewind (10)
read (10, fmt='(i6, (t7, 6i2))') nrow, (vec(i), i=1,15)
close (10)
- if (nrow.ne.1) call abort
- if (any (vec.ne.(/1,2,3,4,5,6,7,8,9,10,11,12,13,14,15/))) call abort
+ if (nrow.ne.1) STOP 1
+ if (any (vec.ne.(/1,2,3,4,5,6,7,8,9,10,11,12,13,14,15/))) STOP 2
end
rewind(11)
read (11, '(a040,t1,040a)', end = 999) foost1 , foost2
- if (foost1.ne.foost2) call abort()
+ if (foost1.ne.foost2) STOP 1
read (11, '(a032,t2,a032t3,a032)', end = 999) foost1 , foost2, foost3
- if (foost1(1:32).ne."123456789 123456789 123456789 ") call abort()
- if (foost2(1:32).ne."23456789 123456789 123456789 ") call abort()
- if (foost3(1:32).ne."3456789 123456789 123456789 ") call abort()
+ if (foost1(1:32).ne."123456789 123456789 123456789 ") STOP 2
+ if (foost2(1:32).ne."23456789 123456789 123456789 ") STOP 3
+ if (foost3(1:32).ne."3456789 123456789 123456789 ") STOP 4
read (11, '(a017,t1,a0017)', end = 999) foost1 , foost2
- if (foost1.ne.foost2) call abort()
- if (foost2(1:17).ne." Now is the time ") call abort()
+ if (foost1.ne.foost2) STOP 5
+ if (foost2(1:17).ne." Now is the time ") STOP 6
goto 1000
- 999 call abort()
+ 999 STOP 7
1000 continue
close(11)
end
write(10, fmt) 'xxxx', (y(i), i = 1,n)
rewind(10)
read(10, '(a)') fmt
- if (fmt.ne."xxxx a a a") call abort()
+ if (fmt.ne."xxxx a a a") STOP 1
end program t
read(10,*) b
read(10,*) c
close(10)
- if (a.ne.b) call abort()
- IF (b.ne.c) call abort()
+ if (a.ne.b) STOP 1
+ IF (b.ne.c) STOP 2
end
close (10, status="keep")
open (unit=10, file="pr32678testfile", access="stream")
read(10, pos=1) output(1:21)
- if (output(1:21).ne."ab x") call abort
+ if (output(1:21).ne."ab x") STOP 1
read(10) c
- if ((c.ne.achar(10)) .and. (c.ne.achar(13))) call abort
+ if ((c.ne.achar(10)) .and. (c.ne.achar(13))) STOP 2
close (10, status="delete")
10 format (a2,t1,a1,t2,a1,t20,' x')
end
!write(*,'(a)') "123456789012345678901234567890"
write(output,'(T20,A3, T1,A4, T5,A2, T7,A2, T9,A4, T17,A2)')
1 'a', 'b', 'c', 'd', 'e', 'f'
- if (output .ne. " b c d e f a") call abort
+ if (output .ne. " b c d e f a") STOP 1
end
read (10, pos=50000) b
read (10, pos=25474) c
close (10, status="delete")
- if (a /= "a") call abort
- if (b /= "b") call abort
- if (c /= " ") call abort
+ if (a /= "a") STOP 1
+ if (b /= "b") STOP 2
+ if (c /= " ") STOP 3
end
c write(6,fmt='(20I4)') (IFLTSQ(I), I=1,NFLCYC)
c write(6,*) "Program is correct"
close(29)
- if (IFLGHT.ne.451) call abort
- if (NFLCYC.ne.40) call abort
+ if (IFLGHT.ne.451) STOP 1
+ if (NFLCYC.ne.40) STOP 2
stop
C
100 CONTINUE
C write(6,*) "End of file encountered (wrong)"
close (29)
- call abort
+ STOP 3
STOP
END
x = 12.34
write(line,10) x
10 format(tr2,tl2,g11.4)
- if (line.ne.' 12.34 ') call abort()
+ if (line.ne.' 12.34 ') STOP 1
write(line,20) x
20 format(tr5,tl3,g11.4)
- if (line.ne.' 12.34 ') call abort()
+ if (line.ne.' 12.34 ') STOP 2
write(line,30) x
30 format(tr5,tl3,tl3,g11.4)
- if (line.ne.' 12.34 ') call abort()
+ if (line.ne.' 12.34 ') STOP 3
write(line,40) x
40 format(tr25,tl35,f11.4)
- if (line.ne.' 12.3400 ') call abort()
+ if (line.ne.' 12.3400 ') STOP 4
write(line,50) x
50 format(tl5,tr3,f11.4)
- if (line.ne.' 12.3400 ') call abort()
+ if (line.ne.' 12.3400 ') STOP 5
write(line,60) x
60 format(t5,tl3,f11.4)
- if (line.ne.' 12.3400 ') call abort()
+ if (line.ne.' 12.3400 ') STOP 6
end
character(40) :: str
double precision :: d = 5.0
write (str, '(*(2(E15.7)))') d, d
- if (str /= " 0.5000000E+01 0.5000000E+01") call abort
+ if (str /= " 0.5000000E+01 0.5000000E+01") STOP 1
write (str, '(*(2E15.7))') d, d
- if (str /= " 0.5000000E+01 0.5000000E+01") call abort
+ if (str /= " 0.5000000E+01 0.5000000E+01") STOP 2
end program
write(line,10) x
10 format(g1
* 1.4)
- if (line.ne." 12.34") call abort()
+ if (line.ne." 12.34") STOP 1
line = ""
write(line,20) x
20 format(t r 2 , g 1 1 . 4)
- if (line.ne." 12.34") call abort()
+ if (line.ne." 12.34") STOP 2
end
50 FORMAT (1PD20.0)
astr = ""
write(astr,50) -8.0D0
- if (astr.ne." -8.D+00") call abort
+ if (astr.ne." -8.D+00") STOP 1
write(astr,50) 8.0D0
- if (astr.ne." 8.D+00") call abort
+ if (astr.ne." 8.D+00") STOP 2
write(astr, '(E15.0)', iostat=istat) 1e5
- if (istat /= 5006) call abort
+ if (istat /= 5006) STOP 3
write(astr, '(D15.0)', iostat=istat) 1e5
- if (istat /= 5006) call abort
+ if (istat /= 5006) STOP 4
write(astr, '(G15.0)', iostat=istat) 1e5
- if (istat /= 5006) call abort
+ if (istat /= 5006) STOP 5
write(astr, '(2PE15.0)', iostat=istat) 1e5
- if (istat /= 5006) call abort
+ if (istat /= 5006) STOP 6
write(astr, '(0PE15.0)', iostat=istat) 1e5
- if (istat /= 5006) call abort
+ if (istat /= 5006) STOP 7
write(astr, '(1PE15.0)', iostat=istat) 1e5
- if (istat /= 0) call abort
+ if (istat /= 0) STOP 8
write(astr, '(F15.0)', iostat=istat) 1e5
- if (astr.ne." 100000.") call abort
- if (istat /= 0) call abort
+ if (astr.ne." 100000.") STOP 9
+ if (istat /= 0) STOP 10
end program test
REAL :: a(10)
a = x
-if (nearest (x(1), dir(1)) /= nearest (a(1), dir(1))) call abort ()
-if (nearest (x(2), dir(2)) /= nearest (a(2), dir(2))) call abort ()
-if (nearest (x(3), dir(3)) /= nearest (a(3), dir(3))) call abort ()
-if (nearest (x(4), dir(4)) /= nearest (a(4), dir(4))) call abort ()
-if (nearest (x(5), dir(5)) /= nearest (a(5), dir(5))) call abort ()
-if (nearest (x(6), dir(6)) /= nearest (a(6), dir(6))) call abort ()
-if (nearest (x(7), dir(7)) /= nearest (a(7), dir(7))) call abort ()
-if (nearest (x(8), dir(8)) /= nearest (a(8), dir(8))) call abort ()
+if (nearest (x(1), dir(1)) /= nearest (a(1), dir(1))) STOP 1
+if (nearest (x(2), dir(2)) /= nearest (a(2), dir(2))) STOP 2
+if (nearest (x(3), dir(3)) /= nearest (a(3), dir(3))) STOP 3
+if (nearest (x(4), dir(4)) /= nearest (a(4), dir(4))) STOP 4
+if (nearest (x(5), dir(5)) /= nearest (a(5), dir(5))) STOP 5
+if (nearest (x(6), dir(6)) /= nearest (a(6), dir(6))) STOP 6
+if (nearest (x(7), dir(7)) /= nearest (a(7), dir(7))) STOP 7
+if (nearest (x(8), dir(8)) /= nearest (a(8), dir(8))) STOP 8
! These last two tests are commented out because mpfr provides no support
! for denormals, and therefore we get TINY instead of the correct result.
-!if (nearest (x(9), dir(9)) /= nearest (a(9), dir(9))) call abort ()
-!if (nearest (x(10), dir(10)) /= nearest (a(10), dir(10))) call abort ()
+!if (nearest (x(9), dir(9)) /= nearest (a(9), dir(9))) STOP 9
+!if (nearest (x(10), dir(10)) /= nearest (a(10), dir(10))) STOP 10
end
forall (i=1:15, i1(i) /= 0)
i1(i) = 0
end forall
-if (any(i1 /= 0)) call abort
+if (any(i1 /= 0)) STOP 1
a1(:)%k = i1(1:10)
forall (i=1:10, a1(i)%k == 0)
a1(i)%k = i
end forall
-if (any (a1(:)%k /= (/ (i, i=1,10) /))) call abort
+if (any (a1(:)%k /= (/ (i, i=1,10) /))) STOP 2
forall (i=1:15, j=1:10, a1(j)%k <= j)
i2(i,j) = j + i*11
end forall
do i=1,15
- if (any (i2(i,:) /= (/ (i*11 + j, j=1,10) /))) call abort
+ if (any (i2(i,:) /= (/ (i*11 + j, j=1,10) /))) STOP 3
end do
end
a (i, j, k, l) = i - j + k - l
end forall
end forall
- if (sum (a) .ne. 2625.0) call abort ()
+ if (sum (a) .ne. 2625.0) STOP 1
! Check that the fix has not broken the treatment of the '=='
forall (i = 1:5, i == 3) a(i, i, i, i) = -5
- if (sum (a) .ne. 2616.0) call abort ()
+ if (sum (a) .ne. 2616.0) STOP 2
end
forall(i=1:1) b(i:i) = b(i:i) ! The rest were found to be broken
forall(i=1:1) b(:)(i:i) = b(:)(i:i)
forall(i=1:1) b(1:3)(i:i) = b(2:4)(i:i)
- if (any (b .ne. (/"2","3","4","4"/))) call abort ()
+ if (any (b .ne. (/"2","3","4","4"/))) STOP 1
b = c
forall(i=1:1) b(2:4)(i:i) = b(1:3)(i:i)
- if (any (b .ne. (/"1","1","2","3"/))) call abort ()
+ if (any (b .ne. (/"1","1","2","3"/))) STOP 2
b = c
do i = 1, 1
b(2:4)(i:i) = b(1:3)(i:i) ! This was PR33811 and Paul's bit
end do
- if (any (b .ne. (/"1","1","2","3"/))) call abort ()
+ if (any (b .ne. (/"1","1","2","3"/))) STOP 3
call foo
contains
subroutine foo
character(LEN=12) :: b = "123456789012"
! These are Dominique's
forall (i = 3:10) a(:)(i:i+2) = a(:)(i-2:i)
- IF (a(1) .ne. "121234567890") CALL abort ()
+ IF (a(1) .ne. "121234567890") STOP 4
forall (i = 3:10) a(2)(i:i+2) = a(1)(i-2:i)
- IF (a(2) .ne. "121212345678") call abort ()
+ IF (a(2) .ne. "121212345678") STOP 5
forall (i = 3:10) b(i:i+2) = b(i-2:i)
- IF (b .ne. "121234567890") CALL abort ()
+ IF (b .ne. "121234567890") STOP 6
end subroutine
end
!
integer :: p(4) = (/2,4,1,3/)
forall (i = 1:4) p(p(i)) = i ! This was the original
- if (any (p .ne. (/3,1,4,2/))) call abort ()
+ if (any (p .ne. (/3,1,4,2/))) STOP 1
forall (i = 1:4) p(5 - p(i)) = p(5 - i) ! This is a more complicated version
- if (any (p .ne. (/1,2,3,4/))) call abort ()
+ if (any (p .ne. (/1,2,3,4/))) STOP 2
end
forall(iTime=1:2)
timeSteps(iTime)=ratio**(dble(iTime)-0.5d0)-ratio**(dble(iTime)-1.5d0)
end forall
- if (any(abs(timesteps - control) > 1d-10)) call abort
+ if (any(abs(timesteps - control) > 1d-10)) STOP 1
! Make sure we still do the front-end optimization after a forall
a = cos(ratio)*cos(ratio) + sin(ratio)*sin(ratio)
- if (abs(a-1.d0) > 1d-10) call abort
+ if (abs(a-1.d0) > 1d-10) STOP 2
end program test
! { dg-final { scan-tree-dump-times "__builtin_cos" 1 "original" } }
! { dg-final { scan-tree-dump-times "__builtin_sin" 1 "original" } }
! Check that non-mask case is still OK and the fix for PR28119
a = 0
- forall (i=1:n) a(i) = i ; if (any (a .ne. (/1,2,3,4/))) call abort ()
+ forall (i=1:n) a(i) = i ; if (any (a .ne. (/1,2,3,4/))) STOP 1
! Now a mask using a function with an explicit interface
! via use association.
a = 0
forall (i=1:n, foot (i)) a(i) = i
- if (any (a .ne. (/0,2,3,0/))) call abort ()
+ if (any (a .ne. (/0,2,3,0/))) STOP 2
! Now an array variable mask
a = 0
forall (i=1:n, .not. s(i)) a(i) = i
- if (any (a .ne. (/1,0,0,4/))) call abort ()
+ if (any (a .ne. (/1,0,0,4/))) STOP 3
! This was the PR - an internal function mask
a = 0
forall (i=1:n, t (i)) a(i) = i
- if (any (a .ne. (/0,2,0,4/))) call abort ()
+ if (any (a .ne. (/0,2,0,4/))) STOP 4
! Check that an expression is OK - this also gave a syntax
! error
a = 0
forall (i=1:n, mod (i, 2) == 0) a(i) = i
- if (any (a .ne. (/0,2,0,4/))) call abort ()
+ if (any (a .ne. (/0,2,0,4/))) STOP 5
! And that an expression that used to work is OK
a = 0
forall (i=1:n, s (i) .or. t(i)) a(i) = w (i)
- if (any (a .ne. (/0,3,2,1/))) call abort ()
+ if (any (a .ne. (/0,3,2,1/))) STOP 6
contains
pure logical function t(i)
a = 0
forall (i=1:n, foot (i)) a(i) = i ! { dg-error "impure" }
- if (any (a .ne. (/0,2,3,0/))) call abort ()
+ if (any (a .ne. (/0,2,3,0/))) STOP 1
forall (i=1:n, s (i) .or. t(i)) a(i) = i ! { dg-error "impure|LOGICAL" }
- if (any (a .ne. (/0,3,2,1/))) call abort ()
+ if (any (a .ne. (/0,3,2,1/))) STOP 2
a = 0
forall (i=1:n, mod (i, 2) == 0) a(i) = w (i) ! { dg-error "impure" }
- if (any (a .ne. (/0,2,0,4/))) call abort ()
+ if (any (a .ne. (/0,2,0,4/))) STOP 3
contains
logical function t(i)
end forall
! print *, l1
! print '(4i2)', it
- if (any (it .ne. reshape ((/1, 0, 0, 4/), (/2, 2/)))) call abort ()
+ if (any (it .ne. reshape ((/1, 0, 0, 4/), (/2, 2/)))) STOP 1
end
end forall
tot = sum(a(:,:))
! print *, tot
- if (tot .ne. 200) call abort ()
+ if (tot .ne. 200) STOP 1
end
real :: y
y=fraction (-2.0)
- if (fraction (-2.0) /= -0.5) call abort ()
- if (fraction (-0.0) /= 0.0) call abort ()
- if (sign(1.0, fraction(-0.0)) /= -1.0) call abort ()
- if (fraction (-2.0_8) /= -0.5) call abort ()
+ if (fraction (-2.0) /= -0.5) STOP 1
+ if (fraction (-0.0) /= 0.0) STOP 2
+ if (sign(1.0, fraction(-0.0)) /= -1.0) STOP 3
+ if (fraction (-2.0_8) /= -0.5) STOP 4
end program test_frac
write(911,"()")
newline_length = ftell(911)
close (911)
- if (newline_length < 1 .or. newline_length > 2) call abort()
+ if (newline_length < 1 .or. newline_length > 2) STOP 1
open(fd, status="scratch")
! expected position: one leading blank + 10 + newline
WRITE(fd, *) "1234567890"
- IF (FTELL(fd) /= 11 + newline_length) CALL abort()
+ IF (FTELL(fd) /= 11 + newline_length) STOP 2
! move backward from current position
CALL FSEEK(fd, -11 - newline_length, SEEK_CUR, ierr)
- IF (ierr /= 0 .OR. FTELL(fd) /= 0) CALL abort()
+ IF (ierr /= 0 .OR. FTELL(fd) /= 0) STOP 3
! move to negative position (error)
CALL FSEEK(fd, -1, SEEK_SET, ierr)
- IF (ierr == 0 .OR. FTELL(fd) /= 0) CALL abort()
+ IF (ierr == 0 .OR. FTELL(fd) /= 0) STOP 4
! move forward from end (11 + 10 + newline)
CALL FSEEK(fd, 10, SEEK_END, ierr)
- IF (ierr /= 0 .OR. FTELL(fd) /= 21 + newline_length) CALL abort()
+ IF (ierr /= 0 .OR. FTELL(fd) /= 21 + newline_length) STOP 5
! set position (0)
CALL FSEEK(fd, 0, SEEK_SET, ierr)
- IF (ierr /= 0 .OR. FTELL(fd) /= 0) CALL abort()
+ IF (ierr /= 0 .OR. FTELL(fd) /= 0) STOP 6
! move forward from current position
CALL FSEEK(fd, 5, SEEK_CUR, ierr)
- IF (ierr /= 0 .OR. FTELL(fd) /= 5) CALL abort()
+ IF (ierr /= 0 .OR. FTELL(fd) /= 5) STOP 7
CALL FSEEK(fd, HUGE(0_1), SEEK_SET, ierr)
- IF (ierr /= 0 .OR. FTELL(fd) /= HUGE(0_1)) CALL abort()
+ IF (ierr /= 0 .OR. FTELL(fd) /= HUGE(0_1)) STOP 8
CALL FSEEK(fd, HUGE(0_2), SEEK_SET, ierr)
- IF (ierr /= 0 .OR. FTELL(fd) /= HUGE(0_2)) CALL abort()
+ IF (ierr /= 0 .OR. FTELL(fd) /= HUGE(0_2)) STOP 9
CALL FSEEK(fd, HUGE(0_4), SEEK_SET, ierr)
- IF (ierr /= 0 .OR. FTELL(fd) /= HUGE(0_4)) CALL abort()
+ IF (ierr /= 0 .OR. FTELL(fd) /= HUGE(0_4)) STOP 10
CALL FSEEK(fd, -HUGE(0_4), SEEK_CUR, ierr)
- IF (ierr /= 0 .OR. FTELL(fd) /= 0) CALL abort()
+ IF (ierr /= 0 .OR. FTELL(fd) /= 0) STOP 11
END PROGRAM
open (10, status="scratch")
call ftell (10, o)
- if (o /= 0) call abort
+ if (o /= 0) STOP 1
write (10,"(A)") "1234567"
call ftell (10, o)
- if (o /= 8 .and. o /= 9) call abort
+ if (o /= 8 .and. o /= 9) STOP 2
write (10,"(A)") "1234567"
call ftell (10, o2)
- if (o2 /= 2 * o) call abort
+ if (o2 /= 2 * o) STOP 3
close (10)
call ftell (10, o)
- if (o /= -1) call abort
+ if (o /= -1) STOP 4
end
! { dg-do run }
integer(kind=8) o
open (10, status="scratch")
- if (ftell(10) /= 0) call abort
+ if (ftell(10) /= 0) STOP 1
write (10,"(A)") "1234567"
- if (ftell(10) /= 8 .and. ftell(10) /= 9) call abort
+ if (ftell(10) /= 8 .and. ftell(10) /= 9) STOP 2
o = ftell(10)
write (10,"(A)") "1234567"
- if (ftell(10) /= 2 * o) call abort
+ if (ftell(10) /= 2 * o) STOP 3
close (10)
- if (ftell(10) /= -1) call abort
+ if (ftell(10) /= -1) STOP 4
end
call ftell(10, i)
! Expected: On '\n' systems: 7, on \r\n systems: 8
if(i /= 7 .and. i /= 8) then
- call abort
+ STOP 1
end if
read(10,'(a)') buffer
if (trim(buffer) /= "789") then
- call abort()
+ STOP 1
end if
call ftell(10,j)
close(10)
! Expected: On '\n' systems: 11, on \r\n systems: 13
if (i == 7) then
read(10, pos=7) ch
- if (ch /= char(10)) call abort
- if (j /= 11) call abort
+ if (ch /= char(10)) STOP 2
+ if (j /= 11) STOP 3
end if
if (i == 8) then
read(10, pos=7) ch
- if (ch /= char(13)) call abort
+ if (ch /= char(13)) STOP 4
read(10) ch
- if (ch /= char(10)) call abort
- if (j /= 13) call abort
+ if (ch /= char(10)) STOP 5
+ if (j /= 13) STOP 6
end if
close(10, status="delete")
end program ftell_3
integer :: a(2,2)
a = -42
a(1,:) = func()
-if (any (reshape (a, [4]) /= [1, -42, 2, -42])) call abort
+if (any (reshape (a, [4]) /= [1, -42, 2, -42])) STOP 1
a = -42
a(2,:) = func()
-if (any (reshape (a, [4]) /= [-42, 1, -42, 2])) call abort
+if (any (reshape (a, [4]) /= [-42, 1, -42, 2])) STOP 2
a = -42
a(:,1) = func()
-if (any (reshape (a, [4]) /= [1, 2, -42, -42])) call abort
+if (any (reshape (a, [4]) /= [1, 2, -42, -42])) STOP 3
a = -42
a(:,2) = func()
-if (any (reshape (a, [4]) /= [-42, -42, 1, 2])) call abort
+if (any (reshape (a, [4]) /= [-42, -42, 1, 2])) STOP 4
contains
function func()
integer :: func(2)
double precision, dimension(2,2):: testCatch
type( boundTest ):: testObj
testCatch = testObj%test(2,2) ! This would cause an ICE
- if (any (testCatch .ne. dble (reshape ([(i, i = 1, 4)],[2,2])))) call abort
+ if (any (testCatch .ne. dble (reshape ([(i, i = 1, 4)],[2,2])))) STOP 1
end program bugTest
arr = reshape (vect, shape(arr))
r = f(i,real(i),"HALLO",arr)
- if (r%i .ne. i) call abort()
- if (r%x .ne. real(i)) call abort()
- if (r%c .ne. "HALLO") call abort()
+ if (r%i .ne. i) STOP 1
+ if (r%x .ne. real(i)) STOP 2
+ if (r%c .ne. "HALLO") STOP 3
vect2 = reshape (r%arr, shape(vect2))
- if (any(vect2.ne.vect)) call abort()
+ if (any(vect2.ne.vect)) STOP 4
end do
contains
type (mytype), pointer :: y
x = mytype (42)
y => get (x)
- if (y%i.ne.42) call abort ()
+ if (y%i.ne.42) STOP 1
x = mytype (112)
y => get2 (x)
- if (y%i.ne.112) call abort ()
+ if (y%i.ne.112) STOP 2
end program func_derived_2
rewind (10)
read (10, '(80a)') line
- if (trim (line).ne."derived = 2") call abort ()
+ if (trim (line).ne."derived = 2") STOP 1
read (10, '(80a)') line
- if (trim (line).ne."simple = 1") call abort ()
+ if (trim (line).ne."simple = 1") STOP 2
read (10, '(80a)') line
- if (trim (line).ne."simple = 1") call abort ()
+ if (trim (line).ne."simple = 1") STOP 3
read (10, '(80a)') line
- if (trim (line).ne."simple = 1") call abort ()
+ if (trim (line).ne."simple = 1") STOP 4
close (10)
end program
! From PR 19673 : We didn't dereference the result from POINTER
! functions with a RESULT clause
program ret_ptr
- if (foo(99) /= bar(99)) call abort ()
+ if (foo(99) /= bar(99)) STOP 1
contains
function foo (arg) result(ptr)
integer :: arg
! { dg-do run }
! Character functions with a result clause were broken
program testch
- if (ch().ne."hello ") call abort()
+ if (ch().ne."hello ") STOP 1
contains
function ch () result(str)
character(len = 10) :: str
ptr2 => bar2(2)
bar1 = x%gen(1)
-if (ptr1 /= 11) call abort()
+if (ptr1 /= 11) STOP 1
bar1 = x%foo(2)
-if (ptr1 /= 12) call abort()
+if (ptr1 /= 12) STOP 2
bar2 = x%gen(3)
-if (ptr2 /= 13) call abort()
+if (ptr2 /= 13) STOP 3
bar2 = x%foo(4)
-if (ptr2 /= 14) call abort()
+if (ptr2 /= 14) STOP 4
bar2(:) = x%gen(5)
-if (ptr2 /= 15) call abort()
+if (ptr2 /= 15) STOP 5
bar2(:) = x%foo(6)
-if (ptr2 /= 16) call abort()
+if (ptr2 /= 16) STOP 6
call test()
end
integer, pointer :: ptr
bar = [1,2]
ptr => bar(2)
-if (ptr /= 2) call abort()
+if (ptr /= 2) STOP 7
bar = gen()
-if (ptr /= 77) call abort()
+if (ptr /= 77) STOP 8
contains
function foo()
integer, allocatable :: foo(:)
character(len = 10) :: c
character(4) :: cl
c = f ()
- if (g () /= "2") call abort
+ if (g () /= "2") STOP 1
contains
character(len = l) function f ()
use m
- if (len (f) /= 2) call abort
+ if (len (f) /= 2) STOP 2
f = "a"
end function f
character(len = len (cl)) function g ()
END FUNCTION t
character t
- if (t() .ne. "q") call abort ()
+ if (t() .ne. "q") STOP 1
end
use mymodule
type(t), external :: func
type(t) :: z
- if (kind (y ()) .ne. 4) call abort ()
- if (kind (declared_dp_before_defined ()) .ne. 8) call abort ()
- if (int (declared_dp_before_defined ()) .ne. 4) call abort ()
- if (int (another_dp_before_defined ()) .ne. 4) call abort ()
+ if (kind (y ()) .ne. 4) STOP 1
+ if (kind (declared_dp_before_defined ()) .ne. 8) STOP 2
+ if (int (declared_dp_before_defined ()) .ne. 4) STOP 3
+ if (int (another_dp_before_defined ()) .ne. 4) STOP 4
z = func()
- if (z%i .ne. 5) call abort ()
+ if (z%i .ne. 5) STOP 5
end
use m1, only: i2
use m2 ! This provides the function kind
three = i1
- if(three /= kind(three)) call abort()
+ if(three /= kind(three)) STOP 1
end function three
! At one stage during the development of the patch, this started failing
real (kind(0d0)) foo
i = one()
i = two()
- if(three() /= 8) call abort()
- if (int(foo()) /= 8) call abort ()
+ if(three() /= 8) STOP 2
+ if (int(foo()) /= 8) STOP 3
contains
integer(i1) function one() ! Host associated kind
- if (kind(one) /= 4) call abort()
+ if (kind(one) /= 4) STOP 4
one = 1
end function one
integer(i1) function two() ! Use associated kind
use m1, only: i2
use m2
- if (kind(two) /= 8) call abort()
+ if (kind(two) /= 8) STOP 5
two = 1
end function two
end program main
else if ((my_ichar(charq).ge.97 .and. my_ichar(charq).le.103)) then
test2_OK = .true.
end if
- if ((.not. test1_ok) .or. (.not. test2_ok)) call abort
+ if ((.not. test1_ok) .or. (.not. test2_ok)) STOP 1
test1_ok = .true.
test2_ok = .true.
else if ((my_ichar(charq).ge.97 .and. my_ichar(charq).le.103)) then
test3_ok = .true.
end if
- if ((.not. test1_ok) .or. (.not. test2_ok) .or. (.not. test3_ok)) call abort
+ if ((.not. test1_ok) .or. (.not. test2_ok) .or. (.not. test3_ok)) STOP 2
test1_ok = .true.
test2_ok = .true.
test3_ok = .true.
end if
- if ((.not. test1_ok) .or. (.not. test2_ok) .or. (.not. test3_ok)) call abort
+ if ((.not. test1_ok) .or. (.not. test2_ok) .or. (.not. test3_ok)) STOP 3
contains
pure function my_ichar(c)
h1 = [(cos(2*pi*mod(i*k,N)/N),k=0,N/2), &
& (sin(2*pi*mod(i*k,N)/N),k=1,N/2-1)]
h2 = (/ 1._dp, 0._dp, -1._dp, 1._dp /)
- if (any(abs(h1 - h2) > eps)) call abort
+ if (any(abs(h1 - h2) > eps)) STOP 1
end program test
n = 3
goto 100
100 x = dble(n) + dble(n)
- if (x /= 6.d0) call abort
+ if (x /= 6.d0) STOP 1
end program main
END FUNCTION
INTEGER :: s1
-IF (S1(1,2,1).NE.0) CALL ABORT()
+IF (S1(1,2,1).NE.0) STOP 1
END
character(len=20) :: line
n = 3
write (unit=line,fmt='(3I2)') myfunc(n) + myfunc(n)
- if (line /= ' 61218') call abort
+ if (line /= ' 61218') STOP 1
write (unit=line,fmt='(A)') mychar(2) // mychar(2)
- if (line /= '2323') call abort
+ if (line /= '2323') STOP 2
end program main
! { dg-final { scan-tree-dump-times "myfunc" 2 "original" } }
! { dg-final { scan-tree-dump-times "mychar" 2 "original" } }
call bug1(expnt)
if ((zeta(1).ne.1) .or. (zeta(2).ne.2) .or. (zeta(3).ne.3)) then
- call abort
+ STOP 1
endif
end
!
character*5 string
write(string, *) "a "
- if (string .ne. ' a') call abort
+ if (string .ne. ' a') STOP 1
C-- The leading space is normal for list-directed output
end
data a/441*1d0/
N=10
call sub(N,a)
- if (a(-N,N) .ne. 0d0) call abort
+ if (a(-N,N) .ne. 0d0) STOP 1
end
*
* C --- PROGRAM END -------
data r/4e10/
foo = 4e10
bar = r
- if (foo .ne. bar) call abort
+ if (foo .ne. bar) STOP 1
end
* $ g77 x.f && ./a.out
* 1345294336
data r/4d10/
foo = 4d10
bar = r
- if (foo .ne. bar) call abort
+ if (foo .ne. bar) STOP 1
end
data c/(4e10,0)/
foo = 4e10
bar = c
- if (foo .ne. bar) call abort
+ if (foo .ne. bar) STOP 1
end
data c/(4d10,0)/
foo = 4d10
bar = c
- if (foo .ne. bar) call abort
+ if (foo .ne. bar) STOP 1
end
j = 0
do while (i() .eq. 1)
j = j + 1
- if (j .gt. 5) call abort
+ if (j .gt. 5) STOP 1
end do
- if (j .ne. 4) call abort
- if (ival .ne. 5) call abort
+ if (j .ne. 4) STOP 2
+ if (ival .ne. 5) STOP 3
end
function i()
common /x/ ival
* Date: Sun, 06 Jun 1999 16:39:35 -0400
* X-UIDL: 6aa9208d7bda8b6182a095dfd37016b7
- IF (DNINT(0.0D0) .NE. 0.) CALL ABORT
+ IF (DNINT(0.0D0) .NE. 0.) STOP 1
STOP
END
a = f1(one)
if ( abs(a-1.0) .gt. 1.0e-5 ) then
write(6,*) 'A should be 1.0 but it is',a
- call abort()
+ STOP 1
end if
end
I = SLASQX( N )
IF ( I .NE. 2*N ) THEN
WRITE(6,*) 'I = ', I, ' but should be ', 2*N
- CALL ABORT()
+ STOP 1
END IF
END
IF(BK .GT. TOLD) GOTO 10
ENDDO
WRITE(*,*)'Error: BK = ', BK
- CALL ABORT
+ STOP 1
10 CONTINUE
WRITE(*,*)'No Error: BK = ', BK
END
PRINT*
90 IF ( I .NE. 4 ) THEN
PRINT*,'I =', I, ' but should be 4'
- CALL ABORT()
+ STOP 1
END IF
END
result = foo(a(i), b(i))
if (abs(result - x(i)) > tolerance) then
print *, i, a(i), b(i), x(i), result
- call abort
+ STOP 1
end if
end do
end
ENDDO
ENDDO
DO I = 1, 4
- IF (DAT(1,I) .GT. DAT(1,I+1)) CALL ABORT
+ IF (DAT(1,I) .GT. DAT(1,I+1)) STOP 1
ENDDO
END
c { dg-do run }
DO I = 0, 255
- IF (ICHAR(CHAR(I)) .NE. I) CALL ABORT
+ IF (ICHAR(CHAR(I)) .NE. I) STOP 1
ENDDO
END
w(1) = x
x = conjg(x)
w(1) = conjg(w(1))
- if (abs(x-w(1)) .gt. 1.0e-5) call abort
+ if (abs(x-w(1)) .gt. 1.0e-5) STOP 1
end
m2 = 7
buff(i) = 'tcase0a'
write(line,*) buff(i)(m1:m2)
- if (line .ne. ' tcase0a') call abort
+ if (line .ne. ' tcase0a') STOP 1
end
IF (A(IM5) .NE. -5. .OR. A(IM1) .NE. -1. .OR.
, A(IZ) .NE. 0. .OR.
, A(IP5) .NE. +5. .OR. A(IP1) .NE. +1. )
- , CALL ABORT
+ , STOP 1
END
END IF
END DO
10 FORMAT(I2/I2) = WHILE*REAL*THEN
- IF (FORMAT(I2) .NE. FORMAT(I2+I2)) CALL ABORT
+ IF (FORMAT(I2) .NE. FORMAT(I2+I2)) STOP 1
END ! DO
SUBROUTINE FUNCTION PROGRAM (REAL,INTEGER, LOGICAL)
LOGICAL REAL
do i=3,i
j = j+i
end do
- if (i.ne.7) call abort()
+ if (i.ne.7) STOP 1
print *, i,j
end
double precision d1, d2, d3
integer i1, i2, i3
- if (r1(1) .ne. 1.) call abort
- if (d1 .ne. 10.) call abort
- if (r1(4) .ne. 1.) call abort
- if (r1(5) .ne. 1.) call abort
- if (i1 .ne. 1) call abort
- if (r2(1) .ne. 2.) call abort
- if (d2 .ne. 20.) call abort
- if (r2(4) .ne. 2.) call abort
- if (r2(5) .ne. 2.) call abort
- if (i2 .ne. 2) call abort
- if (r3(1) .ne. 3.) call abort
- if (d3 .ne. 30.) call abort
- if (r3(4) .ne. 3.) call abort
- if (r3(5) .ne. 3.) call abort
- if (i3 .ne. 3) call abort
+ if (r1(1) .ne. 1.) STOP 1
+ if (d1 .ne. 10.) STOP 2
+ if (r1(4) .ne. 1.) STOP 3
+ if (r1(5) .ne. 1.) STOP 4
+ if (i1 .ne. 1) STOP 5
+ if (r2(1) .ne. 2.) STOP 6
+ if (d2 .ne. 20.) STOP 7
+ if (r2(4) .ne. 2.) STOP 8
+ if (r2(5) .ne. 2.) STOP 9
+ if (i2 .ne. 2) STOP 10
+ if (r3(1) .ne. 3.) STOP 11
+ if (d3 .ne. 30.) STOP 12
+ if (r3(4) .ne. 3.) STOP 13
+ if (r3(5) .ne. 3.) STOP 14
+ if (i3 .ne. 3) STOP 15
end
double precision d1, d2, d3
integer i1, i2, i3
- if (r1(1) .ne. 1.) call abort
- if (d1 .ne. 10.) call abort
- if (r1(4) .ne. 1.) call abort
- if (r1(5) .ne. 1.) call abort
- if (i1 .ne. 1) call abort
- if (r2(1) .ne. 2.) call abort
- if (d2 .ne. 20.) call abort
- if (r2(4) .ne. 2.) call abort
- if (r2(5) .ne. 2.) call abort
- if (i2 .ne. 2) call abort
- if (r3(1) .ne. 3.) call abort
- if (d3 .ne. 30.) call abort
- if (r3(4) .ne. 3.) call abort
- if (r3(5) .ne. 3.) call abort
- if (i3 .ne. 3) call abort
+ if (r1(1) .ne. 1.) STOP 1
+ if (d1 .ne. 10.) STOP 2
+ if (r1(4) .ne. 1.) STOP 3
+ if (r1(5) .ne. 1.) STOP 4
+ if (i1 .ne. 1) STOP 5
+ if (r2(1) .ne. 2.) STOP 6
+ if (d2 .ne. 20.) STOP 7
+ if (r2(4) .ne. 2.) STOP 8
+ if (r2(5) .ne. 2.) STOP 9
+ if (i2 .ne. 2) STOP 10
+ if (r3(1) .ne. 3.) STOP 11
+ if (d3 .ne. 30.) STOP 12
+ if (r3(4) .ne. 3.) STOP 13
+ if (r3(5) .ne. 3.) STOP 14
+ if (i3 .ne. 3) STOP 15
end
real r1, r2, r3
character c4, c5, c6
- if (c1(1) .ne. '1') call abort
- if (r1 .ne. 1.) call abort
- if (c1(11) .ne. '1') call abort
- if (c4 .ne. '4') call abort
- if (c2(1) .ne. '2') call abort
- if (r2 .ne. 2.) call abort
- if (c2(11) .ne. '2') call abort
- if (c5 .ne. '5') call abort
- if (c3(1) .ne. '3') call abort
- if (r3 .ne. 3.) call abort
- if (c3(11) .ne. '3') call abort
- if (c6 .ne. '6') call abort
+ if (c1(1) .ne. '1') STOP 1
+ if (r1 .ne. 1.) STOP 2
+ if (c1(11) .ne. '1') STOP 3
+ if (c4 .ne. '4') STOP 4
+ if (c2(1) .ne. '2') STOP 5
+ if (r2 .ne. 2.) STOP 6
+ if (c2(11) .ne. '2') STOP 7
+ if (c5 .ne. '5') STOP 8
+ if (c3(1) .ne. '3') STOP 9
+ if (r3 .ne. 3.) STOP 10
+ if (c3(11) .ne. '3') STOP 11
+ if (c6 .ne. '6') STOP 12
end
real r1, r2, r3
character c4, c5, c6
- if (c1(1) .ne. '1') call abort
- if (r1 .ne. 1.) call abort
- if (c1(11) .ne. '1') call abort
- if (c4 .ne. '4') call abort
- if (c2(1) .ne. '2') call abort
- if (r2 .ne. 2.) call abort
- if (c2(11) .ne. '2') call abort
- if (c5 .ne. '5') call abort
- if (c3(1) .ne. '3') call abort
- if (r3 .ne. 3.) call abort
- if (c3(11) .ne. '3') call abort
- if (c6 .ne. '6') call abort
+ if (c1(1) .ne. '1') STOP 1
+ if (r1 .ne. 1.) STOP 2
+ if (c1(11) .ne. '1') STOP 3
+ if (c4 .ne. '4') STOP 4
+ if (c2(1) .ne. '2') STOP 5
+ if (r2 .ne. 2.) STOP 6
+ if (c2(11) .ne. '2') STOP 7
+ if (c5 .ne. '5') STOP 8
+ if (c3(1) .ne. '3') STOP 9
+ if (r3 .ne. 3.) STOP 10
+ if (c3(11) .ne. '3') STOP 11
+ if (c6 .ne. '6') STOP 12
end
real r1, r2, r3
character c4, c5, c6
- if (c1(1) .ne. '1') call abort
- if (r1 .ne. 1.) call abort
- if (c1(11) .ne. '1') call abort
- if (c4 .ne. '4') call abort
- if (c2(1) .ne. '2') call abort
- if (r2 .ne. 2.) call abort
- if (c2(11) .ne. '2') call abort
- if (c5 .ne. '5') call abort
- if (c3(1) .ne. '3') call abort
- if (r3 .ne. 3.) call abort
- if (c3(11) .ne. '3') call abort
- if (c6 .ne. '6') call abort
+ if (c1(1) .ne. '1') STOP 1
+ if (r1 .ne. 1.) STOP 2
+ if (c1(11) .ne. '1') STOP 3
+ if (c4 .ne. '4') STOP 4
+ if (c2(1) .ne. '2') STOP 5
+ if (r2 .ne. 2.) STOP 6
+ if (c2(11) .ne. '2') STOP 7
+ if (c5 .ne. '5') STOP 8
+ if (c3(1) .ne. '3') STOP 9
+ if (r3 .ne. 3.) STOP 10
+ if (c3(11) .ne. '3') STOP 11
+ if (c6 .ne. '6') STOP 12
end
double precision d1, d2, d3
integer i1, i2, i3
- if (r1(1) .ne. 1.) call abort
- if (d1 .ne. 10.) call abort
- if (r1(4) .ne. 1.) call abort
- if (r1(5) .ne. 1.) call abort
- if (i1 .ne. 1) call abort
- if (r2(1) .ne. 2.) call abort
- if (d2 .ne. 20.) call abort
- if (r2(4) .ne. 2.) call abort
- if (r2(5) .ne. 2.) call abort
- if (i2 .ne. 2) call abort
- if (r3(1) .ne. 3.) call abort
- if (d3 .ne. 30.) call abort
- if (r3(4) .ne. 3.) call abort
- if (r3(5) .ne. 3.) call abort
- if (i3 .ne. 3) call abort
+ if (r1(1) .ne. 1.) STOP 1
+ if (d1 .ne. 10.) STOP 2
+ if (r1(4) .ne. 1.) STOP 3
+ if (r1(5) .ne. 1.) STOP 4
+ if (i1 .ne. 1) STOP 5
+ if (r2(1) .ne. 2.) STOP 6
+ if (d2 .ne. 20.) STOP 7
+ if (r2(4) .ne. 2.) STOP 8
+ if (r2(5) .ne. 2.) STOP 9
+ if (i2 .ne. 2) STOP 10
+ if (r3(1) .ne. 3.) STOP 11
+ if (d3 .ne. 30.) STOP 12
+ if (r3(4) .ne. 3.) STOP 13
+ if (r3(5) .ne. 3.) STOP 14
+ if (i3 .ne. 3) STOP 15
end
double precision d1, d2, d3
integer i1, i2, i3
- if (r1(1) .ne. 1.) call abort
- if (d1 .ne. 10.) call abort
- if (r1(4) .ne. 1.) call abort
- if (r1(5) .ne. 1.) call abort
- if (i1 .ne. 1) call abort
- if (r2(1) .ne. 2.) call abort
- if (d2 .ne. 20.) call abort
- if (r2(4) .ne. 2.) call abort
- if (r2(5) .ne. 2.) call abort
- if (i2 .ne. 2) call abort
- if (r3(1) .ne. 3.) call abort
- if (d3 .ne. 30.) call abort
- if (r3(4) .ne. 3.) call abort
- if (r3(5) .ne. 3.) call abort
- if (i3 .ne. 3) call abort
+ if (r1(1) .ne. 1.) STOP 1
+ if (d1 .ne. 10.) STOP 2
+ if (r1(4) .ne. 1.) STOP 3
+ if (r1(5) .ne. 1.) STOP 4
+ if (i1 .ne. 1) STOP 5
+ if (r2(1) .ne. 2.) STOP 6
+ if (d2 .ne. 20.) STOP 7
+ if (r2(4) .ne. 2.) STOP 8
+ if (r2(5) .ne. 2.) STOP 9
+ if (i2 .ne. 2) STOP 10
+ if (r3(1) .ne. 3.) STOP 11
+ if (d3 .ne. 30.) STOP 12
+ if (r3(4) .ne. 3.) STOP 13
+ if (r3(5) .ne. 3.) STOP 14
+ if (i3 .ne. 3) STOP 15
end
real r1, r2, r3
character c4, c5, c6
- if (c1(1) .ne. '1') call abort
- if (r1 .ne. 1.) call abort
- if (c1(11) .ne. '1') call abort
- if (c4 .ne. '4') call abort
- if (c2(1) .ne. '2') call abort
- if (r2 .ne. 2.) call abort
- if (c2(11) .ne. '2') call abort
- if (c5 .ne. '5') call abort
- if (c3(1) .ne. '3') call abort
- if (r3 .ne. 3.) call abort
- if (c3(11) .ne. '3') call abort
- if (c6 .ne. '6') call abort
+ if (c1(1) .ne. '1') STOP 1
+ if (r1 .ne. 1.) STOP 2
+ if (c1(11) .ne. '1') STOP 3
+ if (c4 .ne. '4') STOP 4
+ if (c2(1) .ne. '2') STOP 5
+ if (r2 .ne. 2.) STOP 6
+ if (c2(11) .ne. '2') STOP 7
+ if (c5 .ne. '5') STOP 8
+ if (c3(1) .ne. '3') STOP 9
+ if (r3 .ne. 3.) STOP 10
+ if (c3(11) .ne. '3') STOP 11
+ if (c6 .ne. '6') STOP 12
end
double precision d1, d2, d3
integer i1, i2, i3
- if (s1(1) .ne. 1.) call abort
- if (r1(1) .ne. 1.) call abort
- if (d1 .ne. 10.) call abort
- if (r1(4) .ne. 1.) call abort
- if (r1(5) .ne. 1.) call abort
- if (i1 .ne. 1) call abort
- if (s2(1) .ne. 2.) call abort
- if (r2(1) .ne. 2.) call abort
- if (d2 .ne. 20.) call abort
- if (r2(4) .ne. 2.) call abort
- if (r2(5) .ne. 2.) call abort
- if (i2 .ne. 2) call abort
- if (s3(1) .ne. 3.) call abort
- if (r3(1) .ne. 3.) call abort
- if (d3 .ne. 30.) call abort
- if (r3(4) .ne. 3.) call abort
- if (r3(5) .ne. 3.) call abort
- if (i3 .ne. 3) call abort
+ if (s1(1) .ne. 1.) STOP 1
+ if (r1(1) .ne. 1.) STOP 2
+ if (d1 .ne. 10.) STOP 3
+ if (r1(4) .ne. 1.) STOP 4
+ if (r1(5) .ne. 1.) STOP 5
+ if (i1 .ne. 1) STOP 6
+ if (s2(1) .ne. 2.) STOP 7
+ if (r2(1) .ne. 2.) STOP 8
+ if (d2 .ne. 20.) STOP 9
+ if (r2(4) .ne. 2.) STOP 10
+ if (r2(5) .ne. 2.) STOP 11
+ if (i2 .ne. 2) STOP 12
+ if (s3(1) .ne. 3.) STOP 13
+ if (r3(1) .ne. 3.) STOP 14
+ if (d3 .ne. 30.) STOP 15
+ if (r3(4) .ne. 3.) STOP 16
+ if (r3(5) .ne. 3.) STOP 17
+ if (i3 .ne. 3) STOP 18
end
double precision d1, d2, d3
integer i1, i2, i3
- if (s1(1) .ne. 1.) call abort
- if (r1(1) .ne. 1.) call abort
- if (d1 .ne. 10.) call abort
- if (r1(4) .ne. 1.) call abort
- if (r1(5) .ne. 1.) call abort
- if (i1 .ne. 1) call abort
- if (s2(1) .ne. 2.) call abort
- if (r2(1) .ne. 2.) call abort
- if (d2 .ne. 20.) call abort
- if (r2(4) .ne. 2.) call abort
- if (r2(5) .ne. 2.) call abort
- if (i2 .ne. 2) call abort
- if (s3(1) .ne. 3.) call abort
- if (r3(1) .ne. 3.) call abort
- if (d3 .ne. 30.) call abort
- if (r3(4) .ne. 3.) call abort
- if (r3(5) .ne. 3.) call abort
- if (i3 .ne. 3) call abort
+ if (s1(1) .ne. 1.) STOP 1
+ if (r1(1) .ne. 1.) STOP 2
+ if (d1 .ne. 10.) STOP 3
+ if (r1(4) .ne. 1.) STOP 4
+ if (r1(5) .ne. 1.) STOP 5
+ if (i1 .ne. 1) STOP 6
+ if (s2(1) .ne. 2.) STOP 7
+ if (r2(1) .ne. 2.) STOP 8
+ if (d2 .ne. 20.) STOP 9
+ if (r2(4) .ne. 2.) STOP 10
+ if (r2(5) .ne. 2.) STOP 11
+ if (i2 .ne. 2) STOP 12
+ if (s3(1) .ne. 3.) STOP 13
+ if (r3(1) .ne. 3.) STOP 14
+ if (d3 .ne. 30.) STOP 15
+ if (r3(4) .ne. 3.) STOP 16
+ if (r3(5) .ne. 3.) STOP 17
+ if (i3 .ne. 3) STOP 18
end
z0 = cmplx(3.,4.)
r0 = cabs(z0)
- if (r0 .ne. 5.) call abort
+ if (r0 .ne. 5.) STOP 1
z1 = dcmplx(3.d0,4.d0)
r1 = zabs(z1)
- if (r1 .ne. 5.d0) call abort
+ if (r1 .ne. 5.d0) STOP 2
end
k=1
n=2
ind=k-n+2
- if (ind /= 1) call abort
- if (ab(ind) /= 1) call abort
- if (k-n+2 /= 1) call abort
- if (ab(k-n+2) /= 1) call abort
+ if (ind /= 1) STOP 1
+ if (ab(ind) /= 1) STOP 2
+ if (k-n+2 /= 1) STOP 3
+ if (ab(k-n+2) /= 1) STOP 4
END
z0 = cmplx(0.,.5)
z1 = 1./z0
- if (z1 .ne. cmplx(0.,-2)) call abort
+ if (z1 .ne. cmplx(0.,-2)) STOP 1
z0 = 10.*z0
- if (z0 .ne. cmplx(0.,5.)) call abort
+ if (z0 .ne. cmplx(0.,5.)) STOP 2
z2 = cmplx(1.,2.)
z1 = z0/z2
- if (z1 .ne. cmplx(2.,1.)) call abort
+ if (z1 .ne. cmplx(2.,1.)) STOP 3
z1 = z0*z2
- if (z1 .ne. cmplx(-10.,5.)) call abort
+ if (z1 .ne. cmplx(-10.,5.)) STOP 4
end
! Some versions of cpp will delete "//'World' as a C++ comment.
character*40 title
title = 'Hello '//'World'
- if (title .ne. 'Hello World') call abort
+ if (title .ne. 'Hello World') STOP 1
end
character(4) j
data i /4hbla'/
write (j, '(4a)') i
- if (j .ne. "bla'") call abort
+ if (j .ne. "bla'") STOP 1
end
! { dg-warning "Hollerith constant" "const" { target *-*-* } 6 }
! { dg-do run }
#include "cpp5.h"
- IF (FOO().NE.1) CALL ABORT ()
+ IF (FOO().NE.1) STOP 1
END
z0 = dcmplx(0.,.5)
z1 = 1./z0
- if (z1 .ne. dcmplx(0.,-2)) call abort
+ if (z1 .ne. dcmplx(0.,-2)) STOP 1
z0 = 10.*z0
- if (z0 .ne. dcmplx(0.,5.)) call abort
+ if (z0 .ne. dcmplx(0.,5.)) STOP 2
z2 = cmplx(1.,2.)
z1 = z0/z2
- if (z1 .ne. dcmplx(2.,1.)) call abort
+ if (z1 .ne. dcmplx(2.,1.)) STOP 3
z1 = z0*z2
- if (z1 .ne. dcmplx(-10.,5.)) call abort
+ if (z1 .ne. dcmplx(-10.,5.)) STOP 4
end
do i=1,100
a(i)=0.D0
enddo
- if (dnrm2(100,a,1) .ne. 0.0) call abort
+ if (dnrm2(100,a,1) .ne. 0.0) STOP 1
end
double precision function dnrm2 ( n, dx, incx)
real(kind=8) x1, y1
x=0.
y = erfc(x)
- if (y .ne. 1.) call abort
+ if (y .ne. 1.) STOP 1
x=1.1
y = erfc(x)
- if (abs(y - .1197949) .ge. 1.e-6) call abort
+ if (abs(y - .1197949) .ge. 1.e-6) STOP 2
c modified from x=10, y .gt. 1.5e-44 to avoid lack of -mieee on Alphas.
x=8
y = erfc(x)
- if (y .gt. 1.2e-28) call abort
+ if (y .gt. 1.2e-28) STOP 3
x1=0.
y1 = erfc(x1)
- if (y1 .ne. 1.) call abort
+ if (y1 .ne. 1.) STOP 4
x1=1.1d0
y1 = erfc(x1)
- if (abs(y1 - .1197949d0) .ge. 1.d-6) call abort
+ if (abs(y1 - .1197949d0) .ge. 1.d-6) STOP 5
x1=10
y1 = erfc(x1)
- if (y1 .gt. 1.5d-44) call abort
+ if (y1 .gt. 1.5d-44) STOP 6
end
c=================================================
!output:
write(buf,'(A)') '1 -1'
read(buf,'(I1)') i
- if ( i.ne.1 ) call abort()
+ if ( i.ne.1 ) STOP 1
read(buf,'(1X,I1)') i
- if ( i.ne.0 ) call abort()
+ if ( i.ne.0 ) STOP 2
read(buf,'(1X,I1,1X,I2)') i,j
- if ( i.ne.0 .and. j.ne.-1 ) call abort()
+ if ( i.ne.0 .and. j.ne.-1 ) STOP 3
end
in = '1234 8'
read(in,'(T3,I1)') i
- if ( i.ne.3 ) call abort()
+ if ( i.ne.3 ) STOP 1
read(in,'(5X,TL4,I2)') i
- if ( i.ne.23 ) call abort()
+ if ( i.ne.23 ) STOP 2
read(in,'(3X,I1,TR3,I1)') i,j
- if ( i.ne.4 ) call abort()
- if ( j.ne.8 ) call abort()
+ if ( i.ne.4 ) STOP 3
+ if ( j.ne.8 ) STOP 4
in = ' 1.5 -12.62 348.75 1.0E-6'
100 format(F6.0,TL6,I4,1X,I1,8X,I5,F3.0,T10,F5.0,T17,F6.0,TR2,F6.0)
read(in,100) a,i,j,k,b,c,d,e
- if ( abs(a-1.5).gt.1.0e-5 ) call abort()
- if ( i.ne.1 ) call abort()
- if ( j.ne.5 ) call abort()
- if ( k.ne.348 ) call abort()
- if ( abs(b-0.75).gt.1.0e-5 ) call abort()
- if ( abs(c-12.62).gt.1.0e-5 ) call abort()
- if ( abs(d-348.75).gt.1.0e-4 ) call abort()
- if ( abs(e-1.0e-6).gt.1.0e-11 ) call abort()
+ if ( abs(a-1.5).gt.1.0e-5 ) STOP 5
+ if ( i.ne.1 ) STOP 6
+ if ( j.ne.5 ) STOP 7
+ if ( k.ne.348 ) STOP 8
+ if ( abs(b-0.75).gt.1.0e-5 ) STOP 9
+ if ( abs(c-12.62).gt.1.0e-5 ) STOP 10
+ if ( abs(d-348.75).gt.1.0e-4 ) STOP 11
+ if ( abs(e-1.0e-6).gt.1.0e-11 ) STOP 12
end
call c_i1(IAND(NOT(k),k2),ka,'NOT(integer(1))')
call c_i8(IAND(NOT(m),m2),ma,'NOT(integer(8))')
- if ( fail ) call abort()
+ if ( fail ) STOP 1
end
subroutine failure(label)
call c_r(TANH(1.0),0.76159416,'TANH(real)')
call c_d(TANH(1.d0),0.76159416d0,'TANH(double)')
- if ( fail ) call abort()
+ if ( fail ) STOP 1
end
subroutine failure(label)
call c_r(SIGN(-3.0,2.),3.,'SIGN(real,real)')
call c_d(SIGN(-3.d0,2.d0),3.d0,'SIGN(double,double)')
- if ( fail ) call abort()
+ if ( fail ) STOP 1
end
subroutine failure(label)
real(kind=8) r8, r88
parameter (i1 = 1, i2 = 2, i4 = 4, i = 5, i8 = i + i4*i2 + i2*i1)
parameter (r = 3.0, r4 = 4.0, r8 = 8.d0, d = i8*r + r4*i2 + r8*i1)
- if (i8 .ne. 15 ) call abort
- if (d .ne. 61.d0) call abort
+ if (i8 .ne. 15 ) STOP 1
+ if (d .ne. 61.d0) STOP 2
i11 = 1; i22 = 2; i44 = 4; ii = 5
i88 = i + i4*i2 + i2*i1
- if (i88 .ne. i8) call abort
+ if (i88 .ne. i8) STOP 3
rr = 3.0; r44 = 4.0; r88 = 8.0d0
dd = i88*rr + r44*i22 + r88*i11
- if (dd .ne. d) call abort
+ if (dd .ne. d) STOP 4
end
call c_d(DBESYN(j,dx),da,'DBESYN(integer(2),double)')
call c_d(DBESYN(k,dx),da,'DBESYN(integer(1),double)')
- if ( fail ) call abort()
+ if ( fail ) STOP 1
end
subroutine failure(label)
call c_d(ERFC(dx),da,'ERFC(double)')
call c_d(DERFC(dx),da,'DERFC(double)')
- if ( fail ) call abort()
+ if ( fail ) STOP 1
end
subroutine failure(label)
n = 5
t = (n > foo)
- if (t .neqv. .true.) call abort
+ if (t .neqv. .true.) STOP 1
t = (n >= foo)
- if (t .neqv. .true.) call abort
+ if (t .neqv. .true.) STOP 2
t = (n < foo)
- if (t .neqv. .false.) call abort
+ if (t .neqv. .false.) STOP 3
t = (n <= 5)
- if (t .neqv. .true.) call abort
+ if (t .neqv. .true.) STOP 4
t = (n >= 5 )
- if (t .neqv. .true.) call abort
+ if (t .neqv. .true.) STOP 5
t = (n == 5)
- if (t .neqv. .true.) call abort
+ if (t .neqv. .true.) STOP 6
t = (n /= 5)
- if (t .neqv. .false.) call abort
+ if (t .neqv. .false.) STOP 7
t = (n /= foo)
- if (t .neqv. .true.) call abort
+ if (t .neqv. .true.) STOP 8
t = (n == foo)
- if (t .neqv. .false.) call abort
+ if (t .neqv. .false.) STOP 9
end
270 continue
do k=0,N
- if (yzin1(k) .ne. yzin2(k)) call abort
+ if (yzin1(k) .ne. yzin2(k)) STOP 1
enddo
- if (yzin1(0) .ne. -1371.) call abort
- if (yzin1(1) .ne. -685.5) call abort
- if (yzin1(2) .ne. 0.) call abort
+ if (yzin1(0) .ne. -1371.) STOP 2
+ if (yzin1(1) .ne. -685.5) STOP 3
+ if (yzin1(2) .ne. 0.) STOP 4
return
end
real(sp) :: rsp
real(dp) :: rdp
-if (abs(gamma(1.0_sp) - 1.0_sp) > tiny(1.0_sp)) call abort()
-if (abs(gamma(1.0_dp) - 1.0_dp) > tiny(1.0_dp)) call abort()
-if (abs(dgamma(1.0_dp) - 1.0_dp) > tiny(1.0_dp)) call abort()
+if (abs(gamma(1.0_sp) - 1.0_sp) > tiny(1.0_sp)) STOP 1
+if (abs(gamma(1.0_dp) - 1.0_dp) > tiny(1.0_dp)) STOP 2
+if (abs(dgamma(1.0_dp) - 1.0_dp) > tiny(1.0_dp)) STOP 3
-if (abs(lgamma(1.0_sp)) > tiny(1.0_sp)) call abort()
-if (abs(lgamma(1.0_dp)) > tiny(1.0_dp)) call abort()
-if (abs(log_gamma(1.0_sp)) > tiny(1.0_sp)) call abort()
-if (abs(log_gamma(1.0_dp)) > tiny(1.0_dp)) call abort()
-if (abs(algama(1.0_sp)) > tiny(1.0_sp)) call abort()
-if (abs(dlgama(1.0_dp)) > tiny(1.0_dp)) call abort()
+if (abs(lgamma(1.0_sp)) > tiny(1.0_sp)) STOP 4
+if (abs(lgamma(1.0_dp)) > tiny(1.0_dp)) STOP 5
+if (abs(log_gamma(1.0_sp)) > tiny(1.0_sp)) STOP 6
+if (abs(log_gamma(1.0_dp)) > tiny(1.0_dp)) STOP 7
+if (abs(algama(1.0_sp)) > tiny(1.0_sp)) STOP 8
+if (abs(dlgama(1.0_dp)) > tiny(1.0_dp)) STOP 9
end program gamma_test
real(qp) :: rqp
-if (abs(gamma(1.0_qp) - 1.0_qp) > tiny(1.0_qp)) call abort()
-if (abs(log_gamma(1.0_qp)) > tiny(1.0_qp)) call abort()
+if (abs(gamma(1.0_qp) - 1.0_qp) > tiny(1.0_qp)) STOP 1
+if (abs(log_gamma(1.0_qp)) > tiny(1.0_qp)) STOP 2
end program gamma_test
xd = n + 0.5d0
td = c(n)*sqrt(pi)
ts = c(n)*sqrt(pi)
- if (abs(gamma(xs)-ts)/ts > 9e-6) call abort
- if (abs(gamma(xd)-td)/td > 5e-14) call abort
+ if (abs(gamma(xs)-ts)/ts > 9e-6) STOP 1
+ if (abs(gamma(xd)-td)/td > 5e-14) STOP 2
end do
call tst_s(2.3, gamma(2.3))
call tst_s(3.7, gamma(3.7))
contains
subroutine tst_s(a, b)
real :: a, b
- if (abs(gamma(a) - b)/b > 1e-6) call abort
+ if (abs(gamma(a) - b)/b > 1e-6) STOP 3
end subroutine tst_s
subroutine tst_d(a, b)
double precision :: a,b
- if (abs(gamma(a) - b)/b > 5e-14) call abort
+ if (abs(gamma(a) - b)/b > 5e-14) STOP 4
end subroutine tst_d
end program main
USE TOO
INTEGER :: I
CALL SUB(xx,I)
- IF (I.NE.7) CALL ABORT()
+ IF (I.NE.7) STOP 1
END PROGRAM
CHARACTER(14) :: cname
CHARACTER(14) :: cnames(1)
CALL odfname(base,i,cname)
- if (trim (cname) .ne. "odfamilycname") call abort
+ if (trim (cname) .ne. "odfamilycname") STOP 1
CALL odfname(base,i,cnames)
- if (trim (cnames(1)) .ne. "odfamilycnames") call abort
+ if (trim (cnames(1)) .ne. "odfamilycnames") STOP 2
END PROGRAM
subroutine sub(x, chr)
real x
character(8) chr
- if (trim (chr) .ne. "real") call abort
- if (int (x) .ne. 1) call abort
+ if (trim (chr) .ne. "real") STOP 1
+ if (int (x) .ne. 1) STOP 2
end subroutine sub
end module mod1
subroutine sub_int(i, chr)
character(8) chr
integer i
- if (trim (chr) .ne. "integer") call abort
- if (i .ne. 1) call abort
+ if (trim (chr) .ne. "integer") STOP 3
+ if (i .ne. 1) STOP 4
end subroutine sub_int
end module mod2
use m
real :: res(1)
res = matmul (one(2.0), (/ 2.0/))
-if (abs (res(1)-4.0) > epsilon (res)) call abort ()
+if (abs (res(1)-4.0) > epsilon (res)) STOP 1
end
type(foo2) :: af2
call af2%do()
- if (af2%i .ne. 2) call abort
- if (af2%get() .ne. 3) call abort
+ if (af2%i .ne. 2) STOP 1
+ if (af2%get() .ne. 3) STOP 2
end program testd15
integer, allocatable :: a1
integer, pointer :: a2
- if (.not.test(a1)) call abort()
- if (test(a2)) call abort()
+ if (.not.test(a1)) STOP 1
+ if (test(a2)) STOP 2
contains
implicit none
intrinsic :: cos
- if (testIF(2.0)/=2.0) call abort()
- if (testIF(cos)/=1.0) call abort()
+ if (testIF(2.0)/=2.0) STOP 1
+ if (testIF(cos)/=1.0) STOP 2
end program
use m
integer :: i
i = bar()
- if (i /= -10) call abort
+ if (i /= -10) STOP 1
end program p
integer :: y(3), z(3)
y = (/1,2,3/)
call baz(y,z)
-if (any (y /= z)) call abort ()
+if (any (y /= z)) STOP 1
end
subroutine test_globals() bind(c)
! the value of I is initialized above
if(I .ne. 2) then
- call abort()
+ STOP 1
endif
end subroutine test_globals
end module global_vars_c_init
subroutine test_globals() bind(c)
! the value of I is initialized above
if(I .ne. 2) then
- call abort()
+ STOP 1
endif
end subroutine test_globals
end module global_vars_f90_init
#define TEST_INTEGER(u,ukind,v,vkind) \
ukind = u;\
vkind = v;\
- if (iand(u,v) /= and(ukind, vkind)) call abort;\
- if (iand(u,v) /= and(vkind, ukind)) call abort;\
- if (ieor(u,v) /= xor(ukind, vkind)) call abort;\
- if (ieor(u,v) /= xor(vkind, ukind)) call abort;\
- if (ior(u,v) /= or(ukind, vkind)) call abort;\
- if (ior(u,v) /= or(vkind, ukind)) call abort
+ if (iand(u,v) /= and(ukind, vkind)) STOP 1;\
+ if (iand(u,v) /= and(vkind, ukind)) STOP 1;\
+ if (ieor(u,v) /= xor(ukind, vkind)) STOP 1;\
+ if (ieor(u,v) /= xor(vkind, ukind)) STOP 1;\
+ if (ior(u,v) /= or(ukind, vkind)) STOP 1;\
+ if (ior(u,v) /= or(vkind, ukind)) STOP 1
TEST_INTEGER(19,i1,6,j1)
TEST_INTEGER(19,i1,6,j2)
#define TEST_LOGICAL(u,ukind,v,vkind) \
ukind = u;\
vkind = v;\
- if ((u .and. v) .neqv. and(ukind, vkind)) call abort;\
- if ((u .and. v) .neqv. and(vkind, ukind)) call abort;\
- if (((u .and. .not. v) .or. (.not. u .and. v)) .neqv. xor(ukind, vkind)) call abort;\
- if (((u .and. .not. v) .or. (.not. u .and. v)) .neqv. xor(vkind, ukind)) call abort;\
- if ((u .or. v) .neqv. or(ukind, vkind)) call abort;\
- if ((u .or. v) .neqv. or(vkind, ukind)) call abort
+ if ((u .and. v) .neqv. and(ukind, vkind)) STOP 1;\
+ if ((u .and. v) .neqv. and(vkind, ukind)) STOP 1;\
+ if (((u .and. .not. v) .or. (.not. u .and. v)) .neqv. xor(ukind, vkind)) STOP 1;\
+ if (((u .and. .not. v) .or. (.not. u .and. v)) .neqv. xor(vkind, ukind)) STOP 1;\
+ if ((u .or. v) .neqv. or(ukind, vkind)) STOP 1;\
+ if ((u .or. v) .neqv. or(vkind, ukind)) STOP 2
TEST_LOGICAL(.true.,l1,.false.,k1)
TEST_LOGICAL(.true.,l1,.true.,k1)
!$OMP PARALLEL
!$ACC PARALLEL COPYIN(ARGC)
IF (ARGC .NE. 0) THEN
- CALL ABORT
+ STOP 1
END IF
!$ACC END PARALLEL
!$OMP END PARALLEL
!$OMP xPARALLEL
!$ACC xPARALLEL COPYIN(ARGC) ! { dg-error "Unclassifiable OpenACC directive" }
IF (ARGC .NE. 0) THEN
- CALL ABORT
+ STOP 1
END IF
!$ACC END PARALLEL ! { dg-error "Unexpected" }
!$OMP END PARALLEL
integer i
do i = 1, n
- if (a(i) .ne. b(i) + sarg) call abort ()
+ if (a(i) .ne. b(i) + sarg) STOP 1
end do
end subroutine test
!$acc end kernels
do i = 0, n - 1
- if (c(i) .ne. a(i) + b(i)) call abort
+ if (c(i) .ne. a(i) + b(i)) STOP 1
end do
end program main
!$acc end data
do i = 0, n - 1
- if (c(i) .ne. a(i) + b(i)) call abort
+ if (c(i) .ne. a(i) + b(i)) STOP 1
end do
end program main
!$acc exit data copyout (c(0:n-1))
do i = 0, n - 1
- if (c(i) .ne. a(i) + b(i)) call abort
+ if (c(i) .ne. a(i) + b(i)) STOP 1
end do
end program main
!$acc exit data copyout (a(0:n-1), b(0:n-1), c(0:n-1))
do i = 0, n - 1
- if (c(i) .ne. a(i) + b(i)) call abort
+ if (c(i) .ne. a(i) + b(i)) STOP 1
end do
end program main
!$acc exit data copyout (a(0:n-1), c(0:n-1))
do i = 0, n - 1
- if (c(i) .ne. a(i) + b(i)) call abort
+ if (c(i) .ne. a(i) + b(i)) STOP 1
end do
end program main
!$acc end data
do i = 0, n - 1
- if (c(i) .ne. a(i) + b(i)) call abort
+ if (c(i) .ne. a(i) + b(i)) STOP 1
end do
end program main
!$acc end kernels
do i = 0, n - 1
- if (c(i) .ne. a(i) + b(i)) call abort
+ if (c(i) .ne. a(i) + b(i)) STOP 1
end do
end subroutine foo
!$acc end kernels
do i = 0, n - 1
- if (c(i) .ne. a(i) + b(i)) call abort
+ if (c(i) .ne. a(i) + b(i)) STOP 1
end do
end program main
!$ACC PARALLEL &
!$ACC& COPYIN(ARGC) ! { dg-error "directive cannot be specified within" }
IF (ARGC .NE. 0) THEN
- CALL ABORT
+ STOP 1
END IF
!$ACC END PARALLEL
!$OMP END PARALLEL
subroutine pete(A)
real(8) :: A
print *, 'pete got ',A
- if (A /= 3.0) call abort()
+ if (A /= 3.0) STOP 1
end subroutine pete
subroutine bob()
integer :: b(48)
logical :: l
if (allocated (a)) then
- call abort
+ STOP 1
call bla(b)
end if
!$omp parallel private (a) reduction (.or.:l)
integer, allocatable :: a(:)
logical :: l
- if (allocated (a)) call abort
+ if (allocated (a)) STOP 1
!$omp parallel private (a) reduction (.or.:l)
do i = 1, 7
end do
z = [(i, i=1,n)]
h = [(i, i=n,1,-1)]
call sub (n, h)
- if ( any(h/=z) ) call abort
+ if ( any(h/=z) ) STOP 1
end
subroutine sub (n, x)
integer :: n, x(n)
!$omp declare reduction (+:t: omp_out%a = omp_out%a + omp_in%a)
!$omp simd reduction(+:x)
do i = 1, 8
- if (abs(i) < 5) call abort
+ if (abs(i) < 5) STOP 1
x%a = x%a + 1
end do
print *, x%a
do j=1,n
if (abs(a(j)-c(j)) > eps) then
print *,1,j,a(j), c(j)
- call abort
+ STOP 1
end if
end do
do j=1,n
if (abs(a(j)-c(j)) > eps) then
print *,2,j,a(j), c(j)
- call abort
+ STOP 2
end if
end do
do j=1,n
if (abs(a(j)-c(j)) > eps) then
print *,1,j,a(j), c(j)
- call abort
+ STOP 1
end if
end do
I = 1
GO TO 2
IF (I .EQ. 0) THEN
- 2 IF (I .NE. 1) CALL ABORT
+ 2 IF (I .NE. 1) STOP 1
I = 0
GOTO 3
ELSE
3 I = 2
END IF
- IF (I .NE. 2) CALL ABORT
+ IF (I .NE. 2) STOP 2
END
i = 0
call check_if (i)
- if (i /= 2) call abort ()
+ if (i /= 2) STOP 1
call check_select (i)
- if (i /= 2) call abort ()
+ if (i /= 2) STOP 2
end
if(i == 2) goto 10
j = j+1
10 enddo
- if (j/=2) call abort
+ if (j/=2) STOP 1
end
GO TO 1271
21260 IVFAIL = IVFAIL + 1
1271 CONTINUE
- IF (IVFAIL /= 0) CALL abort ()
+ IF (IVFAIL /= 0) STOP 1
END
end do
call foo (p, q, c_loc (r(1)), s)
do i = 1, 1024
- if (p(i) /= i * i + 3 * i + 2) call abort
+ if (p(i) /= i * i + 3 * i + 2) STOP 1
p(i) = i
end do
call bar (p, q, c_loc (r(1)), s)
do i = 1, 1024
- if (p(i) /= i * i + 3 * i + 2) call abort
+ if (p(i) /= i * i + 3 * i + 2) STOP 2
end do
! Attempt to create 64-byte aligned allocatable
do i = 1, 64
end do
call baz (p, c)
do i = 1, 1024
- if (p(i) /= i * i + 5 * i + 2) call abort
+ if (p(i) /= i * i + 5 * i + 2) STOP 3
end do
end if
end
ptr => tar1%i
ptr = ptr + 1 ! check the scalarizer is OK
- if (any (ptr .ne. (/3, 5/))) call abort ()
- if (any ((/ptr(1), ptr(2)/) .ne. (/3, 5/))) call abort ()
- if (any (tar1%i .ne. (/3, 5/))) call abort ()
+ if (any (ptr .ne. (/3, 5/))) STOP 1
+ if (any ((/ptr(1), ptr(2)/) .ne. (/3, 5/))) STOP 2
+ if (any (tar1%i .ne. (/3, 5/))) STOP 3
! Make sure that the other components are not touched.
- if (any (tar1%r .ne. (/1.0, 3.0/))) call abort ()
- if (any (tar1%chr .ne. (/"abc", "efg"/))) call abort ()
+ if (any (tar1%r .ne. (/1.0, 3.0/))) STOP 4
+ if (any (tar1%chr .ne. (/"abc", "efg"/))) STOP 5
! Check that the pointer is passed correctly as an actual argument.
call foo (ptr)
- if (any (tar1%i .ne. (/2, 4/))) call abort ()
+ if (any (tar1%i .ne. (/2, 4/))) STOP 6
! And that dummy pointers are OK too.
call bar (ptr)
- if (any (tar1%i .ne. (/101, 103/))) call abort ()
+ if (any (tar1%i .ne. (/101, 103/))) STOP 7
!_______________substring subreference___________
ptr2 => tar2(:)(2:3)
ptr2 = ptr2(:)(2:2)//"z" ! again, check the scalarizer
- if (any (ptr2 .ne. (/"cz", "gz"/))) call abort ()
- if (any ((/ptr2(1), ptr2(2)/) .ne. (/"cz", "gz"/))) call abort ()
- if (any (tar2 .ne. (/"aczd", "egzh"/))) call abort ()
+ if (any (ptr2 .ne. (/"cz", "gz"/))) STOP 8
+ if (any ((/ptr2(1), ptr2(2)/) .ne. (/"cz", "gz"/))) STOP 9
+ if (any (tar2 .ne. (/"aczd", "egzh"/))) STOP 10
!_______________substring component subreference___________
ptr2 => tar1(:)%chr(1:2)
ptr2 = ptr2(:)(2:2)//"q" ! yet again, check the scalarizer
- if (any (ptr2 .ne. (/"bq","fq"/))) call abort ()
- if (any (tar1%chr .ne. (/"bqc","fqg"/))) call abort ()
+ if (any (ptr2 .ne. (/"bq","fq"/))) STOP 11
+ if (any (tar1%chr .ne. (/"bqc","fqg"/))) STOP 12
!_______________trailing array element subreference___________
ptr3 => tar5%r(1,2)
ptr3 = (/99.0, 999.0/)
- if (any (tar5(1)%r .ne. reshape ((/1.0,2.0,99.0,4.0/), sh))) call abort ()
- if (any (tar5(2)%r .ne. reshape ((/5.0,6.0,999.0,8.0/), sh))) call abort ()
+ if (any (tar5(1)%r .ne. reshape ((/1.0,2.0,99.0,4.0/), sh))) STOP 13
+ if (any (tar5(2)%r .ne. reshape ((/5.0,6.0,999.0,8.0/), sh))) STOP 14
!_______________forall assignment___________
ptr2 => tar2(:)(1:2)
forall (i = 1:2) ptr2(i)(1:1) = "z"
- if (any (tar2 .ne. (/"zczd", "zgzh"/))) call abort ()
+ if (any (tar2 .ne. (/"zczd", "zgzh"/))) STOP 15
!_______________something more complicated___________
tar3%t => tar1
ptr3 => tar3%t%r
ptr3 = cos (ptr3)
- if (any (abs(ptr3 - (/cos(1.0_4), cos(3.0_4)/)) >= epsilon(1.0_4))) call abort ()
+ if (any (abs(ptr3 - (/cos(1.0_4), cos(3.0_4)/)) >= epsilon(1.0_4))) STOP 16
ptr2 => tar3%t(:)%chr(2:3)
ptr2 = " x"
- if (any (tar1%chr .ne. (/"b x", "f x"/))) call abort ()
+ if (any (tar1%chr .ne. (/"b x", "f x"/))) STOP 17
!_______________check non-subref works still___________
ptr2 => tar4
- if (any (ptr2 .ne. (/"ab","cd"/))) call abort ()
+ if (any (ptr2 .ne. (/"ab","cd"/))) STOP 18
contains
subroutine foo (arg)
INTEGER A(5,5)
COMMON A
CALL FOO (2)
- IF (A(1,1).NE.8) CALL ABORT
+ IF (A(1,1).NE.8) STOP 1
A(1,1) = 0
- IF (ANY(A.NE.0)) CALL ABORT
+ IF (ANY(A.NE.0)) STOP 2
END
a(:, 2:4) = a(:, 1:3)
do n = 1, 5
- if (a(n, 3) .ne. (n + 1)) call abort
- if (b(4, n) .ne. (6 - n)) call abort
+ if (a(n, 3) .ne. (n + 1)) STOP 1
+ if (b(4, n) .ne. (6 - n)) STOP 2
end do
end program
end if
if (w1(1,1).ne.21.0d0) then
- call abort()
+ STOP 1
end if
end
(/1.0D0,0.0D0,0.0D0/),&
(/1.0D0,0.0D0,0.0D0/),&
1.0D0,1.0D0,1.0D0,1.0D0)
- if (res.ne.1.0d0) call abort()
+ if (res.ne.1.0d0) STOP 1
CONTAINS
s = 2.0
m = 4
res = SUM([(s**(REAL(k-1)/REAL(m-1)),k=1,m)])
- if (abs(res - 5.84732246) > 1e-6) call abort
+ if (abs(res - 5.84732246) > 1e-6) STOP 1
end
j = 4Ho wo
r = 4Hrld!
write (line, '(3A4)') i, j, r
-if (line .ne. 'Hello world!') call abort
+if (line .ne. 'Hello world!') STOP 1
i = 2Hab
j = 2Hab
r = 2Hab
c = 2Hab
write (line, '(3A4, 8A)') i, j, r, c
-if (line .ne. 'ab ab ab ab ') call abort
+if (line .ne. 'ab ab ab ab ') STOP 2
write(line, '(4A8, "!")' ) x
-if (line .ne. 'abcdefghijklmnopqrstuvwxyz012345!') call abort
+if (line .ne. 'abcdefghijklmnopqrstuvwxyz012345!') STOP 3
write (line, a) 3
-if (line .ne. ' 3') call abort
+if (line .ne. ' 3') STOP 4
write (line, a (1,2)) 4
-if (line .ne. ' 4') call abort
+if (line .ne. ' 4') STOP 5
write (line, z) 5
-if (line .ne. ' 5') call abort
+if (line .ne. ' 5') STOP 6
write (line, z1) 6
-if (line .ne. ' 6') call abort
+if (line .ne. ' 6') STOP 7
write (line, z2) 7
-if (line .ne. ' 7') call abort
+if (line .ne. ' 7') STOP 8
write (line, z2 (1,2)) 8
-if (line .ne. ' 8') call abort
+if (line .ne. ' 8') STOP 9
write (line, '(16A)') z2
-if (line .ne. '(i7)xxxx(i8)xxxx') call abort
+if (line .ne. '(i7)xxxx(i8)xxxx') STOP 10
call test (8h hello)
end
character(80) line
write (line, '(8a)') h
-if (line .ne. ' hello') call abort
+if (line .ne. ' hello') STOP 11
end subroutine
! { dg-warning "Hollerith constant" "const" { target *-*-* } 15 }
c(1,2) = 4H(A5)
write (ch, "(2A4)") c
-if (ch .ne. "(A4)(A5)") call abort()
+if (ch .ne. "(A4)(A5)") STOP 1
write (ch, c) 'Hello'
-if (ch .ne. "Hell") call abort()
+if (ch .ne. "Hell") STOP 2
write (ch, c (1,2)) 'Hello'
-if (ch .ne. "Hello") call abort()
+if (ch .ne. "Hello") STOP 3
write (ch, *) 5Hhello
-if (ch .ne. " hello") call abort()
+if (ch .ne. " hello") STOP 4
write (ch, "(A5)") 5Hhello
-if (ch .ne. "hello") call abort()
+if (ch .ne. "hello") STOP 5
end
integer(kind=4) :: a(1, 3)
character(len=40) :: t
write (t, fmt=a(1,2)) 1, 2, 3, 4, 5, 6, 7, 8
- if (t .ne. ' 1 2 3 4 5 6 7 8') call abort
+ if (t .ne. ' 1 2 3 4 5 6 7 8') STOP 1
end subroutine foo
interface
subroutine foo (a)
b(1,2) = 4H (8I
b(1,3) = 2H4)
write (t, fmt=b(1,2)) 1, 2, 3, 4, 5, 6, 7, 8
- if (t .ne. ' 1 2 3 4 5 6 7 8') call abort
+ if (t .ne. ' 1 2 3 4 5 6 7 8') STOP 2
call foo (b)
end
nwrds = (nchrs + icpw - 1) /icpw
write(outstr,'(4(z8," "))') (iarray(i), i=1,nwrds)
if (outstr.ne."4C4C4548 4F59204F 20202055" .and. &
- & outstr.ne."48454C4C 4F20594F 55202020") call abort
+ & outstr.ne."48454C4C 4F20594F 55202020") STOP 1
return
end
! { dg-warning "Hollerith constant" "" { target *-*-* } 6 }
write(c,8000)
8000 format(36(2H!)))
do i = 1,72,2
- if (c(i:i+1) /= '!)') call abort
+ if (c(i:i+1) /= '!)') STOP 1
end do
end
! Original code contributed by Gerhard Steinmetz
program p
character :: c(4) = [1h(, 1hi, 1h4, 1h)]
- if (c(1) /= '(') call abort
- if (c(2) /= 'i') call abort
- if (c(3) /= '4') call abort
- if (c(4) /= ')') call abort
+ if (c(1) /= '(') STOP 1
+ if (c(2) /= 'i') STOP 2
+ if (c(3) /= '4') STOP 3
+ if (c(4) /= ')') STOP 4
end
! { dg-do compile }
-! { dg-options "-fall-intrinsics -std=f95" }
+! { dg-options " -std=f95" }
! PR15966, PR18781 & PR16531
implicit none
complex(kind=8) x(2)
l = 4Ho wo
r = 4Hrld!
write (line, '(3A4)') i, l, r
-if (line .ne. 'Hello world!') call abort
+if (line .ne. 'Hello world!') STOP 1
i = 2Hab
r = 2Hab
l = 2Hab
c = 2Hab
write (line, '(3A4, 8A)') i, l, r, c
-if (line .ne. 'ab ab ab ab ') call abort
+if (line .ne. 'ab ab ab ab ') STOP 2
write(line, '(4A8, "!")' ) x
-if (line .ne. 'abcdefghijklmnopqrstuvwxyz012345!') call abort
+if (line .ne. 'abcdefghijklmnopqrstuvwxyz012345!') STOP 3
write (line, a) 3
-if (line .ne. ' 3') call abort
+if (line .ne. ' 3') STOP 4
write (line, a (1,2)) 4
-if (line .ne. ' 4') call abort
+if (line .ne. ' 4') STOP 5
write (line, z) 5
-if (line .ne. ' 5') call abort
+if (line .ne. ' 5') STOP 6
write (line, z1) 6
-if (line .ne. ' 6') call abort
+if (line .ne. ' 6') STOP 7
write (line, z2) 7
-if (line .ne. ' 7') call abort
+if (line .ne. ' 7') STOP 8
write (line, z2 (1,2)) 8
-if (line .ne. ' 8') call abort
+if (line .ne. ' 8') STOP 9
write (line, '(16A)') z2
-if (line .ne. '(i7)xxxx(i8)xxxx') call abort
+if (line .ne. '(i7)xxxx(i8)xxxx') STOP 10
call test (8h hello)
end
character(80) line
write (line, '(8a)') h
-if (line .ne. ' hello') call abort
+if (line .ne. ' hello') STOP 11
end subroutine
! { dg-error "Hollerith constant" "const" { target *-*-* } 16 }
l = 4Ho wo ! { dg-warning "has undefined result" }
r = 4Hrld!
write (line, '(3A4)') i, l, r
-if (line .ne. 'Hello world!') call abort
+if (line .ne. 'Hello world!') STOP 1
i = 2Hab
r = 2Hab
l = 2Hab ! { dg-warning "has undefined result" }
c = 2Hab
write (line, '(3A4, 8A)') i, l, r, c
-if (line .ne. 'ab ab ab ab ') call abort
+if (line .ne. 'ab ab ab ab ') STOP 2
write(line, '(4A8, "!")' ) x
-if (line .ne. 'abcdefghijklmnopqrstuvwxyz012345!') call abort
+if (line .ne. 'abcdefghijklmnopqrstuvwxyz012345!') STOP 3
write (line, a) 3
-if (line .ne. ' 3') call abort
+if (line .ne. ' 3') STOP 4
write (line, a (1,2)) 4
-if (line .ne. ' 4') call abort
+if (line .ne. ' 4') STOP 5
write (line, z) 5
-if (line .ne. ' 5') call abort
+if (line .ne. ' 5') STOP 6
write (line, z1) 6
-if (line .ne. ' 6') call abort
+if (line .ne. ' 6') STOP 7
write (line, z2) 7
-if (line .ne. ' 7') call abort
+if (line .ne. ' 7') STOP 8
write (line, z2 (1,2)) 8
-if (line .ne. ' 8') call abort
+if (line .ne. ' 8') STOP 9
write (line, '(16A)') z2
-if (line .ne. '(i7)xxxx(i8)xxxx') call abort
+if (line .ne. '(i7)xxxx(i8)xxxx') STOP 10
call test (8h hello)
end
character*80 line
write (line, '(8a)') h
-if (line .ne. ' hello') call abort
+if (line .ne. ' hello') STOP 11
end subroutine
SUBROUTINE S3
integer :: check = 0
CALL putaline()
- if (check .ne. 1) call abort
+ if (check .ne. 1) STOP 1
CALL putaline("xx")
- if (check .ne. 2) call abort
+ if (check .ne. 2) STOP 2
! CALL putaline(1.0) ! => this now causes an error, as it should
CONTAINS
SUBROUTINE putaline(x)
integer :: check = 0
REAL :: rcheck = 0.0
call putaline(check)
- if (check .ne. 3) call abort
+ if (check .ne. 3) STOP 3
call putaline(rcheck)
- if (rcheck .ne. 4.0) call abort
+ if (rcheck .ne. 4.0) STOP 4
end subroutine s4
END MODULE
end interface
CONTAINS
SUBROUTINE s
- if (x(2, 3) .ne. real (2)**3) call abort ()
- if (z(3, 3) .ne. real (3)**3) call abort ()
+ if (x(2, 3) .ne. real (2)**3) STOP 1
+ if (z(3, 3) .ne. real (3)**3) STOP 2
CALL inner
CONTAINS
SUBROUTINE inner
i = 7
- if (x(i, 7) .ne. real (7)**7) call abort ()
- if (z(i, 7) .ne. real (7)**7) call abort ()
+ if (x(i, 7) .ne. real (7)**7) STOP 3
+ if (z(i, 7) .ne. real (7)**7) STOP 4
END SUBROUTINE
FUNCTION x(n, m)
x = REAL(n)**m
REAL :: x(3) = (/ 1.5, 2.5, 3.5 /)
CONTAINS
SUBROUTINE s
- if (x(2) .eq. 2.5) call abort ()
+ if (x(2) .eq. 2.5) STOP 1
CONTAINS
FUNCTION x(n, m)
integer, optional :: m
USE M1
CONTAINS
SUBROUTINE S2
- if (s1 () .ne. 1) call abort
+ if (s1 () .ne. 1) STOP 1
CONTAINS
integer function S1 ()
s1 = 1
CONTAINS
SUBROUTINE upper
y = x(3,1)
- if (int(y) .ne. 3) call abort
+ if (int(y) .ne. 3) STOP 1
END SUBROUTINE
FUNCTION x(n, m)
x = m*n
END FUNCTION
SUBROUTINE lower
y = x(2,1)
- if (int(y) .ne. 2) call abort
+ if (int(y) .ne. 2) STOP 2
END SUBROUTINE
END SUBROUTINE
END MODULE
CALL S(A)
CALL T(A)
CALL U(A)
- if ( ALL(A.ne.(/2,2,3,4/))) CALL ABORT ()
- if ( ALL(F().ne.(/2.0,2.0/))) CALL ABORT()
+ if ( ALL(A.ne.(/2,2,3,4/))) STOP 1
+ if ( ALL(F().ne.(/2.0,2.0/))) STOP 2
CONTAINS
SUBROUTINE S(A)
contains
subroutine check_r4 (a, b)
real(kind=4), intent(in) :: a, b
- if (abs(a - b) > 1.e-5 * abs(b)) call abort
+ if (abs(a - b) > 1.e-5 * abs(b)) STOP 1
end subroutine
subroutine check_r8 (a, b)
real(kind=8), intent(in) :: a, b
- if (abs(a - b) > 1.e-7 * abs(b)) call abort
+ if (abs(a - b) > 1.e-7 * abs(b)) STOP 2
end subroutine
end program test
a(1,1) = 35
a(2,1) = -74
-if (iand(a(1,1),a(2,1)) /= iall(a)) call abort ()
-if (iand(a(1,1),a(2,1)) /= iall(array=[35, -74])) call abort ()
-if (any (iand(a(1,1),a(2,1)) /= iall(a,dim=1))) call abort ()
-if (iand(a(1,1),a(2,1)) /= iall(dim=1,mask=[.true.,.true.],array=[35, -74])) call abort ()
+if (iand(a(1,1),a(2,1)) /= iall(a)) STOP 1
+if (iand(a(1,1),a(2,1)) /= iall(array=[35, -74])) STOP 2
+if (any (iand(a(1,1),a(2,1)) /= iall(a,dim=1))) STOP 3
+if (iand(a(1,1),a(2,1)) /= iall(dim=1,mask=[.true.,.true.],array=[35, -74])) STOP 4
-if (ior(a(1,1),a(2,1)) /= iany(a)) call abort ()
-if (ior(a(1,1),a(2,1)) /= iany(array=[35, -74])) call abort ()
-if (any (ior(a(1,1),a(2,1)) /= iany(a,dim=1))) call abort ()
-if (ior(a(1,1),a(2,1)) /= iany(dim=1,mask=[.true.,.true.],array=[35, -74])) call abort ()
+if (ior(a(1,1),a(2,1)) /= iany(a)) STOP 5
+if (ior(a(1,1),a(2,1)) /= iany(array=[35, -74])) STOP 6
+if (any (ior(a(1,1),a(2,1)) /= iany(a,dim=1))) STOP 7
+if (ior(a(1,1),a(2,1)) /= iany(dim=1,mask=[.true.,.true.],array=[35, -74])) STOP 8
-if (ieor(a(1,1),a(2,1)) /= iparity(a)) call abort ()
-if (ieor(a(1,1),a(2,1)) /= iparity(array=[35, -74])) call abort ()
-if (any (ieor(a(1,1),a(2,1)) /= iparity(a,dim=1))) call abort ()
-if (ieor(a(1,1),a(2,1)) /= iparity(dim=1,mask=[.true.,.true.],array=[35, -74])) call abort ()
+if (ieor(a(1,1),a(2,1)) /= iparity(a)) STOP 9
+if (ieor(a(1,1),a(2,1)) /= iparity(array=[35, -74])) STOP 10
+if (any (ieor(a(1,1),a(2,1)) /= iparity(a,dim=1))) STOP 11
+if (ieor(a(1,1),a(2,1)) /= iparity(dim=1,mask=[.true.,.true.],array=[35, -74])) STOP 12
end
! { dg-do compile }
-! { dg-options "-fall-intrinsics -std=f95" }
+! { dg-options " -std=f95" }
! PR fortran/20248
program z
- if (iargc() /= 0) call abort
+ if (iargc() /= 0) STOP 1
end program z
j = ishft(j,1) + 1
k = ibits(j, 0, 32)
m = iand(j,n)
- if (k /= m) call abort
+ if (k /= m) STOP 1
end do
end program ibits_test
type(derivedtype) :: dt
type(derivedtype1) :: dt1
- if (ichar(c(3:3)) /= 97) call abort
- if (ichar(c(:1)) /= 97) call abort
- if (ichar(c(j:j)) /= 98) call abort
- if (ichar(s1) /= 101) call abort
- if (ichar('f') /= 102) call abort
+ if (ichar(c(3:3)) /= 97) STOP 1
+ if (ichar(c(:1)) /= 97) STOP 2
+ if (ichar(c(j:j)) /= 98) STOP 3
+ if (ichar(s1) /= 101) STOP 4
+ if (ichar('f') /= 102) STOP 5
g1(1) = 'a'
- if (ichar(g1(1)) /= 97) call abort
- if (ichar(g1(1)(:)) /= 97) call abort
+ if (ichar(g1(1)) /= 97) STOP 6
+ if (ichar(g1(1)(:)) /= 97) STOP 7
g2(1,1) = 'a'
- if (ichar(g2(1,1)) /= 97) call abort
+ if (ichar(g2(1,1)) /= 97) STOP 8
i = ichar(c) ! { dg-error "must be of length one" }
i = ichar(c(:)) ! { dg-error "must be of length one" }
! ichar and iachar use the same checking routines. DO a couple of tests to
! make sure it's not totally broken.
- if (ichar(c(3:3)) /= 97) call abort
+ if (ichar(c(3:3)) /= 97) STOP 9
i = ichar(c) ! { dg-error "must be of length one" }
i = ichar(dt%addr(1:1))
Program test
integer i
-if (ichar (char (0)) .ne. 0) call abort ()
-if (ichar (char (255)) .ne. 255) call abort ()
-if (ichar (char (127)) .ne. 127) call abort ()
+if (ichar (char (0)) .ne. 0) STOP 1
+if (ichar (char (255)) .ne. 255) STOP 2
+if (ichar (char (127)) .ne. 127) STOP 3
i = 0
-if (ichar (char (i)) .ne. i) call abort ()
+if (ichar (char (i)) .ne. i) STOP 4
i = 255
-if (ichar (char (i)) .ne. i) call abort ()
+if (ichar (char (i)) .ne. i) STOP 5
i = 127
-if (ichar (char (i)) .ne. i) call abort ()
+if (ichar (char (i)) .ne. i) STOP 6
end
FLAGS_STRING(s) ; \
if (s /= expected) then ; \
write (*,"(A,I0,A,A)") "Flags at line ", __LINE__, ": ", s ; \
- call abort ; \
+ STOP 1; \
end if ; \
call check_flag_sub
if (any(l)) then
print *, "Flags not cleared in subroutine"
- call abort
+ STOP 2
end if
end subroutine
! Test IEEE_COPY_SIGN
sx1 = 1.3
- if (ieee_copy_sign(sx1, sx1) /= sx1) call abort
- if (ieee_copy_sign(sx1, -sx1) /= -sx1) call abort
- if (ieee_copy_sign(sx1, 1.) /= sx1) call abort
- if (ieee_copy_sign(sx1, -1.) /= -sx1) call abort
+ if (ieee_copy_sign(sx1, sx1) /= sx1) STOP 1
+ if (ieee_copy_sign(sx1, -sx1) /= -sx1) STOP 2
+ if (ieee_copy_sign(sx1, 1.) /= sx1) STOP 3
+ if (ieee_copy_sign(sx1, -1.) /= -sx1) STOP 4
sx1 = huge(sx1)
- if (ieee_copy_sign(sx1, sx1) /= sx1) call abort
- if (ieee_copy_sign(sx1, -sx1) /= -sx1) call abort
- if (ieee_copy_sign(sx1, 1.) /= sx1) call abort
- if (ieee_copy_sign(sx1, -1.) /= -sx1) call abort
+ if (ieee_copy_sign(sx1, sx1) /= sx1) STOP 5
+ if (ieee_copy_sign(sx1, -sx1) /= -sx1) STOP 6
+ if (ieee_copy_sign(sx1, 1.) /= sx1) STOP 7
+ if (ieee_copy_sign(sx1, -1.) /= -sx1) STOP 8
sx1 = ieee_value(sx1, ieee_positive_inf)
- if (ieee_copy_sign(sx1, sx1) /= sx1) call abort
- if (ieee_copy_sign(sx1, -sx1) /= -sx1) call abort
- if (ieee_copy_sign(sx1, 1.) /= sx1) call abort
- if (ieee_copy_sign(sx1, -1.) /= -sx1) call abort
+ if (ieee_copy_sign(sx1, sx1) /= sx1) STOP 9
+ if (ieee_copy_sign(sx1, -sx1) /= -sx1) STOP 10
+ if (ieee_copy_sign(sx1, 1.) /= sx1) STOP 11
+ if (ieee_copy_sign(sx1, -1.) /= -sx1) STOP 12
sx1 = tiny(sx1)
- if (ieee_copy_sign(sx1, sx1) /= sx1) call abort
- if (ieee_copy_sign(sx1, -sx1) /= -sx1) call abort
- if (ieee_copy_sign(sx1, 1.) /= sx1) call abort
- if (ieee_copy_sign(sx1, -1.) /= -sx1) call abort
+ if (ieee_copy_sign(sx1, sx1) /= sx1) STOP 13
+ if (ieee_copy_sign(sx1, -sx1) /= -sx1) STOP 14
+ if (ieee_copy_sign(sx1, 1.) /= sx1) STOP 15
+ if (ieee_copy_sign(sx1, -1.) /= -sx1) STOP 16
sx1 = tiny(sx1)
sx1 = sx1 / 101
- if (ieee_copy_sign(sx1, sx1) /= sx1) call abort
- if (ieee_copy_sign(sx1, -sx1) /= -sx1) call abort
- if (ieee_copy_sign(sx1, 1.) /= sx1) call abort
- if (ieee_copy_sign(sx1, -1.) /= -sx1) call abort
+ if (ieee_copy_sign(sx1, sx1) /= sx1) STOP 17
+ if (ieee_copy_sign(sx1, -sx1) /= -sx1) STOP 18
+ if (ieee_copy_sign(sx1, 1.) /= sx1) STOP 19
+ if (ieee_copy_sign(sx1, -1.) /= -sx1) STOP 20
sx1 = -1.3
- if (ieee_copy_sign(sx1, sx1) /= sx1) call abort
- if (ieee_copy_sign(sx1, -sx1) /= -sx1) call abort
- if (ieee_copy_sign(sx1, 1.) /= abs(sx1)) call abort
- if (ieee_copy_sign(sx1, -1.) /= -abs(sx1)) call abort
+ if (ieee_copy_sign(sx1, sx1) /= sx1) STOP 21
+ if (ieee_copy_sign(sx1, -sx1) /= -sx1) STOP 22
+ if (ieee_copy_sign(sx1, 1.) /= abs(sx1)) STOP 23
+ if (ieee_copy_sign(sx1, -1.) /= -abs(sx1)) STOP 24
sx1 = -huge(sx1)
- if (ieee_copy_sign(sx1, sx1) /= sx1) call abort
- if (ieee_copy_sign(sx1, -sx1) /= -sx1) call abort
- if (ieee_copy_sign(sx1, 1.) /= abs(sx1)) call abort
- if (ieee_copy_sign(sx1, -1.) /= -abs(sx1)) call abort
+ if (ieee_copy_sign(sx1, sx1) /= sx1) STOP 25
+ if (ieee_copy_sign(sx1, -sx1) /= -sx1) STOP 26
+ if (ieee_copy_sign(sx1, 1.) /= abs(sx1)) STOP 27
+ if (ieee_copy_sign(sx1, -1.) /= -abs(sx1)) STOP 28
sx1 = ieee_value(sx1, ieee_negative_inf)
- if (ieee_copy_sign(sx1, sx1) /= sx1) call abort
- if (ieee_copy_sign(sx1, -sx1) /= -sx1) call abort
- if (ieee_copy_sign(sx1, 1.) /= abs(sx1)) call abort
- if (ieee_copy_sign(sx1, -1.) /= -abs(sx1)) call abort
+ if (ieee_copy_sign(sx1, sx1) /= sx1) STOP 29
+ if (ieee_copy_sign(sx1, -sx1) /= -sx1) STOP 30
+ if (ieee_copy_sign(sx1, 1.) /= abs(sx1)) STOP 31
+ if (ieee_copy_sign(sx1, -1.) /= -abs(sx1)) STOP 32
sx1 = -tiny(sx1)
- if (ieee_copy_sign(sx1, sx1) /= sx1) call abort
- if (ieee_copy_sign(sx1, -sx1) /= -sx1) call abort
- if (ieee_copy_sign(sx1, 1.) /= abs(sx1)) call abort
- if (ieee_copy_sign(sx1, -1.) /= -abs(sx1)) call abort
+ if (ieee_copy_sign(sx1, sx1) /= sx1) STOP 33
+ if (ieee_copy_sign(sx1, -sx1) /= -sx1) STOP 34
+ if (ieee_copy_sign(sx1, 1.) /= abs(sx1)) STOP 35
+ if (ieee_copy_sign(sx1, -1.) /= -abs(sx1)) STOP 36
sx1 = -tiny(sx1)
sx1 = sx1 / 101
- if (ieee_copy_sign(sx1, sx1) /= sx1) call abort
- if (ieee_copy_sign(sx1, -sx1) /= -sx1) call abort
- if (ieee_copy_sign(sx1, 1.) /= abs(sx1)) call abort
- if (ieee_copy_sign(sx1, -1.) /= -abs(sx1)) call abort
+ if (ieee_copy_sign(sx1, sx1) /= sx1) STOP 37
+ if (ieee_copy_sign(sx1, -sx1) /= -sx1) STOP 38
+ if (ieee_copy_sign(sx1, 1.) /= abs(sx1)) STOP 39
+ if (ieee_copy_sign(sx1, -1.) /= -abs(sx1)) STOP 40
- if (ieee_class(ieee_copy_sign(0., -1.)) /= ieee_negative_zero) call abort
- if (ieee_class(ieee_copy_sign(-0., -1.)) /= ieee_negative_zero) call abort
- if (ieee_class(ieee_copy_sign(0., 1.)) /= ieee_positive_zero) call abort
- if (ieee_class(ieee_copy_sign(-0., 1.)) /= ieee_positive_zero) call abort
+ if (ieee_class(ieee_copy_sign(0., -1.)) /= ieee_negative_zero) STOP 41
+ if (ieee_class(ieee_copy_sign(-0., -1.)) /= ieee_negative_zero) STOP 42
+ if (ieee_class(ieee_copy_sign(0., 1.)) /= ieee_positive_zero) STOP 43
+ if (ieee_class(ieee_copy_sign(-0., 1.)) /= ieee_positive_zero) STOP 44
sx1 = ieee_value(0., ieee_quiet_nan)
- if (ieee_class(ieee_copy_sign(sx1, 1.)) /= ieee_quiet_nan) call abort
- if (ieee_class(ieee_copy_sign(sx1, -1.)) /= ieee_quiet_nan) call abort
+ if (ieee_class(ieee_copy_sign(sx1, 1.)) /= ieee_quiet_nan) STOP 45
+ if (ieee_class(ieee_copy_sign(sx1, -1.)) /= ieee_quiet_nan) STOP 46
dx1 = 1.3
- if (ieee_copy_sign(dx1, dx1) /= dx1) call abort
- if (ieee_copy_sign(dx1, -dx1) /= -dx1) call abort
- if (ieee_copy_sign(dx1, 1.) /= dx1) call abort
- if (ieee_copy_sign(dx1, -1.d0) /= -dx1) call abort
+ if (ieee_copy_sign(dx1, dx1) /= dx1) STOP 47
+ if (ieee_copy_sign(dx1, -dx1) /= -dx1) STOP 48
+ if (ieee_copy_sign(dx1, 1.) /= dx1) STOP 49
+ if (ieee_copy_sign(dx1, -1.d0) /= -dx1) STOP 50
dx1 = huge(dx1)
- if (ieee_copy_sign(dx1, dx1) /= dx1) call abort
- if (ieee_copy_sign(dx1, -dx1) /= -dx1) call abort
- if (ieee_copy_sign(dx1, 1.d0) /= dx1) call abort
- if (ieee_copy_sign(dx1, -1.) /= -dx1) call abort
+ if (ieee_copy_sign(dx1, dx1) /= dx1) STOP 51
+ if (ieee_copy_sign(dx1, -dx1) /= -dx1) STOP 52
+ if (ieee_copy_sign(dx1, 1.d0) /= dx1) STOP 53
+ if (ieee_copy_sign(dx1, -1.) /= -dx1) STOP 54
dx1 = ieee_value(dx1, ieee_positive_inf)
- if (ieee_copy_sign(dx1, dx1) /= dx1) call abort
- if (ieee_copy_sign(dx1, -dx1) /= -dx1) call abort
- if (ieee_copy_sign(dx1, 1.) /= dx1) call abort
- if (ieee_copy_sign(dx1, -1.d0) /= -dx1) call abort
+ if (ieee_copy_sign(dx1, dx1) /= dx1) STOP 55
+ if (ieee_copy_sign(dx1, -dx1) /= -dx1) STOP 56
+ if (ieee_copy_sign(dx1, 1.) /= dx1) STOP 57
+ if (ieee_copy_sign(dx1, -1.d0) /= -dx1) STOP 58
dx1 = tiny(dx1)
- if (ieee_copy_sign(dx1, dx1) /= dx1) call abort
- if (ieee_copy_sign(dx1, -dx1) /= -dx1) call abort
- if (ieee_copy_sign(dx1, 1.d0) /= dx1) call abort
- if (ieee_copy_sign(dx1, -1.) /= -dx1) call abort
+ if (ieee_copy_sign(dx1, dx1) /= dx1) STOP 59
+ if (ieee_copy_sign(dx1, -dx1) /= -dx1) STOP 60
+ if (ieee_copy_sign(dx1, 1.d0) /= dx1) STOP 61
+ if (ieee_copy_sign(dx1, -1.) /= -dx1) STOP 62
dx1 = tiny(dx1)
dx1 = dx1 / 101
- if (ieee_copy_sign(dx1, dx1) /= dx1) call abort
- if (ieee_copy_sign(dx1, -dx1) /= -dx1) call abort
- if (ieee_copy_sign(dx1, 1.) /= dx1) call abort
- if (ieee_copy_sign(dx1, -1.d0) /= -dx1) call abort
+ if (ieee_copy_sign(dx1, dx1) /= dx1) STOP 63
+ if (ieee_copy_sign(dx1, -dx1) /= -dx1) STOP 64
+ if (ieee_copy_sign(dx1, 1.) /= dx1) STOP 65
+ if (ieee_copy_sign(dx1, -1.d0) /= -dx1) STOP 66
dx1 = -1.3d0
- if (ieee_copy_sign(dx1, dx1) /= dx1) call abort
- if (ieee_copy_sign(dx1, -dx1) /= -dx1) call abort
- if (ieee_copy_sign(dx1, 1.d0) /= abs(dx1)) call abort
- if (ieee_copy_sign(dx1, -1.) /= -abs(dx1)) call abort
+ if (ieee_copy_sign(dx1, dx1) /= dx1) STOP 67
+ if (ieee_copy_sign(dx1, -dx1) /= -dx1) STOP 68
+ if (ieee_copy_sign(dx1, 1.d0) /= abs(dx1)) STOP 69
+ if (ieee_copy_sign(dx1, -1.) /= -abs(dx1)) STOP 70
dx1 = -huge(dx1)
- if (ieee_copy_sign(dx1, dx1) /= dx1) call abort
- if (ieee_copy_sign(dx1, -dx1) /= -dx1) call abort
- if (ieee_copy_sign(dx1, 1.) /= abs(dx1)) call abort
- if (ieee_copy_sign(dx1, -1.d0) /= -abs(dx1)) call abort
+ if (ieee_copy_sign(dx1, dx1) /= dx1) STOP 71
+ if (ieee_copy_sign(dx1, -dx1) /= -dx1) STOP 72
+ if (ieee_copy_sign(dx1, 1.) /= abs(dx1)) STOP 73
+ if (ieee_copy_sign(dx1, -1.d0) /= -abs(dx1)) STOP 74
dx1 = ieee_value(dx1, ieee_negative_inf)
- if (ieee_copy_sign(dx1, dx1) /= dx1) call abort
- if (ieee_copy_sign(dx1, -dx1) /= -dx1) call abort
- if (ieee_copy_sign(dx1, 1.d0) /= abs(dx1)) call abort
- if (ieee_copy_sign(dx1, -1.) /= -abs(dx1)) call abort
+ if (ieee_copy_sign(dx1, dx1) /= dx1) STOP 75
+ if (ieee_copy_sign(dx1, -dx1) /= -dx1) STOP 76
+ if (ieee_copy_sign(dx1, 1.d0) /= abs(dx1)) STOP 77
+ if (ieee_copy_sign(dx1, -1.) /= -abs(dx1)) STOP 78
dx1 = -tiny(dx1)
- if (ieee_copy_sign(dx1, dx1) /= dx1) call abort
- if (ieee_copy_sign(dx1, -dx1) /= -dx1) call abort
- if (ieee_copy_sign(dx1, 1.) /= abs(dx1)) call abort
- if (ieee_copy_sign(dx1, -1.d0) /= -abs(dx1)) call abort
+ if (ieee_copy_sign(dx1, dx1) /= dx1) STOP 79
+ if (ieee_copy_sign(dx1, -dx1) /= -dx1) STOP 80
+ if (ieee_copy_sign(dx1, 1.) /= abs(dx1)) STOP 81
+ if (ieee_copy_sign(dx1, -1.d0) /= -abs(dx1)) STOP 82
dx1 = -tiny(dx1)
dx1 = dx1 / 101
- if (ieee_copy_sign(dx1, dx1) /= dx1) call abort
- if (ieee_copy_sign(dx1, -dx1) /= -dx1) call abort
- if (ieee_copy_sign(dx1, 1.d0) /= abs(dx1)) call abort
- if (ieee_copy_sign(dx1, -1.) /= -abs(dx1)) call abort
+ if (ieee_copy_sign(dx1, dx1) /= dx1) STOP 83
+ if (ieee_copy_sign(dx1, -dx1) /= -dx1) STOP 84
+ if (ieee_copy_sign(dx1, 1.d0) /= abs(dx1)) STOP 85
+ if (ieee_copy_sign(dx1, -1.) /= -abs(dx1)) STOP 86
- if (ieee_class(ieee_copy_sign(0.d0, -1.)) /= ieee_negative_zero) call abort
- if (ieee_class(ieee_copy_sign(-0.d0, -1.)) /= ieee_negative_zero) call abort
- if (ieee_class(ieee_copy_sign(0.d0, 1.)) /= ieee_positive_zero) call abort
- if (ieee_class(ieee_copy_sign(-0.d0, 1.)) /= ieee_positive_zero) call abort
+ if (ieee_class(ieee_copy_sign(0.d0, -1.)) /= ieee_negative_zero) STOP 87
+ if (ieee_class(ieee_copy_sign(-0.d0, -1.)) /= ieee_negative_zero) STOP 88
+ if (ieee_class(ieee_copy_sign(0.d0, 1.)) /= ieee_positive_zero) STOP 89
+ if (ieee_class(ieee_copy_sign(-0.d0, 1.)) /= ieee_positive_zero) STOP 90
dx1 = ieee_value(0.d0, ieee_quiet_nan)
- if (ieee_class(ieee_copy_sign(dx1, 1.d0)) /= ieee_quiet_nan) call abort
- if (ieee_class(ieee_copy_sign(dx1, -1.)) /= ieee_quiet_nan) call abort
+ if (ieee_class(ieee_copy_sign(dx1, 1.d0)) /= ieee_quiet_nan) STOP 91
+ if (ieee_class(ieee_copy_sign(dx1, -1.)) /= ieee_quiet_nan) STOP 92
! Test IEEE_LOGB
- if (ieee_logb(1.17) /= exponent(1.17) - 1) call abort
- if (ieee_logb(-1.17) /= exponent(-1.17) - 1) call abort
- if (ieee_logb(huge(sx1)) /= exponent(huge(sx1)) - 1) call abort
- if (ieee_logb(-huge(sx1)) /= exponent(-huge(sx1)) - 1) call abort
- if (ieee_logb(tiny(sx1)) /= exponent(tiny(sx1)) - 1) call abort
- if (ieee_logb(-tiny(sx1)) /= exponent(-tiny(sx1)) - 1) call abort
+ if (ieee_logb(1.17) /= exponent(1.17) - 1) STOP 93
+ if (ieee_logb(-1.17) /= exponent(-1.17) - 1) STOP 94
+ if (ieee_logb(huge(sx1)) /= exponent(huge(sx1)) - 1) STOP 95
+ if (ieee_logb(-huge(sx1)) /= exponent(-huge(sx1)) - 1) STOP 96
+ if (ieee_logb(tiny(sx1)) /= exponent(tiny(sx1)) - 1) STOP 97
+ if (ieee_logb(-tiny(sx1)) /= exponent(-tiny(sx1)) - 1) STOP 98
- if (ieee_class(ieee_logb(0.)) /= ieee_negative_inf) call abort
- if (ieee_class(ieee_logb(-0.)) /= ieee_negative_inf) call abort
+ if (ieee_class(ieee_logb(0.)) /= ieee_negative_inf) STOP 99
+ if (ieee_class(ieee_logb(-0.)) /= ieee_negative_inf) STOP 100
sx1 = ieee_value(sx1, ieee_positive_inf)
- if (ieee_class(ieee_logb(sx1)) /= ieee_positive_inf) call abort
- if (ieee_class(ieee_logb(-sx1)) /= ieee_positive_inf) call abort
+ if (ieee_class(ieee_logb(sx1)) /= ieee_positive_inf) STOP 101
+ if (ieee_class(ieee_logb(-sx1)) /= ieee_positive_inf) STOP 102
sx1 = ieee_value(sx1, ieee_quiet_nan)
- if (ieee_class(ieee_logb(sx1)) /= ieee_quiet_nan) call abort
+ if (ieee_class(ieee_logb(sx1)) /= ieee_quiet_nan) STOP 103
- if (ieee_logb(1.17d0) /= exponent(1.17d0) - 1) call abort
- if (ieee_logb(-1.17d0) /= exponent(-1.17d0) - 1) call abort
- if (ieee_logb(huge(dx1)) /= exponent(huge(dx1)) - 1) call abort
- if (ieee_logb(-huge(dx1)) /= exponent(-huge(dx1)) - 1) call abort
- if (ieee_logb(tiny(dx1)) /= exponent(tiny(dx1)) - 1) call abort
- if (ieee_logb(-tiny(dx1)) /= exponent(-tiny(dx1)) - 1) call abort
+ if (ieee_logb(1.17d0) /= exponent(1.17d0) - 1) STOP 104
+ if (ieee_logb(-1.17d0) /= exponent(-1.17d0) - 1) STOP 105
+ if (ieee_logb(huge(dx1)) /= exponent(huge(dx1)) - 1) STOP 106
+ if (ieee_logb(-huge(dx1)) /= exponent(-huge(dx1)) - 1) STOP 107
+ if (ieee_logb(tiny(dx1)) /= exponent(tiny(dx1)) - 1) STOP 108
+ if (ieee_logb(-tiny(dx1)) /= exponent(-tiny(dx1)) - 1) STOP 109
- if (ieee_class(ieee_logb(0.d0)) /= ieee_negative_inf) call abort
- if (ieee_class(ieee_logb(-0.d0)) /= ieee_negative_inf) call abort
+ if (ieee_class(ieee_logb(0.d0)) /= ieee_negative_inf) STOP 110
+ if (ieee_class(ieee_logb(-0.d0)) /= ieee_negative_inf) STOP 111
dx1 = ieee_value(dx1, ieee_positive_inf)
- if (ieee_class(ieee_logb(dx1)) /= ieee_positive_inf) call abort
- if (ieee_class(ieee_logb(-dx1)) /= ieee_positive_inf) call abort
+ if (ieee_class(ieee_logb(dx1)) /= ieee_positive_inf) STOP 112
+ if (ieee_class(ieee_logb(-dx1)) /= ieee_positive_inf) STOP 113
dx1 = ieee_value(dx1, ieee_quiet_nan)
- if (ieee_class(ieee_logb(dx1)) /= ieee_quiet_nan) call abort
+ if (ieee_class(ieee_logb(dx1)) /= ieee_quiet_nan) STOP 114
! Test IEEE_NEXT_AFTER
- if (ieee_next_after(0.12, 1.0) /= nearest(0.12, 1.0)) call abort
- if (ieee_next_after(0.12, -1.0) /= nearest(0.12, -1.0)) call abort
+ if (ieee_next_after(0.12, 1.0) /= nearest(0.12, 1.0)) STOP 115
+ if (ieee_next_after(0.12, -1.0) /= nearest(0.12, -1.0)) STOP 116
sx1 = 0.12
- if (ieee_next_after(sx1, sx1) /= sx1) call abort
+ if (ieee_next_after(sx1, sx1) /= sx1) STOP 117
sx1 = -0.12
- if (ieee_next_after(sx1, sx1) /= sx1) call abort
+ if (ieee_next_after(sx1, sx1) /= sx1) STOP 118
sx1 = huge(sx1)
- if (ieee_next_after(sx1, sx1) /= sx1) call abort
+ if (ieee_next_after(sx1, sx1) /= sx1) STOP 119
sx1 = tiny(sx1)
- if (ieee_next_after(sx1, sx1) /= sx1) call abort
+ if (ieee_next_after(sx1, sx1) /= sx1) STOP 120
sx1 = 0
- if (ieee_next_after(sx1, sx1) /= sx1) call abort
+ if (ieee_next_after(sx1, sx1) /= sx1) STOP 121
sx1 = ieee_value(sx1, ieee_negative_inf)
- if (ieee_next_after(sx1, sx1) /= sx1) call abort
+ if (ieee_next_after(sx1, sx1) /= sx1) STOP 122
sx1 = ieee_value(sx1, ieee_quiet_nan)
- if (ieee_class(ieee_next_after(sx1, sx1)) /= ieee_quiet_nan) call abort
+ if (ieee_class(ieee_next_after(sx1, sx1)) /= ieee_quiet_nan) STOP 123
- if (ieee_next_after(0., 1.0) <= 0) call abort
- if (ieee_next_after(0., -1.0) >= 0) call abort
+ if (ieee_next_after(0., 1.0) <= 0) STOP 124
+ if (ieee_next_after(0., -1.0) >= 0) STOP 125
sx1 = ieee_next_after(huge(sx1), ieee_value(sx1, ieee_negative_inf))
- if (.not. sx1 < huge(sx1)) call abort
+ if (.not. sx1 < huge(sx1)) STOP 126
sx1 = ieee_next_after(huge(sx1), ieee_value(sx1, ieee_positive_inf))
- if (ieee_class(sx1) /= ieee_positive_inf) call abort
+ if (ieee_class(sx1) /= ieee_positive_inf) STOP 127
sx1 = ieee_next_after(-tiny(sx1), 1.0)
- if (ieee_class(sx1) /= ieee_negative_denormal) call abort
+ if (ieee_class(sx1) /= ieee_negative_denormal) STOP 128
- if (ieee_next_after(0.12d0, 1.0d0) /= nearest(0.12d0, 1.0)) call abort
- if (ieee_next_after(0.12d0, -1.0) /= nearest(0.12d0, -1.0)) call abort
+ if (ieee_next_after(0.12d0, 1.0d0) /= nearest(0.12d0, 1.0)) STOP 129
+ if (ieee_next_after(0.12d0, -1.0) /= nearest(0.12d0, -1.0)) STOP 130
dx1 = 0.12
- if (ieee_next_after(dx1, dx1) /= dx1) call abort
+ if (ieee_next_after(dx1, dx1) /= dx1) STOP 131
dx1 = -0.12
- if (ieee_next_after(dx1, dx1) /= dx1) call abort
+ if (ieee_next_after(dx1, dx1) /= dx1) STOP 132
dx1 = huge(dx1)
- if (ieee_next_after(dx1, dx1) /= dx1) call abort
+ if (ieee_next_after(dx1, dx1) /= dx1) STOP 133
dx1 = tiny(dx1)
- if (ieee_next_after(dx1, dx1) /= dx1) call abort
+ if (ieee_next_after(dx1, dx1) /= dx1) STOP 134
dx1 = 0
- if (ieee_next_after(dx1, dx1) /= dx1) call abort
+ if (ieee_next_after(dx1, dx1) /= dx1) STOP 135
dx1 = ieee_value(dx1, ieee_negative_inf)
- if (ieee_next_after(dx1, dx1) /= dx1) call abort
+ if (ieee_next_after(dx1, dx1) /= dx1) STOP 136
dx1 = ieee_value(dx1, ieee_quiet_nan)
- if (ieee_class(ieee_next_after(dx1, dx1)) /= ieee_quiet_nan) call abort
+ if (ieee_class(ieee_next_after(dx1, dx1)) /= ieee_quiet_nan) STOP 137
- if (ieee_next_after(0.d0, 1.0) <= 0) call abort
- if (ieee_next_after(0.d0, -1.0d0) >= 0) call abort
+ if (ieee_next_after(0.d0, 1.0) <= 0) STOP 138
+ if (ieee_next_after(0.d0, -1.0d0) >= 0) STOP 139
dx1 = ieee_next_after(huge(dx1), ieee_value(dx1, ieee_negative_inf))
- if (.not. dx1 < huge(dx1)) call abort
+ if (.not. dx1 < huge(dx1)) STOP 140
dx1 = ieee_next_after(huge(dx1), ieee_value(dx1, ieee_positive_inf))
- if (ieee_class(dx1) /= ieee_positive_inf) call abort
+ if (ieee_class(dx1) /= ieee_positive_inf) STOP 141
dx1 = ieee_next_after(-tiny(dx1), 1.0d0)
- if (ieee_class(dx1) /= ieee_negative_denormal) call abort
+ if (ieee_class(dx1) /= ieee_negative_denormal) STOP 142
! Test IEEE_REM
- if (ieee_rem(4.0, 3.0) /= 1.0) call abort
- if (ieee_rem(-4.0, 3.0) /= -1.0) call abort
- if (ieee_rem(2.0, 3.0d0) /= -1.0d0) call abort
- if (ieee_rem(-2.0, 3.0d0) /= 1.0d0) call abort
- if (ieee_rem(2.0d0, 3.0d0) /= -1.0d0) call abort
- if (ieee_rem(-2.0d0, 3.0d0) /= 1.0d0) call abort
+ if (ieee_rem(4.0, 3.0) /= 1.0) STOP 143
+ if (ieee_rem(-4.0, 3.0) /= -1.0) STOP 144
+ if (ieee_rem(2.0, 3.0d0) /= -1.0d0) STOP 145
+ if (ieee_rem(-2.0, 3.0d0) /= 1.0d0) STOP 146
+ if (ieee_rem(2.0d0, 3.0d0) /= -1.0d0) STOP 147
+ if (ieee_rem(-2.0d0, 3.0d0) /= 1.0d0) STOP 148
if (ieee_class(ieee_rem(ieee_value(0., ieee_quiet_nan), 1.0)) &
- /= ieee_quiet_nan) call abort
+ /= ieee_quiet_nan) STOP 149
if (ieee_class(ieee_rem(1.0, ieee_value(0.d0, ieee_quiet_nan))) &
- /= ieee_quiet_nan) call abort
+ /= ieee_quiet_nan) STOP 150
if (ieee_class(ieee_rem(ieee_value(0., ieee_positive_inf), 1.0)) &
- /= ieee_quiet_nan) call abort
+ /= ieee_quiet_nan) STOP 151
if (ieee_class(ieee_rem(ieee_value(0.d0, ieee_negative_inf), 1.0)) &
- /= ieee_quiet_nan) call abort
+ /= ieee_quiet_nan) STOP 152
if (ieee_rem(-1.0, ieee_value(0., ieee_positive_inf)) &
- /= -1.0) call abort
+ /= -1.0) STOP 153
if (ieee_rem(1.0, ieee_value(0.d0, ieee_negative_inf)) &
- /= 1.0) call abort
+ /= 1.0) STOP 154
! Test IEEE_RINT
sx1 = 7 / 3.
sx1 = ieee_rint (sx1)
call ieee_set_rounding_mode (mode)
- if (sx1 /= 2) call abort
+ if (sx1 /= 2) STOP 155
end if
if (ieee_support_rounding (ieee_up, sx1)) then
sx1 = 7 / 3.
sx1 = ieee_rint (sx1)
call ieee_set_rounding_mode (mode)
- if (sx1 /= 3) call abort
+ if (sx1 /= 3) STOP 156
end if
if (ieee_support_rounding (ieee_down, sx1)) then
sx1 = 7 / 3.
sx1 = ieee_rint (sx1)
call ieee_set_rounding_mode (mode)
- if (sx1 /= 2) call abort
+ if (sx1 /= 2) STOP 157
end if
if (ieee_support_rounding (ieee_to_zero, sx1)) then
sx1 = 7 / 3.
sx1 = ieee_rint (sx1)
call ieee_set_rounding_mode (mode)
- if (sx1 /= 2) call abort
+ if (sx1 /= 2) STOP 158
end if
- if (ieee_class(ieee_rint(0.)) /= ieee_positive_zero) call abort
- if (ieee_class(ieee_rint(-0.)) /= ieee_negative_zero) call abort
+ if (ieee_class(ieee_rint(0.)) /= ieee_positive_zero) STOP 159
+ if (ieee_class(ieee_rint(-0.)) /= ieee_negative_zero) STOP 160
if (ieee_support_rounding (ieee_nearest, dx1)) then
call ieee_get_rounding_mode (mode)
dx1 = 7 / 3.d0
dx1 = ieee_rint (dx1)
call ieee_set_rounding_mode (mode)
- if (dx1 /= 2) call abort
+ if (dx1 /= 2) STOP 161
end if
if (ieee_support_rounding (ieee_up, dx1)) then
dx1 = 7 / 3.d0
dx1 = ieee_rint (dx1)
call ieee_set_rounding_mode (mode)
- if (dx1 /= 3) call abort
+ if (dx1 /= 3) STOP 162
end if
if (ieee_support_rounding (ieee_down, dx1)) then
dx1 = 7 / 3.d0
dx1 = ieee_rint (dx1)
call ieee_set_rounding_mode (mode)
- if (dx1 /= 2) call abort
+ if (dx1 /= 2) STOP 163
end if
if (ieee_support_rounding (ieee_to_zero, dx1)) then
dx1 = 7 / 3.d0
dx1 = ieee_rint (dx1)
call ieee_set_rounding_mode (mode)
- if (dx1 /= 2) call abort
+ if (dx1 /= 2) STOP 164
end if
- if (ieee_class(ieee_rint(0.d0)) /= ieee_positive_zero) call abort
- if (ieee_class(ieee_rint(-0.d0)) /= ieee_negative_zero) call abort
+ if (ieee_class(ieee_rint(0.d0)) /= ieee_positive_zero) STOP 165
+ if (ieee_class(ieee_rint(-0.d0)) /= ieee_negative_zero) STOP 166
! Test IEEE_SCALB
sx1 = 1
- if (ieee_scalb(sx1, 2) /= 4.) call abort
- if (ieee_scalb(-sx1, 2) /= -4.) call abort
- if (ieee_scalb(sx1, -2) /= 1/4.) call abort
- if (ieee_scalb(-sx1, -2) /= -1/4.) call abort
- if (ieee_class(ieee_scalb(sx1, huge(0))) /= ieee_positive_inf) call abort
- if (ieee_class(ieee_scalb(-sx1, huge(0))) /= ieee_negative_inf) call abort
- if (ieee_class(ieee_scalb(sx1, -huge(0))) /= ieee_positive_zero) call abort
- if (ieee_class(ieee_scalb(-sx1, -huge(0))) /= ieee_negative_zero) call abort
+ if (ieee_scalb(sx1, 2) /= 4.) STOP 167
+ if (ieee_scalb(-sx1, 2) /= -4.) STOP 168
+ if (ieee_scalb(sx1, -2) /= 1/4.) STOP 169
+ if (ieee_scalb(-sx1, -2) /= -1/4.) STOP 170
+ if (ieee_class(ieee_scalb(sx1, huge(0))) /= ieee_positive_inf) STOP 171
+ if (ieee_class(ieee_scalb(-sx1, huge(0))) /= ieee_negative_inf) STOP 172
+ if (ieee_class(ieee_scalb(sx1, -huge(0))) /= ieee_positive_zero) STOP 173
+ if (ieee_class(ieee_scalb(-sx1, -huge(0))) /= ieee_negative_zero) STOP 174
sx1 = ieee_value(sx1, ieee_quiet_nan)
- if (ieee_class(ieee_scalb(sx1, 1)) /= ieee_quiet_nan) call abort
+ if (ieee_class(ieee_scalb(sx1, 1)) /= ieee_quiet_nan) STOP 175
sx1 = ieee_value(sx1, ieee_positive_inf)
- if (ieee_class(ieee_scalb(sx1, -42)) /= ieee_positive_inf) call abort
+ if (ieee_class(ieee_scalb(sx1, -42)) /= ieee_positive_inf) STOP 176
sx1 = ieee_value(sx1, ieee_negative_inf)
- if (ieee_class(ieee_scalb(sx1, -42)) /= ieee_negative_inf) call abort
+ if (ieee_class(ieee_scalb(sx1, -42)) /= ieee_negative_inf) STOP 177
dx1 = 1
- if (ieee_scalb(dx1, 2) /= 4.d0) call abort
- if (ieee_scalb(-dx1, 2) /= -4.d0) call abort
- if (ieee_scalb(dx1, -2) /= 1/4.d0) call abort
- if (ieee_scalb(-dx1, -2) /= -1/4.d0) call abort
- if (ieee_class(ieee_scalb(dx1, huge(0))) /= ieee_positive_inf) call abort
- if (ieee_class(ieee_scalb(-dx1, huge(0))) /= ieee_negative_inf) call abort
- if (ieee_class(ieee_scalb(dx1, -huge(0))) /= ieee_positive_zero) call abort
- if (ieee_class(ieee_scalb(-dx1, -huge(0))) /= ieee_negative_zero) call abort
+ if (ieee_scalb(dx1, 2) /= 4.d0) STOP 178
+ if (ieee_scalb(-dx1, 2) /= -4.d0) STOP 179
+ if (ieee_scalb(dx1, -2) /= 1/4.d0) STOP 180
+ if (ieee_scalb(-dx1, -2) /= -1/4.d0) STOP 181
+ if (ieee_class(ieee_scalb(dx1, huge(0))) /= ieee_positive_inf) STOP 182
+ if (ieee_class(ieee_scalb(-dx1, huge(0))) /= ieee_negative_inf) STOP 183
+ if (ieee_class(ieee_scalb(dx1, -huge(0))) /= ieee_positive_zero) STOP 184
+ if (ieee_class(ieee_scalb(-dx1, -huge(0))) /= ieee_negative_zero) STOP 185
dx1 = ieee_value(dx1, ieee_quiet_nan)
- if (ieee_class(ieee_scalb(dx1, 1)) /= ieee_quiet_nan) call abort
+ if (ieee_class(ieee_scalb(dx1, 1)) /= ieee_quiet_nan) STOP 186
dx1 = ieee_value(dx1, ieee_positive_inf)
- if (ieee_class(ieee_scalb(dx1, -42)) /= ieee_positive_inf) call abort
+ if (ieee_class(ieee_scalb(dx1, -42)) /= ieee_positive_inf) STOP 187
dx1 = ieee_value(dx1, ieee_negative_inf)
- if (ieee_class(ieee_scalb(dx1, -42)) /= ieee_negative_inf) call abort
+ if (ieee_class(ieee_scalb(dx1, -42)) /= ieee_negative_inf) STOP 188
contains
real, intent(in) :: x, y
if (x /= y) then
print *, x, y
- call abort
+ STOP 189
end if
end subroutine
double precision, intent(in) :: x, y
if (x /= y) then
print *, x, y
- call abort
+ STOP 190
end if
end subroutine
real, intent(in) :: x, y
if (x == y) then
print *, x, y
- call abort
+ STOP 191
end if
end subroutine
double precision, intent(in) :: x, y
if (x == y) then
print *, x, y
- call abort
+ STOP 192
end if
end subroutine
! Test IEEE_IS_FINITE
if (ieee_support_datatype(0._s)) then
- if (.not. ieee_is_finite(0.2_s)) call abort
- if (.not. ieee_is_finite(-0.2_s)) call abort
- if (.not. ieee_is_finite(0._s)) call abort
- if (.not. ieee_is_finite(-0._s)) call abort
- if (.not. ieee_is_finite(tiny(0._s))) call abort
- if (.not. ieee_is_finite(tiny(0._s)/100)) call abort
- if (.not. ieee_is_finite(huge(0._s))) call abort
- if (.not. ieee_is_finite(-huge(0._s))) call abort
+ if (.not. ieee_is_finite(0.2_s)) STOP 1
+ if (.not. ieee_is_finite(-0.2_s)) STOP 2
+ if (.not. ieee_is_finite(0._s)) STOP 3
+ if (.not. ieee_is_finite(-0._s)) STOP 4
+ if (.not. ieee_is_finite(tiny(0._s))) STOP 5
+ if (.not. ieee_is_finite(tiny(0._s)/100)) STOP 6
+ if (.not. ieee_is_finite(huge(0._s))) STOP 7
+ if (.not. ieee_is_finite(-huge(0._s))) STOP 8
sx1 = huge(sx1)
- if (ieee_is_finite(2*sx1)) call abort
- if (ieee_is_finite(2*(-sx1))) call abort
+ if (ieee_is_finite(2*sx1)) STOP 9
+ if (ieee_is_finite(2*(-sx1))) STOP 10
sx1 = ieee_value(sx1, ieee_quiet_nan)
- if (ieee_is_finite(sx1)) call abort
+ if (ieee_is_finite(sx1)) STOP 11
end if
if (ieee_support_datatype(0._d)) then
- if (.not. ieee_is_finite(0.2_d)) call abort
- if (.not. ieee_is_finite(-0.2_d)) call abort
- if (.not. ieee_is_finite(0._d)) call abort
- if (.not. ieee_is_finite(-0._d)) call abort
- if (.not. ieee_is_finite(tiny(0._d))) call abort
- if (.not. ieee_is_finite(tiny(0._d)/100)) call abort
- if (.not. ieee_is_finite(huge(0._d))) call abort
- if (.not. ieee_is_finite(-huge(0._d))) call abort
+ if (.not. ieee_is_finite(0.2_d)) STOP 12
+ if (.not. ieee_is_finite(-0.2_d)) STOP 13
+ if (.not. ieee_is_finite(0._d)) STOP 14
+ if (.not. ieee_is_finite(-0._d)) STOP 15
+ if (.not. ieee_is_finite(tiny(0._d))) STOP 16
+ if (.not. ieee_is_finite(tiny(0._d)/100)) STOP 17
+ if (.not. ieee_is_finite(huge(0._d))) STOP 18
+ if (.not. ieee_is_finite(-huge(0._d))) STOP 19
dx1 = huge(dx1)
- if (ieee_is_finite(2*dx1)) call abort
- if (ieee_is_finite(2*(-dx1))) call abort
+ if (ieee_is_finite(2*dx1)) STOP 20
+ if (ieee_is_finite(2*(-dx1))) STOP 21
dx1 = ieee_value(dx1, ieee_quiet_nan)
- if (ieee_is_finite(dx1)) call abort
+ if (ieee_is_finite(dx1)) STOP 22
end if
! Test IEEE_IS_NAN
if (ieee_support_datatype(0._s)) then
- if (ieee_is_nan(0.2_s)) call abort
- if (ieee_is_nan(-0.2_s)) call abort
- if (ieee_is_nan(0._s)) call abort
- if (ieee_is_nan(-0._s)) call abort
- if (ieee_is_nan(tiny(0._s))) call abort
- if (ieee_is_nan(tiny(0._s)/100)) call abort
- if (ieee_is_nan(huge(0._s))) call abort
- if (ieee_is_nan(-huge(0._s))) call abort
+ if (ieee_is_nan(0.2_s)) STOP 23
+ if (ieee_is_nan(-0.2_s)) STOP 24
+ if (ieee_is_nan(0._s)) STOP 25
+ if (ieee_is_nan(-0._s)) STOP 26
+ if (ieee_is_nan(tiny(0._s))) STOP 27
+ if (ieee_is_nan(tiny(0._s)/100)) STOP 28
+ if (ieee_is_nan(huge(0._s))) STOP 29
+ if (ieee_is_nan(-huge(0._s))) STOP 30
sx1 = huge(sx1)
- if (ieee_is_nan(2*sx1)) call abort
- if (ieee_is_nan(2*(-sx1))) call abort
+ if (ieee_is_nan(2*sx1)) STOP 31
+ if (ieee_is_nan(2*(-sx1))) STOP 32
sx1 = ieee_value(sx1, ieee_quiet_nan)
- if (.not. ieee_is_nan(sx1)) call abort
+ if (.not. ieee_is_nan(sx1)) STOP 33
sx1 = -1
- if (.not. ieee_is_nan(sqrt(sx1))) call abort
+ if (.not. ieee_is_nan(sqrt(sx1))) STOP 34
end if
if (ieee_support_datatype(0._d)) then
- if (ieee_is_nan(0.2_d)) call abort
- if (ieee_is_nan(-0.2_d)) call abort
- if (ieee_is_nan(0._d)) call abort
- if (ieee_is_nan(-0._d)) call abort
- if (ieee_is_nan(tiny(0._d))) call abort
- if (ieee_is_nan(tiny(0._d)/100)) call abort
- if (ieee_is_nan(huge(0._d))) call abort
- if (ieee_is_nan(-huge(0._d))) call abort
+ if (ieee_is_nan(0.2_d)) STOP 35
+ if (ieee_is_nan(-0.2_d)) STOP 36
+ if (ieee_is_nan(0._d)) STOP 37
+ if (ieee_is_nan(-0._d)) STOP 38
+ if (ieee_is_nan(tiny(0._d))) STOP 39
+ if (ieee_is_nan(tiny(0._d)/100)) STOP 40
+ if (ieee_is_nan(huge(0._d))) STOP 41
+ if (ieee_is_nan(-huge(0._d))) STOP 42
dx1 = huge(dx1)
- if (ieee_is_nan(2*dx1)) call abort
- if (ieee_is_nan(2*(-dx1))) call abort
+ if (ieee_is_nan(2*dx1)) STOP 43
+ if (ieee_is_nan(2*(-dx1))) STOP 44
dx1 = ieee_value(dx1, ieee_quiet_nan)
- if (.not. ieee_is_nan(dx1)) call abort
+ if (.not. ieee_is_nan(dx1)) STOP 45
dx1 = -1
- if (.not. ieee_is_nan(sqrt(dx1))) call abort
+ if (.not. ieee_is_nan(sqrt(dx1))) STOP 46
end if
! IEEE_IS_NEGATIVE
if (ieee_support_datatype(0._s)) then
- if (ieee_is_negative(0.2_s)) call abort
- if (.not. ieee_is_negative(-0.2_s)) call abort
- if (ieee_is_negative(0._s)) call abort
- if (.not. ieee_is_negative(-0._s)) call abort
- if (ieee_is_negative(tiny(0._s))) call abort
- if (ieee_is_negative(tiny(0._s)/100)) call abort
- if (.not. ieee_is_negative(-tiny(0._s))) call abort
- if (.not. ieee_is_negative(-tiny(0._s)/100)) call abort
- if (ieee_is_negative(huge(0._s))) call abort
- if (.not. ieee_is_negative(-huge(0._s))) call abort
+ if (ieee_is_negative(0.2_s)) STOP 47
+ if (.not. ieee_is_negative(-0.2_s)) STOP 48
+ if (ieee_is_negative(0._s)) STOP 49
+ if (.not. ieee_is_negative(-0._s)) STOP 50
+ if (ieee_is_negative(tiny(0._s))) STOP 51
+ if (ieee_is_negative(tiny(0._s)/100)) STOP 52
+ if (.not. ieee_is_negative(-tiny(0._s))) STOP 53
+ if (.not. ieee_is_negative(-tiny(0._s)/100)) STOP 54
+ if (ieee_is_negative(huge(0._s))) STOP 55
+ if (.not. ieee_is_negative(-huge(0._s))) STOP 56
sx1 = huge(sx1)
- if (ieee_is_negative(2*sx1)) call abort
- if (.not. ieee_is_negative(2*(-sx1))) call abort
+ if (ieee_is_negative(2*sx1)) STOP 57
+ if (.not. ieee_is_negative(2*(-sx1))) STOP 58
sx1 = ieee_value(sx1, ieee_quiet_nan)
- if (ieee_is_negative(sx1)) call abort
+ if (ieee_is_negative(sx1)) STOP 59
sx1 = -1
- if (ieee_is_negative(sqrt(sx1))) call abort
+ if (ieee_is_negative(sqrt(sx1))) STOP 60
end if
if (ieee_support_datatype(0._d)) then
- if (ieee_is_negative(0.2_d)) call abort
- if (.not. ieee_is_negative(-0.2_d)) call abort
- if (ieee_is_negative(0._d)) call abort
- if (.not. ieee_is_negative(-0._d)) call abort
- if (ieee_is_negative(tiny(0._d))) call abort
- if (ieee_is_negative(tiny(0._d)/100)) call abort
- if (.not. ieee_is_negative(-tiny(0._d))) call abort
- if (.not. ieee_is_negative(-tiny(0._d)/100)) call abort
- if (ieee_is_negative(huge(0._d))) call abort
- if (.not. ieee_is_negative(-huge(0._d))) call abort
+ if (ieee_is_negative(0.2_d)) STOP 61
+ if (.not. ieee_is_negative(-0.2_d)) STOP 62
+ if (ieee_is_negative(0._d)) STOP 63
+ if (.not. ieee_is_negative(-0._d)) STOP 64
+ if (ieee_is_negative(tiny(0._d))) STOP 65
+ if (ieee_is_negative(tiny(0._d)/100)) STOP 66
+ if (.not. ieee_is_negative(-tiny(0._d))) STOP 67
+ if (.not. ieee_is_negative(-tiny(0._d)/100)) STOP 68
+ if (ieee_is_negative(huge(0._d))) STOP 69
+ if (.not. ieee_is_negative(-huge(0._d))) STOP 70
dx1 = huge(dx1)
- if (ieee_is_negative(2*dx1)) call abort
- if (.not. ieee_is_negative(2*(-dx1))) call abort
+ if (ieee_is_negative(2*dx1)) STOP 71
+ if (.not. ieee_is_negative(2*(-dx1))) STOP 72
dx1 = ieee_value(dx1, ieee_quiet_nan)
- if (ieee_is_negative(dx1)) call abort
+ if (ieee_is_negative(dx1)) STOP 73
dx1 = -1
- if (ieee_is_negative(sqrt(dx1))) call abort
+ if (ieee_is_negative(sqrt(dx1))) STOP 74
end if
! Test IEEE_IS_NORMAL
if (ieee_support_datatype(0._s)) then
- if (.not. ieee_is_normal(0.2_s)) call abort
- if (.not. ieee_is_normal(-0.2_s)) call abort
- if (.not. ieee_is_normal(0._s)) call abort
- if (.not. ieee_is_normal(-0._s)) call abort
- if (.not. ieee_is_normal(tiny(0._s))) call abort
- if (ieee_is_normal(tiny(0._s)/100)) call abort
- if (.not. ieee_is_normal(-tiny(0._s))) call abort
- if (ieee_is_normal(-tiny(0._s)/100)) call abort
- if (.not. ieee_is_normal(huge(0._s))) call abort
- if (.not. ieee_is_normal(-huge(0._s))) call abort
+ if (.not. ieee_is_normal(0.2_s)) STOP 75
+ if (.not. ieee_is_normal(-0.2_s)) STOP 76
+ if (.not. ieee_is_normal(0._s)) STOP 77
+ if (.not. ieee_is_normal(-0._s)) STOP 78
+ if (.not. ieee_is_normal(tiny(0._s))) STOP 79
+ if (ieee_is_normal(tiny(0._s)/100)) STOP 80
+ if (.not. ieee_is_normal(-tiny(0._s))) STOP 81
+ if (ieee_is_normal(-tiny(0._s)/100)) STOP 82
+ if (.not. ieee_is_normal(huge(0._s))) STOP 83
+ if (.not. ieee_is_normal(-huge(0._s))) STOP 84
sx1 = huge(sx1)
- if (ieee_is_normal(2*sx1)) call abort
- if (ieee_is_normal(2*(-sx1))) call abort
+ if (ieee_is_normal(2*sx1)) STOP 85
+ if (ieee_is_normal(2*(-sx1))) STOP 86
sx1 = ieee_value(sx1, ieee_quiet_nan)
- if (ieee_is_normal(sx1)) call abort
+ if (ieee_is_normal(sx1)) STOP 87
sx1 = -1
- if (ieee_is_normal(sqrt(sx1))) call abort
+ if (ieee_is_normal(sqrt(sx1))) STOP 88
end if
if (ieee_support_datatype(0._d)) then
- if (.not. ieee_is_normal(0.2_d)) call abort
- if (.not. ieee_is_normal(-0.2_d)) call abort
- if (.not. ieee_is_normal(0._d)) call abort
- if (.not. ieee_is_normal(-0._d)) call abort
- if (.not. ieee_is_normal(tiny(0._d))) call abort
- if (ieee_is_normal(tiny(0._d)/100)) call abort
- if (.not. ieee_is_normal(-tiny(0._d))) call abort
- if (ieee_is_normal(-tiny(0._d)/100)) call abort
- if (.not. ieee_is_normal(huge(0._d))) call abort
- if (.not. ieee_is_normal(-huge(0._d))) call abort
+ if (.not. ieee_is_normal(0.2_d)) STOP 89
+ if (.not. ieee_is_normal(-0.2_d)) STOP 90
+ if (.not. ieee_is_normal(0._d)) STOP 91
+ if (.not. ieee_is_normal(-0._d)) STOP 92
+ if (.not. ieee_is_normal(tiny(0._d))) STOP 93
+ if (ieee_is_normal(tiny(0._d)/100)) STOP 94
+ if (.not. ieee_is_normal(-tiny(0._d))) STOP 95
+ if (ieee_is_normal(-tiny(0._d)/100)) STOP 96
+ if (.not. ieee_is_normal(huge(0._d))) STOP 97
+ if (.not. ieee_is_normal(-huge(0._d))) STOP 98
dx1 = huge(dx1)
- if (ieee_is_normal(2*dx1)) call abort
- if (ieee_is_normal(2*(-dx1))) call abort
+ if (ieee_is_normal(2*dx1)) STOP 99
+ if (ieee_is_normal(2*(-dx1))) STOP 100
dx1 = ieee_value(dx1, ieee_quiet_nan)
- if (ieee_is_normal(dx1)) call abort
+ if (ieee_is_normal(dx1)) STOP 101
dx1 = -1
- if (ieee_is_normal(sqrt(dx1))) call abort
+ if (ieee_is_normal(sqrt(dx1))) STOP 102
end if
end
if (ieee_support_datatype(0._s)) then
sx1 = 0.1_s
- if (ieee_class(sx1) /= ieee_positive_normal) call abort
- if (ieee_class(-sx1) /= ieee_negative_normal) call abort
+ if (ieee_class(sx1) /= ieee_positive_normal) STOP 1
+ if (ieee_class(-sx1) /= ieee_negative_normal) STOP 2
sx1 = huge(sx1)
- if (ieee_class(sx1) /= ieee_positive_normal) call abort
- if (ieee_class(-sx1) /= ieee_negative_normal) call abort
- if (ieee_class(2*sx1) /= ieee_positive_inf) call abort
- if (ieee_class(2*(-sx1)) /= ieee_negative_inf) call abort
+ if (ieee_class(sx1) /= ieee_positive_normal) STOP 3
+ if (ieee_class(-sx1) /= ieee_negative_normal) STOP 4
+ if (ieee_class(2*sx1) /= ieee_positive_inf) STOP 5
+ if (ieee_class(2*(-sx1)) /= ieee_negative_inf) STOP 6
sx1 = tiny(sx1)
- if (ieee_class(sx1) /= ieee_positive_normal) call abort
- if (ieee_class(-sx1) /= ieee_negative_normal) call abort
- if (ieee_class(sx1 / 2) /= ieee_positive_denormal) call abort
- if (ieee_class((-sx1) / 2) /= ieee_negative_denormal) call abort
+ if (ieee_class(sx1) /= ieee_positive_normal) STOP 7
+ if (ieee_class(-sx1) /= ieee_negative_normal) STOP 8
+ if (ieee_class(sx1 / 2) /= ieee_positive_denormal) STOP 9
+ if (ieee_class((-sx1) / 2) /= ieee_negative_denormal) STOP 10
sx1 = -1
- if (ieee_class(sqrt(sx1)) /= ieee_quiet_nan) call abort
+ if (ieee_class(sqrt(sx1)) /= ieee_quiet_nan) STOP 11
sx1 = 0
- if (ieee_class(sx1) /= ieee_positive_zero) call abort
- if (ieee_class(-sx1) /= ieee_negative_zero) call abort
+ if (ieee_class(sx1) /= ieee_positive_zero) STOP 12
+ if (ieee_class(-sx1) /= ieee_negative_zero) STOP 13
end if
if (ieee_support_datatype(0._d)) then
dx1 = 0.1_d
- if (ieee_class(dx1) /= ieee_positive_normal) call abort
- if (ieee_class(-dx1) /= ieee_negative_normal) call abort
+ if (ieee_class(dx1) /= ieee_positive_normal) STOP 14
+ if (ieee_class(-dx1) /= ieee_negative_normal) STOP 15
dx1 = huge(dx1)
- if (ieee_class(dx1) /= ieee_positive_normal) call abort
- if (ieee_class(-dx1) /= ieee_negative_normal) call abort
- if (ieee_class(2*dx1) /= ieee_positive_inf) call abort
- if (ieee_class(2*(-dx1)) /= ieee_negative_inf) call abort
+ if (ieee_class(dx1) /= ieee_positive_normal) STOP 16
+ if (ieee_class(-dx1) /= ieee_negative_normal) STOP 17
+ if (ieee_class(2*dx1) /= ieee_positive_inf) STOP 18
+ if (ieee_class(2*(-dx1)) /= ieee_negative_inf) STOP 19
dx1 = tiny(dx1)
- if (ieee_class(dx1) /= ieee_positive_normal) call abort
- if (ieee_class(-dx1) /= ieee_negative_normal) call abort
- if (ieee_class(dx1 / 2) /= ieee_positive_denormal) call abort
- if (ieee_class((-dx1) / 2) /= ieee_negative_denormal) call abort
+ if (ieee_class(dx1) /= ieee_positive_normal) STOP 20
+ if (ieee_class(-dx1) /= ieee_negative_normal) STOP 21
+ if (ieee_class(dx1 / 2) /= ieee_positive_denormal) STOP 22
+ if (ieee_class((-dx1) / 2) /= ieee_negative_denormal) STOP 23
dx1 = -1
- if (ieee_class(sqrt(dx1)) /= ieee_quiet_nan) call abort
+ if (ieee_class(sqrt(dx1)) /= ieee_quiet_nan) STOP 24
dx1 = 0
- if (ieee_class(dx1) /= ieee_positive_zero) call abort
- if (ieee_class(-dx1) /= ieee_negative_zero) call abort
+ if (ieee_class(dx1) /= ieee_positive_zero) STOP 25
+ if (ieee_class(-dx1) /= ieee_negative_zero) STOP 26
end if
! Test IEEE_VALUE and IEEE_UNORDERED
if (ieee_support_datatype(0._s)) then
sx1 = ieee_value(sx1, ieee_quiet_nan)
- if (.not. ieee_is_nan(sx1)) call abort
- if (.not. ieee_unordered(sx1, sx1)) call abort
- if (.not. ieee_unordered(sx1, 0._s)) call abort
- if (.not. ieee_unordered(sx1, 0._d)) call abort
- if (.not. ieee_unordered(0._s, sx1)) call abort
- if (.not. ieee_unordered(0._d, sx1)) call abort
- if (ieee_unordered(0._s, 0._s)) call abort
+ if (.not. ieee_is_nan(sx1)) STOP 27
+ if (.not. ieee_unordered(sx1, sx1)) STOP 28
+ if (.not. ieee_unordered(sx1, 0._s)) STOP 29
+ if (.not. ieee_unordered(sx1, 0._d)) STOP 30
+ if (.not. ieee_unordered(0._s, sx1)) STOP 31
+ if (.not. ieee_unordered(0._d, sx1)) STOP 32
+ if (ieee_unordered(0._s, 0._s)) STOP 33
sx1 = ieee_value(sx1, ieee_positive_inf)
- if (ieee_is_finite(sx1)) call abort
- if (ieee_is_nan(sx1)) call abort
- if (ieee_is_negative(sx1)) call abort
- if (ieee_is_normal(sx1)) call abort
+ if (ieee_is_finite(sx1)) STOP 34
+ if (ieee_is_nan(sx1)) STOP 35
+ if (ieee_is_negative(sx1)) STOP 36
+ if (ieee_is_normal(sx1)) STOP 37
sx1 = ieee_value(sx1, ieee_negative_inf)
- if (ieee_is_finite(sx1)) call abort
- if (ieee_is_nan(sx1)) call abort
- if (.not. ieee_is_negative(sx1)) call abort
- if (ieee_is_normal(sx1)) call abort
+ if (ieee_is_finite(sx1)) STOP 38
+ if (ieee_is_nan(sx1)) STOP 39
+ if (.not. ieee_is_negative(sx1)) STOP 40
+ if (ieee_is_normal(sx1)) STOP 41
sx1 = ieee_value(sx1, ieee_positive_normal)
- if (.not. ieee_is_finite(sx1)) call abort
- if (ieee_is_nan(sx1)) call abort
- if (ieee_is_negative(sx1)) call abort
- if (.not. ieee_is_normal(sx1)) call abort
+ if (.not. ieee_is_finite(sx1)) STOP 42
+ if (ieee_is_nan(sx1)) STOP 43
+ if (ieee_is_negative(sx1)) STOP 44
+ if (.not. ieee_is_normal(sx1)) STOP 45
sx1 = ieee_value(sx1, ieee_negative_normal)
- if (.not. ieee_is_finite(sx1)) call abort
- if (ieee_is_nan(sx1)) call abort
- if (.not. ieee_is_negative(sx1)) call abort
- if (.not. ieee_is_normal(sx1)) call abort
+ if (.not. ieee_is_finite(sx1)) STOP 46
+ if (ieee_is_nan(sx1)) STOP 47
+ if (.not. ieee_is_negative(sx1)) STOP 48
+ if (.not. ieee_is_normal(sx1)) STOP 49
sx1 = ieee_value(sx1, ieee_positive_denormal)
- if (.not. ieee_is_finite(sx1)) call abort
- if (ieee_is_nan(sx1)) call abort
- if (ieee_is_negative(sx1)) call abort
- if (ieee_is_normal(sx1)) call abort
- if (sx1 <= 0) call abort
- if (sx1 >= tiny(sx1)) call abort
+ if (.not. ieee_is_finite(sx1)) STOP 50
+ if (ieee_is_nan(sx1)) STOP 51
+ if (ieee_is_negative(sx1)) STOP 52
+ if (ieee_is_normal(sx1)) STOP 53
+ if (sx1 <= 0) STOP 54
+ if (sx1 >= tiny(sx1)) STOP 55
sx1 = ieee_value(sx1, ieee_negative_denormal)
- if (.not. ieee_is_finite(sx1)) call abort
- if (ieee_is_nan(sx1)) call abort
- if (.not. ieee_is_negative(sx1)) call abort
- if (ieee_is_normal(sx1)) call abort
- if (sx1 >= 0) call abort
- if (sx1 <= -tiny(sx1)) call abort
+ if (.not. ieee_is_finite(sx1)) STOP 56
+ if (ieee_is_nan(sx1)) STOP 57
+ if (.not. ieee_is_negative(sx1)) STOP 58
+ if (ieee_is_normal(sx1)) STOP 59
+ if (sx1 >= 0) STOP 60
+ if (sx1 <= -tiny(sx1)) STOP 61
sx1 = ieee_value(sx1, ieee_positive_zero)
- if (.not. ieee_is_finite(sx1)) call abort
- if (ieee_is_nan(sx1)) call abort
- if (ieee_is_negative(sx1)) call abort
- if (.not. ieee_is_normal(sx1)) call abort
- if (sx1 /= 0) call abort
+ if (.not. ieee_is_finite(sx1)) STOP 62
+ if (ieee_is_nan(sx1)) STOP 63
+ if (ieee_is_negative(sx1)) STOP 64
+ if (.not. ieee_is_normal(sx1)) STOP 65
+ if (sx1 /= 0) STOP 66
sx1 = ieee_value(sx1, ieee_negative_zero)
- if (.not. ieee_is_finite(sx1)) call abort
- if (ieee_is_nan(sx1)) call abort
- if (.not. ieee_is_negative(sx1)) call abort
- if (.not. ieee_is_normal(sx1)) call abort
- if (sx1 /= 0) call abort
+ if (.not. ieee_is_finite(sx1)) STOP 67
+ if (ieee_is_nan(sx1)) STOP 68
+ if (.not. ieee_is_negative(sx1)) STOP 69
+ if (.not. ieee_is_normal(sx1)) STOP 70
+ if (sx1 /= 0) STOP 71
end if
if (ieee_support_datatype(0._d)) then
dx1 = ieee_value(dx1, ieee_quiet_nan)
- if (.not. ieee_is_nan(dx1)) call abort
- if (.not. ieee_unordered(dx1, dx1)) call abort
- if (.not. ieee_unordered(dx1, 0._s)) call abort
- if (.not. ieee_unordered(dx1, 0._d)) call abort
- if (.not. ieee_unordered(0._s, dx1)) call abort
- if (.not. ieee_unordered(0._d, dx1)) call abort
- if (ieee_unordered(0._d, 0._d)) call abort
+ if (.not. ieee_is_nan(dx1)) STOP 72
+ if (.not. ieee_unordered(dx1, dx1)) STOP 73
+ if (.not. ieee_unordered(dx1, 0._s)) STOP 74
+ if (.not. ieee_unordered(dx1, 0._d)) STOP 75
+ if (.not. ieee_unordered(0._s, dx1)) STOP 76
+ if (.not. ieee_unordered(0._d, dx1)) STOP 77
+ if (ieee_unordered(0._d, 0._d)) STOP 78
dx1 = ieee_value(dx1, ieee_positive_inf)
- if (ieee_is_finite(dx1)) call abort
- if (ieee_is_nan(dx1)) call abort
- if (ieee_is_negative(dx1)) call abort
- if (ieee_is_normal(dx1)) call abort
+ if (ieee_is_finite(dx1)) STOP 79
+ if (ieee_is_nan(dx1)) STOP 80
+ if (ieee_is_negative(dx1)) STOP 81
+ if (ieee_is_normal(dx1)) STOP 82
dx1 = ieee_value(dx1, ieee_negative_inf)
- if (ieee_is_finite(dx1)) call abort
- if (ieee_is_nan(dx1)) call abort
- if (.not. ieee_is_negative(dx1)) call abort
- if (ieee_is_normal(dx1)) call abort
+ if (ieee_is_finite(dx1)) STOP 83
+ if (ieee_is_nan(dx1)) STOP 84
+ if (.not. ieee_is_negative(dx1)) STOP 85
+ if (ieee_is_normal(dx1)) STOP 86
dx1 = ieee_value(dx1, ieee_positive_normal)
- if (.not. ieee_is_finite(dx1)) call abort
- if (ieee_is_nan(dx1)) call abort
- if (ieee_is_negative(dx1)) call abort
- if (.not. ieee_is_normal(dx1)) call abort
+ if (.not. ieee_is_finite(dx1)) STOP 87
+ if (ieee_is_nan(dx1)) STOP 88
+ if (ieee_is_negative(dx1)) STOP 89
+ if (.not. ieee_is_normal(dx1)) STOP 90
dx1 = ieee_value(dx1, ieee_negative_normal)
- if (.not. ieee_is_finite(dx1)) call abort
- if (ieee_is_nan(dx1)) call abort
- if (.not. ieee_is_negative(dx1)) call abort
- if (.not. ieee_is_normal(dx1)) call abort
+ if (.not. ieee_is_finite(dx1)) STOP 91
+ if (ieee_is_nan(dx1)) STOP 92
+ if (.not. ieee_is_negative(dx1)) STOP 93
+ if (.not. ieee_is_normal(dx1)) STOP 94
dx1 = ieee_value(dx1, ieee_positive_denormal)
- if (.not. ieee_is_finite(dx1)) call abort
- if (ieee_is_nan(dx1)) call abort
- if (ieee_is_negative(dx1)) call abort
- if (ieee_is_normal(dx1)) call abort
- if (dx1 <= 0) call abort
- if (dx1 >= tiny(dx1)) call abort
+ if (.not. ieee_is_finite(dx1)) STOP 95
+ if (ieee_is_nan(dx1)) STOP 96
+ if (ieee_is_negative(dx1)) STOP 97
+ if (ieee_is_normal(dx1)) STOP 98
+ if (dx1 <= 0) STOP 99
+ if (dx1 >= tiny(dx1)) STOP 100
dx1 = ieee_value(dx1, ieee_negative_denormal)
- if (.not. ieee_is_finite(dx1)) call abort
- if (ieee_is_nan(dx1)) call abort
- if (.not. ieee_is_negative(dx1)) call abort
- if (ieee_is_normal(dx1)) call abort
- if (dx1 >= 0) call abort
- if (dx1 <= -tiny(dx1)) call abort
+ if (.not. ieee_is_finite(dx1)) STOP 101
+ if (ieee_is_nan(dx1)) STOP 102
+ if (.not. ieee_is_negative(dx1)) STOP 103
+ if (ieee_is_normal(dx1)) STOP 104
+ if (dx1 >= 0) STOP 105
+ if (dx1 <= -tiny(dx1)) STOP 106
dx1 = ieee_value(dx1, ieee_positive_zero)
- if (.not. ieee_is_finite(dx1)) call abort
- if (ieee_is_nan(dx1)) call abort
- if (ieee_is_negative(dx1)) call abort
- if (.not. ieee_is_normal(dx1)) call abort
- if (dx1 /= 0) call abort
+ if (.not. ieee_is_finite(dx1)) STOP 107
+ if (ieee_is_nan(dx1)) STOP 108
+ if (ieee_is_negative(dx1)) STOP 109
+ if (.not. ieee_is_normal(dx1)) STOP 110
+ if (dx1 /= 0) STOP 111
dx1 = ieee_value(dx1, ieee_negative_zero)
- if (.not. ieee_is_finite(dx1)) call abort
- if (ieee_is_nan(dx1)) call abort
- if (.not. ieee_is_negative(dx1)) call abort
- if (.not. ieee_is_normal(dx1)) call abort
- if (dx1 /= 0) call abort
+ if (.not. ieee_is_finite(dx1)) STOP 112
+ if (ieee_is_nan(dx1)) STOP 113
+ if (.not. ieee_is_negative(dx1)) STOP 114
+ if (.not. ieee_is_normal(dx1)) STOP 115
+ if (dx1 /= 0) STOP 116
end if
call ieee_set_status(s1)
call ieee_get_flag(ieee_all, flags)
- if (any(flags)) call abort
+ if (any(flags)) STOP 1
call ieee_get_rounding_mode(mode)
- if (mode /= ieee_down) call abort
+ if (mode /= ieee_down) STOP 2
call ieee_get_halting_mode(ieee_all, halt)
- if (any(halt)) call abort
+ if (any(halt)) STOP 3
call ieee_set_rounding_mode(ieee_to_zero)
call ieee_set_flag(ieee_underflow, .true.)
call ieee_set_halting_mode(ieee_overflow, .true.)
x = -1
x = sqrt(x)
- if (.not. ieee_is_nan(x)) call abort
+ if (.not. ieee_is_nan(x)) STOP 4
call ieee_get_status(s2)
if (.not. (all(flags .eqv. [.false.,.false.,.true.,.true.,.false.]) &
.or. all(flags .eqv. [.false.,.false.,.true.,.true.,.true.]) &
.or. all(flags .eqv. [.false.,.false.,.true.,.false.,.false.]) &
- .or. all(flags .eqv. [.false.,.false.,.true.,.false.,.true.]))) call abort
+ .or. all(flags .eqv. [.false.,.false.,.true.,.false.,.true.]))) STOP 5
call ieee_get_rounding_mode(mode)
- if (mode /= ieee_to_zero) call abort
+ if (mode /= ieee_to_zero) STOP 6
call ieee_get_halting_mode(ieee_all, halt)
- if ((haltworks .and. .not. halt(1)) .or. any(halt(2:))) call abort
+ if ((haltworks .and. .not. halt(1)) .or. any(halt(2:))) STOP 7
call ieee_set_status(s2)
if (.not. (all(flags .eqv. [.false.,.false.,.true.,.true.,.false.]) &
.or. all(flags .eqv. [.false.,.false.,.true.,.true.,.true.]) &
.or. all(flags .eqv. [.false.,.false.,.true.,.false.,.false.]) &
- .or. all(flags .eqv. [.false.,.false.,.true.,.false.,.true.]))) call abort
+ .or. all(flags .eqv. [.false.,.false.,.true.,.false.,.true.]))) STOP 8
call ieee_get_rounding_mode(mode)
- if (mode /= ieee_to_zero) call abort
+ if (mode /= ieee_to_zero) STOP 9
call ieee_get_halting_mode(ieee_all, halt)
- if ((haltworks .and. .not. halt(1)) .or. any(halt(2:))) call abort
+ if ((haltworks .and. .not. halt(1)) .or. any(halt(2:))) STOP 10
call ieee_set_status(s1)
call ieee_get_flag(ieee_all, flags)
- if (any(flags)) call abort
+ if (any(flags)) STOP 11
call ieee_get_rounding_mode(mode)
- if (mode /= ieee_down) call abort
+ if (mode /= ieee_down) STOP 12
call ieee_get_halting_mode(ieee_all, halt)
- if (any(halt)) call abort
+ if (any(halt)) STOP 13
call ieee_set_status(s2)
if (.not. (all(flags .eqv. [.false.,.false.,.true.,.true.,.false.]) &
.or. all(flags .eqv. [.false.,.false.,.true.,.true.,.true.]) &
.or. all(flags .eqv. [.false.,.false.,.true.,.false.,.false.]) &
- .or. all(flags .eqv. [.false.,.false.,.true.,.false.,.true.]))) call abort
+ .or. all(flags .eqv. [.false.,.false.,.true.,.false.,.true.]))) STOP 14
call ieee_get_rounding_mode(mode)
- if (mode /= ieee_to_zero) call abort
+ if (mode /= ieee_to_zero) STOP 15
call ieee_get_halting_mode(ieee_all, halt)
- if ((haltworks .and. .not. halt(1)) .or. any(halt(2:))) call abort
+ if ((haltworks .and. .not. halt(1)) .or. any(halt(2:))) STOP 16
end
! Test IEEE_SELECTED_REAL_KIND
if (ieee_support_datatype(0.)) then
- if (ieee_selected_real_kind() /= kind(0.)) call abort
- if (ieee_selected_real_kind(0) /= kind(0.)) call abort
- if (ieee_selected_real_kind(0,0) /= kind(0.)) call abort
- if (ieee_selected_real_kind(0,0,2) /= kind(0.)) call abort
+ if (ieee_selected_real_kind() /= kind(0.)) STOP 1
+ if (ieee_selected_real_kind(0) /= kind(0.)) STOP 2
+ if (ieee_selected_real_kind(0,0) /= kind(0.)) STOP 3
+ if (ieee_selected_real_kind(0,0,2) /= kind(0.)) STOP 4
end if
if (ieee_support_datatype(0.d0)) then
- if (ieee_selected_real_kind(precision(0.)+1) /= kind(0.d0)) call abort
- if (ieee_selected_real_kind(precision(0.),range(0.)+1) /= kind(0.d0)) call abort
- if (ieee_selected_real_kind(precision(0.)+1,range(0.)+1) /= kind(0.d0)) call abort
- if (ieee_selected_real_kind(precision(0.)+1,range(0.)+1,2) /= kind(0.d0)) call abort
+ if (ieee_selected_real_kind(precision(0.)+1) /= kind(0.d0)) STOP 5
+ if (ieee_selected_real_kind(precision(0.),range(0.)+1) /= kind(0.d0)) STOP 6
+ if (ieee_selected_real_kind(precision(0.)+1,range(0.)+1) /= kind(0.d0)) STOP 7
+ if (ieee_selected_real_kind(precision(0.)+1,range(0.)+1,2) /= kind(0.d0)) STOP 8
end if
- if (ieee_selected_real_kind(0,0,3) /= -5) call abort
- if (ieee_selected_real_kind(100*precision(0._maxreal)) /= -1) call abort
- if (ieee_selected_real_kind(0,100*range(0._maxreal)) /= -2) call abort
- if (ieee_selected_real_kind(100*precision(0._maxreal),100*range(0._maxreal)) /= -3) call abort
+ if (ieee_selected_real_kind(0,0,3) /= -5) STOP 9
+ if (ieee_selected_real_kind(100*precision(0._maxreal)) /= -1) STOP 10
+ if (ieee_selected_real_kind(0,100*range(0._maxreal)) /= -2) STOP 11
+ if (ieee_selected_real_kind(100*precision(0._maxreal),100*range(0._maxreal)) /= -3) STOP 12
end
integer, parameter :: x8 = merge(4,2,ieee_support_halting(ieee_overflow))
- if (len(s1) /= x1) call abort
- if (len(s2) /= x2) call abort
- if (len(s3) /= x3) call abort
+ if (len(s1) /= x1) STOP 1
+ if (len(s2) /= x2) STOP 2
+ if (len(s3) /= x3) STOP 3
- if (len(s4) /= x4) call abort
- if (len(s5) /= x5) call abort
+ if (len(s4) /= x4) STOP 4
+ if (len(s5) /= x5) STOP 5
- if (len(s6) /= x6) call abort
- if (len(s7) /= x7) call abort
+ if (len(s6) /= x6) STOP 6
+ if (len(s7) /= x7) STOP 7
- if (len(s8) /= x8) call abort
+ if (len(s8) /= x8) STOP 8
end subroutine
call check_positive_zero(fraction(0.))
call check_negative_zero(fraction(-0.))
- if (.not. isnan(fraction(inf))) call abort
- if (.not. isnan(fraction(-inf))) call abort
- if (.not. isnan(fraction(nan))) call abort
-
- if (exponent(0.) /= 0) call abort
- if (exponent(-0.) /= 0) call abort
- if (exponent(inf) /= huge(0)) call abort
- if (exponent(-inf) /= huge(0)) call abort
- if (exponent(nan) /= huge(0)) call abort
-
- if (spacing(0.) /= spacing(tiny(0.))) call abort
- if (spacing(-0.) /= spacing(tiny(0.))) call abort
- if (.not. isnan(spacing(inf))) call abort
- if (.not. isnan(spacing(-inf))) call abort
- if (.not. isnan(spacing(nan))) call abort
+ if (.not. isnan(fraction(inf))) STOP 1
+ if (.not. isnan(fraction(-inf))) STOP 2
+ if (.not. isnan(fraction(nan))) STOP 3
+
+ if (exponent(0.) /= 0) STOP 4
+ if (exponent(-0.) /= 0) STOP 5
+ if (exponent(inf) /= huge(0)) STOP 6
+ if (exponent(-inf) /= huge(0)) STOP 7
+ if (exponent(nan) /= huge(0)) STOP 8
+
+ if (spacing(0.) /= spacing(tiny(0.))) STOP 9
+ if (spacing(-0.) /= spacing(tiny(0.))) STOP 10
+ if (.not. isnan(spacing(inf))) STOP 11
+ if (.not. isnan(spacing(-inf))) STOP 12
+ if (.not. isnan(spacing(nan))) STOP 13
call check_positive_zero(rrspacing(0.))
call check_positive_zero(rrspacing(-0.))
- if (.not. isnan(rrspacing(inf))) call abort
- if (.not. isnan(rrspacing(-inf))) call abort
- if (.not. isnan(rrspacing(nan))) call abort
+ if (.not. isnan(rrspacing(inf))) STOP 14
+ if (.not. isnan(rrspacing(-inf))) STOP 15
+ if (.not. isnan(rrspacing(nan))) STOP 16
call check_positive_zero(set_exponent(0.,42))
call check_negative_zero(set_exponent(-0.,42))
- if (.not. isnan(set_exponent(inf, 42))) call abort
- if (.not. isnan(set_exponent(-inf, 42))) call abort
- if (.not. isnan(set_exponent(nan, 42))) call abort
+ if (.not. isnan(set_exponent(inf, 42))) STOP 17
+ if (.not. isnan(set_exponent(-inf, 42))) STOP 18
+ if (.not. isnan(set_exponent(nan, 42))) STOP 19
contains
implicit none
real, value :: x
- if (ieee_class (x) /= ieee_positive_zero) call abort
+ if (ieee_class (x) /= ieee_positive_zero) STOP 20
end
subroutine check_negative_zero(x)
implicit none
real, value :: x
- if (ieee_class (x) /= ieee_negative_zero) call abort
+ if (ieee_class (x) /= ieee_negative_zero) STOP 21
end
end
x = 0.
call check_positive_zero(fraction(x))
- if (exponent(x) /= 0) call abort
- if (spacing(x) /= spacing(tiny(x))) call abort
+ if (exponent(x) /= 0) STOP 1
+ if (spacing(x) /= spacing(tiny(x))) STOP 2
call check_positive_zero(rrspacing(x))
call check_positive_zero(set_exponent(x,42))
x = -0.
call check_negative_zero(fraction(x))
- if (exponent(x) /= 0) call abort
- if (spacing(x) /= spacing(tiny(x))) call abort
+ if (exponent(x) /= 0) STOP 3
+ if (spacing(x) /= spacing(tiny(x))) STOP 4
call check_positive_zero(rrspacing(x))
call check_negative_zero(set_exponent(x,42))
x = inf
- if (.not. isnan(fraction(x))) call abort
- if (exponent(x) /= huge(0)) call abort
- if (.not. isnan(spacing(x))) call abort
- if (.not. isnan(rrspacing(x))) call abort
- if (.not. isnan(set_exponent(x, 42))) call abort
+ if (.not. isnan(fraction(x))) STOP 5
+ if (exponent(x) /= huge(0)) STOP 6
+ if (.not. isnan(spacing(x))) STOP 7
+ if (.not. isnan(rrspacing(x))) STOP 8
+ if (.not. isnan(set_exponent(x, 42))) STOP 9
x = -inf
- if (.not. isnan(fraction(x))) call abort
- if (exponent(x) /= huge(0)) call abort
- if (.not. isnan(spacing(x))) call abort
- if (.not. isnan(rrspacing(x))) call abort
- if (.not. isnan(set_exponent(x, 42))) call abort
+ if (.not. isnan(fraction(x))) STOP 10
+ if (exponent(x) /= huge(0)) STOP 11
+ if (.not. isnan(spacing(x))) STOP 12
+ if (.not. isnan(rrspacing(x))) STOP 13
+ if (.not. isnan(set_exponent(x, 42))) STOP 14
x = nan
- if (.not. isnan(fraction(x))) call abort
- if (exponent(x) /= huge(0)) call abort
- if (.not. isnan(spacing(x))) call abort
- if (.not. isnan(rrspacing(x))) call abort
- if (.not. isnan(set_exponent(x, 42))) call abort
+ if (.not. isnan(fraction(x))) STOP 15
+ if (exponent(x) /= huge(0)) STOP 16
+ if (.not. isnan(spacing(x))) STOP 17
+ if (.not. isnan(rrspacing(x))) STOP 18
+ if (.not. isnan(set_exponent(x, 42))) STOP 19
contains
implicit none
real, value :: x
- if (ieee_class (x) /= ieee_positive_zero) call abort
+ if (ieee_class (x) /= ieee_positive_zero) STOP 20
end
subroutine check_negative_zero(x)
implicit none
real, value :: x
- if (ieee_class (x) /= ieee_negative_zero) call abort
+ if (ieee_class (x) /= ieee_negative_zero) STOP 21
end
end
! Checking ieee_is_finite
- if (.not. ieee_is_finite(huge(0._k1))) call abort
- if (ieee_is_finite(ieee_value(0._k1, ieee_negative_inf))) call abort
+ if (.not. ieee_is_finite(huge(0._k1))) STOP 1
+ if (ieee_is_finite(ieee_value(0._k1, ieee_negative_inf))) STOP 2
x1 = -42
- if (.not. ieee_is_finite(x1)) call abort
- if (ieee_is_finite(sqrt(x1))) call abort
+ if (.not. ieee_is_finite(x1)) STOP 3
+ if (ieee_is_finite(sqrt(x1))) STOP 4
- if (.not. ieee_is_finite(huge(0._k2))) call abort
- if (ieee_is_finite(ieee_value(0._k2, ieee_negative_inf))) call abort
+ if (.not. ieee_is_finite(huge(0._k2))) STOP 5
+ if (ieee_is_finite(ieee_value(0._k2, ieee_negative_inf))) STOP 6
x2 = -42
- if (.not. ieee_is_finite(x2)) call abort
- if (ieee_is_finite(sqrt(x2))) call abort
+ if (.not. ieee_is_finite(x2)) STOP 7
+ if (ieee_is_finite(sqrt(x2))) STOP 8
! Other ieee_is intrinsics
- if (ieee_is_nan(huge(0._k1))) call abort
- if (.not. ieee_is_negative(-huge(0._k1))) call abort
- if (.not. ieee_is_normal(-huge(0._k1))) call abort
+ if (ieee_is_nan(huge(0._k1))) STOP 9
+ if (.not. ieee_is_negative(-huge(0._k1))) STOP 10
+ if (.not. ieee_is_normal(-huge(0._k1))) STOP 11
- if (ieee_is_nan(huge(0._k2))) call abort
- if (.not. ieee_is_negative(-huge(0._k2))) call abort
- if (.not. ieee_is_normal(-huge(0._k2))) call abort
+ if (ieee_is_nan(huge(0._k2))) STOP 12
+ if (.not. ieee_is_negative(-huge(0._k2))) STOP 13
+ if (.not. ieee_is_normal(-huge(0._k2))) STOP 14
! ieee_support intrinsics
- if (.not. ieee_support_datatype(x1)) call abort
- if (.not. ieee_support_denormal(x1)) call abort
- if (.not. ieee_support_divide(x1)) call abort
- if (.not. ieee_support_inf(x1)) call abort
- if (.not. ieee_support_io(x1)) call abort
- if (.not. ieee_support_nan(x1)) call abort
- if (.not. ieee_support_rounding(ieee_nearest, x1)) call abort
- if (.not. ieee_support_sqrt(x1)) call abort
- if (.not. ieee_support_standard(x1)) call abort
+ if (.not. ieee_support_datatype(x1)) STOP 15
+ if (.not. ieee_support_denormal(x1)) STOP 16
+ if (.not. ieee_support_divide(x1)) STOP 17
+ if (.not. ieee_support_inf(x1)) STOP 18
+ if (.not. ieee_support_io(x1)) STOP 19
+ if (.not. ieee_support_nan(x1)) STOP 20
+ if (.not. ieee_support_rounding(ieee_nearest, x1)) STOP 21
+ if (.not. ieee_support_sqrt(x1)) STOP 22
+ if (.not. ieee_support_standard(x1)) STOP 23
l = ieee_support_underflow_control(x1)
- if (.not. ieee_support_datatype(x2)) call abort
- if (.not. ieee_support_denormal(x2)) call abort
- if (.not. ieee_support_divide(x2)) call abort
- if (.not. ieee_support_inf(x2)) call abort
- if (.not. ieee_support_io(x2)) call abort
- if (.not. ieee_support_nan(x2)) call abort
- if (.not. ieee_support_rounding(ieee_nearest, x2)) call abort
- if (.not. ieee_support_sqrt(x2)) call abort
- if (.not. ieee_support_standard(x2)) call abort
+ if (.not. ieee_support_datatype(x2)) STOP 24
+ if (.not. ieee_support_denormal(x2)) STOP 25
+ if (.not. ieee_support_divide(x2)) STOP 26
+ if (.not. ieee_support_inf(x2)) STOP 27
+ if (.not. ieee_support_io(x2)) STOP 28
+ if (.not. ieee_support_nan(x2)) STOP 29
+ if (.not. ieee_support_rounding(ieee_nearest, x2)) STOP 30
+ if (.not. ieee_support_sqrt(x2)) STOP 31
+ if (.not. ieee_support_standard(x2)) STOP 32
l = ieee_support_underflow_control(x2)
! ieee_value and ieee_class
- if (.not. ieee_is_nan(ieee_value(x1, ieee_quiet_nan))) call abort
+ if (.not. ieee_is_nan(ieee_value(x1, ieee_quiet_nan))) STOP 33
if (ieee_class(ieee_value(x1, ieee_positive_denormal)) &
- /= ieee_positive_denormal) call abort
+ /= ieee_positive_denormal) STOP 34
- if (.not. ieee_is_nan(ieee_value(x2, ieee_quiet_nan))) call abort
+ if (.not. ieee_is_nan(ieee_value(x2, ieee_quiet_nan))) STOP 35
if (ieee_class(ieee_value(x2, ieee_positive_denormal)) &
- /= ieee_positive_denormal) call abort
+ /= ieee_positive_denormal) STOP 36
! ieee_unordered
- if (.not. ieee_unordered(ieee_value(x1, ieee_quiet_nan), 0._k1)) call abort
- if (ieee_unordered(ieee_value(x1, ieee_negative_inf), 0._k1)) call abort
+ if (.not. ieee_unordered(ieee_value(x1, ieee_quiet_nan), 0._k1)) STOP 37
+ if (ieee_unordered(ieee_value(x1, ieee_negative_inf), 0._k1)) STOP 38
- if (.not. ieee_unordered(ieee_value(x2, ieee_quiet_nan), 0._k2)) call abort
- if (ieee_unordered(ieee_value(x2, ieee_negative_inf), 0._k2)) call abort
+ if (.not. ieee_unordered(ieee_value(x2, ieee_quiet_nan), 0._k2)) STOP 39
+ if (ieee_unordered(ieee_value(x2, ieee_negative_inf), 0._k2)) STOP 40
! ieee_copy_sign
if (.not. ieee_class(ieee_copy_sign(ieee_value(x1, ieee_positive_inf), -1.)) &
- == ieee_negative_inf) call abort
+ == ieee_negative_inf) STOP 41
if (.not. ieee_class(ieee_copy_sign(0._k1, -42._k2)) &
- == ieee_negative_zero) call abort
+ == ieee_negative_zero) STOP 42
if (.not. ieee_class(ieee_copy_sign(ieee_value(x2, ieee_positive_inf), -1.)) &
- == ieee_negative_inf) call abort
+ == ieee_negative_inf) STOP 43
if (.not. ieee_class(ieee_copy_sign(0._k2, -42._k1)) &
- == ieee_negative_zero) call abort
+ == ieee_negative_zero) STOP 44
! ieee_logb
- if (ieee_logb (42._k1) /= exponent(42._k1) - 1) call abort
+ if (ieee_logb (42._k1) /= exponent(42._k1) - 1) STOP 45
- if (ieee_logb (42._k2) /= exponent(42._k2) - 1) call abort
+ if (ieee_logb (42._k2) /= exponent(42._k2) - 1) STOP 46
! ieee_next_after
if (ieee_next_after(42._k1, ieee_value(x1, ieee_positive_inf)) &
- /= 42._k1 + spacing(42._k1)) call abort
+ /= 42._k1 + spacing(42._k1)) STOP 47
if (ieee_next_after(42._k2, ieee_value(x2, ieee_positive_inf)) &
- /= 42._k2 + spacing(42._k2)) call abort
+ /= 42._k2 + spacing(42._k2)) STOP 48
! ieee_rem
if (ieee_class(ieee_rem(-42._k1, 2._k1)) /= ieee_negative_zero) &
- call abort
+ STOP 49
if (ieee_class(ieee_rem(-42._k2, 2._k2)) /= ieee_negative_zero) &
- call abort
+ STOP 50
! ieee_rint
- if (ieee_rint(-1.1_k1) /= -1._k1) call abort
- if (ieee_rint(huge(x1)) /= huge(x1)) call abort
+ if (ieee_rint(-1.1_k1) /= -1._k1) STOP 51
+ if (ieee_rint(huge(x1)) /= huge(x1)) STOP 52
- if (ieee_rint(-1.1_k2) /= -1._k2) call abort
- if (ieee_rint(huge(x2)) /= huge(x2)) call abort
+ if (ieee_rint(-1.1_k2) /= -1._k2) STOP 53
+ if (ieee_rint(huge(x2)) /= huge(x2)) STOP 54
! ieee_scalb
x1 = sqrt(42._k1)
- if (ieee_scalb(x1, 2) /= 4._k1 * x1) call abort
- if (ieee_scalb(x1, -2) /= x1 / 4._k1) call abort
+ if (ieee_scalb(x1, 2) /= 4._k1 * x1) STOP 55
+ if (ieee_scalb(x1, -2) /= x1 / 4._k1) STOP 56
x2 = sqrt(42._k2)
- if (ieee_scalb(x2, 2) /= 4._k2 * x2) call abort
- if (ieee_scalb(x2, -2) /= x2 / 4._k2) call abort
+ if (ieee_scalb(x2, 2) /= 4._k2 * x2) STOP 57
+ if (ieee_scalb(x2, -2) /= x2 / 4._k2) STOP 58
end program test
real(kind=k1), intent(in) :: x, y
if (x /= y) then
print *, x, y
- call abort
+ STOP 1
end if
end subroutine
real(kind=k2), intent(in) :: x, y
if (x /= y) then
print *, x, y
- call abort
+ STOP 2
end if
end subroutine
real(kind=k1), intent(in) :: x, y
if (x == y) then
print *, x, y
- call abort
+ STOP 3
end if
end subroutine
real(kind=k2), intent(in) :: x, y
if (x == y) then
print *, x, y
- call abort
+ STOP 4
end if
end subroutine
FLAGS_STRING(s) ; \
if (s /= expected) then ; \
write (*,"(A,I0,A,A)") "Flags at line ", __LINE__, ": ", s ; \
- call abort ; \
+ STOP 1; \
end if ; \
call check_flag_sub
if (any(l)) then
print *, "Flags not cleared in subroutine"
- call abort
+ STOP 2
end if
end subroutine
x = tiny(x)
call ieee_set_underflow_mode(.true.)
x = x / 2000._kx
- if (x == 0) call abort
+ if (x == 0) STOP 1
call ieee_get_underflow_mode(l)
- if (.not. l) call abort
+ if (.not. l) STOP 2
x = tiny(x)
call ieee_set_underflow_mode(.false.)
x = x / 2000._kx
- if (x > 0) call abort
+ if (x > 0) STOP 3
call ieee_get_underflow_mode(l)
- if (l) call abort
+ if (l) STOP 4
end if
y = tiny(y)
call ieee_set_underflow_mode(.true.)
y = y / 2000._ky
- if (y == 0) call abort
+ if (y == 0) STOP 5
call ieee_get_underflow_mode(l)
- if (.not. l) call abort
+ if (.not. l) STOP 6
y = tiny(y)
call ieee_set_underflow_mode(.false.)
y = y / 2000._ky
- if (y > 0) call abort
+ if (y > 0) STOP 7
call ieee_get_underflow_mode(l)
- if (l) call abort
+ if (l) STOP 8
end if
! We should support at least C float and C double types
if (ieee_support_rounding(ieee_nearest)) then
- if (.not. ieee_support_rounding(ieee_nearest, 0.)) call abort
- if (.not. ieee_support_rounding(ieee_nearest, 0.d0)) call abort
+ if (.not. ieee_support_rounding(ieee_nearest, 0.)) STOP 1
+ if (.not. ieee_support_rounding(ieee_nearest, 0.d0)) STOP 2
end if
! The initial rounding mode should probably be NEAREST
! (at least on the platforms we currently support)
if (ieee_support_rounding(ieee_nearest, 0.)) then
call ieee_get_rounding_mode (mode)
- if (mode /= ieee_nearest) call abort
+ if (mode /= ieee_nearest) STOP 3
end if
real, intent(in) :: x, y
if (x /= y) then
print *, x, y
- call abort
+ STOP 4
end if
end subroutine
double precision, intent(in) :: x, y
if (x /= y) then
print *, x, y
- call abort
+ STOP 5
end if
end subroutine
real, intent(in) :: x, y
if (x == y) then
print *, x, y
- call abort
+ STOP 6
end if
end subroutine
double precision, intent(in) :: x, y
if (x == y) then
print *, x, y
- call abort
+ STOP 7
end if
end subroutine
x = tiny(x)
call ieee_set_underflow_mode(.true.)
x = x / 2000._kx
- if (x == 0) call abort
+ if (x == 0) STOP 1
call ieee_get_underflow_mode(l)
- if (.not. l) call abort
+ if (.not. l) STOP 2
x = tiny(x)
call ieee_set_underflow_mode(.false.)
x = x / 2000._kx
- if (x > 0) call abort
+ if (x > 0) STOP 3
call ieee_get_underflow_mode(l)
- if (l) call abort
+ if (l) STOP 4
end if
y = tiny(y)
call ieee_set_underflow_mode(.true.)
y = y / 2000._ky
- if (y == 0) call abort
+ if (y == 0) STOP 5
call ieee_get_underflow_mode(l)
- if (.not. l) call abort
+ if (.not. l) STOP 6
y = tiny(y)
call ieee_set_underflow_mode(.false.)
y = y / 2000._ky
- if (y > 0) call abort
+ if (y > 0) STOP 7
call ieee_get_underflow_mode(l)
- if (l) call abort
+ if (l) STOP 8
end if
integer:: i
integer, dimension(3):: A
data (A(i:i+2:i+1), i=1,2) /1, 2, 3/
- if(any(A .ne. [1,3,2])) call abort()
+ if(any(A .ne. [1,3,2])) STOP 1
end program
INTEGER i
dimension di(5)
i = 1
- if (fun(di(i),1,2).NE.5) call abort()
+ if (fun(di(i),1,2).NE.5) STOP 1
call sub(di(i),i)
- if (i.NE.4) call abort()
+ if (i.NE.4) STOP 2
end
parameter(Q2 = 'abcdefghijkl') ! len=12
contains
subroutine sub(Q3)
- if(len('#'//Q3//'#') /= 15) call abort()
- if('#'//Q3//'#' /= '#ABCDEFGHIJKLM#') call abort()
+ if(len('#'//Q3//'#') /= 15) STOP 1
+ if('#'//Q3//'#' /= '#ABCDEFGHIJKLM#') STOP 2
end subroutine sub
end module mod
program startest
use mod
implicit none
- if(len('#'//Q1//'#') /= 10) call abort()
- if(len('#'//Q2//'#') /= 14) call abort()
- if('#'//Q1//'#' /='#12345678#') call abort()
- if('#'//Q2//'#' /='#abcdefghijkl#') call abort()
+ if(len('#'//Q1//'#') /= 10) STOP 3
+ if(len('#'//Q2//'#') /= 14) STOP 4
+ if('#'//Q1//'#' /='#12345678#') STOP 5
+ if('#'//Q2//'#' /='#abcdefghijkl#') STOP 6
call sub('ABCDEFGHIJKLM') ! len=13
end program startest
allocate(aaf, source=foo(2))
select type (aaf)
type is (foo)
- if (aaf%i /= 2) call abort
+ if (aaf%i /= 2) STOP 1
class default
- call abort
+ STOP 2
end select
allocate(caf, source=foo(3))
select type (caf)
type is (foo)
- if (caf%i /= 3) call abort
+ if (caf%i /= 3) STOP 3
class default
- call abort
+ STOP 4
end select
contains
use b
implicit none
real :: x = 1, y = 1, t, u, v, w
- if (neval /= 0) call abort ()
+ if (neval /= 0) STOP 1
t = f(x)*f(y)
- if (neval /= 0) call abort ()
+ if (neval /= 0) STOP 2
u = f(x)*f(y) + f(x)*f(y)
- if (neval /= 0) call abort ()
+ if (neval /= 0) STOP 3
v = g(x)*g(y)
- if (neval /= 2) call abort ()
+ if (neval /= 2) STOP 4
w = g(x)*g(y) + g(x)*g(y)
- if (neval /= 6) call abort ()
- if (t /= 1.0 .or. u /= 2.0 .or. v /= 1.0 .or. w /= 2) call abort ()
+ if (neval /= 6) STOP 5
+ if (t /= 1.0 .or. u /= 2.0 .or. v /= 1.0 .or. w /= 2) STOP 6
end program gfcbug114a
! { dg-final { scan-module "b" "IMPLICIT_PURE" } }
n = SUM((/(i,i=1,n)/))
! 'i' must not be changed
- IF (i /= 10) CALL abort()
+ IF (i /= 10) STOP 1
END
rewind (10)
do i=1,linenum
read (10,'(A)') line
- if (line .ne. res(i)) call abort
+ if (line .ne. res(i)) STOP 1
end do
close(10,status="delete")
1000 format (A2,100I4)
ca(2) = "bar"
ca(3) = "xyzzy"
write (unit=line, fmt='(3A5)') (ca(i),i=1,3)
- if (line /= buffer) call abort
+ if (line /= buffer) STOP 1
ca(1) = ""
ca(2) = ""
ca(3) = ""
read (unit=line, fmt='(3A5)') (ca(i),i=1,3)
- if (line /= buffer) call abort
+ if (line /= buffer) STOP 2
end program
a = reshape([(((i*10+j),i=1,3),j=1,3)], shape(a))
i = 2147483548
write (unit=line,fmt='(10I3)') (a(i,i),i=1,3)
- if (line /= ' 11 22 33') call abort
+ if (line /= ' 11 22 33') STOP 1
write (unit=line,fmt='(10I3)') (a(i+1,i+1),i=1,2)
- if (line /= ' 22 33') call abort
+ if (line /= ' 22 33') STOP 2
do k=1,3
do j=1,3
do i=1,3
end do
i = -2147483548
write (unit=line,fmt='(10I4)') ((b(i,j,i),i=1,3),j=1,3)
- if (line /= ' 111 212 313 121 222 323 131 232 333') call abort
+ if (line /= ' 111 212 313 121 222 323 131 232 333') STOP 3
end program main
! { dg-do run }
-! { dg-options "-std=f2008 -fall-intrinsics" }
+! { dg-options "-std=f2008 " }
! Test for correct semantics of implied-shape arrays.
! Character array.
CHARACTER(LEN=*), PARAMETER :: arr4(*) = (/ CHARACTER(LEN=3) :: "ab", "cde" /)
- IF (LBOUND (arr1, 1) /= n .OR. UBOUND (arr1, 1) /= n + 2) CALL abort ()
- IF (SIZE (arr1) /= 3) CALL abort ()
+ IF (LBOUND (arr1, 1) /= n .OR. UBOUND (arr1, 1) /= n + 2) STOP 1
+ IF (SIZE (arr1) /= 3) STOP 2
- IF (LBOUND (arr2, 1) /= 1 .OR. UBOUND (arr2, 1) /= 3) CALL abort ()
- IF (SIZE (arr2) /= 3) CALL abort ()
+ IF (LBOUND (arr2, 1) /= 1 .OR. UBOUND (arr2, 1) /= 3) STOP 3
+ IF (SIZE (arr2) /= 3) STOP 4
IF (ANY (LBOUND (arr3) /= (/ n, 1 /) .OR. UBOUND (arr3) /= (/ n + 1, 2 /))) &
- CALL abort ()
- IF (SIZE (arr3) /= 4) CALL abort ()
+ STOP 5
+ IF (SIZE (arr3) /= 4) STOP 6
- IF (LBOUND (arr4, 1) /= 1 .OR. UBOUND (arr4, 1) /= 2) CALL abort ()
- IF (SIZE (arr4) /= 2) CALL abort ()
+ IF (LBOUND (arr4, 1) /= 1 .OR. UBOUND (arr4, 1) /= 2) STOP 7
+ IF (SIZE (arr4) /= 2) STOP 8
END PROGRAM main
integer :: i
end type myType3
type(myType3) :: x
- if(x%i /= 7) call abort()
+ if(x%i /= 7) STOP 1
x%i = 1
end subroutine test
end type myType
type(myType) :: x
integer(8) :: y
- if(y /= 8) call abort()
- if(x%i /= 2) call abort()
+ if(y /= 8) STOP 2
+ if(x%i /= 2) STOP 3
x%i = 5
y = 42
end subroutine bar
y%i = 2
i8 = 8
call bar(y,i8)
- if(y%i /= 5 .or. i8/= 42) call abort()
+ if(y%i /= 5 .or. i8/= 42) STOP 4
z%i = 7
call test(z)
- if(z%i /= 1) call abort()
+ if(z%i /= 1) STOP 5
end program foo
subroutine bar(r)
implicit none
integer(8) :: r
- if(r /= 42) call abort()
+ if(r /= 42) STOP 1
r = 13
end subroutine bar
character(len=3) :: c
end type myT
type(myT) :: a
- if(a%c /= "xyz") call abort()
+ if(a%c /= "xyz") STOP 2
a%c = "abc"
end subroutine
end type gType
real(8) :: a
type(gType) :: b
- if(a /= 99.0 .or. b%c /= 11) call abort()
+ if(a /= 99.0 .or. b%c /= 11) STOP 3
a = -123.0
b%c = -44
end subroutine new
integer(dp) :: y
y = 42
call bar(y)
- if(y /= 13) call abort()
+ if(y /= 13) STOP 4
end subroutine test
subroutine test2()
type(myT) :: z
z%c = "xyz"
call foo(z)
- if(z%c /= "abc") call abort()
+ if(z%c /= "abc") STOP 5
end subroutine test2
end module modtest
r = 99.0
t%c = 11
call new(r,t)
- if(r /= -123.0 .or. t%c /= -44) call abort()
+ if(r /= -123.0 .or. t%c /= -44) STOP 6
end subroutine test3
end program all
! { dg-do run }
-! { dg-options "-std=f2008 -fall-intrinsics" }
+! { dg-options "-std=f2008 " }
! PR fortran/45197
! Check that IMPURE and IMPURE ELEMENTAL in particular works.
! Traverse in forward order.
s = 0
b = accumulate (a, s)
- IF (ANY (b /= (/ 1, 3, 6, 10, 15 /))) CALL abort ()
+ IF (ANY (b /= (/ 1, 3, 6, 10, 15 /))) STOP 1
! And now backward.
s = 0
b = accumulate (a(n:1:-1), s)
- IF (ANY (b /= (/ 5, 9, 12, 14, 15 /))) CALL abort ()
+ IF (ANY (b /= (/ 5, 9, 12, 14, 15 /))) STOP 2
! Use subroutine.
i = 1
arr = 0
CALL impureSub (a)
- IF (ANY (arr /= a)) CALL abort ()
+ IF (ANY (arr /= a)) STOP 3
CONTAINS
IDA1 = INDEX ( 'DEFDEF' , 'DEF', GDA1 ) !fails
do I = 1, 10
- if (IDA1(i).NE.RSLT(i)) call abort
+ if (IDA1(i).NE.RSLT(i)) STOP 1
end do
IDA1 = INDEX ( (/ ('DEFDEF',i=1,10) /) , 'DEF', GDA1 ) !works
do I = 1, 10
- if (IDA1(i).NE.RSLT(i)) call abort
+ if (IDA1(i).NE.RSLT(i)) STOP 2
end do
END
string1 = 'ABCDEEDCBA'
string4 = 'ABCDEEDCBA'
- if(index(string1,1_'A') /= 1) call abort()
- if(index(string4,4_'A') /= 1) call abort()
- if(index(string1,1_'A',kind=4) /= 1_4) call abort()
- if(index(string4,4_'A',kind=4) /= 1_4) call abort()
- if(index(string1,1_'A',kind=1) /= 1_1) call abort()
- if(index(string4,4_'A',kind=1) /= 1_1) call abort()
+ if(index(string1,1_'A') /= 1) STOP 1
+ if(index(string4,4_'A') /= 1) STOP 2
+ if(index(string1,1_'A',kind=4) /= 1_4) STOP 3
+ if(index(string4,4_'A',kind=4) /= 1_4) STOP 4
+ if(index(string1,1_'A',kind=1) /= 1_1) STOP 5
+ if(index(string4,4_'A',kind=1) /= 1_1) STOP 6
- if(index(string1,1_'A',back=.true.) /= 10) call abort()
- if(index(string4,4_'A',back=.true.) /= 10) call abort()
- if(index(string1,1_'A',kind=4,back=.true.) /= 10_4) call abort()
- if(index(string4,4_'A',kind=4,back=.true.) /= 10_4) call abort()
- if(index(string1,1_'A',kind=1,back=.true.) /= 10_1) call abort()
- if(index(string4,4_'A',kind=1,back=.true.) /= 10_1) call abort()
+ if(index(string1,1_'A',back=.true.) /= 10) STOP 7
+ if(index(string4,4_'A',back=.true.) /= 10) STOP 8
+ if(index(string1,1_'A',kind=4,back=.true.) /= 10_4) STOP 9
+ if(index(string4,4_'A',kind=4,back=.true.) /= 10_4) STOP 10
+ if(index(string1,1_'A',kind=1,back=.true.) /= 10_1) STOP 11
+ if(index(string4,4_'A',kind=1,back=.true.) /= 10_1) STOP 12
- if(index(string1,1_'A',back=.false.) /= 1) call abort()
- if(index(string4,4_'A',back=.false.) /= 1) call abort()
- if(index(string1,1_'A',kind=4,back=.false.) /= 1_4) call abort()
- if(index(string4,4_'A',kind=4,back=.false.) /= 1_4) call abort()
- if(index(string1,1_'A',kind=1,back=.false.) /= 1_1) call abort()
- if(index(string4,4_'A',kind=1,back=.false.) /= 1_1) call abort()
+ if(index(string1,1_'A',back=.false.) /= 1) STOP 13
+ if(index(string4,4_'A',back=.false.) /= 1) STOP 14
+ if(index(string1,1_'A',kind=4,back=.false.) /= 1_4) STOP 15
+ if(index(string4,4_'A',kind=4,back=.false.) /= 1_4) STOP 16
+ if(index(string1,1_'A',kind=1,back=.false.) /= 1_1) STOP 17
+ if(index(string4,4_'A',kind=1,back=.false.) /= 1_1) STOP 18
- if(scan(string1,1_'A') /= 1) call abort()
- if(scan(string4,4_'A') /= 1) call abort()
- if(scan(string1,1_'A',kind=4) /= 1_4) call abort()
- if(scan(string4,4_'A',kind=4) /= 1_4) call abort()
- if(scan(string1,1_'A',kind=1) /= 1_1) call abort()
- if(scan(string4,4_'A',kind=1) /= 1_1) call abort()
+ if(scan(string1,1_'A') /= 1) STOP 19
+ if(scan(string4,4_'A') /= 1) STOP 20
+ if(scan(string1,1_'A',kind=4) /= 1_4) STOP 21
+ if(scan(string4,4_'A',kind=4) /= 1_4) STOP 22
+ if(scan(string1,1_'A',kind=1) /= 1_1) STOP 23
+ if(scan(string4,4_'A',kind=1) /= 1_1) STOP 24
- if(scan(string1,1_'A',back=.true.) /= 10) call abort()
- if(scan(string4,4_'A',back=.true.) /= 10) call abort()
- if(scan(string1,1_'A',kind=4,back=.true.) /= 10_4) call abort()
- if(scan(string4,4_'A',kind=4,back=.true.) /= 10_4) call abort()
- if(scan(string1,1_'A',kind=1,back=.true.) /= 10_1) call abort()
- if(scan(string4,4_'A',kind=1,back=.true.) /= 10_1) call abort()
+ if(scan(string1,1_'A',back=.true.) /= 10) STOP 25
+ if(scan(string4,4_'A',back=.true.) /= 10) STOP 26
+ if(scan(string1,1_'A',kind=4,back=.true.) /= 10_4) STOP 27
+ if(scan(string4,4_'A',kind=4,back=.true.) /= 10_4) STOP 28
+ if(scan(string1,1_'A',kind=1,back=.true.) /= 10_1) STOP 29
+ if(scan(string4,4_'A',kind=1,back=.true.) /= 10_1) STOP 30
- if(scan(string1,1_'A',back=.false.) /= 1) call abort()
- if(scan(string4,4_'A',back=.false.) /= 1) call abort()
- if(scan(string1,1_'A',kind=4,back=.false.) /= 1_4) call abort()
- if(scan(string4,4_'A',kind=4,back=.false.) /= 1_4) call abort()
- if(scan(string1,1_'A',kind=1,back=.false.) /= 1_1) call abort()
- if(scan(string4,4_'A',kind=1,back=.false.) /= 1_1) call abort()
+ if(scan(string1,1_'A',back=.false.) /= 1) STOP 31
+ if(scan(string4,4_'A',back=.false.) /= 1) STOP 32
+ if(scan(string1,1_'A',kind=4,back=.false.) /= 1_4) STOP 33
+ if(scan(string4,4_'A',kind=4,back=.false.) /= 1_4) STOP 34
+ if(scan(string1,1_'A',kind=1,back=.false.) /= 1_1) STOP 35
+ if(scan(string4,4_'A',kind=1,back=.false.) /= 1_1) STOP 36
end
! { dg-final { scan-tree-dump-times "if ..integer.kind=1.. _gfortran_string_index" 6 "original" } }
real r1
real r2(10)
dimension r3(10,10)
- if (r1 /= 0.0) call abort
- if (r2(2) /= 0.0) call abort
- if (r3(5,5) /= 0.0) call abort
- if (r4 /= 0.0) call abort
+ if (r1 /= 0.0) STOP 1
+ if (r2(2) /= 0.0) STOP 2
+ if (r3(5,5) /= 0.0) STOP 3
+ if (r4 /= 0.0) STOP 4
end subroutine real_test
subroutine logical_test
logical l1
logical l2(2)
- if (l1 .neqv. .false.) call abort
- if (l2(2) .neqv. .false.) call abort
+ if (l1 .neqv. .false.) STOP 5
+ if (l2(2) .neqv. .false.) STOP 6
end subroutine logical_test
subroutine int_test
integer i1
integer i2(10)
dimension i3(10,10)
- if (i1 /= 0) call abort
- if (i2(2) /= 0) call abort
- if (i3(5,5) /= 0) call abort
- if (i4 /= 0) call abort
+ if (i1 /= 0) STOP 7
+ if (i2(2) /= 0) STOP 8
+ if (i3(5,5) /= 0) STOP 9
+ if (i4 /= 0) STOP 10
end subroutine int_test
subroutine complex_test
complex c1
complex c2(20,20)
- if (c1 /= (0.0,0.0)) call abort
- if (c2(1,1) /= (0.0,0.0)) call abort
+ if (c1 /= (0.0,0.0)) STOP 11
+ if (c2(1,1) /= (0.0,0.0)) STOP 12
end subroutine complex_test
subroutine char_test
character*1 c1
character*8 c2, c3(5)
character c4(10)
- if (c1 /= '\0') call abort
- if (c2 /= '\0\0\0\0\0\0\0\0') call abort
- if (c3(1) /= '\0\0\0\0\0\0\0\0') call abort
- if (c3(5) /= '\0\0\0\0\0\0\0\0') call abort
- if (c4(5) /= '\0') call abort
+ if (c1 /= '\0') STOP 13
+ if (c2 /= '\0\0\0\0\0\0\0\0') STOP 14
+ if (c3(1) /= '\0\0\0\0\0\0\0\0') STOP 15
+ if (c3(5) /= '\0\0\0\0\0\0\0\0') STOP 16
+ if (c4(5) /= '\0') STOP 17
end subroutine char_test
real :: var1, var2 ! Should get NaN initialized
! Should be the default value
- if (e%rmult /= 1.0) call abort ()
+ if (e%rmult /= 1.0) STOP 1
! Check that NaN initialization is really turned on
- if (var1 == var1) call abort ()
- if (var2 == var2) call abort ()
+ if (var1 == var1) STOP 2
+ if (var2 == var2) STOP 3
! The following was failing:
associate (rmult=>e%rmult)
- if (e%rmult /= 1.0) call abort ()
+ if (e%rmult /= 1.0) STOP 4
end associate
end subroutine test
end module testa2
call print(vsum)
if (vsum%x .ne. 3 .or. vsum%y .ne. 3) then
- call abort()
+ STOP 1
endif
end program
real r1
real r2(10)
dimension r3(10,10)
- if (r1 /= 0.0) call abort
- if (r2(2) /= 0.0) call abort
- if (r3(5,5) /= 0.0) call abort
- if (r4 /= 0.0) call abort
+ if (r1 /= 0.0) STOP 1
+ if (r2(2) /= 0.0) STOP 2
+ if (r3(5,5) /= 0.0) STOP 3
+ if (r4 /= 0.0) STOP 4
end subroutine real_test
subroutine logical_test
logical l1
logical l2(2)
- if (l1 .neqv. .true.) call abort
- if (l2(2) .neqv. .true.) call abort
+ if (l1 .neqv. .true.) STOP 5
+ if (l2(2) .neqv. .true.) STOP 6
end subroutine logical_test
subroutine int_test
integer i1
integer i2(10)
dimension i3(10,10)
- if (i1 /= 1) call abort
- if (i2(2) /= 1) call abort
- if (i3(5,5) /= 1) call abort
- if (i4 /= 1) call abort
+ if (i1 /= 1) STOP 7
+ if (i2(2) /= 1) STOP 8
+ if (i3(5,5) /= 1) STOP 9
+ if (i4 /= 1) STOP 10
end subroutine int_test
subroutine complex_test
complex c1
complex c2(20,20)
- if (c1 /= (0.0,0.0)) call abort
- if (c2(1,1) /= (0.0,0.0)) call abort
+ if (c1 /= (0.0,0.0)) STOP 11
+ if (c2(1,1) /= (0.0,0.0)) STOP 12
end subroutine complex_test
real r1
real r2(10)
dimension r3(10,10)
- if (r1 .eq. r1) call abort
- if (r2(2) .eq. r2(2)) call abort
- if (r3(5,5) .eq. r3(5,5)) call abort
- if (r4 .eq. r4) call abort
+ if (r1 .eq. r1) STOP 1
+ if (r2(2) .eq. r2(2)) STOP 2
+ if (r3(5,5) .eq. r3(5,5)) STOP 3
+ if (r4 .eq. r4) STOP 4
end subroutine real_test
subroutine logical_test
logical l1
logical l2(2)
- if (l1 .neqv. .false.) call abort
- if (l2(2) .neqv. .false.) call abort
+ if (l1 .neqv. .false.) STOP 5
+ if (l2(2) .neqv. .false.) STOP 6
end subroutine logical_test
subroutine int_test
integer i1
integer i2(10)
dimension i3(10,10)
- if (i1 /= -1) call abort
- if (i2(2) /= -1) call abort
- if (i3(5,5) /= -1) call abort
- if (i4 /= -1) call abort
+ if (i1 /= -1) STOP 7
+ if (i2(2) /= -1) STOP 8
+ if (i3(5,5) /= -1) STOP 9
+ if (i4 /= -1) STOP 10
end subroutine int_test
subroutine complex_test
complex c1
complex c2(20,20)
- if (c1 .eq. c1) call abort
- if (c2(1,1) .eq. c2(1,1)) call abort
+ if (c1 .eq. c1) STOP 11
+ if (c2(1,1) .eq. c2(1,1)) STOP 12
end subroutine complex_test
real r1
real r2(10)
dimension r3(10,10)
- if (r1 .le. 0 .or. r1 .ne. 2*r1) call abort
- if (r2(2) .le. 0 .or. r2(2) .ne. 2*r2(2)) call abort
- if (r3(5,5) .le. 0 .or. r3(5,5) .ne. 2*r3(5,5)) call abort
- if (r4 .le. 0 .or. r4 .ne. 2*r4) call abort
+ if (r1 .le. 0 .or. r1 .ne. 2*r1) STOP 1
+ if (r2(2) .le. 0 .or. r2(2) .ne. 2*r2(2)) STOP 2
+ if (r3(5,5) .le. 0 .or. r3(5,5) .ne. 2*r3(5,5)) STOP 3
+ if (r4 .le. 0 .or. r4 .ne. 2*r4) STOP 4
end subroutine real_test
real r1
real r2(10)
dimension r3(10,10)
- if (r1 .ge. 0 .or. r1 .ne. 2*r1) call abort
- if (r2(2) .ge. 0 .or. r2(2) .ne. 2*r2(2)) call abort
- if (r3(5,5) .ge. 0 .or. r3(5,5) .ne. 2*r3(5,5)) call abort
- if (r4 .ge. 0 .or. r4 .ne. 2*r4) call abort
+ if (r1 .ge. 0 .or. r1 .ne. 2*r1) STOP 1
+ if (r2(2) .ge. 0 .or. r2(2) .ne. 2*r2(2)) STOP 2
+ if (r3(5,5) .ge. 0 .or. r3(5,5) .ne. 2*r3(5,5)) STOP 3
+ if (r4 .ge. 0 .or. r4 .ne. 2*r4) STOP 4
end subroutine real_test
character*1 c1
character*8 c2, c3(5)
character c4(10)
- if (c1 /= ' ') call abort
- if (c2 /= ' ') call abort
- if (c3(1) /= ' ') call abort
- if (c3(5) /= ' ') call abort
- if (c4(5) /= ' ') call abort
+ if (c1 /= ' ') STOP 1
+ if (c2 /= ' ') STOP 2
+ if (c3(1) /= ' ') STOP 3
+ if (c3(5) /= ' ') STOP 4
+ if (c4(5) /= ' ') STOP 5
end subroutine char_test
integer i3
save i2
if (first) then
- if (i1 .ne. -100) call abort
- if (i2 .ne. 101) call abort
- if (i3 .ne. 101) call abort
+ if (i1 .ne. -100) STOP 1
+ if (i2 .ne. 101) STOP 2
+ if (i3 .ne. 101) STOP 3
else
- if (i1 .ne. 1001) call abort
- if (i2 .ne. 1002) call abort
- if (i3 .ne. 101) call abort
+ if (i1 .ne. 1001) STOP 4
+ if (i2 .ne. 1002) STOP 5
+ if (i3 .ne. 101) STOP 6
end if
i1 = 1001
i2 = 1002
integer i2
save
if (first) then
- if (i1 .ne. -100) call abort
- if (i2 .ne. 101) call abort
+ if (i1 .ne. -100) STOP 7
+ if (i2 .ne. 101) STOP 8
else
- if (i1 .ne. 1001) call abort
- if (i2 .ne. 1002) call abort
+ if (i1 .ne. 1001) STOP 9
+ if (i2 .ne. 1002) STOP 10
end if
i1 = 1001
i2 = 1002
subroutine foo(n)
character(len=n) :: str
! print *, str
- if (str /= repeat ('Y', n)) call abort()
+ if (str /= repeat ('Y', n)) STOP 1
end subroutine foo
call foo(3)
call set(d)
if(d%i /= 2) then
print *, 'Expect: 2, got: ', d%i
- call abort()
+ STOP 1
end if
contains
subroutine set(x1)
type(d) :: a
! Without the following line it passes with 4.3.0:
print *, a%i
- if(a%i /= -1) call abort()
+ if(a%i /= -1) STOP 1
a%i=0
end subroutine g
end module s
integer :: b3(4) = a(1, v, 3)
integer :: b4(3,3) = a(v([2,4,3]), 2, [2,3,4])
- if (any(b1 /= reshape([21,22,23, 37,38,39, 53,54,55], [3,3]))) call abort()
- if (any(b2 /= reshape([14, 62, 46], [1,3]))) call abort()
- if (any(b2b /= [53, 56, 55])) call abort()
- if (any(b3 /= [45, 33, 41, 37])) call abort()
- if (any(b4 /= reshape([21,22,23, 37,38,39, 53,54,55], [3,3]))) call abort()
+ if (any(b1 /= reshape([21,22,23, 37,38,39, 53,54,55], [3,3]))) STOP 1
+ if (any(b2 /= reshape([14, 62, 46], [1,3]))) STOP 2
+ if (any(b2b /= [53, 56, 55])) STOP 3
+ if (any(b3 /= [45, 33, 41, 37])) STOP 4
+ if (any(b4 /= reshape([21,22,23, 37,38,39, 53,54,55], [3,3]))) STOP 5
end program test
!
integer :: n
real, dimension(2) :: a = (/ ( (float(n))**(1.0), n=1,2) /)
- if (any (a .ne. (/ ( (float(n))**(1.0), n=1,2) /))) call abort
+ if (any (a .ne. (/ ( (float(n))**(1.0), n=1,2) /))) STOP 1
end
end type A
type(A):: x, y(3)
x=f()
- if (associated(x%p) .or. x%i /= 3) call abort ()
+ if (associated(x%p) .or. x%i /= 3) STOP 1
y(1)%p => tgt
y%i = 99
call sub1(3,y)
- if (associated(y(1)%p) .or. any(y(:)%i /= 3)) call abort ()
+ if (associated(y(1)%p) .or. any(y(:)%i /= 3)) STOP 2
y(1)%p => tgt
y%i = 99
call sub2(y)
- if (associated(y(1)%p) .or. any(y(:)%i /= 3)) call abort ()
+ if (associated(y(1)%p) .or. any(y(:)%i /= 3)) STOP 3
contains
function f() result (fr)
type(A):: fr
! initialization expression, now allowed in Fortran 2003
! PR fortran/29962
! { dg-do run }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003 " }
real, parameter :: three = 27.0**(1.0/3.0)
- if(abs(three-3.0)>epsilon(three)) call abort()
+ if(abs(three-3.0)>epsilon(three)) STOP 1
end
integer, parameter :: i(3) = index (ch, ch2)
integer :: ic(1) = len_trim((/"a"/))
- if (any (reshape (b, (/4/)) .ne. (/(sin(real(k)), k = 1,4)/))) call abort ()
- if (any (ob .ne. (/5,6,5/))) call abort () ! Original PR29507
- if (any (i .ne. (/2,3,4/))) call abort ()
- if (ic(1) .ne. 1) call abort () ! Original PR31404
+ if (any (reshape (b, (/4/)) .ne. (/(sin(real(k)), k = 1,4)/))) STOP 1
+ if (any (ob .ne. (/5,6,5/))) STOP 2 ! Original PR29507
+ if (any (i .ne. (/2,3,4/))) STOP 3
+ if (ic(1) .ne. 1) STOP 4 ! Original PR31404
end
c2_lower = 1 + offset ; c2_upper = c2 + offset
c = matmul(a,b)
- if (sum(abs(c-cres))>1e-4) call abort
+ if (sum(abs(c-cres))>1e-4) STOP 1
c_alloc = matmul(a,b) ! { dg-warning "Code for reallocating the allocatable array" }
- if (sum(abs(c_alloc-cres))>1e-4) call abort
- if (any([size(c_alloc,1), size(c_alloc,2)] /= [3,4])) call abort
+ if (sum(abs(c_alloc-cres))>1e-4) STOP 2
+ if (any([size(c_alloc,1), size(c_alloc,2)] /= [3,4])) STOP 3
deallocate(c_alloc)
allocate(c_alloc(4,4))
c_alloc = matmul(a,b) ! { dg-warning "Code for reallocating the allocatable array" }
- if (sum(abs(c_alloc-cres))>1e-4) call abort
- if (any([size(c_alloc,1), size(c_alloc,2)] /= [3,4])) call abort
+ if (sum(abs(c_alloc-cres))>1e-4) STOP 4
+ if (any([size(c_alloc,1), size(c_alloc,2)] /= [3,4])) STOP 5
deallocate(c_alloc)
allocate(c_alloc(3,3))
c_alloc = matmul(a,b) ! { dg-warning "Code for reallocating the allocatable array" }
- if (sum(abs(c_alloc-cres))>1e-4) call abort
- if (any([size(c_alloc,1), size(c_alloc,2)] /= [3,4])) call abort
+ if (sum(abs(c_alloc-cres))>1e-4) STOP 6
+ if (any([size(c_alloc,1), size(c_alloc,2)] /= [3,4])) STOP 7
c_alloc = 42.
c_alloc(:,:) = matmul(a,b)
- if (sum(abs(c_alloc-cres))>1e-4) call abort
- if (any([size(c_alloc,1), size(c_alloc,2)] /= [3,4])) call abort
+ if (sum(abs(c_alloc-cres))>1e-4) STOP 8
+ if (any([size(c_alloc,1), size(c_alloc,2)] /= [3,4])) STOP 9
deallocate(c_alloc)
ap = a
bp = b
cp = matmul(ap, bp)
- if (sum(abs(cp-cres)) > 1e-4) call abort
+ if (sum(abs(cp-cres)) > 1e-4) STOP 10
f = 0
f(1,1:3,2:3) = a
f(2,2:3,:) = b
c = matmul(f(1,1:3,2:3), f(2,2:3,:))
- if (sum(abs(c-cres))>1e-4) call abort
+ if (sum(abs(c-cres))>1e-4) STOP 11
f(3,1:eight:2,:) = matmul(a, b)
- if (sum(abs(f(3,1:eight:2,:)-cres))>1e-4) call abort
+ if (sum(abs(f(3,1:eight:2,:)-cres))>1e-4) STOP 12
afoo%a = a
bfoo%a = b
cfoo%a = matmul(afoo%a, bfoo%a)
- if (sum(abs(cfoo%a-cres)) > 1e-4) call abort
+ if (sum(abs(cfoo%a-cres)) > 1e-4) STOP 13
block
real :: aa(a1, a2), bb(b1, b2), cc(c1, c2)
bm = b
cc = matmul(aa,bb)
- if (sum(cc-cres)>1e-4) call abort
+ if (sum(cc-cres)>1e-4) STOP 14
c_alloc = matmul(aa,bb) ! { dg-warning "Code for reallocating the allocatable array" }
- if (sum(abs(c_alloc-cres))>1e-4) call abort
- if (any([size(c_alloc,1), size(c_alloc,2)] /= [3,4])) call abort
+ if (sum(abs(c_alloc-cres))>1e-4) STOP 15
+ if (any([size(c_alloc,1), size(c_alloc,2)] /= [3,4])) STOP 16
c_alloc = 42.
deallocate(c_alloc)
allocate(c_alloc(4,4))
c_alloc = matmul(aa,bb) ! { dg-warning "Code for reallocating the allocatable array" }
- if (sum(abs(c_alloc-cres))>1e-4) call abort
- if (any([size(c_alloc,1), size(c_alloc,2)] /= [3,4])) call abort
+ if (sum(abs(c_alloc-cres))>1e-4) STOP 17
+ if (any([size(c_alloc,1), size(c_alloc,2)] /= [3,4])) STOP 18
deallocate(c_alloc)
allocate(c_alloc(3,3))
c_alloc = matmul(aa,bb) ! { dg-warning "Code for reallocating the allocatable array" }
- if (sum(abs(c_alloc-cres))>1e-4) call abort
- if (any([size(c_alloc,1), size(c_alloc,2)] /= [3,4])) call abort
+ if (sum(abs(c_alloc-cres))>1e-4) STOP 19
+ if (any([size(c_alloc,1), size(c_alloc,2)] /= [3,4])) STOP 20
deallocate(c_alloc)
cm = matmul(am, bm)
- if (sum(abs(cm-cres)) > 1e-4) call abort
+ if (sum(abs(cm-cres)) > 1e-4) STOP 21
cm = 42.
cm(:,:) = matmul(a,bm)
- if (sum(abs(cm-cres)) > 1e-4) call abort
+ if (sum(abs(cm-cres)) > 1e-4) STOP 22
end block
+286, -294, +240, -254, &
+422, -430, +352, -370 ]
!print *,c
- if (any(c /= reshape(res, shape(c)))) call abort
+ if (any(c /= reshape(res, shape(c)))) STOP 1
c(:,v) = matmul(a, b)
- if (any(c(:,v) /= reshape(res, shape(c)))) call abort
+ if (any(c(:,v) /= reshape(res, shape(c)))) STOP 2
c(v,:) = matmul(a, b)
- if (any(c(v,:) /= reshape(res, shape(c)))) call abort
+ if (any(c(v,:) /= reshape(res, shape(c)))) STOP 3
c = matmul(a(:,v),b(v,:))
- if (any(c /= reshape(res, shape(c)))) call abort
+ if (any(c /= reshape(res, shape(c)))) STOP 4
end
& (956.,4264.),(9532.,344.)/
c = matmul(a,b)
- if (any(res1 /= c)) call abort
+ if (any(res1 /= c)) STOP 1
b2 = conjg(b)
c = matmul(a,conjg(b2))
- if (any(res1 /= c)) call abort
+ if (any(res1 /= c)) STOP 2
c = matmul(a,conjg(b))
- if (any(res2 /= c)) call abort
+ if (any(res2 /= c)) STOP 3
c = matmul(conjg(a), b)
- if (any(conjg(c) /= res2)) call abort
+ if (any(conjg(c) /= res2)) STOP 4
end program main
! { dg-final { scan-tree-dump-times "_gfortran_matmul" 0 "optimized" } }
-229., 364., -388., 267., -424., 456./
c = matmul(a,transpose(b))
- if (sum(c-cres)>1e-4) call abort
+ if (sum(c-cres)>1e-4) STOP 1
call mm1 (a, b, c)
- if (sum(c-cres)>1e-4) call abort
+ if (sum(c-cres)>1e-4) STOP 2
! Unallocated
calloc = matmul(a,transpose(b)) ! { dg-warning "Code for reallocating the allocatable array" }
- if (any(shape(c) /= shape(calloc))) call abort
- if (sum(calloc-cres)>1e-4) call abort
+ if (any(shape(c) /= shape(calloc))) STOP 3
+ if (sum(calloc-cres)>1e-4) STOP 4
deallocate(calloc)
! Allocated to wrong shape
allocate (calloc(10,10))
calloc = matmul(a,transpose(b)) ! { dg-warning "Code for reallocating the allocatable array" }
- if (any(shape(c) /= shape(calloc))) call abort
- if (sum(calloc-cres)>1e-4) call abort
+ if (any(shape(c) /= shape(calloc))) STOP 5
+ if (sum(calloc-cres)>1e-4) STOP 6
deallocate(calloc)
end program main
write (unit=r1, fmt='(12F12.5)') matmul(a1,b1)
write (unit=r2, fmt='(12F12.5)') cres1
- if (r1 /= r2) call abort
+ if (r1 /= r2) STOP 1
r = dot_product(matmul(a2,v1),v2)
- if (abs(r+208320) > 1) call abort
+ if (abs(r+208320) > 1) STOP 2
write (unit=r1,fmt='(1P,9E18.10)') matmul(matmul(a3,b3),matmul(c3,d3))
write (unit=r2,fmt='(1P,9E18.10)') res3
- if (r1 /= r2) call abort
+ if (r1 /= r2) STOP 3
end subroutine test1
write (unit=r1, fmt='(12F12.5)') matmul(a1,b1)
write (unit=r2, fmt='(12F12.5)') cres1
- if (r1 /= r2) call abort
+ if (r1 /= r2) STOP 4
r = dot_product(matmul(a2,v1),v2)
- if (abs(r+208320) > 1) call abort
+ if (abs(r+208320) > 1) STOP 5
write (unit=r1,fmt='(1P,9E18.10)') matmul(matmul(a3,b3),matmul(c3,d3))
write (unit=r2,fmt='(1P,9E18.10)') res3
- if (r1 /= r2) call abort
+ if (r1 /= r2) STOP 6
end subroutine test2
191., 458., 914., 223., 534., 1062./
c = matmul(transpose(a),b)
- if (sum(c-cres)>1e-4) call abort
- if (sum(c-cres)>1e-4) call abort
+ if (sum(c-cres)>1e-4) STOP 1
+ if (sum(c-cres)>1e-4) STOP 2
! Unallocated
calloc = matmul(transpose(a),b) ! { dg-warning "Code for reallocating the allocatable array" }
- if (any(shape(c) /= shape(calloc))) call abort
- if (sum(calloc-cres)>1e-4) call abort
+ if (any(shape(c) /= shape(calloc))) STOP 3
+ if (sum(calloc-cres)>1e-4) STOP 4
deallocate(calloc)
! Allocated to wrong shape
allocate (calloc(10,10))
calloc = matmul(transpose(a),b) ! { dg-warning "Code for reallocating the allocatable array" }
- if (any(shape(c) /= shape(calloc))) call abort
- if (sum(calloc-cres)>1e-4) call abort
+ if (any(shape(c) /= shape(calloc))) STOP 5
+ if (sum(calloc-cres)>1e-4) STOP 6
deallocate(calloc)
! cycle through a few test cases...
end do
end do
cr = matmul(transpose(a2), b2)
- if (any(abs(c2-cr) > 1e-4)) call abort
+ if (any(abs(c2-cr) > 1e-4)) STOP 7
end block
end do
end do
b = bval
c = matmul(a,b)
a = matmul(a,b)
- if (any(a-c /= 0)) call abort
+ if (any(a-c /= 0)) STOP 1
a = aval
b = bval
b = matmul(a,b)
- if (any(b-c /= 0)) call abort
+ if (any(b-c /= 0)) STOP 2
b = bval
a = matmul(aval, b)
- if (any(a-c /= 0)) call abort
+ if (any(a-c /= 0)) STOP 3
ind = [1, 3, 2]
c = matmul(a(ind,:),b)
- if (any(c-ri /= 0)) call abort
+ if (any(c-ri /= 0)) STOP 4
c = matmul(afunc(),b)
- if (any(c-d /= 0)) call abort
+ if (any(c-d /= 0)) STOP 5
a = afunc()
c = matmul(a, bfunc())
- if (any(c-d /= 0)) call abort
+ if (any(c-d /= 0)) STOP 6
end program main
! { dg-final { scan-tree-dump-times "matmul_r4" 2 "optimized" } }
w = 7
w = matmul(M,v)
if( any(w .ne. 0) ) then
- call abort
+ STOP 1
end if
end program bogus_matmul
! { dg-final { scan-tree-dump-times "matmul_r4" 0 "optimized" } }
end do
end do
res = MATMUL(TRANSPOSE(CONJG(R)), M)
- if (any(abs(res-c) >= 1e-6)) call abort
+ if (any(abs(res-c) >= 1e-6)) STOP 1
c = 0
do k=1,3
do j=1,3
end do
end do
res = matmul(m, transpose(conjg(r)))
- if (any(abs(res-c) >= 1e-6)) call abort
+ if (any(abs(res-c) >= 1e-6)) STOP 2
END
data b /17., -23., 29., -31., 37., -39., 41., -47./
data cres /195., -304., 384., 275., -428., 548., 347., -540., 692., 411., -640., 816./
c = matmul(a,b)
- if (sum(c-cres)>1e-4) call abort
+ if (sum(c-cres)>1e-4) STOP 1
calloc = matmul(a,b)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 2
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 3
deallocate(calloc)
allocate(calloc(4,4))
calloc = matmul(a,b)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 4
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 5
deallocate(calloc)
allocate(calloc(3,3))
calloc = matmul(a,b)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 6
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 7
deallocate(calloc)
block
bb = b
cc = matmul(aa,bb)
- if (sum(cc-cres)>1e-4) call abort
+ if (sum(cc-cres)>1e-4) STOP 8
calloc = matmul(aa,bb)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 9
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 10
calloc = 42.
deallocate(calloc)
allocate(calloc(4,4))
calloc = matmul(aa,bb)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 11
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 12
deallocate(calloc)
allocate(calloc(3,3))
calloc = matmul(aa,bb)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 13
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 14
deallocate(calloc)
end block
allocate (b(n,n))
call random_number (b)
write (unit=line,fmt='(2I5)') shape (matmul (b, transpose (b)))
- if (line /= ' 5 5') call abort
+ if (line /= ' 5 5') STOP 1
end program gfcbug142
data b /17., -23., 29., -31., 37., -39., 41., -47./
data cres /195., -304., 384., 275., -428., 548., 347., -540., 692., 411., -640., 816./
c = matmul(a,b)
- if (sum(c-cres)>1e-4) call abort
+ if (sum(c-cres)>1e-4) STOP 1
calloc = matmul(a,b)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 2
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 3
deallocate(calloc)
allocate(calloc(4,4))
calloc = matmul(a,b)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 4
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 5
deallocate(calloc)
allocate(calloc(3,3))
calloc = matmul(a,b)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 6
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 7
deallocate(calloc)
block
bb = b
cc = matmul(aa,bb)
- if (sum(cc-cres)>1e-4) call abort
+ if (sum(cc-cres)>1e-4) STOP 8
calloc = matmul(aa,bb)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 9
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 10
calloc = 42.
deallocate(calloc)
allocate(calloc(4,4))
calloc = matmul(aa,bb)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 11
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 12
deallocate(calloc)
allocate(calloc(3,3))
calloc = matmul(aa,bb)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 13
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 14
deallocate(calloc)
end block
data b /17., -23., 29., -31., 37., -39., 41., -47./
data cres /195., -304., 384., 275., -428., 548., 347., -540., 692., 411., -640., 816./
c = matmul(a,b)
- if (sum(c-cres)>1e-4) call abort
+ if (sum(c-cres)>1e-4) STOP 1
calloc = matmul(a,b)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 2
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 3
deallocate(calloc)
allocate(calloc(4,4))
calloc = matmul(a,b)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 4
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 5
deallocate(calloc)
allocate(calloc(3,3))
calloc = matmul(a,b)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 6
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 7
deallocate(calloc)
block
bb = b
cc = matmul(aa,bb)
- if (sum(cc-cres)>1e-4) call abort
+ if (sum(cc-cres)>1e-4) STOP 8
calloc = matmul(aa,bb)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 9
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 10
calloc = 42.
deallocate(calloc)
allocate(calloc(4,4))
calloc = matmul(aa,bb)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 11
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 12
deallocate(calloc)
allocate(calloc(3,3))
calloc = matmul(aa,bb)
- if (sum(calloc-cres)>1e-4) call abort
- if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort
+ if (sum(calloc-cres)>1e-4) STOP 13
+ if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 14
deallocate(calloc)
end block
c = matmul(a,b)
a = matmul(a,b)
- if (any(a /= c)) call abort
+ if (any(a /= c)) STOP 1
end program main
a2 = -b1
call a1b2(a1,b1,c1)
- if (any(abs(c1 - (/248., -749./)) > 1e-3)) call abort
+ if (any(abs(c1 - (/248., -749./)) > 1e-3)) STOP 1
call a2b1(a2,b2,c2)
- if (any(abs(c2 - (/39., -61., 75./)) > 1e-3)) call abort
+ if (any(abs(c2 - (/39., -61., 75./)) > 1e-3)) STOP 2
end program main
! { dg-final { scan-tree-dump-times "_gfortran_matmul" 0 "original" } }
DO i=1,N
v1 = MATMUL(a,b(:,i))
- if (any(abs(v1-v1res(:,i)) > 1e-10)) call abort
+ if (any(abs(v1-v1res(:,i)) > 1e-10)) STOP 1
v2 = MATMUL(a,b(i,:))
- if (any(abs(v2-v2res(:,i)) > 1e-10)) call abort
+ if (any(abs(v2-v2res(:,i)) > 1e-10)) STOP 2
ENDDO
data b1 / 2., -3., 5., -7., 11., -13./
c1 = matmul(a1(1,:), b1)
- if (any (c1-[248., -749.] /= 0.)) call abort
+ if (any (c1-[248., -749.] /= 0.)) STOP 1
end program main
! { dg-final { scan-tree-dump-times "_gfortran_matmul" 0 "original" } }
data b1 / 2., -3., 5., -7., 11., -13./
c1 = matmul(a1(1,:)%c, b1)
- if (any (c1-[248., -749.] /= 0.)) call abort
+ if (any (c1-[248., -749.] /= 0.)) STOP 1
c2 = matmul(a1%c, b1)
- if (any (c2-reshape([248., -749.],shape(c2)) /= 0.)) call abort
+ if (any (c2-reshape([248., -749.],shape(c2)) /= 0.)) STOP 2
end program main
! { dg-final { scan-tree-dump-times "_gfortran_matmul" 0 "optimized" } }
! Correct results in simple cases
ax = sum(a,1)
- if (any(ax /= px)) call abort
+ if (any(ax /= px)) STOP 1
ay = sum(a,2)
- if (any(ay /= py)) call abort
+ if (any(ay /= py)) STOP 2
az = sum(a,3)
- if (any(az /= pz)) call abort
+ if (any(az /= pz)) STOP 3
! Masks work
- if (any(sum(a,1,.false.) /= 0)) call abort
- if (any(sum(a,2,.true.) /= py)) call abort
- if (any(sum(a,3,m) /= merge(pz,0,m(:,:,1)))) call abort
+ if (any(sum(a,1,.false.) /= 0)) STOP 4
+ if (any(sum(a,2,.true.) /= py)) STOP 5
+ if (any(sum(a,3,m) /= merge(pz,0,m(:,:,1)))) STOP 6
if (any(sum(a,2,m) /= merge(sum(a(:, ::2,:),2),&
sum(a(:,2::2,:),2),&
- m(:,1,:)))) call abort
+ m(:,1,:)))) STOP 7
! It works too with array constructors ...
if (any(sum( &
reshape((/ (i*i,i=1,size(a)) /), shape(a)), &
1, &
- true) /= ax)) call abort
+ true) /= ax)) STOP 8
! ... and with vector subscripts
if (any(sum( &
a((/ (i,i=1,nx) /), &
(/ (i,i=1,ny) /), &
(/ (i,i=1,nz) /)), &
- 1) /= ax)) call abort
+ 1) /= ax)) STOP 9
if (any(sum( &
a(sum(onesx(:,:),1), & ! unnecessary { dg-warning "Creating array temporary" }
sum(onesy(:,:),1), & ! unnecessary { dg-warning "Creating array temporary" }
sum(onesz(:,:),1)), & ! unnecessary { dg-warning "Creating array temporary" }
- 1) /= ax)) call abort
+ 1) /= ax)) STOP 10
! Nested sums work
- if (sum(sum(sum(a,1),1),1) /= sum(a)) call abort
- if (sum(sum(sum(a,1),2),1) /= sum(a)) call abort
- if (sum(sum(sum(a,3),1),1) /= sum(a)) call abort
- if (sum(sum(sum(a,3),2),1) /= sum(a)) call abort
+ if (sum(sum(sum(a,1),1),1) /= sum(a)) STOP 11
+ if (sum(sum(sum(a,1),2),1) /= sum(a)) STOP 12
+ if (sum(sum(sum(a,3),1),1) /= sum(a)) STOP 13
+ if (sum(sum(sum(a,3),2),1) /= sum(a)) STOP 14
- if (any(sum(sum(a,1),1) /= sum(sum(a,2),1))) call abort
- if (any(sum(sum(a,1),2) /= sum(sum(a,3),1))) call abort
- if (any(sum(sum(a,2),2) /= sum(sum(a,3),2))) call abort
+ if (any(sum(sum(a,1),1) /= sum(sum(a,2),1))) STOP 15
+ if (any(sum(sum(a,1),2) /= sum(sum(a,3),1))) STOP 16
+ if (any(sum(sum(a,2),2) /= sum(sum(a,3),2))) STOP 17
! Temps are unavoidable here (function call's argument or result)
! Sums as part of a bigger expr work
if (any(1+sum(eid(a),1)+ax+sum( &
neid3(a), & ! { dg-warning "Creating array temporary" }
- 1)+1 /= 3*ax+2)) call abort
+ 1)+1 /= 3*ax+2)) STOP 18
if (any(1+eid(sum(a,2))+ay+ &
neid2( & ! { dg-warning "Creating array temporary" }
sum(a,2) & ! { dg-warning "Creating array temporary" }
- )+1 /= 3*ay+2)) call abort
+ )+1 /= 3*ay+2)) STOP 19
if (any(sum(eid(sum(a,3))+az+2* &
neid2(az) & ! { dg-warning "Creating array temporary" }
- ,1)+1 /= 4*sum(az,1)+1)) call abort
+ ,1)+1 /= 4*sum(az,1)+1)) STOP 20
- if (any(sum(transpose(sum(a,1)),1)+sum(az,1) /= sum(ax,2)+sum(sum(a,3),1))) call abort
+ if (any(sum(transpose(sum(a,1)),1)+sum(az,1) /= sum(ax,2)+sum(sum(a,3),1))) STOP 21
! Creates a temp when needed.
a(1,:,:) = sum(a,1) ! unnecessary { dg-warning "Creating array temporary" }
- if (any(a(1,:,:) /= ax)) call abort
+ if (any(a(1,:,:) /= ax)) STOP 22
b = p(:,:,1)
call set(b(2:,1), sum(b(:nx-1,:),2)) ! { dg-warning "Creating array temporary" }
- if (any(b(2:,1) /= ay(1:nx-1,1))) call abort
+ if (any(b(2:,1) /= ay(1:nx-1,1))) STOP 23
b = p(:,:,1)
call set(b(:,1), sum(b,2)) ! unnecessary { dg-warning "Creating array temporary" }
- if (any(b(:,1) /= ay(:,1))) call abort
+ if (any(b(:,1) /= ay(:,1))) STOP 24
b = p(:,:,1)
call tes(sum(eid(b(:nx-1,:)),2), b(2:,1)) ! { dg-warning "Creating array temporary" }
- if (any(b(2:,1) /= ay(1:nx-1,1))) call abort
+ if (any(b(2:,1) /= ay(1:nx-1,1))) STOP 25
b = p(:,:,1)
call tes(eid(sum(b,2)), b(:,1)) ! unnecessary { dg-warning "Creating array temporary" }
- if (any(b(:,1) /= ay(:,1))) call abort
+ if (any(b(:,1) /= ay(:,1))) STOP 26
contains
do j = 1, nboxes
pes(j) = modulo (j-1, nprocs)
end do
- if (any(nbx /= 1)) call abort
+ if (any(nbx /= 1)) STOP 1
do j = 0, nprocs-1
- if (.not. all(spread (pes==j,dim=1,ncopies=n_obstype))) call abort
+ if (.not. all(spread (pes==j,dim=1,ncopies=n_obstype))) STOP 2
! The two following tests used to fail
if (any(shape(sum(nbx,dim=2,mask=spread (pes==j,dim=1,ncopies=n_obstype))) &
- /= (/ 2 /))) call abort
+ /= (/ 2 /))) STOP 3
if (any(sum (nbx,dim=2,mask=spread (pes==j,dim=1,ncopies=n_obstype)) &
- /= (/ 1, 1 /))) call abort
+ /= (/ 1, 1 /))) STOP 4
end do
end program gfcbug115
real, dimension(m,n):: y
y = 1.0
- if (any(sum(y*func(m,n), dim=1) /= m)) call abort
+ if (any(sum(y*func(m,n), dim=1) /= m)) STOP 1
end subroutine sub
a = p
c = transpose(a)
- if (any(c /= q)) call abort
+ if (any(c /= q)) STOP 1
write(u,*) transpose(a)
write(v,*) q
- if (u /= v) call abort
+ if (u /= v) STOP 2
e = r
f = s
g = transpose(e+f)
- if (any(g /= r + s)) call abort
+ if (any(g /= r + s)) STOP 3
write(u,*) transpose(e+f)
write(v,*) r + s
- if (u /= v) call abort
+ if (u /= v) STOP 4
e = transpose(e) ! { dg-warning "Creating array temporary" }
- if (any(e /= s)) call abort
+ if (any(e /= s)) STOP 5
write(u,*) transpose(transpose(e))
write(v,*) s
- if (u /= v) call abort
+ if (u /= v) STOP 6
e = transpose(e+f) ! { dg-warning "Creating array temporary" }
- if (any(e /= 2*r)) call abort
+ if (any(e /= 2*r)) STOP 7
write(u,*) transpose(transpose(e+f))-f
write(v,*) 2*r
- if (u /= v) call abort
+ if (u /= v) STOP 8
a = foo(transpose(c))
- if (any(a /= p+1)) call abort
+ if (any(a /= p+1)) STOP 9
write(u,*) foo(transpose(c)) ! { dg-warning "Creating array temporary" }
write(v,*) p+1
- if (u /= v) call abort
+ if (u /= v) STOP 10
c = transpose(foo(a)) ! Unnecessary { dg-warning "Creating array temporary" }
- if (any(c /= q+2)) call abort
+ if (any(c /= q+2)) STOP 11
write(u,*) transpose(foo(a)) ! { dg-warning "Creating array temporary" }
write(v,*) q+2
- if (u /= v) call abort
+ if (u /= v) STOP 12
e = foo(transpose(e)) ! { dg-warning "Creating array temporary" }
- if (any(e /= 2*s+1)) call abort
+ if (any(e /= 2*s+1)) STOP 13
write(u,*) transpose(foo(transpose(e))-1) ! { dg-warning "Creating array temporary" }
write(v,*) 2*s+1
- if (u /= v) call abort
+ if (u /= v) STOP 14
e = transpose(foo(e)) ! { dg-warning "Creating array temporary" }
- if (any(e /= 2*r+2)) call abort
+ if (any(e /= 2*r+2)) STOP 15
write(u,*) transpose(foo(transpose(e)-1)) ! 2 temps { dg-warning "Creating array temporary" }
write(v,*) 2*r+2
- if (u /= v) call abort
+ if (u /= v) STOP 16
a = bar(transpose(c))
- if (any(a /= p+4)) call abort
+ if (any(a /= p+4)) STOP 17
write(u,*) bar(transpose(c))
write(v,*) p+4
- if (u /= v) call abort
+ if (u /= v) STOP 18
c = transpose(bar(a))
- if (any(c /= q+6)) call abort
+ if (any(c /= q+6)) STOP 19
write(u,*) transpose(bar(a))
write(v,*) q+6
- if (u /= v) call abort
+ if (u /= v) STOP 20
e = bar(transpose(e)) ! { dg-warning "Creating array temporary" }
- if (any(e /= 2*s+4)) call abort
+ if (any(e /= 2*s+4)) STOP 21
write(u,*) transpose(bar(transpose(e)))-2
write(v,*) 2*s+4
- if (u /= v) call abort
+ if (u /= v) STOP 22
e = transpose(bar(e)) ! { dg-warning "Creating array temporary" }
- if (any(e /= 2*r+6)) call abort
+ if (any(e /= 2*r+6)) STOP 23
write(u,*) transpose(transpose(bar(e))-2)
write(v,*) 2*r+6
- if (u /= v) call abort
+ if (u /= v) STOP 24
- if (any(a /= transpose(transpose(a)))) call abort ! optimized away
+ if (any(a /= transpose(transpose(a)))) STOP 25! optimized away
write(u,*) a
write(v,*) transpose(transpose(a))
- if (u /= v) call abort
+ if (u /= v) STOP 26
b = a * a
- if (any(transpose(a+b) /= transpose(a)+transpose(b))) call abort ! optimized away
+ if (any(transpose(a+b) /= transpose(a)+transpose(b))) STOP 27! optimized away
write(u,*) transpose(a+b)
write(v,*) transpose(a) + transpose(b)
- if (u /= v) call abort
+ if (u /= v) STOP 28
- if (any(transpose(matmul(a,c)) /= matmul(transpose(c), transpose(a)))) call abort ! 2 temps { dg-warning "Creating array temporary" }
+ if (any(transpose(matmul(a,c)) /= matmul(transpose(c), transpose(a)))) STOP 29! 2 temps { dg-warning "Creating array temporary" }
write(u,*) transpose(matmul(a,c)) ! { dg-warning "Creating array temporary" }
write(v,*) matmul(transpose(c), transpose(a)) ! { dg-warning "Creating array temporary" }
- if (u /= v) call abort
+ if (u /= v) STOP 30
- if (any(transpose(matmul(e,a)) /= matmul(transpose(a), transpose(e)))) call abort ! 2 temps { dg-warning "Creating array temporary" }
+ if (any(transpose(matmul(e,a)) /= matmul(transpose(a), transpose(e)))) STOP 31! 2 temps { dg-warning "Creating array temporary" }
write(u,*) transpose(matmul(e,a)) ! { dg-warning "Creating array temporary" }
write(v,*) matmul(transpose(a), transpose(e)) ! { dg-warning "Creating array temporary" }
- if (u /= v) call abort
+ if (u /= v) STOP 32
call baz (transpose(a))
call toto1 (a, transpose (c))
- if (any (a /= 2 * p + 12)) call abort
+ if (any (a /= 2 * p + 12)) STOP 33
call toto1 (e, transpose (e)) ! { dg-warning "Creating array temporary" }
- if (any (e /= 4 * s + 12)) call abort
+ if (any (e /= 4 * s + 12)) STOP 34
call toto2 (c, transpose (a))
- if (any (c /= 2 * q + 13)) call abort
+ if (any (c /= 2 * q + 13)) STOP 35
call toto2 (e, transpose(e)) ! { dg-warning "Creating array temporary" }
- if (any (e /= 4 * r + 13)) call abort
+ if (any (e /= 4 * r + 13)) STOP 36
call toto2 (e, transpose(transpose(e))) ! { dg-warning "Creating array temporary" }
- if (any (e /= 4 * r + 14)) call abort
+ if (any (e /= 4 * r + 14)) STOP 37
call toto3 (e, transpose(e))
- if (any (e /= 4 * r + 14)) call abort
+ if (any (e /= 4 * r + 14)) STOP 38
call titi (nx, e, transpose(e)) ! { dg-warning "Creating array temporary" }
- if (any (e /= 4 * s + 17)) call abort
+ if (any (e /= 4 * s + 17)) STOP 39
contains
! { dg-final { scan-tree-dump-times "struct\[^\\n\]*atmp" 24 "original" } }
!
! 2 tests optimized out
-! { dg-final { scan-tree-dump-times "_gfortran_abort" 39 "original" } }
-! { # Commented out as failing at -O0: dg-final { scan-tree-dump-times "_gfortran_abort" 37 "optimized" } }
+! { dg-final { scan-tree-dump-times "_gfortran_stop" 39 "original" } }
+! { # Commented out as failing at -O0: dg-final { scan-tree-dump-times "_gfortran_stop" 37 "optimized" } }
!
! cleanup
inquire (iolength=s4) c4
inquire (iolength=s8) c8
- if (s4 /= 8 .or. s8 /= 16) call abort
+ if (s4 /= 8 .or. s8 /= 16) STOP 1
end program main
OPEN(UNIT=7, ACCESS='DIRECT',RECL=132,STATUS='SCRATCH')
INQUIRE(UNIT=7,SEQUENTIAL=D4VK)
CLOSE(UNIT=7,STATUS='DELETE')
- IF (D4VK.NE.'NO') CALL ABORT
+ IF (D4VK.NE.'NO') STOP 1
END
open(file='cseq', unit=23)
inquire(file='cseq',number=unit)
- if (unit /= 23) call abort
+ if (unit /= 23) STOP 1
inquire(file=trim(cwd) // '/cseq',number=unit)
- if (unit /= 23) call abort
+ if (unit /= 23) STOP 2
close(unit=23, status = 'delete')
inquire(file='foo/../cseq2',number=unit)
- if (unit >= 0) call abort
+ if (unit >= 0) STOP 3
inquire(file='cseq2',number=unit)
- if (unit >= 0) call abort
+ if (unit >= 0) STOP 4
end
fname="inquire_13_test"
inquire(unit=6, direct=drct, opened=opn, access=acc)
-if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") call abort
+if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") STOP 1
inquire(unit=10, direct=drct, opened=opn, access=acc)
-if (drct.ne."UNKNOWN" .and. opn .and. acc.ne."UNDEFINED") call abort
+if (drct.ne."UNKNOWN" .and. opn .and. acc.ne."UNDEFINED") STOP 2
inquire(unit=10, direct=drct, opened=opn, access=acc, formatted=frmt)
-if (drct.ne."UNKNOWN" .and. opn .and. acc.ne."UNDEFINED") call abort
-if (frmt.ne."UNKNOWN") call abort
+if (drct.ne."UNKNOWN" .and. opn .and. acc.ne."UNDEFINED") STOP 3
+if (frmt.ne."UNKNOWN") STOP 4
open(unit=19,file=fname,status='replace',err=170,form="formatted")
inquire(unit=19, direct=drct, opened=opn, access=acc,formatted=frmt)
-if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") call abort
-if (frmt.ne."YES") call abort
+if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") STOP 5
+if (frmt.ne."YES") STOP 6
! Inquire on filename, open file with DIRECT and FORMATTED
inquire(file=fname, direct=drct, opened=opn, access=acc, FORMATTED=frmt)
-if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") call abort
-if (frmt.ne."YES") call abort
+if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") STOP 7
+if (frmt.ne."YES") STOP 8
close(19)
! Inquire on filename, closed file with DIRECT and FORMATTED
inquire(file=fname, direct=drct, opened=opn, access=acc, formatted=frmt)
-if (drct.ne."UNKNOWN" .and. opn .and. acc.ne."UNDEFINED") call abort
-if (frmt.ne."UNKNOWN") call abort
+if (drct.ne."UNKNOWN" .and. opn .and. acc.ne."UNDEFINED") STOP 9
+if (frmt.ne."UNKNOWN") STOP 10
open(unit=19,file=fname,status='replace',err=170,form="unformatted")
inquire(unit=19, direct=drct, opened=opn, access=acc, formatted=frmt)
-if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") call abort
-if (frmt.ne."NO") call abort
+if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") STOP 11
+if (frmt.ne."NO") STOP 12
close(19)
open(unit=19,file=fname,status='replace',err=170,form="formatted")
inquire(unit=19, direct=drct, opened=opn, access=acc, unformatted=frmt)
-if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") call abort
+if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") STOP 13
! Inquire on filename, open file with DIRECT and UNFORMATTED
inquire(file=fname, direct=drct, opened=opn, access=acc, UNFORMATTED=frmt)
-if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") call abort
-if (frmt.ne."NO") call abort
+if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") STOP 14
+if (frmt.ne."NO") STOP 15
close(19)
! Inquire on filename, closed file with DIRECT and UNFORMATTED
inquire(file=fname, direct=drct, opened=opn, access=acc, unformatted=frmt)
-if (drct.ne."UNKNOWN" .and. opn .and. acc.ne."UNDEFINED") call abort
-if (frmt.ne."UNKNOWN") call abort
+if (drct.ne."UNKNOWN" .and. opn .and. acc.ne."UNDEFINED") STOP 16
+if (frmt.ne."UNKNOWN") STOP 17
open(unit=19,file=fname,status='replace',err=170,form="unformatted")
inquire(unit=19, direct=drct, opened=opn, access=acc,unformatted=frmt)
-if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") call abort
-if (frmt.ne."YES") call abort
+if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") STOP 18
+if (frmt.ne."YES") STOP 19
close(19)
open(unit=19,file=fname,status='replace',err=170)
inquire(unit=19, direct=drct, opened=opn, access=acc)
-if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") call abort
+if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") STOP 20
close(19)
open(unit=19,file=fname,status='replace',err=170,access='SEQUENTIAL')
inquire(unit=19, direct=drct, opened=opn, access=acc)
-if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") call abort
+if (drct.ne."NO" .and. .not.opn .and. acc.ne."SEQUENTIAL") STOP 21
! Inquire on filename, open file with SEQUENTIAL
inquire(file=fname, SEQUENTIAL=seqn, opened=opn, access=acc)
-if (seqn.ne."YES" .and. .not.opn .and. acc.ne."DIRECT") call abort
+if (seqn.ne."YES" .and. .not.opn .and. acc.ne."DIRECT") STOP 22
close(19)
! Inquire on filename, closed file with SEQUENTIAL
inquire(file=fname, SEQUENTIAL=seqn, opened=opn, access=acc)
-if (seqn.ne."UNKNOWN" .and. opn .and. acc.ne."UNDEFINED") call abort
+if (seqn.ne."UNKNOWN" .and. opn .and. acc.ne."UNDEFINED") STOP 23
open(unit=19,file=fname,status='replace',err=170,form='UNFORMATTED',access='DIRECT',recl=72)
inquire(unit=19, direct=drct, opened=opn, access=acc)
-if (drct.ne."YES" .and. .not.opn .and. acc.ne."DIRECT") call abort
+if (drct.ne."YES" .and. .not.opn .and. acc.ne."DIRECT") STOP 24
! Inquire on filename, open file with DIRECT
inquire(file=fname, direct=drct, opened=opn, access=acc)
-if (drct.ne."YES" .and. .not.opn .and. acc.ne."DIRECT") call abort
+if (drct.ne."YES" .and. .not.opn .and. acc.ne."DIRECT") STOP 25
close(19, status="delete")
! Inquire on filename, closed file with DIRECT
inquire(file=fname, direct=drct, opened=opn, access=acc)
-if (drct.ne."UNKNOWN" .and. opn .and. acc.ne."UNDEFINED") call abort
+if (drct.ne."UNKNOWN" .and. opn .and. acc.ne."UNDEFINED") STOP 26
stop
170 write(*,*) "ERROR: unable to open testdirect.f"
str = "abcdefg"
inquire(file="abcddummy", stream=str)
!print *, "str=",str
-if (str /= "UNKNOWN") call abort
+if (str /= "UNKNOWN") STOP 1
inquire(99, stream=str)
!print *, "str=",str
-if (str /= "UNKNOWN") call abort
+if (str /= "UNKNOWN") STOP 2
open(99,access="stream")
inquire(99, stream=str)
!print *, "str=",str
close(99, status="delete")
stop
10 close(99, status="delete")
-call abort
+STOP 3
end
inquire(unit=input_unit, read=s_read, write=s_write, &
readwrite=s_readwrite)
if (s_read /= "YES" .or. s_write /= "NO" .or. s_readwrite /="NO") then
- call abort()
+ STOP 1
endif
inquire(unit=output_unit, read=s_read, write=s_write, &
readwrite=s_readwrite)
if (s_read /= "NO" .or. s_write /= "YES" .or. s_readwrite /="NO") then
- call abort()
+ STOP 2
endif
inquire(unit=error_unit, read=s_read, write=s_write, &
readwrite=s_readwrite)
if (s_read /= "NO" .or. s_write /= "YES" .or. s_readwrite /="NO") then
- call abort()
+ STOP 3
endif
end program test_inquire
open(10, status='scratch', form='formatted', access='direct', recl=10*4)
write(10,'(10i4)',rec=9) 1,2,3,4,5,6,7,8,9,10
inquire(unit=10,nextrec=nextrec)
- if (nextrec.ne.10) call abort
+ if (nextrec.ne.10) STOP 1
close(10)
end
character(len=20) chr
open(7,STATUS='SCRATCH')
inquire(7,position=chr)
- if (chr.NE.'ASIS') CALL ABORT
+ if (chr.NE.'ASIS') STOP 1
close(7)
open(7,STATUS='SCRATCH',ACCESS='DIRECT',RECL=100)
inquire(7,position=chr)
- if (chr.NE.'UNDEFINED') CALL ABORT
+ if (chr.NE.'UNDEFINED') STOP 2
close(7)
open(7,STATUS='SCRATCH',POSITION='REWIND')
inquire(7,position=chr)
- if (chr.NE.'REWIND') CALL ABORT
+ if (chr.NE.'REWIND') STOP 3
close(7)
open(7,STATUS='SCRATCH',POSITION='ASIS')
inquire(7,position=chr)
- if (chr.NE.'ASIS') CALL ABORT
+ if (chr.NE.'ASIS') STOP 4
close(7)
open(7,STATUS='SCRATCH',POSITION='APPEND')
inquire(7,position=chr)
- if (chr.NE.'APPEND') CALL ABORT
+ if (chr.NE.'APPEND') STOP 5
close(7)
open(7,STATUS='SCRATCH',POSITION='REWIND')
write(7,*)'this is a record written to the file'
write(7,*)'this is another record'
backspace(7)
inquire(7,position=chr)
- if (chr .NE. 'UNSPECIFIED') CALL ABORT
+ if (chr .NE. 'UNSPECIFIED') STOP 6
rewind(7)
inquire(7,position=chr)
- if (chr.NE.'REWIND') CALL ABORT
+ if (chr.NE.'REWIND') STOP 7
close(7)
end
! not connected
inquire(7,pad=chr)
! if (debug) print*,chr
- if (chr.ne.'UNDEFINED') call abort
+ if (chr.ne.'UNDEFINED') STOP 1
chr=''
! not a formatted file
open(7,FORM='UNFORMATTED',STATUS='SCRATCH')
inquire(7,pad=chr)
! if (debug) print*,chr
- if (chr.ne.'UNDEFINED') call abort
+ if (chr.ne.'UNDEFINED') STOP 2
chr=''
! yes
open(8,STATUS='SCRATCH',PAD='YES')
inquire(8,pad=chr)
! if (debug) print*,chr
- if (chr.ne.'YES') call abort
+ if (chr.ne.'YES') STOP 3
chr=''
! no
open(9,STATUS='SCRATCH',PAD='NO')
inquire(9,pad=chr)
! if (debug) print*,chr
- if (chr.ne.'NO') call abort
+ if (chr.ne.'NO') STOP 4
chr=''
end
open(10,delim='quote',status='SCRATCH')
inquire(10,delim=delim)
close(10)
- if (delim .ne. 'QUOTE') call abort
+ if (delim .ne. 'QUOTE') STOP 1
! apostrophe
open(10,delim='apostrophe',status='SCRATCH')
inquire(10,delim=delim)
close(10)
- if (delim .ne. 'APOSTROPHE') call abort
+ if (delim .ne. 'APOSTROPHE') STOP 2
! none
open(10,status='SCRATCH')
inquire(10,delim=delim)
close(10)
- if (delim .ne. 'NONE') call abort
+ if (delim .ne. 'NONE') STOP 3
! undefined
open(10,form='UNFORMATTED',status='SCRATCH')
inquire(10,delim=delim)
close(10)
- if (delim .ne. 'UNDEFINED') call abort
+ if (delim .ne. 'UNDEFINED') STOP 4
end program main
logical :: l
l = .true.
inquire (file='inquire_9 file that should not exist', exist=l)
- if (l) call abort
+ if (l) STOP 1
l = .true.
inquire (unit=-16, exist=l)
- if (l) call abort
+ if (l) STOP 2
open (unit=16, file='inquire_9.tst')
write (unit=16, fmt='(a)') 'Test'
l = .false.
inquire (unit=16, exist=l)
- if (.not.l) call abort
+ if (.not.l) STOP 3
l = .false.
inquire (file='inquire_9.tst', exist=l)
- if (.not.l) call abort
+ if (.not.l) STOP 4
close (unit=16)
l = .false.
inquire (file='inquire_9.tst', exist=l)
- if (.not.l) call abort
+ if (.not.l) STOP 5
open (unit=16, file='inquire_9.tst')
close (unit=16, status='delete')
end
!print *, "Error Code is : ", IOSTAT_INQUIRE_INTERNAL_UNIT
!print *, "IOSTAT Code is: ", istat
!print *, tunit, unit_exists
- if (istat.ne.iostat_inquire_internal_unit) call abort()
- if (unit_exists) call abort()
+ if (istat.ne.iostat_inquire_internal_unit) STOP 1
+ if (unit_exists) STOP 2
END
! F2018 (N2137) 12.10.2.26: recl for unconnected should be -1
inquire(10, recl=r)
if (r /= -1) then
- call abort()
+ STOP 1
end if
! Formatted sequential
inquire(10, recl=r4)
close(10)
if (r /= huge(0_8) - huge(0_4) - 1) then
- call abort()
+ STOP 2
end if
if (r4 /= huge(0)) then
- call abort()
+ STOP 3
end if
! Formatted sequential with recl= specifier
inquire(10, recl=r)
close(10)
if (r /= 100) then
- call abort()
+ STOP 4
end if
! Formatted stream
inquire(10, recl=r)
close(10)
if (r /= -2) then
- call abort()
+ STOP 5
end if
end program inqrecl
! flush(25)
inquire(unit=25, named=is_named, name=aname, size=i)
-if (.not.is_named) call abort
-if (aname /= "testfile_inquire_size") call abort
-if (i /= 3000) call abort
+if (.not.is_named) STOP 1
+if (aname /= "testfile_inquire_size") STOP 2
+if (i /= 3000) STOP 3
inquire(file="testfile_inquire_size", size=i)
-if (.not.is_named) call abort
-if (aname /= "testfile_inquire_size") call abort
-if (i /= 3000) call abort
+if (.not.is_named) STOP 4
+if (aname /= "testfile_inquire_size") STOP 5
+if (i /= 3000) STOP 6
close(25, status="delete")
inquire(file="testfile_inquire_size", size=i)
-if (i /= -1) call abort
+if (i /= -1) STOP 7
end
i2 = int(-3)
i4 = int(-3)
i8 = int(-3)
- if (i1 /= -3_ik1 .or. i2 /= -3_ik2) call abort
- if (i4 /= -3_ik4 .or. i8 /= -3_ik8) call abort
+ if (i1 /= -3_ik1 .or. i2 /= -3_ik2) STOP 1
+ if (i4 /= -3_ik4 .or. i8 /= -3_ik8) STOP 2
i1 = int(5, ik1)
i2 = int(i1, ik2)
i4 = int(i1, ik4)
i8 = int(i1, ik8)
- if (i1 /= 5_ik1 .or. i2 /= 5_ik2) call abort
- if (i4 /= 5_ik4 .or. i8 /= 5_ik8) call abort
+ if (i1 /= 5_ik1 .or. i2 /= 5_ik2) STOP 3
+ if (i4 /= 5_ik4 .or. i8 /= 5_ik8) STOP 4
i8 = int(10, ik8)
i1 = int(i8, ik1)
i2 = int(i8, ik2)
i4 = int(i8, ik4)
- if (i1 /= 10_ik1 .or. i2 /= 10_ik2) call abort
- if (i4 /= 10_ik4 .or. i8 /= 10_ik8) call abort
+ if (i1 /= 10_ik1 .or. i2 /= 10_ik2) STOP 5
+ if (i4 /= 10_ik4 .or. i8 /= 10_ik8) STOP 6
!
! case 2(b)
!
i2 = int(r4, ik2)
i4 = int(r4, ik4)
i8 = int(r4, ik8)
- if (i1 /= -3_ik1 .or. i2 /= -3_ik2) call abort
- if (i4 /= -3_ik4 .or. i8 /= -3_ik8) call abort
+ if (i1 /= -3_ik1 .or. i2 /= -3_ik2) STOP 7
+ if (i4 /= -3_ik4 .or. i8 /= -3_ik8) STOP 8
r8 = -3.7_dp
i1 = int(r8, ik1)
i2 = int(r8, ik2)
i4 = int(r8, ik4)
i8 = int(r8, ik8)
- if (i1 /= -3_ik1 .or. i2 /= -3_ik2) call abort
- if (i4 /= -3_ik4 .or. i8 /= -3_ik8) call abort
+ if (i1 /= -3_ik1 .or. i2 /= -3_ik2) STOP 9
+ if (i4 /= -3_ik4 .or. i8 /= -3_ik8) STOP 10
!
! Case 2(a)
!
i2 = int(r4, ik2)
i4 = int(r4, ik4)
i8 = int(r4, ik8)
- if (i1 /= 0_ik1 .or. i2 /= 0_ik2) call abort
- if (i4 /= 0_ik4 .or. i8 /= 0_ik8) call abort
+ if (i1 /= 0_ik1 .or. i2 /= 0_ik2) STOP 11
+ if (i4 /= 0_ik4 .or. i8 /= 0_ik8) STOP 12
r8 = -3.7E-1_dp
i1 = int(r8, ik1)
i2 = int(r8, ik2)
i4 = int(r8, ik4)
i8 = int(r8, ik8)
- if (i1 /= 0_ik1 .or. i2 /= 0_ik2) call abort
- if (i4 /= 0_ik4 .or. i8 /= 0_ik8) call abort
+ if (i1 /= 0_ik1 .or. i2 /= 0_ik2) STOP 13
+ if (i4 /= 0_ik4 .or. i8 /= 0_ik8) STOP 14
!
! Case 3
!
i2 = int(c4, ik2)
i4 = int(c4, ik4)
i8 = int(c4, ik8)
- if (i1 /= 0_ik1 .or. i2 /= 0_ik2) call abort
- if (i4 /= 0_ik4 .or. i8 /= 0_ik8) call abort
+ if (i1 /= 0_ik1 .or. i2 /= 0_ik2) STOP 15
+ if (i4 /= 0_ik4 .or. i8 /= 0_ik8) STOP 16
c8 = (-3.7E-1_dp,3.7E-1_dp)
i1 = int(c8, ik1)
i2 = int(c8, ik2)
i4 = int(c8, ik4)
i8 = int(c8, ik8)
- if (i1 /= 0_ik1 .or. i2 /= 0_ik2) call abort
- if (i4 /= 0_ik4 .or. i8 /= 0_ik8) call abort
+ if (i1 /= 0_ik1 .or. i2 /= 0_ik2) STOP 17
+ if (i4 /= 0_ik4 .or. i8 /= 0_ik8) STOP 18
c4 = (-3.7_sp,3.7_sp)
i1 = int(c4, ik1)
i2 = int(c4, ik2)
i4 = int(c4, ik4)
i8 = int(c4, ik8)
- if (i1 /= -3_ik1 .or. i2 /= -3_ik2) call abort
- if (i4 /= -3_ik4 .or. i8 /= -3_ik8) call abort
+ if (i1 /= -3_ik1 .or. i2 /= -3_ik2) STOP 19
+ if (i4 /= -3_ik4 .or. i8 /= -3_ik8) STOP 20
c8 = (3.7_dp,3.7_dp)
i1 = int(c8, ik1)
i2 = int(c8, ik2)
i4 = int(c8, ik4)
i8 = int(c8, ik8)
- if (i1 /= 3_ik1 .or. i2 /= 3_ik2) call abort
- if (i4 /= 3_ik4 .or. i8 /= 3_ik8) call abort
+ if (i1 /= 3_ik1 .or. i2 /= 3_ik2) STOP 21
+ if (i4 /= 3_ik4 .or. i8 /= 3_ik8) STOP 22
!
! Case 4
!
i2 = int(b'0011', ik2)
i4 = int(b'0011', ik4)
i8 = int(b'0011', ik8)
- if (i1 /= 3_ik1 .or. i2 /= 3_ik2) call abort
- if (i4 /= 3_ik4 .or. i8 /= 3_ik8) call abort
+ if (i1 /= 3_ik1 .or. i2 /= 3_ik2) STOP 23
+ if (i4 /= 3_ik4 .or. i8 /= 3_ik8) STOP 24
i1 = int(o'0011', ik1)
i2 = int(o'0011', ik2)
i4 = int(o'0011', ik4)
i8 = int(o'0011', ik8)
- if (i1 /= 9_ik1 .or. i2 /= 9_ik2) call abort
- if (i4 /= 9_ik4 .or. i8 /= 9_ik8) call abort
+ if (i1 /= 9_ik1 .or. i2 /= 9_ik2) STOP 25
+ if (i4 /= 9_ik4 .or. i8 /= 9_ik8) STOP 26
i1 = int(z'0011', ik1)
i2 = int(z'0011', ik2)
i4 = int(z'0011', ik4)
i8 = int(z'0011', ik8)
- if (i1 /= 17_ik1 .or. i2 /= 17_ik2) call abort
- if (i4 /= 17_ik4 .or. i8 /= 17_ik8) call abort
+ if (i1 /= 17_ik1 .or. i2 /= 17_ik2) STOP 27
+ if (i4 /= 17_ik4 .or. i8 /= 17_ik8) STOP 28
end program test_int
o2 = short(i4)
if (i8 /= i2 .or. i4 /= i2 .or. j2 /= i2 .or. k2 /= i2 &
- .or. l2 /= i2 .or. m2 /= i2 .or. n2 /= i2 .or. o2 /= i2) call abort
+ .or. l2 /= i2 .or. m2 /= i2 .or. n2 /= i2 .or. o2 /= i2) STOP 1
x = i2
i8 = int8(x)
i4 = long(x)
j2 = short(x)
k2 = int2(x)
- if (i8 /= i2 .or. i4 /= i2 .or. j2 /= i2 .or. k2 /= i2) call abort
+ if (i8 /= i2 .or. i4 /= i2 .or. j2 /= i2 .or. k2 /= i2) STOP 2
z = i2 + (0.,-42.)
i8 = int8(z)
i4 = long(z)
j2 = short(z)
k2 = int2(z)
- if (i8 /= i2 .or. i4 /= i2 .or. j2 /= i2 .or. k2 /= i2) call abort
+ if (i8 /= i2 .or. i4 /= i2 .or. j2 /= i2 .or. k2 /= i2) STOP 3
end
read(inputline,100) test
100 format(1i11)
- if (test /= -2147483648) call abort
+ if (test /= -2147483648) STOP 1
inputline(1:1) = " "
read(inputline, 100, iostat=st) test
- if (st == 0) call abort
+ if (st == 0) STOP 2
inputline(11:11) = "7"
read(inputline, 100) test
- if (test /= 2147483647) call abort
+ if (test /= 2147483647) STOP 3
! Same as above but with list-formatted IO
inputline = "-2147483648"
read(inputline, *) test
- if (test /= -2147483648) call abort
+ if (test /= -2147483648) STOP 4
inputline(1:1) = " "
read(inputline, *, iostat=st) test
- if (st == 0) call abort
+ if (st == 0) STOP 5
inputline(11:11) = "7"
read(inputline, *) test
- if (test /= 2147483647) call abort
+ if (test /= 2147483647) STOP 6
end program int_range
subroutine check_equal_r (a, b)
real, intent(in) :: a, b
- if (abs(a - b) > 1.e-5 * abs(b)) call abort
+ if (abs(a - b) > 1.e-5 * abs(b)) STOP 1
end subroutine check_equal_r
subroutine check_equal_c (a, b)
complex, intent(in) :: a, b
- if (abs(a - b) > 1.e-5 * abs(b)) call abort
+ if (abs(a - b) > 1.e-5 * abs(b)) STOP 2
end subroutine check_equal_c
subroutine check_equal_i (a, b)
integer, intent(in) :: a, b
- if (a /= b) call abort
+ if (a /= b) STOP 3
end subroutine check_equal_i
end subroutine run_me
subroutine check_i8 (a, b)
integer(kind=8), intent(in) :: a, b
- if (a /= b) call abort()
+ if (a /= b) STOP 1
end subroutine check_i8
subroutine check_i4 (a, b)
integer(kind=4), intent(in) :: a, b
- if (a /= b) call abort()
+ if (a /= b) STOP 2
end subroutine check_i4
subroutine check_r8 (a, b)
real(kind=8), intent(in) :: a, b
- if (a /= b) call abort()
+ if (a /= b) STOP 3
end subroutine check_r8
subroutine check_r4 (a, b)
real(kind=4), intent(in) :: a, b
- if (a /= b) call abort()
+ if (a /= b) STOP 4
end subroutine check_r4
subroutine check_c8 (a, b)
complex(kind=8), intent(in) :: a, b
- if (a /= b) call abort()
+ if (a /= b) STOP 5
end subroutine check_c8
subroutine check_c4 (a, b)
complex(kind=4), intent(in) :: a, b
- if (a /= b) call abort()
+ if (a /= b) STOP 6
end subroutine check_c4
subroutine acheck_c8 (a, b)
complex(kind=8), intent(in) :: a, b
- if (abs(a-b) > 1.d-9 * min(abs(a),abs(b))) call abort()
+ if (abs(a-b) > 1.d-9 * min(abs(a),abs(b))) STOP 7
end subroutine acheck_c8
subroutine acheck_c4 (a, b)
complex(kind=4), intent(in) :: a, b
- if (abs(a-b) > 1.e-5 * min(abs(a),abs(b))) call abort()
+ if (abs(a-b) > 1.e-5 * min(abs(a),abs(b))) STOP 8
end subroutine acheck_c4
end module mod_check
subroutine check_i8 (a, b)
integer(kind=8), intent(in) :: a, b
- if (a /= b) call abort()
+ if (a /= b) STOP 1
end subroutine check_i8
subroutine check_i4 (a, b)
integer(kind=4), intent(in) :: a, b
- if (a /= b) call abort()
+ if (a /= b) STOP 2
end subroutine check_i4
subroutine check_r8 (a, b)
real(kind=8), intent(in) :: a, b
- if (a /= b) call abort()
+ if (a /= b) STOP 3
end subroutine check_r8
subroutine check_r4 (a, b)
real(kind=4), intent(in) :: a, b
- if (a /= b) call abort()
+ if (a /= b) STOP 4
end subroutine check_r4
subroutine check_c8 (a, b)
complex(kind=8), intent(in) :: a, b
- if (a /= b) call abort()
+ if (a /= b) STOP 5
end subroutine check_c8
subroutine check_c4 (a, b)
complex(kind=4), intent(in) :: a, b
- if (a /= b) call abort()
+ if (a /= b) STOP 6
end subroutine check_c4
end module mod_check
rewind(10)
read(10,*) astring
close (10)
-if (astring.ne.'+789') call abort
+if (astring.ne.'+789') STOP 1
end
do i=1,2
allocate (temp (2))
call construct_temp (temp)
- if (any (temp % p% mn .ne. 'ijklmnop')) call abort ()
+ if (any (temp % p% mn .ne. 'ijklmnop')) STOP 1
deallocate (temp)
end do
end subroutine setup
!--
subroutine construct_temp (temp)
type (t_temp), intent(out) :: temp (:)
- if (any (temp % p% mn .ne. 'abcdefgh')) call abort ()
+ if (any (temp % p% mn .ne. 'abcdefgh')) STOP 2
temp(:)% p% mn = 'ijklmnop'
end subroutine construct_temp
end module gfcbug72
type(container_t) :: container
- if (container%n /= 42) call abort()
- if (allocated(container%a)) call abort()
+ if (container%n /= 42) STOP 1
+ if (allocated(container%a)) STOP 2
container%n = 1
allocate(container%a(50))
call init (container)
- if (container%n /= 42) call abort()
- if (allocated(container%a)) call abort()
+ if (container%n /= 42) STOP 3
+ if (allocated(container%a)) STOP 4
contains
subroutine init (container)
type(container_t), intent(out) :: container
implicit none
real,allocatable,intent(out),optional :: a(:)
if(present(a)) then
- if(allocated(a)) call abort()
+ if(allocated(a)) STOP 1
allocate(a(1))
a(1) = 5
end if
! print *,'in sub1'
call sub2(a)
if(present(a)) then
- if(a(1) /= 5) call abort()
+ if(a(1) /= 5) STOP 2
end if
end subroutine sub1
end module test_module
call sub1()
x = 8
call sub1(x)
- if(x(1) /= 5) call abort()
+ if(x(1) /= 5) STOP 3
end program
character(21) :: chr (3)
chr = "ABCDEFGHIJKLMNOPQRSTU"
- if (len (test2 (10)) .ne. 21) call abort ()
- if (any (test2 (10) .ne. chr)) call abort ()
+ if (len (test2 (10)) .ne. 21) STOP 1
+ if (any (test2 (10) .ne. chr)) STOP 2
end program test
pure function f (x)
end interface
if(present(a)) then
write(temp,'(f16.10)')a(4.0d0)
- if (trim(temp) /= ' -0.6536436209') call abort
+ if (trim(temp) /= ' -0.6536436209') STOP 1
endif
end subroutine sub
end module m
USE f77_blas_generic
character(6) :: chr
call bl_copy(1, chr)
- if (chr /= "sdcopy") call abort ()
+ if (chr /= "sdcopy") STOP 1
call bl_copy(1.0, chr)
- if (chr /= "recopy") call abort ()
+ if (chr /= "recopy") STOP 2
end program main
USE f77_blas_generic
character(6) :: chr
chr = ""
- if (chr /= "recopy") call abort ()
+ if (chr /= "recopy") STOP 1
end subroutine i_am_ok
program main
character(6) :: chr
chr = ""
call bl_copy(1.0, chr)
- if (chr /= "recopy") call abort ()
+ if (chr /= "recopy") STOP 2
end program main
program gfcbug48
use module1, only : inverse
call sub ()
- if (inverse(1.0_4) /= 1.0_4) call abort ()
- if (inverse(1_4) /= 3_4) call abort ()
+ if (inverse(1.0_4) /= 1.0_4) STOP 1
+ if (inverse(1_4) /= 3_4) STOP 2
contains
subroutine sub ()
use module2, only : inverse
- if (inverse(1.0_4) /= 2.0_4) call abort ()
- if (inverse(1_4) /= 3_4) call abort ()
+ if (inverse(1.0_4) /= 2.0_4) STOP 3
+ if (inverse(1_4) /= 3_4) STOP 4
end subroutine sub
end program gfcbug48
E%I=4
CALL set(E,(E))
-IF (D%I.NE.4) call abort ()
-IF (4.NE.E%I) call abort ()
+IF (D%I.NE.4) STOP 1
+IF (4.NE.E%I) STOP 2
END
char_arb(1)= "Hello"
char_arb(2)= "World"
str_ara = char_arb
- if (any (str_ara(1)%chars(1:5) .ne. char_elm(1:5))) call abort
- if (any (str_ara(2)%chars(1:5) .ne. char_elm(6:10))) call abort
+ if (any (str_ara(1)%chars(1:5) .ne. char_elm(1:5))) STOP 1
+ if (any (str_ara(2)%chars(1:5) .ne. char_elm(6:10))) STOP 2
END PROGRAM VST_2
! { dg-do run }
-! { dg-options "-std=f2008 -fall-intrinsics" }
+! { dg-options "-std=f2008 " }
! PR fortran/34162
! Internal procedures as actual arguments (like restricted closures).
INTEGER :: a
a = 42
- IF (callIt (myA) /= 42) CALL abort ()
+ IF (callIt (myA) /= 42) STOP 1
CALL callSub (incA)
- IF (a /= 43) CALL abort ()
+ IF (a /= 43) STOP 2
CONTAINS
! { dg-do run }
-! { dg-options "-std=f2008 -fall-intrinsics" }
+! { dg-options "-std=f2008 " }
! PR fortran/34162
! Internal procedures as actual arguments (like restricted closures).
PROCEDURE(returnValue), OPTIONAL :: previous, current
IF (PRESENT (current)) THEN
- IF (current () /= level - 1) CALL abort ()
+ IF (current () /= level - 1) STOP 1
END IF
IF (PRESENT (previous)) THEN
- IF (previous () /= level - 2) CALL abort ()
+ IF (previous () /= level - 2) STOP 2
END IF
IF (level == 1) THEN
first => myLevel
END IF
- IF (first () /= 1) CALL abort ()
+ IF (first () /= 1) STOP 3
IF (level == 10) RETURN
integer(c_int), intent(inout) :: arg
integer(c_int), intent(in) :: res
call a(arg)
- if(arg /= res) call abort()
+ if(arg /= res) STOP 1
end subroutine test_sub
subroutine test_func(a, arg, res)
interface
end interface
integer(c_int), intent(in) :: arg
integer(c_int), intent(in) :: res
- if(a(arg) /= res) call abort()
+ if(a(arg) /= res) STOP 2
end subroutine test_func
end module test_mod
i1 = (/ -1, 1, -3 /)
call sub_i1(i1(1:3:2))
- if (any(i1 /= (/ 3, 1, 2 /))) call abort
+ if (any(i1 /= (/ 3, 1, 2 /))) STOP 1
i2 = (/ -1, 1, -3 /)
call sub_i2(i2(1:3:2))
- if (any(i2 /= (/ 3, 1, 2 /))) call abort
+ if (any(i2 /= (/ 3, 1, 2 /))) STOP 2
i4 = (/ -1, 1, -3 /)
call sub_i4(i4(1:3:2))
- if (any(i4 /= (/ 3, 1, 2 /))) call abort
+ if (any(i4 /= (/ 3, 1, 2 /))) STOP 3
i8 = (/ -1, 1, -3 /)
call sub_i8(i8(1:3:2))
- if (any(i8 /= (/ 3, 1, 2 /))) call abort
+ if (any(i8 /= (/ 3, 1, 2 /))) STOP 4
r4 = (/ -1.0, 1.0, -3.0 /)
call sub_r4(r4(1:3:2))
- if (any(r4 /= (/ 3.0, 1.0, 2.0/))) call abort
+ if (any(r4 /= (/ 3.0, 1.0, 2.0/))) STOP 5
r8 = (/ -1.0_8, 1.0_8, -3.0_8 /)
call sub_r8(r8(1:3:2))
- if (any(r8 /= (/ 3.0_8, 1.0_8, 2.0_8/))) call abort
+ if (any(r8 /= (/ 3.0_8, 1.0_8, 2.0_8/))) STOP 6
c4 = (/ (-1.0_4, 0._4), (1.0_4, 0._4), (-3.0_4, 0._4) /)
call sub_c4(c4(1:3:2))
- if (any(real(c4) /= (/ 3.0_4, 1.0_4, 2.0_4/))) call abort
- if (any(aimag(c4) /= 0._4)) call abort
+ if (any(real(c4) /= (/ 3.0_4, 1.0_4, 2.0_4/))) STOP 7
+ if (any(aimag(c4) /= 0._4)) STOP 8
c8 = (/ (-1.0_4, 0._4), (1.0_4, 0._4), (-3.0_4, 0._4) /)
call sub_c8(c8(1:3:2))
- if (any(real(c8) /= (/ 3.0_4, 1.0_4, 2.0_4/))) call abort
- if (any(aimag(c8) /= 0._4)) call abort
+ if (any(real(c8) /= (/ 3.0_4, 1.0_4, 2.0_4/))) STOP 9
+ if (any(aimag(c8) /= 0._4)) STOP 10
d_i8%v = (/ -1, 1, -3 /)
call sub_d_i8(d_i8(1:3:2))
- if (any(d_i8%v /= (/ 3, 1, 2 /))) call abort
+ if (any(d_i8%v /= (/ 3, 1, 2 /))) STOP 11
end program main
subroutine sub_i1(i)
integer(kind=1), dimension(2) :: i
- if (i(1) /= -1) call abort
- if (i(2) /= -3) call abort
+ if (i(1) /= -1) STOP 12
+ if (i(2) /= -3) STOP 13
i(1) = 3
i(2) = 2
end subroutine sub_i1
subroutine sub_i2(i)
integer(kind=2), dimension(2) :: i
- if (i(1) /= -1) call abort
- if (i(2) /= -3) call abort
+ if (i(1) /= -1) STOP 14
+ if (i(2) /= -3) STOP 15
i(1) = 3
i(2) = 2
end subroutine sub_i2
subroutine sub_i4(i)
integer(kind=4), dimension(2) :: i
- if (i(1) /= -1) call abort
- if (i(2) /= -3) call abort
+ if (i(1) /= -1) STOP 16
+ if (i(2) /= -3) STOP 17
i(1) = 3
i(2) = 2
end subroutine sub_i4
subroutine sub_i8(i)
integer(kind=8), dimension(2) :: i
- if (i(1) /= -1) call abort
- if (i(2) /= -3) call abort
+ if (i(1) /= -1) STOP 18
+ if (i(2) /= -3) STOP 19
i(1) = 3
i(2) = 2
end subroutine sub_i8
subroutine sub_r4(r)
real(kind=4), dimension(2) :: r
- if (r(1) /= -1.) call abort
- if (r(2) /= -3.) call abort
+ if (r(1) /= -1.) STOP 20
+ if (r(2) /= -3.) STOP 21
r(1) = 3.
r(2) = 2.
end subroutine sub_r4
subroutine sub_r8(r)
real(kind=8), dimension(2) :: r
- if (r(1) /= -1._8) call abort
- if (r(2) /= -3._8) call abort
+ if (r(1) /= -1._8) STOP 22
+ if (r(2) /= -3._8) STOP 23
r(1) = 3._8
r(2) = 2._8
end subroutine sub_r8
subroutine sub_c8(r)
implicit none
complex(kind=8), dimension(2) :: r
- if (r(1) /= (-1._8,0._8)) call abort
- if (r(2) /= (-3._8,0._8)) call abort
+ if (r(1) /= (-1._8,0._8)) STOP 24
+ if (r(2) /= (-3._8,0._8)) STOP 25
r(1) = 3._8
r(2) = 2._8
end subroutine sub_c8
subroutine sub_c4(r)
implicit none
complex(kind=4), dimension(2) :: r
- if (r(1) /= (-1._4,0._4)) call abort
- if (r(2) /= (-3._4,0._4)) call abort
+ if (r(1) /= (-1._4,0._4)) STOP 26
+ if (r(2) /= (-3._4,0._4)) STOP 27
r(1) = 3._4
r(2) = 2._4
end subroutine sub_c4
integer(kind=8) :: v
end type i8_t
type(i8_t), dimension(2) :: i
- if (i(1)%v /= -1) call abort
- if (i(2)%v /= -3) call abort
+ if (i(1)%v /= -1) STOP 28
+ if (i(2)%v /= -3) STOP 29
i(1)%v = 3
i(2)%v = 2
end subroutine sub_d_i8
subroutine get_rule (c)
type(t_set) :: c (:)
ru(1)%c(:)%use = 99
- if (any (c(:)%use .ne. 42)) call abort
+ if (any (c(:)%use .ne. 42)) STOP 1
call set_set_v (ru(1)%c, c)
- if (any (c(:)%use .ne. 99)) call abort
+ if (any (c(:)%use .ne. 99)) STOP 2
contains
subroutine set_set_v (src, dst)
type(t_set), intent(in) :: src(1)
type(t_set), intent(inout) :: dst(1)
- if (any (src%use .ne. 99)) call abort
- if (any (dst%use .ne. 42)) call abort
+ if (any (src%use .ne. 99)) STOP 3
+ if (any (dst%use .ne. 42)) STOP 4
dst = src
end subroutine set_set_v
end subroutine get_rule
subroutine bar(x)
integer :: x(1:*)
print *, x(1:3)
- if (any (x(1:3) /= [1,3,5])) call abort ()
+ if (any (x(1:3) /= [1,3,5])) STOP 1
end subroutine bar
! { dg-final { scan-tree-dump-times "unpack" 4 "original" } }
subroutine bar(x)
type(t) :: x(*)
print *,x(1:4)%i
- if (any (x(1:4)%i /= [1, 9, 3, 11])) call abort()
+ if (any (x(1:4)%i /= [1, 9, 3, 11])) STOP 1
end subroutine
end
subroutine s2(k)
type(particle) :: k(1:2)
print *,k(:)%ID
- if (any (k(1:2)%ID /= [1, 1])) call abort()
+ if (any (k(1:2)%ID /= [1, 1])) STOP 1
end subroutine
end
n = 5
a = 0
call foo1(a,n)
- if (any(a /= b)) call abort
+ if (any(a /= b)) STOP 1
n = 5
a = 0
call foo2(a,n)
- if (any(a /= b)) call abort
+ if (any(a /= b)) STOP 2
n = 5
a = 0
call foo3(a,n)
- if (any(a /= b)) call abort
+ if (any(a /= b)) STOP 3
n = 5
a = 0
call foo4(a,n)
- if (any(a /= 1)) call abort
+ if (any(a /= 1)) STOP 4
end program main
rk = (/ -1.0_k, 1.0_k, -3.0_k /)
call sub_rk(rk(1:3:2))
- if (any(rk /= (/ 3.0_k, 1.0_k, 2.0_k/))) call abort
+ if (any(rk /= (/ 3.0_k, 1.0_k, 2.0_k/))) STOP 1
ck = (/ (-1.0_k, 0._k), (1.0_k, 0._k), (-3.0_k, 0._k) /)
call sub_ck(ck(1:3:2))
- if (any(real(ck) /= (/ 3.0_k, 1.0_k, 2.0_k/))) call abort
- if (any(aimag(ck) /= 0._k)) call abort
+ if (any(real(ck) /= (/ 3.0_k, 1.0_k, 2.0_k/))) STOP 2
+ if (any(aimag(ck) /= 0._k)) STOP 3
end program main
implicit none
integer,parameter :: k = selected_real_kind (precision (0.0_8) + 1)
real(kind=k), dimension(2) :: r
- if (r(1) /= -1._k) call abort
- if (r(2) /= -3._k) call abort
+ if (r(1) /= -1._k) STOP 4
+ if (r(2) /= -3._k) STOP 5
r(1) = 3._k
r(2) = 2._k
end subroutine sub_rk
implicit none
integer,parameter :: k = selected_real_kind (precision (0.0_8) + 1)
complex(kind=k), dimension(2) :: r
- if (r(1) /= (-1._k,0._k)) call abort
- if (r(2) /= (-3._k,0._k)) call abort
+ if (r(1) /= (-1._k,0._k)) STOP 6
+ if (r(2) /= (-3._k,0._k)) STOP 7
r(1) = 3._k
r(2) = 2._k
end subroutine sub_ck
ik = (/ -1, 1, -3 /)
call sub_ik(ik(1:3:2))
- if (any(ik /= (/ 3, 1, 2 /))) call abort
+ if (any(ik /= (/ 3, 1, 2 /))) STOP 1
end program main
subroutine sub_ik(i)
integer,parameter :: k = selected_int_kind (range (0_8) + 1)
integer(kind=k), dimension(2) :: i
- if (i(1) /= -1) call abort
- if (i(2) /= -3) call abort
+ if (i(1) /= -1) STOP 2
+ if (i(2) /= -3) STOP 3
i(1) = 3
i(2) = 2
end subroutine sub_ik
SUBROUTINE S1(a)
REAL(dp), DIMENSION(45), INTENT(OUT), &
OPTIONAL :: a
- if (present(a)) call abort()
+ if (present(a)) STOP 1
END SUBROUTINE S1
SUBROUTINE S2(a)
REAL(dp), DIMENSION(:, :), INTENT(OUT), &
do j = 1, i
subsum = subsum + data(j)
end do
- if (abs(subsum - chksum) > 1e-6) call abort
+ if (abs(subsum - chksum) > 1e-6) STOP 1
END SUBROUTINE S1
END MODULE
SUBROUTINE S2(I)
INTEGER :: I(4)
!write(6,*) I
- IF (ANY(I.NE.(/3,5,7,9/))) CALL ABORT()
+ IF (ANY(I.NE.(/3,5,7,9/))) STOP 1
END SUBROUTINE S2
MODULE M1
write (unit=c(5:1:-2),fmt="(A)") '5','3', '1'
write (unit=c(2:4:2),fmt="(A)") '2', '4'
read (c(5:1:-1),fmt="(I2)") (n(i), i=5,1,-1)
- if (any(n /= (/ (i,i=1,5) /))) call abort
+ if (any(n /= (/ (i,i=1,5) /))) STOP 1
end program main
character(len=2), dimension(n1,n2,n3):: c
write (unit=c(:,n2:1:-1,:),fmt="(I2)") (i,i=1,n1*n2*n3)
line = transfer(c,mold=line)
- if (line /=" 5 6 3 4 1 21112 910 7 8171815161314232421221920293027282526") call abort
+ if (line /=" 5 6 3 4 1 21112 910 7 8171815161314232421221920293027282526") STOP 1
end program main
buffer = 4_"123"
read(buffer,*) i
write (a,'(I3)') i
- if (a /= 4_"123") call abort
+ if (a /= 4_"123") STOP 1
end program main
external proc
real proc, z
if ((proc(z) .ne. abs (z)) .and.
- & (proc(z) .ne. alog10 (abs(z)))) call abort ()
+ & (proc(z) .ne. alog10 (abs(z)))) STOP 1
return
end
! print *, len(SUB(j + 2)//"a"), ans ! This still fails (no charlen).
print *, len(bar(2)), ans
- IF(.NOT.ASSOCIATED(F1(10))) CALL ABORT()
+ IF(.NOT.ASSOCIATED(F1(10))) STOP 1
deallocate (tar)
CONTAINS
external proc
integer proc
character*(*) chr
- if (proc (chr) .ne. 6) call abort ()
+ if (proc (chr) .ne. 6) STOP 1
end subroutine sub
implicit none
b = eoshift (a,(/1/), boundary=c(1,:)) ! { dg-error "invalid shape in dimension" }
- if (any(eoshift(foo,dim=1,shift=1,boundary=(/42.0,-7.0/))/= 0)) call abort() ! { dg-error "must be a scalar" }
- if (any(eoshift(tempn(2:1),dim=1,shift=1,boundary=(/42.0,-7.0/))/= 0)) call abort() ! { dg-error "must be a scalar" }
+ if (any(eoshift(foo,dim=1,shift=1,boundary=(/42.0,-7.0/))/= 0)) STOP 1 ! { dg-error "must be a scalar" }
+ if (any(eoshift(tempn(2:1),dim=1,shift=1,boundary=(/42.0,-7.0/))/= 0)) STOP 2 ! { dg-error "must be a scalar" }
- if (any(unpack(tempv,tempv(1:0)/=0,tempv) /= -47)) call abort() ! { dg-error "must have identical shape" }
- if (any(unpack(tempv(5:4),tempv(1:0)/=0,tempv) /= -47)) call abort() ! { dg-error "must have identical shape" }
+ if (any(unpack(tempv,tempv(1:0)/=0,tempv) /= -47)) STOP 3 ! { dg-error "must have identical shape" }
+ if (any(unpack(tempv(5:4),tempv(1:0)/=0,tempv) /= -47)) STOP 4 ! { dg-error "must have identical shape" }
end program main
INTEGER :: IDA(10) = [(i, i = 97,106)]
CDA1 = CHAR ( IDA, KIND("A" )) !failed
- if (transfer (CDA1, CDA10) /= "abcdefghij") call abort ()
+ if (transfer (CDA1, CDA10) /= "abcdefghij") STOP 1
CDA1 = CHAR ( IDA ) !worked
- if (transfer (CDA1, CDA10) /= "abcdefghij") call abort ()
+ if (transfer (CDA1, CDA10) /= "abcdefghij") STOP 2
END
lda = (/ (i/2*2 .eq. I, i=1,9) /)
LDA = ALL ( IDA .NE. -1000, 1)
- if (.not. all(lda)) call abort
- if (.not. all(ida .ne. -1000)) call abort
+ if (.not. all(lda)) STOP 1
+ if (.not. all(ida .ne. -1000)) STOP 2
lda = (/ (i/2*2 .eq. I, i=1,9) /)
LDA = any ( IDA .NE. -1000, 1)
print *, lda !expect FALSE
- if (any(lda)) call abort
+ if (any(lda)) STOP 3
print *, any(ida .ne. -1000) !expect FALSE
- if (any(ida .ne. -1000)) call abort
+ if (any(ida .ne. -1000)) STOP 4
iii = 137
iii = count ( IDA .NE. -1000, 1)
- if (any(iii /= 0)) call abort
- if (count(ida .ne. -1000) /= 0) call abort
+ if (any(iii /= 0)) STOP 5
+ if (count(ida .ne. -1000) /= 0) STOP 6
END SUBROUTINE
integer, dimension(nf0,9) :: ida
res = (/ (-i, i=1,9) /)
res = product (ida, 1)
- if (any(res /= 1)) call abort
+ if (any(res /= 1)) STOP 7
end subroutine foo
ma = .false.
a = reshape((/ 1_1, 2_1, 3_1, 4_1/), shape(a))
b = reshape((/ 1_2, 2_2, 3_2, 4_2/), shape(b))
- if (any(sum(a,dim=2) /= (/ 4, 6 /))) call abort
- if (any(sum(b,dim=2) /= (/ 4, 6 /))) call abort
- if (any(product(a,dim=2) /= (/ 3, 8 /))) call abort
- if (any(product(b,dim=2) /= (/ 3, 8 /))) call abort
- if (any(matmul(a,a) /= reshape ( (/ 7, 10, 15, 22 /), shape(a)))) call abort
- if (any(matmul(b,b) /= reshape ( (/ 7, 10, 15, 22 /), shape(b)))) call abort
- if (any(maxval(a,dim=2,mask=ma) /= -128)) call abort
- if (any(maxval(b,dim=2,mask=ma) /= -32768)) call abort
+ if (any(sum(a,dim=2) /= (/ 4, 6 /))) STOP 1
+ if (any(sum(b,dim=2) /= (/ 4, 6 /))) STOP 2
+ if (any(product(a,dim=2) /= (/ 3, 8 /))) STOP 3
+ if (any(product(b,dim=2) /= (/ 3, 8 /))) STOP 4
+ if (any(matmul(a,a) /= reshape ( (/ 7, 10, 15, 22 /), shape(a)))) STOP 5
+ if (any(matmul(b,b) /= reshape ( (/ 7, 10, 15, 22 /), shape(b)))) STOP 6
+ if (any(maxval(a,dim=2,mask=ma) /= -128)) STOP 7
+ if (any(maxval(b,dim=2,mask=ma) /= -32768)) STOP 8
end program main
if (modulo_result(i) /= floor_result(i) ) then
! print "(A,4F5.0)" ,"real case failed: ", &
! ar(i),br(i), modulo_result(i), floor_result(i)
- call abort()
+ STOP 1
end if
if (imodulo_result(i) /= ifloor_result(i)) then
! print "(A,4I5)", "int case failed: ", &
! ai(i), bi(i), imodulo_result(i), ifloor_result(i)
- call abort ()
+ STOP 2
end if
end do
end program main
& -4_1, 5_1/), shape(i1))
d_ri1 = pack(d_i1,d_i1%v>0,d_vi1)
if (any(d_ri1%v /= (/1_1, 2_1, 3_1, 4_1, 5_1, 16_1, 17_1, 18_1, 19_1/))) &
- & call abort
+ & STOP 1
d_vi4%v = (/(i+10,i=1,9)/)
d_i4%v = reshape((/1_4, -1_4, 2_4, -2_4, 3_4, -3_4, 4_4, &
& -4_4, 5_4/), shape(d_i4))
d_ri4 = pack(d_i4,d_i4%v>0,d_vi4)
if (any(d_ri4%v /= (/1_4, 2_4, 3_4, 4_4, 5_4, 16_4, 17_4, 18_4, 19_4/))) &
- & call abort
+ & STOP 2
vr4 = (/(i+10,i=1,9)/)
r4 = reshape((/1.0_4, -3.0_4, 2.1_4, -4.21_4, 1.2_4, 0.98_4, -1.2_4, &
& -7.1_4, -9.9_4, 0.3_4 /), shape(r4))
rr4 = pack(r4,r4>0,vr4)
if (any(rr4 /= (/ 1.0_4, 2.1_4, 1.2_4, 0.98_4, 15._4, 16._4, 17._4, &
- & 18._4, 19._4 /))) call abort
+ & 18._4, 19._4 /))) STOP 3
vr8 = (/(i+10,i=1,9)/)
r8 = reshape((/1.0_8, -3.0_8, 2.1_8, -4.21_8, 1.2_8, 0.98_8, -1.2_8, &
& -7.1_8, -9.9_8, 0.3_8 /), shape(r8))
rr8 = pack(r8,r8>0,vr8)
if (any(rr8 /= (/ 1.0_8, 2.1_8, 1.2_8, 0.98_8, 15._8, 16._8, 17._8, &
- & 18._8, 19._8 /))) call abort
+ & 18._8, 19._8 /))) STOP 4
vc4 = (/(i+10,i=1,9)/)
c4 = reshape((/1.0_4, -3.0_4, 2.1_4, -4.21_4, 1.2_4, 0.98_4, -1.2_4, &
& -7.1_4, -9.9_4, 0.3_4 /), shape(c4))
rc4 = pack(c4,real(c4)>0,vc4)
if (any(real(rc4) /= (/ 1.0_4, 2.1_4, 1.2_4, 0.98_4, 15._4, 16._4, 17._4, &
- & 18._4, 19._4 /))) call abort
- if (any(aimag(rc4) /= 0)) call abort
+ & 18._4, 19._4 /))) STOP 5
+ if (any(aimag(rc4) /= 0)) STOP 6
vc8 = (/(i+10,i=1,9)/)
c8 = reshape((/1.0_4, -3.0_4, 2.1_4, -4.21_4, 1.2_4, 0.98_4, -1.2_4, &
& -7.1_4, -9.9_4, 0.3_4 /), shape(c8))
rc8 = pack(c8,real(c8)>0,vc8)
if (any(real(rc8) /= (/ 1.0_4, 2.1_4, 1.2_4, 0.98_4, 15._4, 16._4, 17._4, &
- & 18._4, 19._4 /))) call abort
- if (any(aimag(rc8) /= 0)) call abort
+ & 18._4, 19._4 /))) STOP 7
+ if (any(aimag(rc8) /= 0)) STOP 8
vi1 = (/(i+10,i=1,9)/)
i1 = reshape((/1_1, -1_1, 2_1, -2_1, 3_1, -3_1, 4_1, -4_1, 5_1/), shape(i1))
ri1 = pack(i1,i1>0,vi1)
if (any(ri1 /= (/1_1, 2_1, 3_1, 4_1, 5_1, 16_1, 17_1, 18_1, 19_1/))) &
- & call abort
+ & STOP 9
vi2 = (/(i+10,i=1,9)/)
i2 = reshape((/1_2, -1_2, 2_2, -2_2, 3_2, -3_2, 4_2, -4_2, 5_2/), shape(i2))
ri2 = pack(i2,i2>0,vi2)
if (any(ri2 /= (/1_2, 2_2, 3_2, 4_2, 5_2, 16_2, 17_2, 18_2, 19_2/))) &
- & call abort
+ & STOP 10
vi4 = (/(i+10,i=1,9)/)
i4 = reshape((/1_4, -1_4, 2_4, -2_4, 3_4, -3_4, 4_4, -4_4, 5_4/), shape(i4))
ri4 = pack(i4,i4>0,vi4)
if (any(ri4 /= (/1_4, 2_4, 3_4, 4_4, 5_4, 16_4, 17_4, 18_4, 19_4/))) &
- & call abort
+ & STOP 11
vi8 = (/(i+10,i=1,9)/)
i8 = reshape((/1_8, -1_8, 2_8, -2_8, 3_8, -3_8, 4_8, -4_8, 5_8/), shape(i8))
ri8 = pack(i8,i8>0,vi8)
if (any(ri8 /= (/1_8, 2_8, 3_8, 4_8, 5_8, 16_8, 17_8, 18_8, 19_8/))) &
- & call abort
+ & STOP 12
end program main
& -7.1_k, -9.9_k, 0.3_k /), shape(rk))
rrk = pack(rk,rk>0,vrk)
if (any(rrk /= (/ 1.0_k, 2.1_k, 1.2_k, 0.98_k, 15._k, 16._k, 17._k, &
- & 18._k, 19._k /))) call abort
+ & 18._k, 19._k /))) STOP 1
vck = (/(i+10,i=1,9)/)
ck = reshape((/1.0_k, -3.0_k, 2.1_k, -4.21_k, 1.2_k, 0.98_k, -1.2_k, &
& -7.1_k, -9.9_k, 0.3_k /), shape(ck))
rck = pack(ck,real(ck)>0,vck)
if (any(real(rck) /= (/ 1.0_k, 2.1_k, 1.2_k, 0.98_k, 15._k, 16._k, 17._k, &
- & 18._k, 19._k /))) call abort
- if (any(aimag(rck) /= 0)) call abort
+ & 18._k, 19._k /))) STOP 2
+ if (any(aimag(rck) /= 0)) STOP 3
end program main
ik = reshape((/1_k, -1_k, 2_k, -2_k, 3_k, -3_k, 4_k, -4_k, 5_k/), shape(ik))
rik = pack(ik,ik>0,vik)
if (any(rik /= (/1_k, 2_k, 3_k, 4_k, 5_k, 16_k, 17_k, 18_k, 19_k/))) &
- & call abort
+ & STOP 1
end program main
type(container_t), dimension(1) :: a1, a2
a2(1)%entry = 1
a1 = pack (a2, mask = [.true.])
-if (a1(1)%entry/=1) call abort()
+if (a1(1)%entry/=1) STOP 1
end
ida = -3
IDA(NF1:NF2,NF1:NF3) = PRODUCT(IDA1,NF2, NF1 .LT. 0) !fails
- if (any(ida /= 1)) call abort
+ if (any(ida /= 1)) STOP 1
ida = -3
IDA(NF1:NF2,NF1:NF3) = PRODUCT(IDA1,NF2, .false. ) !fails
- if (any(ida /= 1)) call abort
+ if (any(ida /= 1)) STOP 2
ida = -3
IDA(NF1:NF2,NF1:NF3) = PRODUCT(IDA1,NF2, ida1 .eq. 137 ) !works
- if (any(ida /= 1)) call abort
+ if (any(ida /= 1)) STOP 3
END SUBROUTINE
program sign1
integer :: i
i = 1
- if (sign(foo(i), 1) /= 1) call abort
+ if (sign(foo(i), 1) /= 1) STOP 1
i = 1
- if (sign(foo(i), -1) /= -1) call abort
+ if (sign(foo(i), -1) /= -1) STOP 2
contains
integer function foo(i)
integer :: i
integer :: i = 1
i1 = huge(0_1) ; j1 = -huge(0_1)
- if (sign(i1, j1) /= j1) call abort()
- if (sign(j1, i1) /= i1) call abort()
- if (sign(i1,one1) /= i1 .or. sign(j1,one1) /= i1) call abort()
- if (sign(i1,mone1) /= j1 .or. sign(j1,mone1) /= j1) call abort()
+ if (sign(i1, j1) /= j1) STOP 1
+ if (sign(j1, i1) /= i1) STOP 2
+ if (sign(i1,one1) /= i1 .or. sign(j1,one1) /= i1) STOP 3
+ if (sign(i1,mone1) /= j1 .or. sign(j1,mone1) /= j1) STOP 4
i2 = huge(0_2) ; j2 = -huge(0_2)
- if (sign(i2, j2) /= j2) call abort()
- if (sign(j2, i2) /= i2) call abort()
- if (sign(i2,one2) /= i2 .or. sign(j2,one2) /= i2) call abort()
- if (sign(i2,mone2) /= j2 .or. sign(j2,mone2) /= j2) call abort()
+ if (sign(i2, j2) /= j2) STOP 5
+ if (sign(j2, i2) /= i2) STOP 6
+ if (sign(i2,one2) /= i2 .or. sign(j2,one2) /= i2) STOP 7
+ if (sign(i2,mone2) /= j2 .or. sign(j2,mone2) /= j2) STOP 8
i4 = huge(0_4) ; j4 = -huge(0_4)
- if (sign(i4, j4) /= j4) call abort()
- if (sign(j4, i4) /= i4) call abort()
- if (sign(i4,one4) /= i4 .or. sign(j4,one4) /= i4) call abort()
- if (sign(i4,mone4) /= j4 .or. sign(j4,mone4) /= j4) call abort()
+ if (sign(i4, j4) /= j4) STOP 9
+ if (sign(j4, i4) /= i4) STOP 10
+ if (sign(i4,one4) /= i4 .or. sign(j4,one4) /= i4) STOP 11
+ if (sign(i4,mone4) /= j4 .or. sign(j4,mone4) /= j4) STOP 12
i8 = huge(0_8) ; j8 = -huge(0_8)
- if (sign(i8, j8) /= j8) call abort()
- if (sign(j8, i8) /= i8) call abort()
- if (sign(i8,one8) /= i8 .or. sign(j8,one8) /= i8) call abort()
- if (sign(i8,mone8) /= j8 .or. sign(j8,mone8) /= j8) call abort()
+ if (sign(i8, j8) /= j8) STOP 13
+ if (sign(j8, i8) /= i8) STOP 14
+ if (sign(i8,one8) /= i8 .or. sign(j8,one8) /= i8) STOP 15
+ if (sign(i8,mone8) /= j8 .or. sign(j8,mone8) /= j8) STOP 16
- if (sign(foo(i), 1) /= 1) call abort
- if (sign(foo(i), -1) /= -2) call abort
- if (sign(42, foo(i)) /= 42) call abort
- if (sign(42, -foo(i)) /= -42) call abort
- if (i /= 5) call abort
+ if (sign(foo(i), 1) /= 1) STOP 1
+ if (sign(foo(i), -1) /= -2) STOP 2
+ if (sign(42, foo(i)) /= 42) STOP 3
+ if (sign(42, -foo(i)) /= -42) STOP 4
+ if (i /= 5) STOP 5
- if (sign(bar(), 1) /= 1) call abort
- if (sign(bar(), -1) /= -2) call abort
- if (sign(17, bar()) /= 17) call abort
- if (sign(17, -bar()) /= -17) call abort
- if (bar() /= 5) call abort
+ if (sign(bar(), 1) /= 1) STOP 6
+ if (sign(bar(), -1) /= -2) STOP 7
+ if (sign(17, bar()) /= 17) STOP 8
+ if (sign(17, -bar()) /= -17) STOP 9
+ if (bar() /= 5) STOP 10
contains
b_1 = spread (a_1, 1, 2)
if (any (b_1 .ne. reshape ((/1_1, 1_1, 2_1, 2_1, 3_1, 3_1, 4_1, 4_1, 5_1, 5_1, 6_1, 6_1/), &
(/2, 2, 3/)))) &
- call abort
+ STOP 1
line1 = ' '
write(line1, 9000) b_1
line2 = ' '
write(line2, 9000) spread (a_1, 1, 2)
- if (line1 /= line2) call abort
+ if (line1 /= line2) STOP 2
line3 = ' '
write(line3, 9000) spread (a_1, 1, 2) + 0_1
- if (line1 /= line3) call abort
+ if (line1 /= line3) STOP 3
i_1 = spread(1_1,1,10)
- if (any(i_1 /= 1_1)) call abort
+ if (any(i_1 /= 1_1)) STOP 4
a_2 = reshape ((/1_2, 2_2, 3_2, 4_2, 5_2, 6_2/), (/2, 3/))
b_2 = spread (a_2, 1, 2)
if (any (b_2 .ne. reshape ((/1_2, 1_2, 2_2, 2_2, 3_2, 3_2, 4_2, 4_2, 5_2, 5_2, 6_2, 6_2/), &
(/2, 2, 3/)))) &
- call abort
+ STOP 5
line1 = ' '
write(line1, 9000) b_2
line2 = ' '
write(line2, 9000) spread (a_2, 1, 2)
- if (line1 /= line2) call abort
+ if (line1 /= line2) STOP 6
line3 = ' '
write(line3, 9000) spread (a_2, 1, 2) + 0_2
- if (line1 /= line3) call abort
+ if (line1 /= line3) STOP 7
i_2 = spread(1_2,1,10)
- if (any(i_2 /= 1_2)) call abort
+ if (any(i_2 /= 1_2)) STOP 8
a_4 = reshape ((/1_4, 2_4, 3_4, 4_4, 5_4, 6_4/), (/2, 3/))
b_4 = spread (a_4, 1, 2)
if (any (b_4 .ne. reshape ((/1_4, 1_4, 2_4, 2_4, 3_4, 3_4, 4_4, 4_4, 5_4, 5_4, 6_4, 6_4/), &
(/2, 2, 3/)))) &
- call abort
+ STOP 9
line1 = ' '
write(line1, 9000) b_4
line2 = ' '
write(line2, 9000) spread (a_4, 1, 2)
- if (line1 /= line2) call abort
+ if (line1 /= line2) STOP 10
line3 = ' '
write(line3, 9000) spread (a_4, 1, 2) + 0_4
- if (line1 /= line3) call abort
+ if (line1 /= line3) STOP 11
i_4 = spread(1_4,1,10)
- if (any(i_4 /= 1_4)) call abort
+ if (any(i_4 /= 1_4)) STOP 12
a_8 = reshape ((/1_8, 2_8, 3_8, 4_8, 5_8, 6_8/), (/2, 3/))
b_8 = spread (a_8, 1, 2)
if (any (b_8 .ne. reshape ((/1_8, 1_8, 2_8, 2_8, 3_8, 3_8, 4_8, 4_8, 5_8, 5_8, 6_8, 6_8/), &
(/2, 2, 3/)))) &
- call abort
+ STOP 13
line1 = ' '
write(line1, 9000) b_8
line2 = ' '
write(line2, 9000) spread (a_8, 1, 2)
- if (line1 /= line2) call abort
+ if (line1 /= line2) STOP 14
line3 = ' '
write(line3, 9000) spread (a_8, 1, 2) + 0_8
- if (line1 /= line3) call abort
+ if (line1 /= line3) STOP 15
i_8 = spread(1_8,1,10)
- if (any(i_8 /= 1_8)) call abort
+ if (any(i_8 /= 1_8)) STOP 16
ar_4 = reshape ((/1._4, 2._4, 3._4, 4._4, 5._4, 6._4/), (/2, 3/))
br_4 = spread (ar_4, 1, 2)
if (any (br_4 .ne. reshape ((/1._4, 1._4, 2._4, 2._4, 3._4, 3._4, &
- & 4._4, 4._4, 5._4, 5._4, 6._4, 6._4/), (/2, 2, 3/)))) call abort
+ & 4._4, 4._4, 5._4, 5._4, 6._4, 6._4/), (/2, 2, 3/)))) STOP 17
line1 = ' '
write(line1, 9010) br_4
line2 = ' '
write(line2, 9010) spread (ar_4, 1, 2)
- if (line1 /= line2) call abort
+ if (line1 /= line2) STOP 18
line3 = ' '
write(line3, 9010) spread (ar_4, 1, 2) + 0._4
- if (line1 /= line3) call abort
+ if (line1 /= line3) STOP 19
r_4 = spread(1._4,1,10)
- if (any(r_4 /= 1._4)) call abort
+ if (any(r_4 /= 1._4)) STOP 20
ar_8 = reshape ((/1._8, 2._8, 3._8, 4._8, 5._8, 6._8/), (/2, 3/))
br_8 = spread (ar_8, 1, 2)
if (any (br_8 .ne. reshape ((/1._8, 1._8, 2._8, 2._8, 3._8, 3._8, &
- & 4._8, 4._8, 5._8, 5._8, 6._8, 6._8/), (/2, 2, 3/)))) call abort
+ & 4._8, 4._8, 5._8, 5._8, 6._8, 6._8/), (/2, 2, 3/)))) STOP 21
line1 = ' '
write(line1, 9010) br_8
line2 = ' '
write(line2, 9010) spread (ar_8, 1, 2)
- if (line1 /= line2) call abort
+ if (line1 /= line2) STOP 22
line3 = ' '
write(line3, 9010) spread (ar_8, 1, 2) + 0._8
- if (line1 /= line3) call abort
+ if (line1 /= line3) STOP 23
r_8 = spread(1._8,1,10)
- if (any(r_8 /= 1._8)) call abort
+ if (any(r_8 /= 1._8)) STOP 24
ac_4 = reshape ((/(1._4,-1._4), (2._4,-2._4), (3._4, -3._4), (4._4, -4._4), &
& (5._4,-5._4), (6._4,-6._4)/), (/2, 3/))
bc_4 = spread (ac_4, 1, 2)
if (any (real(bc_4) .ne. reshape ((/1._4, 1._4, 2._4, 2._4, 3._4, 3._4, &
- & 4._4, 4._4, 5._4, 5._4, 6._4, 6._4/), (/2, 2, 3/)))) call abort
+ & 4._4, 4._4, 5._4, 5._4, 6._4, 6._4/), (/2, 2, 3/)))) STOP 25
if (any (-aimag(bc_4) .ne. reshape ((/1._4, 1._4, 2._4, 2._4, 3._4, 3._4, &
- & 4._4, 4._4, 5._4, 5._4, 6._4, 6._4/), (/2, 2, 3/)))) call abort
+ & 4._4, 4._4, 5._4, 5._4, 6._4, 6._4/), (/2, 2, 3/)))) STOP 26
line1 = ' '
write(line1, 9020) bc_4
line2 = ' '
write(line2, 9020) spread (ac_4, 1, 2)
- if (line1 /= line2) call abort
+ if (line1 /= line2) STOP 27
line3 = ' '
write(line3, 9020) spread (ac_4, 1, 2) + 0._4
- if (line1 /= line3) call abort
+ if (line1 /= line3) STOP 28
c_4 = spread((1._4,-1._4),1,10)
- if (any(c_4 /= (1._4,-1._4))) call abort
+ if (any(c_4 /= (1._4,-1._4))) STOP 29
ac_8 = reshape ((/(1._8,-1._8), (2._8,-2._8), (3._8, -3._8), (4._8, -4._8), &
& (5._8,-5._8), (6._8,-6._8)/), (/2, 3/))
bc_8 = spread (ac_8, 1, 2)
if (any (real(bc_8) .ne. reshape ((/1._8, 1._8, 2._8, 2._8, 3._8, 3._8, &
- & 4._8, 4._8, 5._8, 5._8, 6._8, 6._8/), (/2, 2, 3/)))) call abort
+ & 4._8, 4._8, 5._8, 5._8, 6._8, 6._8/), (/2, 2, 3/)))) STOP 30
if (any (-aimag(bc_8) .ne. reshape ((/1._8, 1._8, 2._8, 2._8, 3._8, 3._8, &
- & 4._8, 4._8, 5._8, 5._8, 6._8, 6._8/), (/2, 2, 3/)))) call abort
+ & 4._8, 4._8, 5._8, 5._8, 6._8, 6._8/), (/2, 2, 3/)))) STOP 31
line1 = ' '
write(line1, 9020) bc_8
line2 = ' '
write(line2, 9020) spread (ac_8, 1, 2)
- if (line1 /= line2) call abort
+ if (line1 /= line2) STOP 32
line3 = ' '
write(line3, 9020) spread (ac_8, 1, 2) + 0._8
- if (line1 /= line3) call abort
+ if (line1 /= line3) STOP 33
c_8 = spread((1._8,-1._8),1,10)
- if (any(c_8 /= (1._8,-1._8))) call abort
+ if (any(c_8 /= (1._8,-1._8))) STOP 34
at_4%v = reshape ((/1_4, 2_4, 3_4, 4_4, 5_4, 6_4/), (/2, 3/))
bt_4 = spread (at_4, 1, 2)
if (any (bt_4%v .ne. reshape ((/1_4, 1_4, 2_4, 2_4, 3_4, 3_4, 4_4, &
& 4_4, 5_4, 5_4, 6_4, 6_4/), (/2, 2, 3/)))) &
- call abort
+ STOP 35
iv_4%v = 123_4
it_4 = spread(iv_4,1,10)
- if (any(it_4%v /= 123_4)) call abort
+ if (any(it_4%v /= 123_4)) STOP 36
9000 format(12I3)
ar_k = reshape ((/1._k, 2._k, 3._k, 4._k, 5._k, 6._k/), (/2, 3/))
br_k = spread (ar_k, 1, 2)
if (any (br_k .ne. reshape ((/1._k, 1._k, 2._k, 2._k, 3._k, 3._k, &
- & 4._k, 4._k, 5._k, 5._k, 6._k, 6._k/), (/2, 2, 3/)))) call abort
+ & 4._k, 4._k, 5._k, 5._k, 6._k, 6._k/), (/2, 2, 3/)))) STOP 1
line1 = ' '
write(line1, 9010) br_k
line2 = ' '
write(line2, 9010) spread (ar_k, 1, 2)
- if (line1 /= line2) call abort
+ if (line1 /= line2) STOP 2
line3 = ' '
write(line3, 9010) spread (ar_k, 1, 2) + 0._k
- if (line1 /= line3) call abort
+ if (line1 /= line3) STOP 3
r_k = spread(1._k,1,10)
- if (any(r_k /= 1._k)) call abort
+ if (any(r_k /= 1._k)) STOP 4
ac_k = reshape ((/(1._k,-1._k), (2._k,-2._k), (3._k, -3._k), (4._k, -4._k), &
& (5._k,-5._k), (6._k,-6._k)/), (/2, 3/))
bc_k = spread (ac_k, 1, 2)
if (any (real(bc_k) .ne. reshape ((/1._k, 1._k, 2._k, 2._k, 3._k, 3._k, &
- & 4._k, 4._k, 5._k, 5._k, 6._k, 6._k/), (/2, 2, 3/)))) call abort
+ & 4._k, 4._k, 5._k, 5._k, 6._k, 6._k/), (/2, 2, 3/)))) STOP 5
if (any (-aimag(bc_k) .ne. reshape ((/1._k, 1._k, 2._k, 2._k, 3._k, 3._k, &
- & 4._k, 4._k, 5._k, 5._k, 6._k, 6._k/), (/2, 2, 3/)))) call abort
+ & 4._k, 4._k, 5._k, 5._k, 6._k, 6._k/), (/2, 2, 3/)))) STOP 6
line1 = ' '
write(line1, 9020) bc_k
line2 = ' '
write(line2, 9020) spread (ac_k, 1, 2)
- if (line1 /= line2) call abort
+ if (line1 /= line2) STOP 7
line3 = ' '
write(line3, 9020) spread (ac_k, 1, 2) + 0._k
- if (line1 /= line3) call abort
+ if (line1 /= line3) STOP 8
c_k = spread((1._k,-1._k),1,10)
- if (any(c_k /= (1._k,-1._k))) call abort
+ if (any(c_k /= (1._k,-1._k))) STOP 9
9010 format(12F7.3)
9020 format(25F7.3)
b_k = spread (a_k, 1, 2)
if (any (b_k .ne. reshape ((/1_k, 1_k, 2_k, 2_k, 3_k, 3_k, 4_k, 4_k, 5_k, 5_k, 6_k, 6_k/), &
(/2, 2, 3/)))) &
- call abort
+ STOP 1
line1 = ' '
write(line1, 9000) b_k
line2 = ' '
write(line2, 9000) spread (a_k, 1, 2)
- if (line1 /= line2) call abort
+ if (line1 /= line2) STOP 2
line3 = ' '
write(line3, 9000) spread (a_k, 1, 2) + 0_k
- if (line1 /= line3) call abort
+ if (line1 /= line3) STOP 3
i_k = spread(1_k,1,10)
- if (any(i_k /= 1_k)) call abort
+ if (any(i_k /= 1_k)) STOP 4
9000 format(12I3)
a1 = reshape ((/1, 0, 0, 0, 1, 0, 0, 0, 1/), (/3, 3/));
b1 = unpack ((/2_1, 3_1, 4_1/), mask, a1)
if (any (b1 .ne. reshape ((/1, 2, 0, 3, 1, 0, 0, 0, 4/), (/3, 3/)))) &
- call abort
+ STOP 1
write (line1,'(10I4)') b1
write (line2,'(10I4)') unpack((/2_1, 3_1, 4_1/), mask, a1)
- if (line1 .ne. line2) call abort
+ if (line1 .ne. line2) STOP 2
b1 = -1
b1 = unpack ((/2_1, 3_1, 4_1/), mask, 0_1)
if (any (b1 .ne. reshape ((/0, 2, 0, 3, 0, 0, 0, 0, 4/), (/3, 3/)))) &
- call abort
+ STOP 3
a2 = reshape ((/1, 0, 0, 0, 1, 0, 0, 0, 1/), (/3, 3/));
b2 = unpack ((/2_2, 3_2, 4_2/), mask, a2)
if (any (b2 .ne. reshape ((/1, 2, 0, 3, 1, 0, 0, 0, 4/), (/3, 3/)))) &
- call abort
+ STOP 4
write (line1,'(10I4)') b2
write (line2,'(10I4)') unpack((/2_2, 3_2, 4_2/), mask, a2)
- if (line1 .ne. line2) call abort
+ if (line1 .ne. line2) STOP 5
b2 = -1
b2 = unpack ((/2_2, 3_2, 4_2/), mask, 0_2)
if (any (b2 .ne. reshape ((/0, 2, 0, 3, 0, 0, 0, 0, 4/), (/3, 3/)))) &
- call abort
+ STOP 6
a4 = reshape ((/1, 0, 0, 0, 1, 0, 0, 0, 1/), (/3, 3/));
b4 = unpack ((/2_4, 3_4, 4_4/), mask, a4)
if (any (b4 .ne. reshape ((/1, 2, 0, 3, 1, 0, 0, 0, 4/), (/3, 3/)))) &
- call abort
+ STOP 7
write (line1,'(10I4)') b4
write (line2,'(10I4)') unpack((/2_4, 3_4, 4_4/), mask, a4)
- if (line1 .ne. line2) call abort
+ if (line1 .ne. line2) STOP 8
b4 = -1
b4 = unpack ((/2_4, 3_4, 4_4/), mask, 0_4)
if (any (b4 .ne. reshape ((/0, 2, 0, 3, 0, 0, 0, 0, 4/), (/3, 3/)))) &
- call abort
+ STOP 9
a8 = reshape ((/1, 0, 0, 0, 1, 0, 0, 0, 1/), (/3, 3/));
b8 = unpack ((/2_8, 3_8, 4_8/), mask, a8)
if (any (b8 .ne. reshape ((/1, 2, 0, 3, 1, 0, 0, 0, 4/), (/3, 3/)))) &
- call abort
+ STOP 10
write (line1,'(10I4)') b8
write (line2,'(10I4)') unpack((/2_8, 3_8, 4_8/), mask, a8)
- if (line1 .ne. line2) call abort
+ if (line1 .ne. line2) STOP 11
b8 = -1
b8 = unpack ((/2_8, 3_8, 4_8/), mask, 0_8)
if (any (b8 .ne. reshape ((/0, 2, 0, 3, 0, 0, 0, 0, 4/), (/3, 3/)))) &
- call abort
+ STOP 12
ar4 = reshape ((/1._4, 0._4, 0._4, 0._4, 1._4, 0._4, 0._4, 0._4, 1._4/), &
(/3, 3/));
br4 = unpack ((/2._4, 3._4, 4._4/), mask, ar4)
if (any (br4 .ne. reshape ((/1._4, 2._4, 0._4, 3._4, 1._4, 0._4, &
0._4, 0._4, 4._4/), (/3, 3/)))) &
- call abort
+ STOP 13
write (line1,'(9F9.5)') br4
write (line2,'(9F9.5)') unpack((/2._4, 3._4, 4._4/), mask, ar4)
- if (line1 .ne. line2) call abort
+ if (line1 .ne. line2) STOP 14
br4 = -1._4
br4 = unpack ((/2._4, 3._4, 4._4/), mask, 0._4)
if (any (br4 .ne. reshape ((/0._4, 2._4, 0._4, 3._4, 0._4, 0._4, &
0._4, 0._4, 4._4/), (/3, 3/)))) &
- call abort
+ STOP 15
ar8 = reshape ((/1._8, 0._8, 0._8, 0._8, 1._8, 0._8, 0._8, 0._8, 1._8/), &
(/3, 3/));
br8 = unpack ((/2._8, 3._8, 4._8/), mask, ar8)
if (any (br8 .ne. reshape ((/1._8, 2._8, 0._8, 3._8, 1._8, 0._8, &
0._8, 0._8, 4._8/), (/3, 3/)))) &
- call abort
+ STOP 16
write (line1,'(9F9.5)') br8
write (line2,'(9F9.5)') unpack((/2._8, 3._8, 4._8/), mask, ar8)
- if (line1 .ne. line2) call abort
+ if (line1 .ne. line2) STOP 17
br8 = -1._8
br8 = unpack ((/2._8, 3._8, 4._8/), mask, 0._8)
if (any (br8 .ne. reshape ((/0._8, 2._8, 0._8, 3._8, 0._8, 0._8, &
0._8, 0._8, 4._8/), (/3, 3/)))) &
- call abort
+ STOP 18
ac4 = reshape ((/1._4, 0._4, 0._4, 0._4, 1._4, 0._4, 0._4, 0._4, 1._4/), &
(/3, 3/));
bc4 = unpack ((/(2._4, 0._4), (3._4, 0._4), (4._4, 0._4)/), mask, ac4)
if (any (real(bc4) .ne. reshape ((/1._4, 2._4, 0._4, 3._4, 1._4, 0._4, &
0._4, 0._4, 4._4/), (/3, 3/)))) &
- call abort
+ STOP 19
write (line1,'(18F9.5)') bc4
write (line2,'(18F9.5)') unpack((/(2._4, 0._4), (3._4, 0._4), (4._4,0._4)/), &
mask, ac4)
- if (line1 .ne. line2) call abort
+ if (line1 .ne. line2) STOP 20
ac8 = reshape ((/1._8, 0._8, 0._8, 0._8, 1._8, 0._8, 0._8, 0._8, 1._8/), &
(/3, 3/));
bc8 = unpack ((/(2._8, 0._8), (3._8, 0._8), (4._8, 0._8)/), mask, ac8)
if (any (real(bc8) .ne. reshape ((/1._8, 2._8, 0._8, 3._8, 1._8, 0._8, &
0._8, 0._8, 4._8/), (/3, 3/)))) &
- call abort
+ STOP 21
write (line1,'(18F9.5)') bc8
write (line2,'(18F9.5)') unpack((/(2._8, 0._8), (3._8, 0._8), (4._8,0._8)/), &
mask, ac8)
- if (line1 .ne. line2) call abort
+ if (line1 .ne. line2) STOP 22
at4%v = reshape ((/1, 0, 0, 0, 1, 0, 0, 0, 1/), (/3, 3/));
vt4%v = (/2_4, 3_4, 4_4/)
bt4 = unpack (vt4, mask, at4)
if (any (bt4%v .ne. reshape ((/1, 2, 0, 3, 1, 0, 0, 0, 4/), (/3, 3/)))) &
- call abort
+ STOP 23
bt4%v = -1
bt4 = unpack (vt4, mask, i4_t(0_4))
if (any (bt4%v .ne. reshape ((/0, 2, 0, 3, 0, 0, 0, 0, 4/), (/3, 3/)))) &
- call abort
+ STOP 24
end program
brk = unpack ((/2._k, 3._k, 4._k/), mask, ark)
if (any (brk .ne. reshape ((/1._k, 2._k, 0._k, 3._k, 1._k, 0._k, &
0._k, 0._k, 4._k/), (/3, 3/)))) &
- call abort
+ STOP 1
write (line1,'(9F9.5)') brk
write (line2,'(9F9.5)') unpack((/2._k, 3._k, 4._k/), mask, ark)
- if (line1 .ne. line2) call abort
+ if (line1 .ne. line2) STOP 2
brk = -1._k
brk = unpack ((/2._k, 3._k, 4._k/), mask, 0._k)
if (any (brk .ne. reshape ((/0._k, 2._k, 0._k, 3._k, 0._k, 0._k, &
0._k, 0._k, 4._k/), (/3, 3/)))) &
- call abort
+ STOP 3
ack = reshape ((/1._k, 0._k, 0._k, 0._k, 1._k, 0._k, 0._k, 0._k, 1._k/), &
(/3, 3/));
bck = unpack ((/(2._k, 0._k), (3._k, 0._k), (4._k, 0._k)/), mask, ack)
if (any (real(bck) .ne. reshape ((/1._k, 2._k, 0._k, 3._k, 1._k, 0._k, &
0._k, 0._k, 4._k/), (/3, 3/)))) &
- call abort
+ STOP 4
write (line1,'(18F9.5)') bck
write (line2,'(18F9.5)') unpack((/(2._k, 0._k), (3._k, 0._k), (4._k,0._k)/), &
mask, ack)
- if (line1 .ne. line2) call abort
+ if (line1 .ne. line2) STOP 5
end program
ak = reshape ((/1, 0, 0, 0, 1, 0, 0, 0, 1/), (/3, 3/));
bk = unpack ((/2_k, 3_k, 4_k/), mask, ak)
if (any (bk .ne. reshape ((/1, 2, 0, 3, 1, 0, 0, 0, 4/), (/3, 3/)))) &
- call abort
+ STOP 1
write (line1,'(10I4)') bk
write (line2,'(10I4)') unpack((/2_k, 3_k, 4_k/), mask, ak)
- if (line1 .ne. line2) call abort
+ if (line1 .ne. line2) STOP 2
bk = -1
bk = unpack ((/2_k, 3_k, 4_k/), mask, 0_k)
if (any (bk .ne. reshape ((/0, 2, 0, 3, 0, 0, 0, 0, 4/), (/3, 3/)))) &
- call abort
+ STOP 3
end program
character(len=1) :: c1
character(len=4) :: c4
c1 = "E"
- if (verify(c1, "1") .ne. 1) call abort
+ if (verify(c1, "1") .ne. 1) STOP 1
c4 = "ABBA"
- if (verify(c4, "A") .ne. 2) call abort
- if (verify(c4, "A", back = .true.) .ne. 3) call abort
- if (verify(c4, "AB") .ne. 0) call abort
+ if (verify(c4, "A") .ne. 2) STOP 2
+ if (verify(c4, "A", back = .true.) .ne. 3) STOP 3
+ if (verify(c4, "AB") .ne. 0) STOP 4
end program
t = "bartutugee"
call check (count(l_array, kind=k), 20)
- if (any (count(l_array, 2, kind=k) /= 5)) call abort
- if (any (count(l_array, kind=k, dim=2) /= 5)) call abort
+ if (any (count(l_array, 2, kind=k) /= 5)) STOP 1
+ if (any (count(l_array, kind=k, dim=2) /= 5)) STOP 2
call check (iachar (s, k), 117)
call check (iachar (s, kind=k), 117)
call check (ichar (s, k), 117)
call check (ichar (s, kind=k), 117)
- if (achar(107) /= achar(107,1)) call abort
+ if (achar(107) /= achar(107,1)) STOP 3
call check (index (t, s, .true., k), 7)
call check (index (t, s, kind=k, back=.false.), 5)
- if (any (lbound (l_array, kind=k) /= 1)) call abort
+ if (any (lbound (l_array, kind=k) /= 1)) STOP 4
call check (lbound (l_array, 1), 1)
call check (lbound (l_array, 1, kind=k), 1)
- if (any (ubound (l_array, kind=k) /= (/4, 5/))) call abort
+ if (any (ubound (l_array, kind=k) /= (/4, 5/))) STOP 5
call check (ubound (l_array, 1), 4)
call check (ubound (l_array, 1, kind=k), 4)
subroutine check(x,y)
integer, intent(in) :: x, y
- if (x /= y) call abort
+ if (x /= y) STOP 6
end subroutine check
end program test
character(50) :: buf='0.D99999'
double precision val
read (UNIT=buf, FMT='(D60.0)', ERR=10) Val
- call abort
+ STOP 1
10 read (UNIT=buf, FMT='(D60.0)') Val
end program read
! { dg-output "At line 10 of file.*" }
write(str,'(b0)') i
write(fmt,'(a,i0,a)') '(b',len_trim(str),')'
read(str,fmt) i2
- if(i /= i2) call abort()
+ if(i /= i2) STOP 1
write(str,'(o0)') i
write(fmt,'(a,i0,a)') '(o',len_trim(str),')'
read(str,fmt) i2
- if(i /= i2) call abort()
+ if(i /= i2) STOP 2
write(str,'(z0)') i
write(fmt,'(a,i0,a)') '(z',len_trim(str),')'
read(str,fmt) i2
- if(i /= i2) call abort()
+ if(i /= i2) STOP 3
write(str,'(b0)') r
write(fmt,'(a,i0,a)') '(b',len_trim(str),')'
read(str,fmt) r2
- if(r /= r2) call abort()
+ if(r /= r2) STOP 4
write(str,'(o0)') r
write(fmt,'(a,i0,a)') '(o',len_trim(str),')'
read(str,fmt) r2
- if(r /= r2) call abort()
+ if(r /= r2) STOP 5
write(str,'(z0)') r
write(fmt,'(a,i0,a)') '(z',len_trim(str),')'
read(str,fmt) r2
- if(r /= r2) call abort()
+ if(r /= r2) STOP 6
write(str,'(b0)') c
write(fmt,'(a,i0,a)') '(b',len_trim(str),')'
read(str,fmt) c2
- if(c /= c2) call abort()
+ if(c /= c2) STOP 7
write(str,'(o0)') c
write(fmt,'(a,i0,a)') '(o',len_trim(str),')'
read(str,fmt) c2
- if(c /= c2) call abort()
+ if(c /= c2) STOP 8
write(str,'(z0)') c
write(fmt,'(a,i0,a)') '(z',len_trim(str),')'
read(str,fmt) c2
- if(c /= c2) call abort()
+ if(c /= c2) STOP 9
end program real_boz
! Test that iomsg is left unchanged with no error
ch = 'asdf'
open(10, status='scratch', iomsg=ch, iostat=i)
- if (ch .ne. 'asdf') call abort
+ if (ch .ne. 'asdf') STOP 1
! Test iomsg with data transfer statement
read(10,'(I2)', iomsg=ch, end=100) k
- call abort
+ STOP 2
100 continue
- if (ch .ne. 'End of file') call abort
+ if (ch .ne. 'End of file') STOP 3
! Test iomsg with open
open (-3, err=200, iomsg=ch)
- call abort
+ STOP 4
200 continue
- if (ch .ne. 'Bad unit number in OPEN statement') call abort
+ if (ch .ne. 'Bad unit number in OPEN statement') STOP 5
! Test iomsg with close
close(23,status="no_idea", err=500, iomsg=ch) ! { dg-warning "STATUS specifier in CLOSE statement.*has invalid value" }
500 continue
- if (ch .ne. "Bad STATUS parameter in CLOSE statement") call abort
+ if (ch .ne. "Bad STATUS parameter in CLOSE statement") STOP 6
end program iomsg_test
read (10,'(I2)',iostat=ios) i
ios = -4321
read (10, '(I1)', iostat=ios) i
- if (ios /= 0) call abort
+ if (ios /= 0) STOP 1
end program main
! { dg-do run }
integer i
close(10, status="whatever", iostat=i) ! { dg-warning "STATUS specifier in CLOSE statement.*has invalid value" }
- if (i == 0) call abort()
+ if (i == 0) STOP 1
write(17,*) 'foo'
close(17, status="delete")
end
integer :: i
character(len=50) :: str
write (2_8*int(huge(0_4),kind=8)+9_8, iostat=i, iomsg=str) 555
- if (i.ne.5005) call abort
- if (str.ne."Unit number in I/O statement too large") call abort
+ if (i.ne.5005) STOP 1
+ if (str.ne."Unit number in I/O statement too large") STOP 2
end
\ No newline at end of file
program test
use iso_fortran_env
implicit none
- if ((.not. is_iostat_end(IOSTAT_END)) .or. is_iostat_end(0)) call abort()
- if ((.not. is_iostat_eor(IOSTAT_EOR)) .or. is_iostat_end(0)) call abort()
+ if ((.not. is_iostat_end(IOSTAT_END)) .or. is_iostat_end(0)) STOP 1
+ if ((.not. is_iostat_eor(IOSTAT_EOR)) .or. is_iostat_end(0)) STOP 2
end program test
! { dg-do run }
! verifies basic functioning of the ishft and ishftc intrinsics
-if (ishft (1_1, 0) /= 1) call abort
-if (ishft (1_1, 1) /= 2) call abort
-if (ishft (3_1, 1) /= 6) call abort
-if (ishft (-1_1, 1) /= -2) call abort
-if (ishft (-1_1, -1) /= 127) call abort
-if (ishft (96_1, 2) /= -128) call abort
-
-if (ishft (1_2, 0) /= 1) call abort
-if (ishft (1_2, 1) /= 2) call abort
-if (ishft (3_2, 1) /= 6) call abort
-if (ishft (-1_2, 1) /= -2) call abort
-if (ishft (-1_2, -1) /= 32767) call abort
-if (ishft (16384_2 + 8192_2, 2) /= -32768_4) call abort
-
-if (ishft (1_4, 0) /= 1) call abort
-if (ishft (1_4, 1) /= 2) call abort
-if (ishft (3_4, 1) /= 6) call abort
-if (ishft (-1_4, 1) /= -2) call abort
-if (ishft (-1_4, -1) /= 2147483647) call abort
-if (ishft (1073741824_4 + 536870912_4, 2) /= -2147483648_8) call abort
-
-if (ishft (1_8, 0) /= 1) call abort
-if (ishft (1_8, 1) /= 2) call abort
-if (ishft (3_8, 1) /= 6) call abort
-if (ishft (-1_8, 1) /= -2) call abort
-if (ishft (-1_8, -60) /= z'F') call abort
-
-if (ishftc (1_1, 0) /= 1) call abort
-if (ishftc (1_1, 1) /= 2) call abort
-if (ishftc (3_1, 1) /= 6) call abort
-if (ishftc (-1_1, 1) /= -1) call abort
-if (ishftc (-1_1, -1) /= -1) call abort
-if (ishftc (ishftc (96_1, 2), -2) /= 96) call abort
-
-if (ishftc (1_2, 0) /= 1) call abort
-if (ishftc (1_2, 1) /= 2) call abort
-if (ishftc (3_2, 1) /= 6) call abort
-if (ishftc (-1_2, 1) /= -1) call abort
-if (ishftc (-1_2, -1) /= -1) call abort
-if (ishftc (ishftc (25000_2, 2), -2) /= 25000) call abort
-
-if (ishftc (1_4, 0) /= 1) call abort
-if (ishftc (1_4, 1) /= 2) call abort
-if (ishftc (3_4, 1) /= 6) call abort
-if (ishftc (-1_4, 1) /= -1) call abort
-if (ishftc (-1_4, -1) /= -1) call abort
-if (ishftc (ishftc (1325876_4, 2), -2) /= 1325876) call abort
-
-if (ishftc (1_8, 0) /= 1) call abort
-if (ishftc (1_8, 1) /= 2) call abort
-if (ishftc (3_8, 1) /= 6) call abort
-if (ishftc (-1_8, 1) /= -1) call abort
-if (ishftc (-1_8, -1) /= -1) call abort
-if (ishftc (ishftc (1325876_8, 2), -2) /= 1325876) call abort
+if (ishft (1_1, 0) /= 1) STOP 1
+if (ishft (1_1, 1) /= 2) STOP 2
+if (ishft (3_1, 1) /= 6) STOP 3
+if (ishft (-1_1, 1) /= -2) STOP 4
+if (ishft (-1_1, -1) /= 127) STOP 5
+if (ishft (96_1, 2) /= -128) STOP 6
+
+if (ishft (1_2, 0) /= 1) STOP 7
+if (ishft (1_2, 1) /= 2) STOP 8
+if (ishft (3_2, 1) /= 6) STOP 9
+if (ishft (-1_2, 1) /= -2) STOP 10
+if (ishft (-1_2, -1) /= 32767) STOP 11
+if (ishft (16384_2 + 8192_2, 2) /= -32768_4) STOP 12
+
+if (ishft (1_4, 0) /= 1) STOP 13
+if (ishft (1_4, 1) /= 2) STOP 14
+if (ishft (3_4, 1) /= 6) STOP 15
+if (ishft (-1_4, 1) /= -2) STOP 16
+if (ishft (-1_4, -1) /= 2147483647) STOP 17
+if (ishft (1073741824_4 + 536870912_4, 2) /= -2147483648_8) STOP 18
+
+if (ishft (1_8, 0) /= 1) STOP 19
+if (ishft (1_8, 1) /= 2) STOP 20
+if (ishft (3_8, 1) /= 6) STOP 21
+if (ishft (-1_8, 1) /= -2) STOP 22
+if (ishft (-1_8, -60) /= z'F') STOP 23
+
+if (ishftc (1_1, 0) /= 1) STOP 24
+if (ishftc (1_1, 1) /= 2) STOP 25
+if (ishftc (3_1, 1) /= 6) STOP 26
+if (ishftc (-1_1, 1) /= -1) STOP 27
+if (ishftc (-1_1, -1) /= -1) STOP 28
+if (ishftc (ishftc (96_1, 2), -2) /= 96) STOP 29
+
+if (ishftc (1_2, 0) /= 1) STOP 30
+if (ishftc (1_2, 1) /= 2) STOP 31
+if (ishftc (3_2, 1) /= 6) STOP 32
+if (ishftc (-1_2, 1) /= -1) STOP 33
+if (ishftc (-1_2, -1) /= -1) STOP 34
+if (ishftc (ishftc (25000_2, 2), -2) /= 25000) STOP 35
+
+if (ishftc (1_4, 0) /= 1) STOP 36
+if (ishftc (1_4, 1) /= 2) STOP 37
+if (ishftc (3_4, 1) /= 6) STOP 38
+if (ishftc (-1_4, 1) /= -1) STOP 39
+if (ishftc (-1_4, -1) /= -1) STOP 40
+if (ishftc (ishftc (1325876_4, 2), -2) /= 1325876) STOP 41
+
+if (ishftc (1_8, 0) /= 1) STOP 42
+if (ishftc (1_8, 1) /= 2) STOP 43
+if (ishftc (3_8, 1) /= 6) STOP 44
+if (ishftc (-1_8, 1) /= -1) STOP 45
+if (ishftc (-1_8, -1) /= -1) STOP 46
+if (ishftc (ishftc (1325876_8, 2), -2) /= 1325876) STOP 47
end
! { dg-do run }
program ishft_2
- if ( ishftc(3, 2, 3) /= 5 ) call abort()
- if ( ishftc(256+3, 2, 3) /= 256+5 ) call abort()
- if ( ishftc(1_4, 31)+1 /= -huge(1_4) ) call abort()
+ if ( ishftc(3, 2, 3) /= 5 ) STOP 1
+ if ( ishftc(256+3, 2, 3) /= 256+5 ) STOP 2
+ if ( ishftc(1_4, 31)+1 /= -huge(1_4) ) STOP 3
end program
program test
- if (ishft (foo(), 2) /= 4) call abort
- if (ishft (foo(), -1) /= 1) call abort
- if (ishft (1, foo()) /= 8) call abort
- if (ishft (16, -foo()) /= 1) call abort
+ if (ishft (foo(), 2) /= 4) STOP 1
+ if (ishft (foo(), -1) /= 1) STOP 2
+ if (ishft (1, foo()) /= 8) STOP 3
+ if (ishft (16, -foo()) /= 1) STOP 4
- if (ishftc (bar(), 2) /= 4) call abort
- if (ishftc (bar(), -1) /= 1) call abort
- if (ishftc (1, bar()) /= 8) call abort
- if (ishftc (16, -bar()) /= 1) call abort
+ if (ishftc (bar(), 2) /= 4) STOP 5
+ if (ishftc (bar(), -1) /= 1) STOP 6
+ if (ishftc (1, bar()) /= 8) STOP 7
+ if (ishftc (16, -bar()) /= 1) STOP 8
contains
real :: x
x = -1.0
x = sqrt(x)
- if (.not. isnan(x)) call abort
+ if (.not. isnan(x)) STOP 1
x = 0.0
x = x / x
- if (.not. isnan(x)) call abort
+ if (.not. isnan(x)) STOP 2
x = 5.0
- if (isnan(x)) call abort
+ if (isnan(x)) STOP 3
x = huge(x)
x = 2*x
- if (isnan(x)) call abort
+ if (isnan(x)) STOP 4
end
implicit none
character(len=1) :: s
write(s,'(L1)') isnan(0.)
- if (s /= 'F') call abort
+ if (s /= 'F') STOP 1
write(s,'(L1)') isnan(exp(huge(0.)))
- if (s /= 'F') call abort
+ if (s /= 'F') STOP 2
write(s,'(L1)') isnan(0./0.)
- if (s /= 'T') call abort
+ if (s /= 'T') STOP 3
end
subroutine sub0(my_int) bind(c)
integer(my_c_int), value :: my_int
if(my_int .ne. 1) then
- call abort()
+ STOP 1
end if
end subroutine sub0
type(my_c_ptr), value :: my_ptr
if(.not. my_c_associated(my_ptr)) then
- call abort()
+ STOP 2
end if
end subroutine sub1
integer(my_c_long_2), value :: my_long
if(my_int .ne. 1) then
- call abort()
+ STOP 3
end if
if(my_long .ne. 1) then
- call abort()
+ STOP 4
end if
end subroutine sub2
integer(my_c_int), pointer :: my_f90_c_ptr
if(.not. my_c_associated(cptr1)) then
- call abort()
+ STOP 5
end if
if(.not. my_c_associated(cptr1, cptr2)) then
- call abort()
+ STOP 6
end if
call my_c_f_pointer(cptr1, my_f90_c_ptr)
type(my_c_ptr_local), value :: cptr2
if(.not. my_c_associated_2(cptr1)) then
- call abort()
+ STOP 7
end if
if(.not. my_c_associated_2(cptr2)) then
- call abort()
+ STOP 8
end if
end subroutine sub4
end module iso_c_binding_rename_1
implicit none
type(my_c_ptr_2) :: my_ptr1
if( .not. my_c_associated_2(my_ptr1)) then
- call abort()
+ STOP 1
end if
end subroutine sub2
implicit none
type(my_c_ptr_2) :: my_ptr1
if( .not. my_c_associated(my_ptr1)) then
- call abort()
+ STOP 2
end if
end subroutine sub3
implicit none
type(my_c_ptr) :: my_ptr1
if( .not. my_c_associated_3(my_ptr1)) then
- call abort()
+ STOP 3
end if
end subroutine sub4
use , intrinsic :: iso_fortran_env
implicit none
- if (file_storage_size /= 8) call abort
- if (character_storage_size /= 8) call abort
- if (all (numeric_storage_size /= [ 8, 16, 32, 64, 128])) call abort
- if (input_unit /= 5) call abort
- if (output_unit /= 6) call abort
- if (error_unit /= 0) call abort
- if (iostat_end /= -1) call abort
- if (iostat_eor /= -2) call abort
+ if (file_storage_size /= 8) STOP 1
+ if (character_storage_size /= 8) STOP 2
+ if (all (numeric_storage_size /= [ 8, 16, 32, 64, 128])) STOP 3
+ if (input_unit /= 5) STOP 4
+ if (output_unit /= 6) STOP 5
+ if (error_unit /= 0) STOP 6
+ if (iostat_end /= -1) STOP 7
+ if (iostat_eor /= -2) STOP 8
end
subroutine bar2
error_unit, iostat_end, iostat_eor
implicit none
- if (file_storage_size /= 8) call abort
- if (character_storage_size /= 8) call abort
- if (all (numeric_storage_size /= [ 8, 16, 32, 64, 128])) call abort
- if (input_unit /= 5) call abort
- if (output_unit /= 6) call abort
- if (error_unit /= 0) call abort
- if (iostat_end /= -1) call abort
- if (iostat_eor /= -2) call abort
+ if (file_storage_size /= 8) STOP 9
+ if (character_storage_size /= 8) STOP 10
+ if (all (numeric_storage_size /= [ 8, 16, 32, 64, 128])) STOP 11
+ if (input_unit /= 5) STOP 12
+ if (output_unit /= 6) STOP 13
+ if (error_unit /= 0) STOP 14
+ if (iostat_end /= -1) STOP 15
+ if (iostat_eor /= -2) STOP 16
end
program test
use , intrinsic :: iso_fortran_env, uu => output_unit
implicit none
- if (input_unit /= 5 .or. uu /= 6) call abort
+ if (input_unit /= 5 .or. uu /= 6) STOP 17
call bar
call bar2
end
use iso_fortran_env, foo => numeric_storage_size
integer, intent(in) :: x, y
- if (foo /= x .or. character_storage_size /= y) call abort
+ if (foo /= x .or. character_storage_size /= y) STOP 1
end
subroutine foo3 (x,y)
use iso_fortran_env, only : numeric_storage_size, character_storage_size
integer, intent(in) :: x, y
- if (numeric_storage_size /= x .or. character_storage_size /= y) call abort
+ if (numeric_storage_size /= x .or. character_storage_size /= y) STOP 2
end
program test
logical(kind=ATOMIC_LOGICAL_KIND) :: atomic_bool
i = 0
-if (IOSTAT_INQUIRE_INTERNAL_UNIT <= 0) call abort()
-if (IOSTAT_INQUIRE_INTERNAL_UNIT == STAT_STOPPED_IMAGE) call abort()
-if (STAT_STOPPED_IMAGE <= 0) call abort()
+if (IOSTAT_INQUIRE_INTERNAL_UNIT <= 0) STOP 1
+if (IOSTAT_INQUIRE_INTERNAL_UNIT == STAT_STOPPED_IMAGE) STOP 2
+if (STAT_STOPPED_IMAGE <= 0) STOP 3
if ((STAT_LOCKED_OTHER_IMAGE == STAT_LOCKED) &
- .or.(STAT_LOCKED_OTHER_IMAGE == STAT_UNLOCKED)) call abort()
-if (STAT_LOCKED == STAT_UNLOCKED) call abort()
+ .or.(STAT_LOCKED_OTHER_IMAGE == STAT_UNLOCKED)) STOP 4
+if (STAT_LOCKED == STAT_UNLOCKED) STOP 5
end
print *, OUTPUT_UNIT
-if (IOSTAT_INQUIRE_INTERNAL_UNIT <= 0) call abort() ! { dg-error "has no IMPLICIT type" }
+if (IOSTAT_INQUIRE_INTERNAL_UNIT <= 0) STOP 1 ! { dg-error "has no IMPLICIT type" }
print *,STAT_STOPPED_IMAGE ! { dg-error "has no IMPLICIT type" }
print *, STAT_LOCKED_OTHER_IMAGE ! { dg-error "has no IMPLICIT type" }
print *, STAT_LOCKED ! { dg-error "has no IMPLICIT type" }
call itime(x)
if (x(1) < 0 .or. x(1) > 23 .or.
& x(2) < 0 .or. x(2) > 59 .or.
- & x(3) < 0 .or. x(3) > 61) call abort
+ & x(3) < 0 .or. x(3) > 61) STOP 1
call idate(x)
if (x(1) < 1 .or. x(1) > 31 .or.
& x(2) < 1 .or. x(2) > 12 .or.
- & x(3) < 2001 .or. x(3) > 2100) call abort
+ & x(3) < 2001 .or. x(3) > 2100) STOP 2
end
call itime(x)
if (x(1) < 0 .or. x(1) > 23 .or.
& x(2) < 0 .or. x(2) > 59 .or.
- & x(3) < 0 .or. x(3) > 61) call abort
+ & x(3) < 0 .or. x(3) > 61) STOP 1
call idate(x)
if (x(1) < 1 .or. x(1) > 31 .or.
& x(2) < 1 .or. x(2) > 12 .or.
- & x(3) < 2001 .or. x(3) > 2100) call abort
+ & x(3) < 2001 .or. x(3) > 2100) STOP 2
end
write (ca,f) a
write (cb,f) b
- if (ca /= cb) call abort
+ if (ca /= cb) STOP 1
end subroutine testoutput
end module testmod
integer(8) :: a, b
i = 0; j = 1; a = i; b = j
- if (i ** j /= a ** b) call abort
+ if (i ** j /= a ** b) STOP 1
end
write (ca,f) a
write (cb,f) b
- if (ca /= cb) call abort
+ if (ca /= cb) STOP 1
end subroutine testoutput
subroutine outputstring (a,f,s)
character(len=len(s)) :: c
write (c,f) a
- if (c /= s) call abort
+ if (c /= s) STOP 2
end subroutine outputstring
end module testmod
write (c1,'(G20.10E5)') x
write (c2,'(G20.10E5)') -x
- if (c2(1:1) /= '-') call abort
+ if (c2(1:1) /= '-') STOP 3
c2(1:1) = ' '
- if (c1 /= c2) call abort
+ if (c1 /= c2) STOP 4
x = tiny(x)
call outputstring (x,'(F20.15)',' 0.000000000000000')
write (c1,'(G20.10E5)') x
write (c2,'(G20.10E5)') -x
- if (c2(1:1) /= '-') call abort
+ if (c2(1:1) /= '-') STOP 5
c2(1:1) = ' '
- if (c1 /= c2) call abort
+ if (c1 /= c2) STOP 6
end program test
y = x ;\
x = func (x) ;\
y = func (y) ;\
- if (abs((y - x) / y) > eps) call abort
+ if (abs((y - x) / y) > eps) STOP 1
#define CTEST_FUNCTION(func,valc) \
z = valc ;\
w = z ;\
z = func (z) ;\
w = func (w) ;\
- if (abs((z - w) / w) > eps) call abort
+ if (abs((z - w) / w) > eps) STOP 2
TEST_FUNCTION(cos,17.456)
TEST_FUNCTION(sin,17.456)
y = x ; \
x1 = val2 ; \
y1 = x1; \
- if (abs((x**x1 - y**y1)/(y**y1)) > eps) call abort
+ if (abs((x**x1 - y**y1)/(y**y1)) > eps) STOP 3
#define CTEST_POWER(val1,val2) \
z = val1 ; \
w = z ; \
z1 = val2 ; \
w1 = z1; \
- if (abs((z**z1 - w**w1)/(w**w1)) > eps) call abort
+ if (abs((z**z1 - w**w1)/(w**w1)) > eps) STOP 4
CTEST_POWER (1.0,1.0)
CTEST_POWER (1.0,5.4)
y = x ;\
x = func (x) ;\
y = func (y) ;\
- if (abs((y - x) / y) > eps) call abort
+ if (abs((y - x) / y) > eps) STOP 1
TEST_FUNCTION(erf,1.45123231)
TEST_FUNCTION(erfc,-0.123789)
b(:) = 2.0_k
write (tmp, *) b
read (tmp, *) a, c
- if (abs (a - b(1)) > eps) call abort ()
- if (abs (c - b(2)) > eps) call abort ()
+ if (abs (a - b(1)) > eps) STOP 1
+ if (abs (c - b(2)) > eps) STOP 2
! Complex(k) scalar and array formatted and list formatted IO
d = cmplx ( 1.0_k, 2.0_k, k)
f = d
write (tmp, *) f
read (tmp, *) e, g
- if (abs (e - d) > eps) call abort ()
- if (abs (g - d) > eps) call abort ()
+ if (abs (e - d) > eps) STOP 3
+ if (abs (g - d) > eps) STOP 4
write (tmp, '(2(e12.4e5, 2x))') d
read (tmp, '(2(e12.4e5, 2x))') e
- if (abs (e - d) > eps) call abort()
+ if (abs (e - d) > eps) STOP 5
end program large_real_kind_form_io_1
b(:) = huge(0.0_k)
write (tmp, *) b
read (tmp, *) a, c
- if (a /= b(1)) call abort ()
- if (c /= b(2)) call abort ()
+ if (a /= b(1)) STOP 1
+ if (c /= b(2)) STOP 2
b(:) = -huge(0.0_k)
write (tmp, *) b
read (tmp, *) a, c
- if (a /= b(1)) call abort ()
- if (c /= b(2)) call abort ()
+ if (a /= b(1)) STOP 3
+ if (c /= b(2)) STOP 4
b(:) = nearest(tiny(0.0_k),1.0_k)
write (tmp, *) b
read (tmp, *) a, c
- if (a /= b(1)) call abort ()
- if (c /= b(2)) call abort ()
+ if (a /= b(1)) STOP 5
+ if (c /= b(2)) STOP 6
b(:) = nearest(-tiny(0.0_k),-1.0_k)
write (tmp, *) b
read (tmp, *) a, c
- if (a /= b(1)) call abort ()
- if (c /= b(2)) call abort ()
+ if (a /= b(1)) STOP 7
+ if (c /= b(2)) STOP 8
end program large_real_kind_form_io_2
inquire(10, recl=r)
close(10, status="delete")
if (r /= 12345678901_8) then
- call abort()
+ STOP 1
end if
end program large_recl
IF (ex) THEN
OPEN(unit=k)
INQUIRE(unit=j, opened=op)
- IF (op) CALL ABORT()
+ IF (op) STOP 1
ENDIF
print *, k
close(k)
logical :: l
character(len=60) :: s
open(2_8*huge(0)+20_8,file="foo",iostat=i)
- if (i == 0) call abort
+ if (i == 0) STOP 1
open(2_8*huge(0)+20_8,file="foo",err=99)
- call abort
+ STOP 2
99 inquire(unit=18,opened=l)
- if (l) call abort
+ if (l) STOP 3
end
equivalence (i(50), j)
j = 1
-if (i(50) /= j) call abort()
+if (i(50) /= j) STOP 1
end subroutine test
call test
i4 = -1
i8 = -1
- if (leadz(i1) /= 0) call abort
- if (leadz(i2) /= 0) call abort
- if (leadz(i4) /= 0) call abort
- if (leadz(i8) /= 0) call abort
-
- if (trailz(i1) /= 0) call abort
- if (trailz(i2) /= 0) call abort
- if (trailz(i4) /= 0) call abort
- if (trailz(i8) /= 0) call abort
-
- if (leadz(-1_1) /= 0) call abort
- if (leadz(-1_2) /= 0) call abort
- if (leadz(-1_4) /= 0) call abort
- if (leadz(-1_8) /= 0) call abort
-
- if (trailz(-1_1) /= 0) call abort
- if (trailz(-1_2) /= 0) call abort
- if (trailz(-1_4) /= 0) call abort
- if (trailz(-1_8) /= 0) call abort
+ if (leadz(i1) /= 0) STOP 1
+ if (leadz(i2) /= 0) STOP 2
+ if (leadz(i4) /= 0) STOP 3
+ if (leadz(i8) /= 0) STOP 4
+
+ if (trailz(i1) /= 0) STOP 5
+ if (trailz(i2) /= 0) STOP 6
+ if (trailz(i4) /= 0) STOP 7
+ if (trailz(i8) /= 0) STOP 8
+
+ if (leadz(-1_1) /= 0) STOP 9
+ if (leadz(-1_2) /= 0) STOP 10
+ if (leadz(-1_4) /= 0) STOP 11
+ if (leadz(-1_8) /= 0) STOP 12
+
+ if (trailz(-1_1) /= 0) STOP 13
+ if (trailz(-1_2) /= 0) STOP 14
+ if (trailz(-1_4) /= 0) STOP 15
+ if (trailz(-1_8) /= 0) STOP 16
i1 = -64
i2 = -64
i4 = -64
i8 = -64
- if (leadz(i1) /= 0) call abort
- if (leadz(i2) /= 0) call abort
- if (leadz(i4) /= 0) call abort
- if (leadz(i8) /= 0) call abort
+ if (leadz(i1) /= 0) STOP 17
+ if (leadz(i2) /= 0) STOP 18
+ if (leadz(i4) /= 0) STOP 19
+ if (leadz(i8) /= 0) STOP 20
- if (trailz(i1) /= 6) call abort
- if (trailz(i2) /= 6) call abort
- if (trailz(i4) /= 6) call abort
- if (trailz(i8) /= 6) call abort
+ if (trailz(i1) /= 6) STOP 21
+ if (trailz(i2) /= 6) STOP 22
+ if (trailz(i4) /= 6) STOP 23
+ if (trailz(i8) /= 6) STOP 24
- if (leadz(-64_1) /= 0) call abort
- if (leadz(-64_2) /= 0) call abort
- if (leadz(-64_4) /= 0) call abort
- if (leadz(-64_8) /= 0) call abort
+ if (leadz(-64_1) /= 0) STOP 25
+ if (leadz(-64_2) /= 0) STOP 26
+ if (leadz(-64_4) /= 0) STOP 27
+ if (leadz(-64_8) /= 0) STOP 28
- if (trailz(-64_1) /= 6) call abort
- if (trailz(-64_2) /= 6) call abort
- if (trailz(-64_4) /= 6) call abort
- if (trailz(-64_8) /= 6) call abort
+ if (trailz(-64_1) /= 6) STOP 29
+ if (trailz(-64_2) /= 6) STOP 30
+ if (trailz(-64_4) /= 6) STOP 31
+ if (trailz(-64_8) /= 6) STOP 32
i1 = -108
i2 = -108
i4 = -108
i8 = -108
- if (leadz(i1) /= 0) call abort
- if (leadz(i2) /= 0) call abort
- if (leadz(i4) /= 0) call abort
- if (leadz(i8) /= 0) call abort
+ if (leadz(i1) /= 0) STOP 33
+ if (leadz(i2) /= 0) STOP 34
+ if (leadz(i4) /= 0) STOP 35
+ if (leadz(i8) /= 0) STOP 36
- if (trailz(i1) /= 2) call abort
- if (trailz(i2) /= 2) call abort
- if (trailz(i4) /= 2) call abort
- if (trailz(i8) /= 2) call abort
+ if (trailz(i1) /= 2) STOP 37
+ if (trailz(i2) /= 2) STOP 38
+ if (trailz(i4) /= 2) STOP 39
+ if (trailz(i8) /= 2) STOP 40
- if (leadz(-108_1) /= 0) call abort
- if (leadz(-108_2) /= 0) call abort
- if (leadz(-108_4) /= 0) call abort
- if (leadz(-108_8) /= 0) call abort
+ if (leadz(-108_1) /= 0) STOP 41
+ if (leadz(-108_2) /= 0) STOP 42
+ if (leadz(-108_4) /= 0) STOP 43
+ if (leadz(-108_8) /= 0) STOP 44
- if (trailz(-108_1) /= 2) call abort
- if (trailz(-108_2) /= 2) call abort
- if (trailz(-108_4) /= 2) call abort
- if (trailz(-108_8) /= 2) call abort
+ if (trailz(-108_1) /= 2) STOP 45
+ if (trailz(-108_2) /= 2) STOP 46
+ if (trailz(-108_4) /= 2) STOP 47
+ if (trailz(-108_8) /= 2) STOP 48
i1 = 1
i2 = 1
i4 = 1
i8 = 1
- if (leadz(i1) /= bit_size(i1) - 1) call abort
- if (leadz(i2) /= bit_size(i2) - 1) call abort
- if (leadz(i4) /= bit_size(i4) - 1) call abort
- if (leadz(i8) /= bit_size(i8) - 1) call abort
+ if (leadz(i1) /= bit_size(i1) - 1) STOP 49
+ if (leadz(i2) /= bit_size(i2) - 1) STOP 50
+ if (leadz(i4) /= bit_size(i4) - 1) STOP 51
+ if (leadz(i8) /= bit_size(i8) - 1) STOP 52
- if (trailz(i1) /= 0) call abort
- if (trailz(i2) /= 0) call abort
- if (trailz(i4) /= 0) call abort
- if (trailz(i8) /= 0) call abort
+ if (trailz(i1) /= 0) STOP 53
+ if (trailz(i2) /= 0) STOP 54
+ if (trailz(i4) /= 0) STOP 55
+ if (trailz(i8) /= 0) STOP 56
- if (leadz(1_1) /= bit_size(1_1) - 1) call abort
- if (leadz(1_2) /= bit_size(1_2) - 1) call abort
- if (leadz(1_4) /= bit_size(1_4) - 1) call abort
- if (leadz(1_8) /= bit_size(1_8) - 1) call abort
+ if (leadz(1_1) /= bit_size(1_1) - 1) STOP 57
+ if (leadz(1_2) /= bit_size(1_2) - 1) STOP 58
+ if (leadz(1_4) /= bit_size(1_4) - 1) STOP 59
+ if (leadz(1_8) /= bit_size(1_8) - 1) STOP 60
- if (trailz(1_1) /= 0) call abort
- if (trailz(1_2) /= 0) call abort
- if (trailz(1_4) /= 0) call abort
- if (trailz(1_8) /= 0) call abort
+ if (trailz(1_1) /= 0) STOP 61
+ if (trailz(1_2) /= 0) STOP 62
+ if (trailz(1_4) /= 0) STOP 63
+ if (trailz(1_8) /= 0) STOP 64
i1 = 64
i2 = 64
i4 = 64
i8 = 64
- if (leadz(i1) /= 1) call abort
- if (leadz(i2) /= 9) call abort
- if (leadz(i4) /= 25) call abort
- if (leadz(i8) /= 57) call abort
-
- if (trailz(i1) /= 6) call abort
- if (trailz(i2) /= 6) call abort
- if (trailz(i4) /= 6) call abort
- if (trailz(i8) /= 6) call abort
-
- if (leadz(64_1) /= 1) call abort
- if (leadz(64_2) /= 9) call abort
- if (leadz(64_4) /= 25) call abort
- if (leadz(64_8) /= 57) call abort
-
- if (trailz(64_1) /= 6) call abort
- if (trailz(64_2) /= 6) call abort
- if (trailz(64_4) /= 6) call abort
- if (trailz(64_8) /= 6) call abort
+ if (leadz(i1) /= 1) STOP 65
+ if (leadz(i2) /= 9) STOP 66
+ if (leadz(i4) /= 25) STOP 67
+ if (leadz(i8) /= 57) STOP 68
+
+ if (trailz(i1) /= 6) STOP 69
+ if (trailz(i2) /= 6) STOP 70
+ if (trailz(i4) /= 6) STOP 71
+ if (trailz(i8) /= 6) STOP 72
+
+ if (leadz(64_1) /= 1) STOP 73
+ if (leadz(64_2) /= 9) STOP 74
+ if (leadz(64_4) /= 25) STOP 75
+ if (leadz(64_8) /= 57) STOP 76
+
+ if (trailz(64_1) /= 6) STOP 77
+ if (trailz(64_2) /= 6) STOP 78
+ if (trailz(64_4) /= 6) STOP 79
+ if (trailz(64_8) /= 6) STOP 80
end
integer(kind=16) :: i16
i16 = -1
- if (leadz(i16) /= 0) call abort
- if (trailz(i16) /= 0) call abort
- if (leadz(-1_16) /= 0) call abort
- if (trailz(-1_16) /= 0) call abort
+ if (leadz(i16) /= 0) STOP 1
+ if (trailz(i16) /= 0) STOP 2
+ if (leadz(-1_16) /= 0) STOP 3
+ if (trailz(-1_16) /= 0) STOP 4
i16 = -64
- if (leadz(i16) /= 0) call abort
- if (trailz(i16) /= 6) call abort
- if (leadz(-64_16) /= 0) call abort
- if (trailz(-64_16) /= 6) call abort
+ if (leadz(i16) /= 0) STOP 5
+ if (trailz(i16) /= 6) STOP 6
+ if (leadz(-64_16) /= 0) STOP 7
+ if (trailz(-64_16) /= 6) STOP 8
i16 = -108
- if (leadz(i16) /= 0) call abort
- if (trailz(i16) /= 2) call abort
- if (leadz(-108_16) /= 0) call abort
- if (trailz(-108_16) /= 2) call abort
+ if (leadz(i16) /= 0) STOP 9
+ if (trailz(i16) /= 2) STOP 10
+ if (leadz(-108_16) /= 0) STOP 11
+ if (trailz(-108_16) /= 2) STOP 12
i16 = 1
- if (leadz(i16) /= bit_size(i16) - 1) call abort
- if (trailz(i16) /= 0) call abort
- if (leadz(1_16) /= bit_size(1_16) - 1) call abort
- if (trailz(1_16) /= 0) call abort
+ if (leadz(i16) /= bit_size(i16) - 1) STOP 13
+ if (trailz(i16) /= 0) STOP 14
+ if (leadz(1_16) /= bit_size(1_16) - 1) STOP 15
+ if (trailz(1_16) /= 0) STOP 16
i16 = 64
- if (leadz(i16) /= 121) call abort
- if (trailz(i16) /= 6) call abort
- if (leadz(64_16) /= 121) call abort
- if (trailz(64_16) /= 6) call abort
+ if (leadz(i16) /= 121) STOP 17
+ if (trailz(i16) /= 6) STOP 18
+ if (leadz(64_16) /= 121) STOP 19
+ if (trailz(64_16) /= 6) STOP 20
end
program test
- if (leadz (foo()) /= bit_size(0) - 1) call abort
- if (leadz (foo()) /= bit_size(0) - 2) call abort
- if (trailz (foo()) /= 0) call abort
- if (trailz (foo()) /= 2) call abort
- if (trailz (foo()) /= 0) call abort
- if (trailz (foo()) /= 1) call abort
+ if (leadz (foo()) /= bit_size(0) - 1) STOP 1
+ if (leadz (foo()) /= bit_size(0) - 2) STOP 2
+ if (trailz (foo()) /= 0) STOP 3
+ if (trailz (foo()) /= 2) STOP 4
+ if (trailz (foo()) /= 0) STOP 5
+ if (trailz (foo()) /= 1) STOP 6
contains
rewind(11)
read (11, *) i
- if (i .ne. 42) call abort
+ if (i .ne. 42) STOP 1
read (11, *) i
- if (i .ne. 43) call abort
+ if (i .ne. 43) STOP 2
read (11, *) i
- if (i .ne. 44) call abort
+ if (i .ne. 44) STOP 3
close (11)
end
write (10,'(A)') ' 1 2 3 4*5 /'
rewind 10
read (10,*) i1
- if (any(i1 /= i2)) call abort
+ if (any(i1 /= i2)) STOP 1
close (10,status="delete")
end program main
s1 = repeat('x', len(s1))
a = 99
read(11,*)s1,a
- if (s1 /= "line1" .or. a /= 1) call abort()
+ if (s1 /= "line1" .or. a /= 1) STOP 1
s1 = repeat('x', len(s1))
read(11,"(a)")s1
close(11,status="delete")
- if (s1 /= "line2") call abort()
+ if (s1 /= "line2") STOP 2
open(11,file="testcase.txt",form='unformatted',access='stream',status='new')
s2 = repeat('x', len(s1))
read(11,*)s1,s2
close(11,status="delete")
- if (s1 /= "word1") call abort()
- if (s2 /= "word2") call abort()
+ if (s1 /= "word1") STOP 3
+ if (s2 /= "word2") STOP 4
end program teststuff
open(99, access='sequential', form='formatted')
read(99, *, iostat=ios) i
close(99, status="delete")
-if (ios /= 0) call abort
+if (ios /= 0) STOP 1
end
read(buff, *, err=10) AVD, AVC, BVC, BVD, CVC, CVD
goto 20
- 10 call abort
+ 10 STOP 1
20 continue
end
a=0d0
read(funit,*) (a(i),i=1,isize)
close(funit)
-if (any(a /= res)) call abort
+if (any(a /= res)) STOP 1
end
logical debug
data debug /.TRUE./
read(a,*)i
- if (i.ne.1234567890) call abort
+ if (i.ne.1234567890) STOP 1
read(a(1:1),*)i
- if (i.ne.1) call abort
+ if (i.ne.1) STOP 2
read(a(2:2),*)i
- if (i.ne.2) call abort
+ if (i.ne.2) STOP 3
read(a(1:5),*)i
- if (i.ne.12345) call abort
+ if (i.ne.12345) STOP 4
read(a(5:10),*)i
- if (i.ne.567890) call abort
+ if (i.ne.567890) STOP 5
read(a(10:10),*)i
- if (i.ne.0) call abort
+ if (i.ne.0) STOP 6
end
print*,a, b, c, d
end if
- if (abs(10. - a) > 1e-5) call abort
- if (abs(20. - b) > 1e-5) call abort
- if (abs(30. - c) > 1e-5) call abort
- if (abs(40. - d) > 1e-5) call abort
+ if (abs(10. - a) > 1e-5) STOP 1
+ if (abs(20. - b) > 1e-5) STOP 2
+ if (abs(30. - c) > 1e-5) STOP 3
+ if (abs(40. - d) > 1e-5) STOP 4
a = 0
b = 0
write (buff,'(a)') '10.,20.,30.,40.'
read(buff,*) a, b, c, d
- if (abs(10. - a) > 1e-5) call abort
- if (abs(20. - b) > 1e-5) call abort
- if (abs(30. - c) > 1e-5) call abort
- if (abs(40. - d) > 1e-5) call abort
+ if (abs(10. - a) > 1e-5) STOP 5
+ if (abs(20. - b) > 1e-5) STOP 6
+ if (abs(30. - c) > 1e-5) STOP 7
+ if (abs(40. - d) > 1e-5) STOP 8
if (debug) then
print*,buff
write (buff,'(a)') '10.0,20.0,30.0,40.0'
read(buff,*) a, b, c, d
- if (abs(10. - a) > 1e-5) call abort
- if (abs(20. - b) > 1e-5) call abort
- if (abs(30. - c) > 1e-5) call abort
- if (abs(40. - d) > 1e-5) call abort
+ if (abs(10. - a) > 1e-5) STOP 9
+ if (abs(20. - b) > 1e-5) STOP 10
+ if (abs(30. - c) > 1e-5) STOP 11
+ if (abs(40. - d) > 1e-5) STOP 12
if (debug) then
print*,buff
write (buff,'(a)') '10.0,,30.0,40.0'
read(buff,*) a, b, c, d
- if (abs(10. - a) > 1e-5) call abort
- if (abs(-99. - b) > 1e-5) call abort
- if (abs(30. - c) > 1e-5) call abort
- if (abs(40. - d) > 1e-5) call abort
+ if (abs(10. - a) > 1e-5) STOP 13
+ if (abs(-99. - b) > 1e-5) STOP 14
+ if (abs(30. - c) > 1e-5) STOP 15
+ if (abs(40. - d) > 1e-5) STOP 16
if (debug) then
print*,buff
write (buff,'(a)') '10,-20,30,-40'
read(buff,*) a, b, c, d
- if (abs(10. - a) > 1e-5) call abort
- if (abs(-20. - b) > 1e-5) call abort
- if (abs(30. - c) > 1e-5) call abort
- if (abs(-40. - d) > 1e-5) call abort
+ if (abs(10. - a) > 1e-5) STOP 17
+ if (abs(-20. - b) > 1e-5) STOP 18
+ if (abs(30. - c) > 1e-5) STOP 19
+ if (abs(-40. - d) > 1e-5) STOP 20
end subroutine abc
x(k) = -1.0
enddo
read (10,*,iostat=ier) x
- if (ier.ne.0) call abort
+ if (ier.ne.0) STOP 1
do k = 1,10
- if (x(k).ne.y(k)) call abort
+ if (x(k).ne.y(k)) STOP 2
x(k) = -1
end do
READ(10,*,iostat=ier) x
- if (ier.ne.0) call abort
+ if (ier.ne.0) STOP 3
do k = 1,10
- if (x(k).ne.y(k)) call abort
+ if (x(k).ne.y(k)) STOP 4
x(k) = -1
end do
READ(10,*,iostat=ier) x
- if (ier.ne.0) call abort
+ if (ier.ne.0) STOP 5
do k = 1,10
- if (x(k).ne.y(k)) call abort
+ if (x(k).ne.y(k)) STOP 6
x(k) = -1
end do
! integer
i(k) = -1
end do
READ(10,*,iostat=ier) (i(j),j=1,10)
- if (ier.ne.0) call abort
+ if (ier.ne.0) STOP 7
do k = 1,10
- if (i(k).ne.y(k)) call abort
+ if (i(k).ne.y(k)) STOP 8
i(k) = -1
end do
end
i = 0
j = 0
read( str, *, end=10 ) i,j
- call abort()
+ STOP 1
10 continue
- if (i.ne.123) call abort()
- if (j.ne.0) call abort()
+ if (i.ne.123) STOP 2
+ if (j.ne.0) STOP 3
! Check file unit
i = 0
open(10, status="scratch")
write(10,'(a)') "123"
rewind(10)
read(10, *, end=20) i,j
- call abort()
+ STOP 4
20 continue
- if (i.ne.123) call abort()
- if (j.ne.0) call abort()
+ if (i.ne.123) STOP 5
+ if (j.ne.0) STOP 6
! Check internal array unit
i = 0
j = 0
k = 0
read(a(1:5:2),*, end=30)i,j,k
- call abort()
+ STOP 7
30 continue
- if (i.ne.123) call abort()
- if (j.ne.234) call abort()
- if (k.ne.0) call abort()
+ if (i.ne.123) STOP 8
+ if (j.ne.234) STOP 9
+ if (k.ne.0) STOP 10
end program pr25307
rewind(10)
a = -1; b = -1; c = -1; d = -1;
read(10,*) a,b,c,d
- if (d.ne.-1) call abort()
+ if (d.ne.-1) STOP 1
! This worked as expected
rewind(10)
rewind(10)
a = -2; b = -2; c = -2; d = -2;
read(10,*) a,b,c,d
- if (d.ne.-2) call abort()
+ if (d.ne.-2) STOP 2
! This worked as expected.
rewind(10)
rewind(10)
a = -3; b = -3; c = -3; d = -3;
read(10,*) a,b,c,d
- if (d.ne.-3) call abort()
+ if (d.ne.-3) STOP 3
! This failed before the patch.
rewind(10)
rewind(10)
a = -4; b = -4; c = -4; d = -4;
read(10,*) a,b,c,d
- if (d.ne.-4) call abort()
+ if (d.ne.-4) STOP 4
close(unit=10, status='delete')
end program t
read(20, fmt=*) ieee_str1, ieee_str2
if (trim(ieee_str1) /= &
'1.0101010101010101010101010101010101010101010101010101*2^-2') &
- call abort
+ STOP 1
if (trim(ieee_str2) /= &
'1.01010101010101010101011*2^-2') &
- call abort
+ STOP 2
close(20, status="delete")
end
read(10,*,iostat=badness)
if (badness/=0) exit
enddo
-if (i /= 4) call abort
+if (i /= 4) STOP 1
end
close(10, status="keep")
open(unit=10,file="atest",form='formatted',status="old")
read(10,*) a, b, c
-if (a.ne.1.2 .or. b.ne.2.2 .or. c.ne.3.3) call abort
+if (a.ne.1.2 .or. b.ne.2.2 .or. c.ne.3.3) STOP 1
close(10, status="delete")
end
call testloc
do i=1,12
if (errors(i)) then
- call abort()
+ STOP 1
endif
end do
end program test
write(t(4),*) t8
write(f(4),*) f8
- if (any(t .ne. " T")) call abort
- if (any(f .ne. " F")) call abort
+ if (any(t .ne. " T")) STOP 1
+ if (any(f .ne. " F")) STOP 2
end
!
logical :: l1(4) = (/.TRUE.,.FALSE.,.TRUE.,.FALSE./)
logical :: l2(4) = (/.FALSE.,.TRUE.,.FALSE.,.TRUE./)
- if (dot_product (l1, l2)) call abort ()
+ if (dot_product (l1, l2)) STOP 1
l2 = .TRUE.
- if (.not.dot_product (l1, l2)) call abort ()
+ if (.not.dot_product (l1, l2)) STOP 2
end
\ No newline at end of file
character(len=4) :: s
write (s, *) c_associated(p), c_associated(c_null_ptr)
if (s /= ' F F') then
- call abort()
+ STOP 1
end if
end program pr82869
character(len=4) :: s
write (s, *) c_associated(p), c_associated(c_null_ptr)
if (s /= ' F F') then
- call abort()
+ STOP 1
end if
end program pr82869_8
do n = 1, size(i)
do j = -30, 30
- if (lshift(i(n),j) /= c_lshift(i(n),j)) call abort
- if (rshift(i(n),j) /= c_rshift(i(n),j)) call abort
+ if (lshift(i(n),j) /= c_lshift(i(n),j)) STOP 1
+ if (rshift(i(n),j) /= c_rshift(i(n),j)) STOP 2
end do
end do
end program test_rshift_lshift
t = time()
call ltime(t,x)
call gmtime(t,y)
- if (x(1) /= y(1) .or. mod(x(2),30) /= mod(y(2),30)) call abort
+ if (x(1) /= y(1) .or. mod(x(2),30) /= mod(y(2),30)) STOP 1
end
t = time()
call ltime(t,x)
call gmtime(t,y)
- if (x(1) /= y(1) .or. mod(x(2),30) /= mod(y(2),30)) call abort
+ if (x(1) /= y(1) .or. mod(x(2),30) /= mod(y(2),30)) STOP 1
end
type(my_c_type_1) :: my_type
integer(c_int), value :: expected_j
if (my_type%j .ne. expected_j) then
- call abort ()
+ STOP 1
end if
end subroutine sub0
end module bind_c_dts_2
end subroutine
end interface
call foo
- if (c/=1 .or. d/=2) call abort
+ if (c/=1 .or. d/=2) STOP 1
end program test
integer :: ic, istat, nc
logical :: exists, is_open
-if (get_unit_number("foo0.dat") .ne. 10) call abort
-if (get_unit_number("foo1.dat") .ne. 11) call abort
-if (get_unit_number("foo2.dat") .ne. 12) call abort
-if (get_unit_number("foo3.dat") .ne. 13) call abort
+if (get_unit_number("foo0.dat") .ne. 10) STOP 1
+if (get_unit_number("foo1.dat") .ne. 11) STOP 2
+if (get_unit_number("foo2.dat") .ne. 12) STOP 3
+if (get_unit_number("foo3.dat") .ne. 13) STOP 4
close(unit=12, status="delete")
-if (get_unit_number("foo2.dat") .ne. 12) call abort()
+if (get_unit_number("foo2.dat") .ne. 12) STOP 1
close(unit=10, status="delete")
close(unit=11, status="delete")
close(unit=12, status="delete")
character(54) :: chr
c_size = 5
- if (tricky ('Help me', butt_ugly) .ne. transfer (butt_ugly (1), chr)) call abort ()
+ if (tricky ('Help me', butt_ugly) .ne. transfer (butt_ugly (1), chr)) STOP 1
end program spec_test
implicit none
real x(7)
- if (my_string(x) .ne. "01234567890") call abort ()
+ if (my_string(x) .ne. "01234567890") STOP 1
end program len_test
subroutine process (strings)
character(*), intent(in) :: strings(:)
- if (any (strings .ne. indata)) call abort ()
+ if (any (strings .ne. indata)) STOP 1
end subroutine
! { dg-options "-ffree-line-length-none" }
#define CHECK(I,KIND,FUNCL,FUNCR,RESL,RESR) \
- if (maskl(I,KIND) /= RESL) call abort ; \
- if (FUNCL(I) /= RESL) call abort ; \
- if (maskr(I,KIND) /= RESR) call abort ; \
- if (FUNCR(I) /= RESR) call abort
+ if (maskl(I,KIND) /= RESL) STOP 1; \
+ if (FUNCL(I) /= RESL) STOP 2; \
+ if (maskr(I,KIND) /= RESR) STOP 3; \
+ if (FUNCR(I) /= RESR) STOP 4
CHECK(0,1,run_maskl1,run_maskr1,0_1,0_1)
CHECK(1,1,run_maskl1,run_maskr1,-huge(0_1)-1_1,1_1)
! { dg-require-effective-target fortran_integer_16 }
#define CHECK(I,KIND,FUNCL,FUNCR,RESL,RESR) \
- if (maskl(I,KIND) /= RESL) call abort ; \
- if (FUNCL(I) /= RESL) call abort ; \
- if (maskr(I,KIND) /= RESR) call abort ; \
- if (FUNCR(I) /= RESR) call abort
+ if (maskl(I,KIND) /= RESL) STOP 1; \
+ if (FUNCL(I) /= RESL) STOP 2; \
+ if (maskr(I,KIND) /= RESR) STOP 3; \
+ if (FUNCR(I) /= RESR) STOP 4
CHECK(0,16,run_maskl16,run_maskr16,0_16,0_16)
CHECK(1,16,run_maskl16,run_maskr16,-huge(0_16)-1_16,1_16)
z = 0.0_T
z = matmul (x, y)
- if (sum (z) /= 750.0_T) call abort ()
+ if (sum (z) /= 750.0_T) STOP 1
! array sections
c = 0.0_T
c(1:3,1:2) = matmul (a(7:9,3:N), b(3:N,3:4))
- if (sum (c) /= 576.0_T) call abort ()
+ if (sum (c) /= 576.0_T) STOP 2
! uses a temp
c = 0.0_T
c = matmul (a, b + x)
- if (sum (c) /= 9625.0_T) call abort ()
+ if (sum (c) /= 9625.0_T) STOP 3
! returns to a temp
c = 0.0_T
c = a + matmul (a, b)
- if (sum (c) /= 5775.0_T) call abort ()
+ if (sum (c) /= 5775.0_T) STOP 4
deallocate (a, b, c)
a=1 ; b=2
a(:,1:2)=matmul(a(:,1:4),b(:,:)) ! { dg-warning "Creating array temporary" }
if (any(a /= reshape((/8,8,8,8,8,8,8,8,1,1,1,1,1,1,1,1/),(/4,4/)))) &
- call abort
+ STOP 1
a = reshape([((-1**i)*i,i=1,16)],[4,4])
b = reshape([((-1**(i-1))*i**2,i=1,8)],[4,2])
b(1:2,1:2) = matmul(a(1:2,:),b) ! { dg-warning "Creating array temporary" }
if (any(b /= reshape([310, 340, -9, -16, 1478, 1652, -49, -64],[4,2]))) &
- call abort
+ STOP 2
deallocate(a)
deallocate(b)
end program main
r(1:su,1:su) = matmul(a(l:u,l:u),b(l:u,l:u))
if (any(reshape(r,[sz*sz]) /= [30, 36, 42, -1, -1, 66, 81, 96, -1, -1,&
& 102, 126, 150, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1])) &
- call abort
+ STOP 1
end program main
w = 7
w = matmul(M,v)
if( any(w .ne. 0) ) then
- call abort
+ STOP 1
end if
end program bogus_matmul
integer, parameter :: a(3,2) = 1
real, parameter :: b(2,3) = 2
real, parameter :: c(3,3) = matmul(a, b)
- if (any(c /= 4.)) call abort
+ if (any(c /= 4.)) STOP 1
end
real, parameter :: b(2,3) = 2
real d(3,3)
d = 4
- if (any(d /= matmul(a,b))) call abort
+ if (any(d /= matmul(a,b))) STOP 1
end
c(1,4) /= 1789789 .or. c(2,4) /= 1789789 .or. &
c(1,5) /= 18 .or. c(2,5) /= 18 .or. &
c(1,6) /= 1789789 .or. c(2,6) /= 1789789 .or. &
- c(1,7) /= 18 .or. c(2,7) /= 18) call abort
+ c(1,7) /= 18 .or. c(2,7) /= 18) STOP 1
end program matmul_2
iX2(1:n,1) = matmul( iB(2,1:n),iC(1:n,1:n) )\r
\r
! Whereas, we should have 8, 8, 99\r
- if (any (iX1(1:n+1,1) .ne. (/8, 8, 99/))) call abort ()\r
- if (any (iX1 .ne. iX2)) call abort ()\r
+ if (any (iX1(1:n+1,1) .ne. (/8, 8, 99/))) STOP 1\r
+ if (any (iX1 .ne. iX2)) STOP 2\r
\r
! Make sure that the fix does not break transpose temporaries.\r
iB = reshape((/(i, i = 1, 9)/),(/3,3/))\r
iX1 = transpose (iB)\r
iX1 = matmul (iX1, iC)\r
iX2 = matmul (transpose (iB), iC)\r
- if (any (iX1 .ne. iX2)) call abort ()\r
- if (any (iX1 .ne. iChk)) call abort ()\r
+ if (any (iX1 .ne. iX2)) STOP 3\r
+ if (any (iX1 .ne. iChk)) STOP 4\r
end\r
mat(:,:) = 1
h(3,:) = h(3,:) + matmul (matmul (h(3,:), transpose (mat)), mat)
- if (any (h(3,:) .ne. (/2.0, 2.0, 3.0/))) call abort ()
+ if (any (h(3,:) .ne. (/2.0, 2.0, 3.0/))) STOP 1
end program gfcbug40
l2 = reshape(laux,shape(l2))
m2 = ltoi(l2)
if (any(matmul(l1,l2) .neqv. (matmul(m1,m2) /= 0))) then
- call abort
+ STOP 1
end if
end do
end forall
iv = ltoi(lv)
if (any(matmul(lv,l1) .neqv. (matmul(iv,m1) /=0))) then
- call abort
+ STOP 2
end if
if (any(matmul(l1,lv) .neqv. (matmul(m1,iv) /= 0))) then
- call abort
+ STOP 3
end if
end do
end do
REAL, PARAMETER :: m2(2,2) = RESHAPE([COS(theta), -SIN(theta), SIN(theta), COS(theta)], [2, 2])
REAL, PARAMETER :: m(2,2) = MATMUL(m1, m2)
- IF (ANY(ABS(m - unity) > EPSILON(0.0))) CALL abort()
+ IF (ANY(ABS(m - unity) > EPSILON(0.0))) STOP 1
END
0.d0, 1.d0/3.d0, 0.d0, &
0.d0, 0.d0, 0.d0], &
[3,3])) > epsilon(1.0d0))) &
- call abort ()
+ STOP 1
END SUBROUTINE mass_matrix
program name
integer, parameter :: m1 = 1
! print *, matmul(B,C)
- if (any (matmul(B,C) /= [-1079, -1793])) call abort()
+ if (any (matmul(B,C) /= [-1079, -1793])) STOP 2
! print *, matmul(C,A)
- if (any (matmul(C,A) /= [-82, -181])) call abort()
+ if (any (matmul(C,A) /= [-82, -181])) STOP 3
! print '(3i5)', m1*matmul(A,B)
if (any (m1*matmul(A,B) /= reshape([71,91,111, 147,201,255, 327,441,555],&
[3,3]))) &
- call abort()
+ STOP 4
call mass_matrix
end program name
data res2 /158., -353./
c3 = matmul(bp,a)
- if (size(c3,1) /= 2) call abort
- if (any(c3 /= res2)) call abort
+ if (size(c3,1) /= 2) STOP 1
+ if (any(c3 /= res2)) STOP 2
end program main
data res2 /158., -353./
c1 = matmul(a,[29.,37.])
- if (size(c1,1) /= 3) call abort
- if (any(c1/=res1)) call abort
+ if (size(c1,1) /= 3) STOP 1
+ if (any(c1/=res1)) STOP 2
c2 = matmul(a,pack(b,[b>20.]))
- if (size(c1,1) /= 3) call abort
- if (any(c1/=res1)) call abort
+ if (size(c1,1) /= 3) STOP 3
+ if (any(c1/=res1)) STOP 4
c3 = matmul(pack(b,[b<0.]),a)
- if (size(c3,1) /= 2) call abort
- if (any(c3 /= res2)) call abort
+ if (size(c3,1) /= 2) STOP 5
+ if (any(c3 /= res2)) STOP 6
end program main
integer, parameter :: B(2,3) = reshape([1,1,1,1,1,1],[2,3])
character (len=30) :: line
write (unit=line,fmt='(9i3)') matmul(A,B)
- if (line /= ' 5 7 9 5 7 9 5 7 9') call abort
+ if (line /= ' 5 7 9 5 7 9 5 7 9') STOP 1
end program main
! dg-final { scan-tree-dump-times "matmul_i4" 0 "original" } }
a(2) = a(2) - 1
a(3) = a(3) - 1
n = maxloc (a, dim = 1)
- if (n .ne. 1) call abort
+ if (n .ne. 1) STOP 1
a(2) = -huge(n)
n = maxloc (a, dim = 1)
- if (n .ne. 2) call abort
+ if (n .ne. 2) STOP 2
end
allocate (c(3))
a(:) = nan
ia = maxloc (a)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 1
a(:) = minf
ia = maxloc (a)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 2
a(1:2) = nan
ia = maxloc (a)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 3
a(2) = 1.0
ia = maxloc (a)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 4
a(2) = pinf
ia = maxloc (a)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 5
c(:) = nan
ia = maxloc (c)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 6
c(:) = minf
ia = maxloc (c)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 7
c(1:2) = nan
ia = maxloc (c)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 8
c(2) = 1.0
ia = maxloc (c)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 9
c(2) = pinf
ia = maxloc (c)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 10
l = .false.
l2(:) = .false.
a(:) = nan
ia = maxloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 11
ia = maxloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 12
a(:) = minf
ia = maxloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 13
ia = maxloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 14
a(1:2) = nan
ia = maxloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 15
ia = maxloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 16
a(2) = 1.0
ia = maxloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 17
ia = maxloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 18
a(2) = pinf
ia = maxloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 19
ia = maxloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 20
c(:) = nan
ia = maxloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 21
ia = maxloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 22
c(:) = minf
ia = maxloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 23
ia = maxloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 24
c(1:2) = nan
ia = maxloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 25
ia = maxloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 26
c(2) = 1.0
ia = maxloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 27
ia = maxloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 28
c(2) = pinf
ia = maxloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 29
ia = maxloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 30
l = .true.
l2(:) = .true.
a(:) = nan
ia = maxloc (a, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 31
ia = maxloc (a, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 32
a(:) = minf
ia = maxloc (a, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 33
ia = maxloc (a, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 34
a(1:2) = nan
ia = maxloc (a, mask = l)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 35
ia = maxloc (a, mask = l2)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 36
a(2) = 1.0
ia = maxloc (a, mask = l)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 37
ia = maxloc (a, mask = l2)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 38
a(2) = pinf
ia = maxloc (a, mask = l)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 39
ia = maxloc (a, mask = l2)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 40
c(:) = nan
ia = maxloc (c, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 41
ia = maxloc (c, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 42
c(:) = minf
ia = maxloc (c, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 43
ia = maxloc (c, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 44
c(1:2) = nan
ia = maxloc (c, mask = l)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 45
ia = maxloc (c, mask = l2)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 46
c(2) = 1.0
ia = maxloc (c, mask = l)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 47
ia = maxloc (c, mask = l2)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 48
c(2) = pinf
ia = maxloc (c, mask = l)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 49
ia = maxloc (c, mask = l2)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 50
deallocate (c)
allocate (c(-2:-3))
ia = maxloc (c)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 51
end
allocate (c(3))
a(:) = 5
ia = maxloc (a)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 1
a(2) = huge(h)
ia = maxloc (a)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 2
a(:) = h
ia = maxloc (a)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 3
a(3) = -huge(h)
ia = maxloc (a)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 4
c(:) = 5
ia = maxloc (c)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 5
c(2) = huge(h)
ia = maxloc (c)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 6
c(:) = h
ia = maxloc (c)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 7
c(3) = -huge(h)
ia = maxloc (c)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 8
l = .false.
l2(:) = .false.
a(:) = 5
ia = maxloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 9
ia = maxloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 10
a(2) = huge(h)
ia = maxloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 11
ia = maxloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 12
a(:) = h
ia = maxloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 13
ia = maxloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 14
a(3) = -huge(h)
ia = maxloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 15
ia = maxloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 16
c(:) = 5
ia = maxloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 17
ia = maxloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 18
c(2) = huge(h)
ia = maxloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 19
ia = maxloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 20
c(:) = h
ia = maxloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 21
ia = maxloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 22
c(3) = -huge(h)
ia = maxloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 23
ia = maxloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 24
l = .true.
l2(:) = .true.
a(:) = 5
ia = maxloc (a, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 25
ia = maxloc (a, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 26
a(2) = huge(h)
ia = maxloc (a, mask = l)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 27
ia = maxloc (a, mask = l2)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 28
a(:) = h
ia = maxloc (a, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 29
ia = maxloc (a, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 30
a(3) = -huge(h)
ia = maxloc (a, mask = l)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 31
ia = maxloc (a, mask = l2)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 32
c(:) = 5
ia = maxloc (c, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 33
ia = maxloc (c, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 34
c(2) = huge(h)
ia = maxloc (c, mask = l)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 35
ia = maxloc (c, mask = l2)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 36
c(:) = h
ia = maxloc (c, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 37
ia = maxloc (c, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 38
c(3) = -huge(h)
ia = maxloc (c, mask = l)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 39
ia = maxloc (c, mask = l2)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 40
deallocate (c)
allocate (c(-2:-3))
ia = maxloc (c)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 41
end
integer, parameter, dimension(2) :: b11 = maxloc(i2, dim=2)
integer, parameter, dimension(3) :: b12 = maxloc(i2,dim=1,mask=i2<0)
integer, parameter, dimension(2) :: b13 = maxloc(i2,dim=2, mask=i2<-10)
- if (b /= 1) call abort
- if (b2 /= 0) call abort
- if (b3 /= 3) call abort
- if (b4 /= 1) call abort
- if (any(b5 /= [2,1])) call abort
- if (any(b6 /= [0, 0])) call abort
- if (any(b7 /= [1,1])) call abort
- if (any(b8 /= b5)) call abort
- if (any(b9 /= [0, 0])) call abort
+ if (b /= 1) STOP 1
+ if (b2 /= 0) STOP 2
+ if (b3 /= 3) STOP 3
+ if (b4 /= 1) STOP 4
+ if (any(b5 /= [2,1])) STOP 5
+ if (any(b6 /= [0, 0])) STOP 6
+ if (any(b7 /= [1,1])) STOP 7
+ if (any(b8 /= b5)) STOP 8
+ if (any(b9 /= [0, 0])) STOP 9
d = 1
- if (any(b10 /= maxloc(i2,dim=d))) call abort
+ if (any(b10 /= maxloc(i2,dim=d))) STOP 10
d = 2
- if (any(b11 /= maxloc(i2,dim=2))) call abort
+ if (any(b11 /= maxloc(i2,dim=2))) STOP 11
d = 1
- if (any(b12 /= maxloc(i2, dim=d,mask=i2<0))) call abort
- if (any(b13 /= 0)) call abort
+ if (any(b12 /= maxloc(i2, dim=d,mask=i2<0))) STOP 12
+ if (any(b13 /= 0)) STOP 13
end program main
res1 = maxloc(c)
res2 = maxloc(a)
- if (any(res1 /= res2)) call abort
+ if (any(res1 /= res2)) STOP 1
res1 = maxloc(c4)
- if (any(res1 /= res2)) call abort
+ if (any(res1 /= res2)) STOP 2
amask = a < 50
res1 = maxloc(c,mask=amask)
res2 = maxloc(a,mask=amask)
- if (any(res1 /= res2)) call abort
+ if (any(res1 /= res2)) STOP 3
amask = .false.
res1 = maxloc(c,mask=amask)
- if (any(res1 /= 0)) call abort
+ if (any(res1 /= 0)) STOP 4
amask(2,3) = .true.
res1 = maxloc(c,mask=amask)
- if (any(res1 /= [2,3])) call abort
+ if (any(res1 /= [2,3])) STOP 5
res1 = maxloc(c,mask=.false.)
- if (any(res1 /= 0)) call abort
+ if (any(res1 /= 0)) STOP 6
res2 = maxloc(a)
res1 = maxloc(c,mask=.true.)
- if (any(res1 /= res2)) call abort
+ if (any(res1 /= res2)) STOP 7
q1 = maxloc(c, dim=1)
q2 = maxloc(a, dim=1)
- if (any(q1 /= q2)) call abort
+ if (any(q1 /= q2)) STOP 8
q1 = maxloc(c, dim=2)
q2 = maxloc(a, dim=2)
- if (any(q1 /= q2)) call abort
+ if (any(q1 /= q2)) STOP 9
q1 = maxloc(c, dim=1, mask=amask)
q2 = maxloc(a, dim=1, mask=amask)
- if (any(q1 /= q2)) call abort
+ if (any(q1 /= q2)) STOP 10
q1 = maxloc(c, dim=2, mask=amask)
q2 = maxloc(a, dim=2, mask=amask)
- if (any(q1 /= q2)) call abort
+ if (any(q1 /= q2)) STOP 11
amask = a < 50
q1 = maxloc(c, dim=1, mask=amask)
q2 = maxloc(a, dim=1, mask=amask)
- if (any(q1 /= q2)) call abort
+ if (any(q1 /= q2)) STOP 12
q1 = maxloc(c, dim=2, mask=amask)
q2 = maxloc(a, dim=2, mask=amask)
- if (any(q1 /= q2)) call abort
+ if (any(q1 /= q2)) STOP 13
e = reshape(c, shape(e))
f = reshape(a, shape(f))
- if (maxloc(e,dim=1) /= maxloc(f,dim=1)) call abort
+ if (maxloc(e,dim=1) /= maxloc(f,dim=1)) STOP 14
cmask = .false.
- if (maxloc(e,dim=1,mask=cmask) /= 0) call abort
+ if (maxloc(e,dim=1,mask=cmask) /= 0) STOP 15
cmask = f > 50
- if ( maxloc(e, dim=1, mask=cmask) /= maxloc (f, dim=1, mask=cmask)) call abort
+ if ( maxloc(e, dim=1, mask=cmask) /= maxloc (f, dim=1, mask=cmask)) STOP 16
end program main
i4 = 1
i8 = 1
-if(-huge(i1)-1_1 /= maxval(i1, msk)) call abort() ! { dg-warning "outside symmetric range implied by Standard Fortran" }
-if(-huge(a1)-1_1 /= maxval(a1)) call abort() ! { dg-warning "outside symmetric range implied by Standard Fortran" }
+if(-huge(i1)-1_1 /= maxval(i1, msk)) STOP 1 ! { dg-warning "outside symmetric range implied by Standard Fortran" }
+if(-huge(a1)-1_1 /= maxval(a1)) STOP 2 ! { dg-warning "outside symmetric range implied by Standard Fortran" }
-if(-huge(i2)-1_2 /= maxval(i2, msk)) call abort() ! { dg-warning "outside symmetric range implied by Standard Fortran" }
-if(-huge(a2)-1_2 /= maxval(a2)) call abort() ! { dg-warning "outside symmetric range implied by Standard Fortran" }
+if(-huge(i2)-1_2 /= maxval(i2, msk)) STOP 3 ! { dg-warning "outside symmetric range implied by Standard Fortran" }
+if(-huge(a2)-1_2 /= maxval(a2)) STOP 4 ! { dg-warning "outside symmetric range implied by Standard Fortran" }
-if(-huge(i4)-1_4 /= maxval(i4, msk)) call abort() ! { dg-warning "outside symmetric range implied by Standard Fortran" }
-if(-huge(a4)-1_4 /= maxval(a4)) call abort() ! { dg-warning "outside symmetric range implied by Standard Fortran" }
+if(-huge(i4)-1_4 /= maxval(i4, msk)) STOP 5 ! { dg-warning "outside symmetric range implied by Standard Fortran" }
+if(-huge(a4)-1_4 /= maxval(a4)) STOP 6 ! { dg-warning "outside symmetric range implied by Standard Fortran" }
-if(-huge(i8)-1_4 /= maxval(i8, msk)) call abort() ! { dg-warning "outside symmetric range implied by Standard Fortran" }
-if(-huge(a8)-1_4 /= maxval(a8)) call abort() ! { dg-warning "outside symmetric range implied by Standard Fortran" }
+if(-huge(i8)-1_4 /= maxval(i8, msk)) STOP 7 ! { dg-warning "outside symmetric range implied by Standard Fortran" }
+if(-huge(a8)-1_4 /= maxval(a8)) STOP 8 ! { dg-warning "outside symmetric range implied by Standard Fortran" }
allocate (a(0:-1,1:1))
allocate (b(0:-1,1:1))
-if(any(maxval(a,dim=1) /= -huge(a)-1_4)) call abort() ! { dg-warning "outside symmetric range implied by Standard Fortran" }
-if(any(minval(a,dim=1) /= huge(a) )) call abort()
+if(any(maxval(a,dim=1) /= -huge(a)-1_4)) STOP 9 ! { dg-warning "outside symmetric range implied by Standard Fortran" }
+if(any(minval(a,dim=1) /= huge(a) )) STOP 10
-if(any(maxval(b,dim=1) /= -huge(b)-1_8)) call abort() ! { dg-warning "outside symmetric range implied by Standard Fortran" }
-if(any(minval(b,dim=1) /= huge(b) )) call abort()
+if(any(maxval(b,dim=1) /= -huge(b)-1_8)) STOP 11 ! { dg-warning "outside symmetric range implied by Standard Fortran" }
+if(any(minval(b,dim=1) /= huge(b) )) STOP 12
end program main
allocate (c(3))
a(:) = nan
- if (maxloc (a, dim = 1).ne.1) call abort
- if (.not.isnan(maxval (a, dim = 1))) call abort
+ if (maxloc (a, dim = 1).ne.1) STOP 1
+ if (.not.isnan(maxval (a, dim = 1))) STOP 2
a(:) = minf
- if (maxloc (a, dim = 1).ne.1) call abort
- if (maxval (a, dim = 1).ne.minf) call abort
+ if (maxloc (a, dim = 1).ne.1) STOP 3
+ if (maxval (a, dim = 1).ne.minf) STOP 4
a(1:2) = nan
- if (maxloc (a, dim = 1).ne.3) call abort
- if (maxval (a, dim = 1).ne.minf) call abort
+ if (maxloc (a, dim = 1).ne.3) STOP 5
+ if (maxval (a, dim = 1).ne.minf) STOP 6
a(2) = 1.0
- if (maxloc (a, dim = 1).ne.2) call abort
- if (maxval (a, dim = 1).ne.1) call abort
+ if (maxloc (a, dim = 1).ne.2) STOP 7
+ if (maxval (a, dim = 1).ne.1) STOP 8
a(2) = pinf
- if (maxloc (a, dim = 1).ne.2) call abort
- if (maxval (a, dim = 1).ne.pinf) call abort
+ if (maxloc (a, dim = 1).ne.2) STOP 9
+ if (maxval (a, dim = 1).ne.pinf) STOP 10
c(:) = nan
- if (maxloc (c, dim = 1).ne.1) call abort
- if (.not.isnan(maxval (c, dim = 1))) call abort
+ if (maxloc (c, dim = 1).ne.1) STOP 11
+ if (.not.isnan(maxval (c, dim = 1))) STOP 12
c(:) = minf
- if (maxloc (c, dim = 1).ne.1) call abort
- if (maxval (c, dim = 1).ne.minf) call abort
+ if (maxloc (c, dim = 1).ne.1) STOP 13
+ if (maxval (c, dim = 1).ne.minf) STOP 14
c(1:2) = nan
- if (maxloc (c, dim = 1).ne.3) call abort
- if (maxval (c, dim = 1).ne.minf) call abort
+ if (maxloc (c, dim = 1).ne.3) STOP 15
+ if (maxval (c, dim = 1).ne.minf) STOP 16
c(2) = 1.0
- if (maxloc (c, dim = 1).ne.2) call abort
- if (maxval (c, dim = 1).ne.1) call abort
+ if (maxloc (c, dim = 1).ne.2) STOP 17
+ if (maxval (c, dim = 1).ne.1) STOP 18
c(2) = pinf
- if (maxloc (c, dim = 1).ne.2) call abort
- if (maxval (c, dim = 1).ne.pinf) call abort
+ if (maxloc (c, dim = 1).ne.2) STOP 19
+ if (maxval (c, dim = 1).ne.pinf) STOP 20
l = .false.
l2(:) = .false.
a(:) = nan
- if (maxloc (a, dim = 1, mask = l).ne.0) call abort
- if (maxval (a, dim = 1, mask = l).ne.-huge(minf)) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.0) call abort
- if (maxval (a, dim = 1, mask = l2).ne.-huge(minf)) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.0) STOP 21
+ if (maxval (a, dim = 1, mask = l).ne.-huge(minf)) STOP 22
+ if (maxloc (a, dim = 1, mask = l2).ne.0) STOP 23
+ if (maxval (a, dim = 1, mask = l2).ne.-huge(minf)) STOP 24
a(:) = minf
- if (maxloc (a, dim = 1, mask = l).ne.0) call abort
- if (maxval (a, dim = 1, mask = l).ne.-huge(minf)) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.0) call abort
- if (maxval (a, dim = 1, mask = l2).ne.-huge(minf)) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.0) STOP 25
+ if (maxval (a, dim = 1, mask = l).ne.-huge(minf)) STOP 26
+ if (maxloc (a, dim = 1, mask = l2).ne.0) STOP 27
+ if (maxval (a, dim = 1, mask = l2).ne.-huge(minf)) STOP 28
a(1:2) = nan
- if (maxloc (a, dim = 1, mask = l).ne.0) call abort
- if (maxval (a, dim = 1, mask = l).ne.-huge(minf)) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.0) call abort
- if (maxval (a, dim = 1, mask = l2).ne.-huge(minf)) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.0) STOP 29
+ if (maxval (a, dim = 1, mask = l).ne.-huge(minf)) STOP 30
+ if (maxloc (a, dim = 1, mask = l2).ne.0) STOP 31
+ if (maxval (a, dim = 1, mask = l2).ne.-huge(minf)) STOP 32
a(2) = 1.0
- if (maxloc (a, dim = 1, mask = l).ne.0) call abort
- if (maxval (a, dim = 1, mask = l).ne.-huge(minf)) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.0) call abort
- if (maxval (a, dim = 1, mask = l2).ne.-huge(minf)) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.0) STOP 33
+ if (maxval (a, dim = 1, mask = l).ne.-huge(minf)) STOP 34
+ if (maxloc (a, dim = 1, mask = l2).ne.0) STOP 35
+ if (maxval (a, dim = 1, mask = l2).ne.-huge(minf)) STOP 36
a(2) = pinf
- if (maxloc (a, dim = 1, mask = l).ne.0) call abort
- if (maxval (a, dim = 1, mask = l).ne.-huge(minf)) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.0) call abort
- if (maxval (a, dim = 1, mask = l2).ne.-huge(minf)) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.0) STOP 37
+ if (maxval (a, dim = 1, mask = l).ne.-huge(minf)) STOP 38
+ if (maxloc (a, dim = 1, mask = l2).ne.0) STOP 39
+ if (maxval (a, dim = 1, mask = l2).ne.-huge(minf)) STOP 40
c(:) = nan
- if (maxloc (c, dim = 1, mask = l).ne.0) call abort
- if (maxval (c, dim = 1, mask = l).ne.-huge(minf)) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.0) call abort
- if (maxval (c, dim = 1, mask = l2).ne.-huge(minf)) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.0) STOP 41
+ if (maxval (c, dim = 1, mask = l).ne.-huge(minf)) STOP 42
+ if (maxloc (c, dim = 1, mask = l2).ne.0) STOP 43
+ if (maxval (c, dim = 1, mask = l2).ne.-huge(minf)) STOP 44
c(:) = minf
- if (maxloc (c, dim = 1, mask = l).ne.0) call abort
- if (maxval (c, dim = 1, mask = l).ne.-huge(minf)) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.0) call abort
- if (maxval (c, dim = 1, mask = l2).ne.-huge(minf)) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.0) STOP 45
+ if (maxval (c, dim = 1, mask = l).ne.-huge(minf)) STOP 46
+ if (maxloc (c, dim = 1, mask = l2).ne.0) STOP 47
+ if (maxval (c, dim = 1, mask = l2).ne.-huge(minf)) STOP 48
c(1:2) = nan
- if (maxloc (c, dim = 1, mask = l).ne.0) call abort
- if (maxval (c, dim = 1, mask = l).ne.-huge(minf)) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.0) call abort
- if (maxval (c, dim = 1, mask = l2).ne.-huge(minf)) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.0) STOP 49
+ if (maxval (c, dim = 1, mask = l).ne.-huge(minf)) STOP 50
+ if (maxloc (c, dim = 1, mask = l2).ne.0) STOP 51
+ if (maxval (c, dim = 1, mask = l2).ne.-huge(minf)) STOP 52
c(2) = 1.0
- if (maxloc (c, dim = 1, mask = l).ne.0) call abort
- if (maxval (c, dim = 1, mask = l).ne.-huge(minf)) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.0) call abort
- if (maxval (c, dim = 1, mask = l2).ne.-huge(minf)) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.0) STOP 53
+ if (maxval (c, dim = 1, mask = l).ne.-huge(minf)) STOP 54
+ if (maxloc (c, dim = 1, mask = l2).ne.0) STOP 55
+ if (maxval (c, dim = 1, mask = l2).ne.-huge(minf)) STOP 56
c(2) = pinf
- if (maxloc (c, dim = 1, mask = l).ne.0) call abort
- if (maxval (c, dim = 1, mask = l).ne.-huge(minf)) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.0) call abort
- if (maxval (c, dim = 1, mask = l2).ne.-huge(minf)) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.0) STOP 57
+ if (maxval (c, dim = 1, mask = l).ne.-huge(minf)) STOP 58
+ if (maxloc (c, dim = 1, mask = l2).ne.0) STOP 59
+ if (maxval (c, dim = 1, mask = l2).ne.-huge(minf)) STOP 60
l = .true.
l2(:) = .true.
a(:) = nan
- if (maxloc (a, dim = 1, mask = l).ne.1) call abort
- if (.not.isnan(maxval (a, dim = 1, mask = l))) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.1) call abort
- if (.not.isnan(maxval (a, dim = 1, mask = l2))) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.1) STOP 61
+ if (.not.isnan(maxval (a, dim = 1, mask = l))) STOP 62
+ if (maxloc (a, dim = 1, mask = l2).ne.1) STOP 63
+ if (.not.isnan(maxval (a, dim = 1, mask = l2))) STOP 64
a(:) = minf
- if (maxloc (a, dim = 1, mask = l).ne.1) call abort
- if (maxval (a, dim = 1, mask = l).ne.minf) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.1) call abort
- if (maxval (a, dim = 1, mask = l2).ne.minf) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.1) STOP 65
+ if (maxval (a, dim = 1, mask = l).ne.minf) STOP 66
+ if (maxloc (a, dim = 1, mask = l2).ne.1) STOP 67
+ if (maxval (a, dim = 1, mask = l2).ne.minf) STOP 68
a(1:2) = nan
- if (maxloc (a, dim = 1, mask = l).ne.3) call abort
- if (maxval (a, dim = 1, mask = l).ne.minf) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.3) call abort
- if (maxval (a, dim = 1, mask = l2).ne.minf) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.3) STOP 69
+ if (maxval (a, dim = 1, mask = l).ne.minf) STOP 70
+ if (maxloc (a, dim = 1, mask = l2).ne.3) STOP 71
+ if (maxval (a, dim = 1, mask = l2).ne.minf) STOP 72
a(2) = 1.0
- if (maxloc (a, dim = 1, mask = l).ne.2) call abort
- if (maxval (a, dim = 1, mask = l).ne.1) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.2) call abort
- if (maxval (a, dim = 1, mask = l2).ne.1) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.2) STOP 73
+ if (maxval (a, dim = 1, mask = l).ne.1) STOP 74
+ if (maxloc (a, dim = 1, mask = l2).ne.2) STOP 75
+ if (maxval (a, dim = 1, mask = l2).ne.1) STOP 76
a(2) = pinf
- if (maxloc (a, dim = 1, mask = l).ne.2) call abort
- if (maxval (a, dim = 1, mask = l).ne.pinf) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.2) call abort
- if (maxval (a, dim = 1, mask = l2).ne.pinf) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.2) STOP 77
+ if (maxval (a, dim = 1, mask = l).ne.pinf) STOP 78
+ if (maxloc (a, dim = 1, mask = l2).ne.2) STOP 79
+ if (maxval (a, dim = 1, mask = l2).ne.pinf) STOP 80
c(:) = nan
- if (maxloc (c, dim = 1, mask = l).ne.1) call abort
- if (.not.isnan(maxval (c, dim = 1, mask = l))) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.1) call abort
- if (.not.isnan(maxval (c, dim = 1, mask = l2))) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.1) STOP 81
+ if (.not.isnan(maxval (c, dim = 1, mask = l))) STOP 82
+ if (maxloc (c, dim = 1, mask = l2).ne.1) STOP 83
+ if (.not.isnan(maxval (c, dim = 1, mask = l2))) STOP 84
c(:) = minf
- if (maxloc (c, dim = 1, mask = l).ne.1) call abort
- if (maxval (c, dim = 1, mask = l).ne.minf) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.1) call abort
- if (maxval (c, dim = 1, mask = l2).ne.minf) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.1) STOP 85
+ if (maxval (c, dim = 1, mask = l).ne.minf) STOP 86
+ if (maxloc (c, dim = 1, mask = l2).ne.1) STOP 87
+ if (maxval (c, dim = 1, mask = l2).ne.minf) STOP 88
c(1:2) = nan
- if (maxloc (c, dim = 1, mask = l).ne.3) call abort
- if (maxval (c, dim = 1, mask = l).ne.minf) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.3) call abort
- if (maxval (c, dim = 1, mask = l2).ne.minf) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.3) STOP 89
+ if (maxval (c, dim = 1, mask = l).ne.minf) STOP 90
+ if (maxloc (c, dim = 1, mask = l2).ne.3) STOP 91
+ if (maxval (c, dim = 1, mask = l2).ne.minf) STOP 92
c(2) = 1.0
- if (maxloc (c, dim = 1, mask = l).ne.2) call abort
- if (maxval (c, dim = 1, mask = l).ne.1) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.2) call abort
- if (maxval (c, dim = 1, mask = l2).ne.1) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.2) STOP 93
+ if (maxval (c, dim = 1, mask = l).ne.1) STOP 94
+ if (maxloc (c, dim = 1, mask = l2).ne.2) STOP 95
+ if (maxval (c, dim = 1, mask = l2).ne.1) STOP 96
c(2) = pinf
- if (maxloc (c, dim = 1, mask = l).ne.2) call abort
- if (maxval (c, dim = 1, mask = l).ne.pinf) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.2) call abort
- if (maxval (c, dim = 1, mask = l2).ne.pinf) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.2) STOP 97
+ if (maxval (c, dim = 1, mask = l).ne.pinf) STOP 98
+ if (maxloc (c, dim = 1, mask = l2).ne.2) STOP 99
+ if (maxval (c, dim = 1, mask = l2).ne.pinf) STOP 100
deallocate (c)
allocate (c(-2:-3))
- if (maxloc (c, dim = 1).ne.0) call abort
- if (maxval (c, dim = 1).ne.-huge(minf)) call abort
+ if (maxloc (c, dim = 1).ne.0) STOP 101
+ if (maxval (c, dim = 1).ne.-huge(minf)) STOP 102
end
h = h - 1
allocate (c(3))
a(:) = 5
- if (maxloc (a, dim = 1).ne.1) call abort
- if (maxval (a, dim = 1).ne.5) call abort
+ if (maxloc (a, dim = 1).ne.1) STOP 1
+ if (maxval (a, dim = 1).ne.5) STOP 2
a(2) = huge(h)
- if (maxloc (a, dim = 1).ne.2) call abort
- if (maxval (a, dim = 1).ne.huge(h)) call abort
+ if (maxloc (a, dim = 1).ne.2) STOP 3
+ if (maxval (a, dim = 1).ne.huge(h)) STOP 4
a(:) = h
- if (maxloc (a, dim = 1).ne.1) call abort
- if (maxval (a, dim = 1).ne.h) call abort
+ if (maxloc (a, dim = 1).ne.1) STOP 5
+ if (maxval (a, dim = 1).ne.h) STOP 6
a(3) = -huge(h)
- if (maxloc (a, dim = 1).ne.3) call abort
- if (maxval (a, dim = 1).ne.-huge(h)) call abort
+ if (maxloc (a, dim = 1).ne.3) STOP 7
+ if (maxval (a, dim = 1).ne.-huge(h)) STOP 8
c(:) = 5
- if (maxloc (c, dim = 1).ne.1) call abort
- if (maxval (c, dim = 1).ne.5) call abort
+ if (maxloc (c, dim = 1).ne.1) STOP 9
+ if (maxval (c, dim = 1).ne.5) STOP 10
c(2) = huge(h)
- if (maxloc (c, dim = 1).ne.2) call abort
- if (maxval (c, dim = 1).ne.huge(h)) call abort
+ if (maxloc (c, dim = 1).ne.2) STOP 11
+ if (maxval (c, dim = 1).ne.huge(h)) STOP 12
c(:) = h
- if (maxloc (c, dim = 1).ne.1) call abort
- if (maxval (c, dim = 1).ne.h) call abort
+ if (maxloc (c, dim = 1).ne.1) STOP 13
+ if (maxval (c, dim = 1).ne.h) STOP 14
c(3) = -huge(h)
- if (maxloc (c, dim = 1).ne.3) call abort
- if (maxval (c, dim = 1).ne.-huge(h)) call abort
+ if (maxloc (c, dim = 1).ne.3) STOP 15
+ if (maxval (c, dim = 1).ne.-huge(h)) STOP 16
l = .false.
l2(:) = .false.
a(:) = 5
- if (maxloc (a, dim = 1, mask = l).ne.0) call abort
- if (maxval (a, dim = 1, mask = l).ne.h) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.0) call abort
- if (maxval (a, dim = 1, mask = l2).ne.h) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.0) STOP 17
+ if (maxval (a, dim = 1, mask = l).ne.h) STOP 18
+ if (maxloc (a, dim = 1, mask = l2).ne.0) STOP 19
+ if (maxval (a, dim = 1, mask = l2).ne.h) STOP 20
a(2) = huge(h)
- if (maxloc (a, dim = 1, mask = l).ne.0) call abort
- if (maxval (a, dim = 1, mask = l).ne.h) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.0) call abort
- if (maxval (a, dim = 1, mask = l2).ne.h) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.0) STOP 21
+ if (maxval (a, dim = 1, mask = l).ne.h) STOP 22
+ if (maxloc (a, dim = 1, mask = l2).ne.0) STOP 23
+ if (maxval (a, dim = 1, mask = l2).ne.h) STOP 24
a(:) = h
- if (maxloc (a, dim = 1, mask = l).ne.0) call abort
- if (maxval (a, dim = 1, mask = l).ne.h) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.0) call abort
- if (maxval (a, dim = 1, mask = l2).ne.h) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.0) STOP 25
+ if (maxval (a, dim = 1, mask = l).ne.h) STOP 26
+ if (maxloc (a, dim = 1, mask = l2).ne.0) STOP 27
+ if (maxval (a, dim = 1, mask = l2).ne.h) STOP 28
a(3) = -huge(h)
- if (maxloc (a, dim = 1, mask = l).ne.0) call abort
- if (maxval (a, dim = 1, mask = l).ne.h) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.0) call abort
- if (maxval (a, dim = 1, mask = l2).ne.h) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.0) STOP 29
+ if (maxval (a, dim = 1, mask = l).ne.h) STOP 30
+ if (maxloc (a, dim = 1, mask = l2).ne.0) STOP 31
+ if (maxval (a, dim = 1, mask = l2).ne.h) STOP 32
c(:) = 5
- if (maxloc (c, dim = 1, mask = l).ne.0) call abort
- if (maxval (c, dim = 1, mask = l).ne.h) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.0) call abort
- if (maxval (c, dim = 1, mask = l2).ne.h) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.0) STOP 33
+ if (maxval (c, dim = 1, mask = l).ne.h) STOP 34
+ if (maxloc (c, dim = 1, mask = l2).ne.0) STOP 35
+ if (maxval (c, dim = 1, mask = l2).ne.h) STOP 36
c(2) = huge(h)
- if (maxloc (c, dim = 1, mask = l).ne.0) call abort
- if (maxval (c, dim = 1, mask = l).ne.h) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.0) call abort
- if (maxval (c, dim = 1, mask = l2).ne.h) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.0) STOP 37
+ if (maxval (c, dim = 1, mask = l).ne.h) STOP 38
+ if (maxloc (c, dim = 1, mask = l2).ne.0) STOP 39
+ if (maxval (c, dim = 1, mask = l2).ne.h) STOP 40
c(:) = h
- if (maxloc (c, dim = 1, mask = l).ne.0) call abort
- if (maxval (c, dim = 1, mask = l).ne.h) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.0) call abort
- if (maxval (c, dim = 1, mask = l2).ne.h) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.0) STOP 41
+ if (maxval (c, dim = 1, mask = l).ne.h) STOP 42
+ if (maxloc (c, dim = 1, mask = l2).ne.0) STOP 43
+ if (maxval (c, dim = 1, mask = l2).ne.h) STOP 44
c(3) = -huge(h)
- if (maxloc (c, dim = 1, mask = l).ne.0) call abort
- if (maxval (c, dim = 1, mask = l).ne.h) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.0) call abort
- if (maxval (c, dim = 1, mask = l2).ne.h) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.0) STOP 45
+ if (maxval (c, dim = 1, mask = l).ne.h) STOP 46
+ if (maxloc (c, dim = 1, mask = l2).ne.0) STOP 47
+ if (maxval (c, dim = 1, mask = l2).ne.h) STOP 48
l = .true.
l2(:) = .true.
a(:) = 5
- if (maxloc (a, dim = 1, mask = l).ne.1) call abort
- if (maxval (a, dim = 1, mask = l).ne.5) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.1) call abort
- if (maxval (a, dim = 1, mask = l2).ne.5) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.1) STOP 49
+ if (maxval (a, dim = 1, mask = l).ne.5) STOP 50
+ if (maxloc (a, dim = 1, mask = l2).ne.1) STOP 51
+ if (maxval (a, dim = 1, mask = l2).ne.5) STOP 52
a(2) = huge(h)
- if (maxloc (a, dim = 1, mask = l).ne.2) call abort
- if (maxval (a, dim = 1, mask = l).ne.huge(h)) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.2) call abort
- if (maxval (a, dim = 1, mask = l2).ne.huge(h)) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.2) STOP 53
+ if (maxval (a, dim = 1, mask = l).ne.huge(h)) STOP 54
+ if (maxloc (a, dim = 1, mask = l2).ne.2) STOP 55
+ if (maxval (a, dim = 1, mask = l2).ne.huge(h)) STOP 56
a(:) = h
- if (maxloc (a, dim = 1, mask = l).ne.1) call abort
- if (maxval (a, dim = 1, mask = l).ne.h) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.1) call abort
- if (maxval (a, dim = 1, mask = l2).ne.h) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.1) STOP 57
+ if (maxval (a, dim = 1, mask = l).ne.h) STOP 58
+ if (maxloc (a, dim = 1, mask = l2).ne.1) STOP 59
+ if (maxval (a, dim = 1, mask = l2).ne.h) STOP 60
a(3) = -huge(h)
- if (maxloc (a, dim = 1, mask = l).ne.3) call abort
- if (maxval (a, dim = 1, mask = l).ne.-huge(h)) call abort
- if (maxloc (a, dim = 1, mask = l2).ne.3) call abort
- if (maxval (a, dim = 1, mask = l2).ne.-huge(h)) call abort
+ if (maxloc (a, dim = 1, mask = l).ne.3) STOP 61
+ if (maxval (a, dim = 1, mask = l).ne.-huge(h)) STOP 62
+ if (maxloc (a, dim = 1, mask = l2).ne.3) STOP 63
+ if (maxval (a, dim = 1, mask = l2).ne.-huge(h)) STOP 64
c(:) = 5
- if (maxloc (c, dim = 1, mask = l).ne.1) call abort
- if (maxval (c, dim = 1, mask = l).ne.5) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.1) call abort
- if (maxval (c, dim = 1, mask = l2).ne.5) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.1) STOP 65
+ if (maxval (c, dim = 1, mask = l).ne.5) STOP 66
+ if (maxloc (c, dim = 1, mask = l2).ne.1) STOP 67
+ if (maxval (c, dim = 1, mask = l2).ne.5) STOP 68
c(2) = huge(h)
- if (maxloc (c, dim = 1, mask = l).ne.2) call abort
- if (maxval (c, dim = 1, mask = l).ne.huge(h)) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.2) call abort
- if (maxval (c, dim = 1, mask = l2).ne.huge(h)) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.2) STOP 69
+ if (maxval (c, dim = 1, mask = l).ne.huge(h)) STOP 70
+ if (maxloc (c, dim = 1, mask = l2).ne.2) STOP 71
+ if (maxval (c, dim = 1, mask = l2).ne.huge(h)) STOP 72
c(:) = h
- if (maxloc (c, dim = 1, mask = l).ne.1) call abort
- if (maxval (c, dim = 1, mask = l).ne.h) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.1) call abort
- if (maxval (c, dim = 1, mask = l2).ne.h) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.1) STOP 73
+ if (maxval (c, dim = 1, mask = l).ne.h) STOP 74
+ if (maxloc (c, dim = 1, mask = l2).ne.1) STOP 75
+ if (maxval (c, dim = 1, mask = l2).ne.h) STOP 76
c(3) = -huge(h)
- if (maxloc (c, dim = 1, mask = l).ne.3) call abort
- if (maxval (c, dim = 1, mask = l).ne.-huge(h)) call abort
- if (maxloc (c, dim = 1, mask = l2).ne.3) call abort
- if (maxval (c, dim = 1, mask = l2).ne.-huge(h)) call abort
+ if (maxloc (c, dim = 1, mask = l).ne.3) STOP 77
+ if (maxval (c, dim = 1, mask = l).ne.-huge(h)) STOP 78
+ if (maxloc (c, dim = 1, mask = l2).ne.3) STOP 79
+ if (maxval (c, dim = 1, mask = l2).ne.-huge(h)) STOP 80
deallocate (c)
allocate (c(-2:-3))
- if (maxloc (c, dim = 1).ne.0) call abort
- if (maxval (c, dim = 1).ne.h) call abort
+ if (maxloc (c, dim = 1).ne.0) STOP 81
+ if (maxval (c, dim = 1).ne.h) STOP 82
end
l5(1,2) = .false.
l5(2,3) = .false.
a = reshape ((/ nan, nan, nan, minf, minf, minf, minf, pinf, minf /), (/ 3, 3 /))
- if (maxval (a).ne.pinf) call abort
- if (any (maxloc (a).ne.(/ 2, 3 /))) call abort
+ if (maxval (a).ne.pinf) STOP 1
+ if (any (maxloc (a).ne.(/ 2, 3 /))) STOP 2
b = maxval (a, dim = 1)
- if (.not.isnan(b(1))) call abort
+ if (.not.isnan(b(1))) STOP 3
b(1) = 0.0
- if (any (b.ne.(/ 0.0, minf, pinf /))) call abort
- if (any (maxloc (a, dim = 1).ne.(/ 1, 1, 2 /))) call abort
+ if (any (b.ne.(/ 0.0, minf, pinf /))) STOP 4
+ if (any (maxloc (a, dim = 1).ne.(/ 1, 1, 2 /))) STOP 5
b = maxval (a, dim = 2)
- if (any (b.ne.(/ minf, pinf, minf /))) call abort
- if (any (maxloc (a, dim = 2).ne.(/ 2, 3, 2 /))) call abort
- if (maxval (a, mask = l).ne.h) call abort
- if (any (maxloc (a, mask = l).ne.(/ 0, 0 /))) call abort
+ if (any (b.ne.(/ minf, pinf, minf /))) STOP 6
+ if (any (maxloc (a, dim = 2).ne.(/ 2, 3, 2 /))) STOP 7
+ if (maxval (a, mask = l).ne.h) STOP 8
+ if (any (maxloc (a, mask = l).ne.(/ 0, 0 /))) STOP 9
b = maxval (a, dim = 1, mask = l)
- if (any (b.ne.(/ h, h, h /))) call abort
- if (any (maxloc (a, dim = 1, mask = l).ne.(/ 0, 0, 0 /))) call abort
+ if (any (b.ne.(/ h, h, h /))) STOP 10
+ if (any (maxloc (a, dim = 1, mask = l).ne.(/ 0, 0, 0 /))) STOP 11
b = maxval (a, dim = 2, mask = l)
- if (any (b.ne.(/ h, h, h /))) call abort
- if (any (maxloc (a, dim = 2, mask = l).ne.(/ 0, 0, 0 /))) call abort
- if (maxval (a, mask = l3).ne.h) call abort
- if (any (maxloc (a, mask = l3).ne.(/ 0, 0 /))) call abort
+ if (any (b.ne.(/ h, h, h /))) STOP 12
+ if (any (maxloc (a, dim = 2, mask = l).ne.(/ 0, 0, 0 /))) STOP 13
+ if (maxval (a, mask = l3).ne.h) STOP 14
+ if (any (maxloc (a, mask = l3).ne.(/ 0, 0 /))) STOP 15
b = maxval (a, dim = 1, mask = l3)
- if (any (b.ne.(/ h, h, h /))) call abort
- if (any (maxloc (a, dim = 1, mask = l3).ne.(/ 0, 0, 0 /))) call abort
+ if (any (b.ne.(/ h, h, h /))) STOP 16
+ if (any (maxloc (a, dim = 1, mask = l3).ne.(/ 0, 0, 0 /))) STOP 17
b = maxval (a, dim = 2, mask = l3)
- if (any (b.ne.(/ h, h, h /))) call abort
- if (any (maxloc (a, dim = 2, mask = l3).ne.(/ 0, 0, 0 /))) call abort
- if (maxval (a, mask = l2).ne.pinf) call abort
- if (maxval (a, mask = l4).ne.pinf) call abort
- if (any (maxloc (a, mask = l2).ne.(/ 2, 3 /))) call abort
- if (any (maxloc (a, mask = l4).ne.(/ 2, 3 /))) call abort
+ if (any (b.ne.(/ h, h, h /))) STOP 18
+ if (any (maxloc (a, dim = 2, mask = l3).ne.(/ 0, 0, 0 /))) STOP 19
+ if (maxval (a, mask = l2).ne.pinf) STOP 20
+ if (maxval (a, mask = l4).ne.pinf) STOP 21
+ if (any (maxloc (a, mask = l2).ne.(/ 2, 3 /))) STOP 22
+ if (any (maxloc (a, mask = l4).ne.(/ 2, 3 /))) STOP 23
b = maxval (a, dim = 1, mask = l2)
- if (.not.isnan(b(1))) call abort
+ if (.not.isnan(b(1))) STOP 24
b(1) = 0.0
- if (any (b.ne.(/ 0.0, minf, pinf /))) call abort
- if (any (maxloc (a, dim = 1, mask = l2).ne.(/ 1, 1, 2 /))) call abort
+ if (any (b.ne.(/ 0.0, minf, pinf /))) STOP 25
+ if (any (maxloc (a, dim = 1, mask = l2).ne.(/ 1, 1, 2 /))) STOP 26
b = maxval (a, dim = 2, mask = l2)
- if (any (b.ne.(/ minf, pinf, minf /))) call abort
- if (any (maxloc (a, dim = 2, mask = l2).ne.(/ 2, 3, 2 /))) call abort
+ if (any (b.ne.(/ minf, pinf, minf /))) STOP 27
+ if (any (maxloc (a, dim = 2, mask = l2).ne.(/ 2, 3, 2 /))) STOP 28
b = maxval (a, dim = 1, mask = l4)
- if (.not.isnan(b(1))) call abort
+ if (.not.isnan(b(1))) STOP 29
b(1) = 0.0
- if (any (b.ne.(/ 0.0, minf, pinf /))) call abort
- if (any (maxloc (a, dim = 1, mask = l2).ne.(/ 1, 1, 2 /))) call abort
+ if (any (b.ne.(/ 0.0, minf, pinf /))) STOP 30
+ if (any (maxloc (a, dim = 1, mask = l2).ne.(/ 1, 1, 2 /))) STOP 31
b = maxval (a, dim = 2, mask = l4)
- if (any (b.ne.(/ minf, pinf, minf /))) call abort
- if (any (maxloc (a, dim = 2, mask = l2).ne.(/ 2, 3, 2 /))) call abort
- if (maxval (a, mask = l5).ne.minf) call abort
- if (any (maxloc (a, mask = l5).ne.(/ 2, 2 /))) call abort
+ if (any (b.ne.(/ minf, pinf, minf /))) STOP 32
+ if (any (maxloc (a, dim = 2, mask = l2).ne.(/ 2, 3, 2 /))) STOP 33
+ if (maxval (a, mask = l5).ne.minf) STOP 34
+ if (any (maxloc (a, mask = l5).ne.(/ 2, 2 /))) STOP 35
b = maxval (a, dim = 1, mask = l5)
- if (.not.isnan(b(1))) call abort
+ if (.not.isnan(b(1))) STOP 36
b(1) = 0.0
- if (any (b.ne.(/ 0.0, minf, minf /))) call abort
- if (any (maxloc (a, dim = 1, mask = l5).ne.(/ 2, 2, 1 /))) call abort
+ if (any (b.ne.(/ 0.0, minf, minf /))) STOP 37
+ if (any (maxloc (a, dim = 1, mask = l5).ne.(/ 2, 2, 1 /))) STOP 38
b = maxval (a, dim = 2, mask = l5)
- if (any (b.ne.(/ minf, minf, minf /))) call abort
- if (any (maxloc (a, dim = 2, mask = l5).ne.(/ 3, 2, 2 /))) call abort
+ if (any (b.ne.(/ minf, minf, minf /))) STOP 39
+ if (any (maxloc (a, dim = 2, mask = l5).ne.(/ 3, 2, 2 /))) STOP 40
a = nan
- if (.not.isnan(maxval (a))) call abort
- if (maxval (a, mask = l).ne.h) call abort
- if (.not.isnan(maxval (a, mask = l2))) call abort
- if (maxval (a, mask = l3).ne.h) call abort
- if (.not.isnan(maxval (a, mask = l4))) call abort
- if (.not.isnan(maxval (a, mask = l5))) call abort
- if (any (maxloc (a).ne.(/ 1, 1 /))) call abort
- if (any (maxloc (a, mask = l).ne.(/ 0, 0 /))) call abort
- if (any (maxloc (a, mask = l2).ne.(/ 1, 1 /))) call abort
- if (any (maxloc (a, mask = l3).ne.(/ 0, 0 /))) call abort
- if (any (maxloc (a, mask = l4).ne.(/ 1, 1 /))) call abort
- if (any (maxloc (a, mask = l5).ne.(/ 2, 1 /))) call abort
+ if (.not.isnan(maxval (a))) STOP 41
+ if (maxval (a, mask = l).ne.h) STOP 42
+ if (.not.isnan(maxval (a, mask = l2))) STOP 43
+ if (maxval (a, mask = l3).ne.h) STOP 44
+ if (.not.isnan(maxval (a, mask = l4))) STOP 45
+ if (.not.isnan(maxval (a, mask = l5))) STOP 46
+ if (any (maxloc (a).ne.(/ 1, 1 /))) STOP 47
+ if (any (maxloc (a, mask = l).ne.(/ 0, 0 /))) STOP 48
+ if (any (maxloc (a, mask = l2).ne.(/ 1, 1 /))) STOP 49
+ if (any (maxloc (a, mask = l3).ne.(/ 0, 0 /))) STOP 50
+ if (any (maxloc (a, mask = l4).ne.(/ 1, 1 /))) STOP 51
+ if (any (maxloc (a, mask = l5).ne.(/ 2, 1 /))) STOP 52
a = minf
- if (maxval (a).ne.minf) call abort
- if (maxval (a, mask = l).ne.h) call abort
- if (maxval (a, mask = l2).ne.minf) call abort
- if (maxval (a, mask = l3).ne.h) call abort
- if (maxval (a, mask = l4).ne.minf) call abort
- if (maxval (a, mask = l5).ne.minf) call abort
- if (any (maxloc (a).ne.(/ 1, 1 /))) call abort
- if (any (maxloc (a, mask = l).ne.(/ 0, 0 /))) call abort
- if (any (maxloc (a, mask = l2).ne.(/ 1, 1 /))) call abort
- if (any (maxloc (a, mask = l3).ne.(/ 0, 0 /))) call abort
- if (any (maxloc (a, mask = l4).ne.(/ 1, 1 /))) call abort
- if (any (maxloc (a, mask = l5).ne.(/ 2, 1 /))) call abort
+ if (maxval (a).ne.minf) STOP 53
+ if (maxval (a, mask = l).ne.h) STOP 54
+ if (maxval (a, mask = l2).ne.minf) STOP 55
+ if (maxval (a, mask = l3).ne.h) STOP 56
+ if (maxval (a, mask = l4).ne.minf) STOP 57
+ if (maxval (a, mask = l5).ne.minf) STOP 58
+ if (any (maxloc (a).ne.(/ 1, 1 /))) STOP 59
+ if (any (maxloc (a, mask = l).ne.(/ 0, 0 /))) STOP 60
+ if (any (maxloc (a, mask = l2).ne.(/ 1, 1 /))) STOP 61
+ if (any (maxloc (a, mask = l3).ne.(/ 0, 0 /))) STOP 62
+ if (any (maxloc (a, mask = l4).ne.(/ 1, 1 /))) STOP 63
+ if (any (maxloc (a, mask = l5).ne.(/ 2, 1 /))) STOP 64
a = nan
a(1,3) = minf
- if (maxval (a).ne.minf) call abort
- if (maxval (a, mask = l).ne.h) call abort
- if (maxval (a, mask = l2).ne.minf) call abort
- if (maxval (a, mask = l3).ne.h) call abort
- if (maxval (a, mask = l4).ne.minf) call abort
- if (maxval (a, mask = l5).ne.minf) call abort
- if (any (maxloc (a).ne.(/ 1, 3 /))) call abort
- if (any (maxloc (a, mask = l).ne.(/ 0, 0 /))) call abort
- if (any (maxloc (a, mask = l2).ne.(/ 1, 3 /))) call abort
- if (any (maxloc (a, mask = l3).ne.(/ 0, 0 /))) call abort
- if (any (maxloc (a, mask = l4).ne.(/ 1, 3 /))) call abort
- if (any (maxloc (a, mask = l5).ne.(/ 1, 3 /))) call abort
+ if (maxval (a).ne.minf) STOP 65
+ if (maxval (a, mask = l).ne.h) STOP 66
+ if (maxval (a, mask = l2).ne.minf) STOP 67
+ if (maxval (a, mask = l3).ne.h) STOP 68
+ if (maxval (a, mask = l4).ne.minf) STOP 69
+ if (maxval (a, mask = l5).ne.minf) STOP 70
+ if (any (maxloc (a).ne.(/ 1, 3 /))) STOP 71
+ if (any (maxloc (a, mask = l).ne.(/ 0, 0 /))) STOP 72
+ if (any (maxloc (a, mask = l2).ne.(/ 1, 3 /))) STOP 73
+ if (any (maxloc (a, mask = l3).ne.(/ 0, 0 /))) STOP 74
+ if (any (maxloc (a, mask = l4).ne.(/ 1, 3 /))) STOP 75
+ if (any (maxloc (a, mask = l5).ne.(/ 1, 3 /))) STOP 76
end
write (unit=a,fmt='(I5.5)') (21-i*i+6*i,i=1,n)
res = maxval(a)
- if (res /= '00030') call abort
+ if (res /= '00030') STOP 1
res = maxval(a,dim=1)
- if (res /= '00030') call abort
+ if (res /= '00030') STOP 2
do
call random_number(r)
v = int(r * 100)
end do
write (unit=b,fmt='(I5.5)') v
write (unit=res,fmt='(I5.5)') maxval(v)
- if (res /= maxval(b)) call abort
+ if (res /= maxval(b)) STOP 3
smask = .true.
- if (res /= maxval(b, smask)) call abort
+ if (res /= maxval(b, smask)) STOP 4
smask = .false.
- if (all_zero /= maxval(b, smask)) call abort
+ if (all_zero /= maxval(b, smask)) STOP 5
mask = v > 20
write (unit=res,fmt='(I5.5)') maxval(v,mask)
- if (res /= maxval(b, mask)) call abort
+ if (res /= maxval(b, mask)) STOP 6
mask = .false.
- if (maxval(b, mask) /= all_zero) call abort
+ if (maxval(b, mask) /= all_zero) STOP 7
allocate (empty(0:3,0))
res = maxval(empty)
- if (res /= all_zero) call abort
+ if (res /= all_zero) STOP 8
end program main
write (unit=a,fmt='(I5.5)') (21-i*i+6*i,i=1,n)
res = maxval(a)
- if (res /= 4_'00030') call abort
+ if (res /= 4_'00030') STOP 1
do
call random_number(r)
v = int(r * 100)
end do
write (unit=b,fmt='(I5.5)') v
write (unit=res,fmt='(I5.5)') maxval(v)
- if (res /= maxval(b)) call abort
+ if (res /= maxval(b)) STOP 2
smask = .true.
- if (res /= maxval(b, smask)) call abort
+ if (res /= maxval(b, smask)) STOP 3
smask = .false.
- if (all_zero /= maxval(b, smask)) call abort
+ if (all_zero /= maxval(b, smask)) STOP 4
mask = v > 20
write (unit=res,fmt='(I5.5)') maxval(v,mask)
- if (res /= maxval(b, mask)) call abort
+ if (res /= maxval(b, mask)) STOP 5
mask = .false.
- if (maxval(b, mask) /= all_zero) call abort
+ if (maxval(b, mask) /= all_zero) STOP 6
allocate (empty(0:3,0))
res = maxval(empty)
- if (res /= all_zero) call abort
+ if (res /= all_zero) STOP 7
end program main
r1 = maxval(a,dim=1)
write (unit=r2,fmt='(I6.6)') maxval(v,dim=1)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 1
r1 = 'x'
write (unit=r1,fmt='(I6.6)') maxval(v,dim=1)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 2
r1 = 'y'
r1 = maxval(a,dim=2)
write (unit=r2,fmt='(I6.6)') maxval(v,dim=2)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 3
r1 = 'z'
write (unit=r1,fmt='(I6.6)') maxval(v,dim=2)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 4
allocate (a_alloc(0,1), v_alloc(0,1))
ret = 'what'
ret = maxval(a_alloc,dim=1)
- if (ret(1) /= zero) call abort
+ if (ret(1) /= zero) STOP 5
r1 = 'qq'
r1 = maxval(a, dim=1, mask=a>"000200");
- if (any(r1 /= zero .neqv. maxval(v,dim=1, mask=v>200) > 0)) call abort
- if (any(maxval(a, dim=1, mask=a>"000200") /= zero .neqv. maxval(v,dim=1, mask=v>200) > 0)) call abort
+ if (any(r1 /= zero .neqv. maxval(v,dim=1, mask=v>200) > 0)) STOP 6
+ if (any(maxval(a, dim=1, mask=a>"000200") /= zero .neqv. maxval(v,dim=1, mask=v>200) > 0)) STOP 7
r1 = 'rr'
r1 = maxval(a, dim=2, mask=a>"000200");
- if (any(r1 /= zero .neqv. maxval(v,dim=2, mask=v>200) > 0)) call abort
- if (any(maxval(a, dim=2, mask=a>"000200") /= zero .neqv. maxval(v,dim=2, mask=v>200) > 0)) call abort
+ if (any(r1 /= zero .neqv. maxval(v,dim=2, mask=v>200) > 0)) STOP 8
+ if (any(maxval(a, dim=2, mask=a>"000200") /= zero .neqv. maxval(v,dim=2, mask=v>200) > 0)) STOP 9
mask = .true.
forall (i=1:n)
r1 = 'aa'
r1 = maxval(a, dim=1, mask=mask)
write(unit=r2,fmt='(I6.6)') maxval(v,dim=1, mask=mask)
- if (any(r1 /= r2)) call abort
+ if (any(r1 /= r2)) STOP 10
r1 = 'xyz'
smask = .true.
r1 = maxval(a, dim=1, mask=smask)
write (unit=r2,fmt='(I6.6)') maxval(v,dim=1)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 11
smask = .false.
r1 = 'foobar'
r1 = maxval(a, dim=1, mask=smask)
- if (any(r1 /= zero)) call abort
+ if (any(r1 /= zero)) STOP 12
end program main
r1 = maxval(a,dim=1)
write (unit=r2,fmt='(I6.6)') maxval(v,dim=1)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 1
r1 = 4_'x'
write (unit=r1,fmt='(I6.6)') maxval(v,dim=1)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 2
r1 = 4_'y'
r1 = maxval(a,dim=2)
write (unit=r2,fmt='(I6.6)') maxval(v,dim=2)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 3
r1 = 4_'z'
write (unit=r1,fmt='(I6.6)') maxval(v,dim=2)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 4
allocate (a_alloc(0,1), v_alloc(0,1))
ret = 4_'what'
ret = maxval(a_alloc,dim=1)
- if (ret(1) /= zero) call abort
+ if (ret(1) /= zero) STOP 5
r1 = 4_'qq'
r1 = maxval(a, dim=1, mask=a>4_"000200");
- if (any(r1 /= zero .neqv. maxval(v,dim=1, mask=v>200) > 0)) call abort
- if (any(maxval(a, dim=1, mask=a>4_"000200") /= zero .neqv. maxval(v,dim=1, mask=v>200) > 0)) call abort
+ if (any(r1 /= zero .neqv. maxval(v,dim=1, mask=v>200) > 0)) STOP 6
+ if (any(maxval(a, dim=1, mask=a>4_"000200") /= zero .neqv. maxval(v,dim=1, mask=v>200) > 0)) STOP 7
r1 = 4_'rr'
r1 = maxval(a, dim=2, mask=a>4_"000200");
- if (any(r1 /= zero .neqv. maxval(v,dim=2, mask=v>200) > 0)) call abort
- if (any(maxval(a, dim=2, mask=a>4_"000200") /= zero .neqv. maxval(v,dim=2, mask=v>200) > 0)) call abort
+ if (any(r1 /= zero .neqv. maxval(v,dim=2, mask=v>200) > 0)) STOP 8
+ if (any(maxval(a, dim=2, mask=a>4_"000200") /= zero .neqv. maxval(v,dim=2, mask=v>200) > 0)) STOP 9
mask = .true.
forall (i=1:n)
r1 = 4_'aa'
r1 = maxval(a, dim=1, mask=mask)
write(unit=r2,fmt='(I6.6)') maxval(v,dim=1, mask=mask)
- if (any(r1 /= r2)) call abort
+ if (any(r1 /= r2)) STOP 10
r1 = 4_'xyz'
smask = .true.
r1 = maxval(a, dim=1, mask=smask)
write (unit=r2,fmt='(I6.6)') maxval(v,dim=1)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 11
smask = .false.
r1 = 4_'foobar'
r1 = maxval(a, dim=1, mask=smask)
- if (any(r1 /= zero)) call abort
+ if (any(r1 /= zero)) STOP 12
end program main
character(len=3), parameter :: cm4 = maxval (c, c<"g")
character(len=3), dimension(3), parameter :: cm5 = maxval(c,dim=1,mask=c<"p")
- if (any (im1 /= [ 2, 5, 11])) call abort
- if (im2 /= -1) call abort
- if (any (im3 /= [ -1,11])) call abort
- if (im4 /= -3) call abort
- if (any (im5 /= [-huge(im5)-1, -3, -7])) call abort ! { dg-warning "Integer outside symmetric range" }
- if (any (im6 /= [-1, -huge(im6)-1])) call abort ! { dg-warning "Integer outside symmetric range" }
+ if (any (im1 /= [ 2, 5, 11])) STOP 1
+ if (im2 /= -1) STOP 2
+ if (any (im3 /= [ -1,11])) STOP 3
+ if (im4 /= -3) STOP 4
+ if (any (im5 /= [-huge(im5)-1, -3, -7])) STOP 5! { dg-warning "Integer outside symmetric range" }
+ if (any (im6 /= [-1, -huge(im6)-1])) STOP 6! { dg-warning "Integer outside symmetric range" }
- if (any (rm1 /= [ 2., 5., 11.])) call abort
- if (rm2 /= -1.) call abort
- if (any (rm3 /= [ -1.,11.])) call abort
- if (rm4 /= -3.) call abort
- if (any (rm5 /= [-huge(rm5), -3., -7.])) call abort
- if (any (rm6 /= [-1.,-huge(rm6)])) call abort
+ if (any (rm1 /= [ 2., 5., 11.])) STOP 7
+ if (rm2 /= -1.) STOP 8
+ if (any (rm3 /= [ -1.,11.])) STOP 9
+ if (rm4 /= -3.) STOP 10
+ if (any (rm5 /= [-huge(rm5), -3., -7.])) STOP 11
+ if (any (rm6 /= [-1.,-huge(rm6)])) STOP 12
- if (cm1 /= "zui") call abort
- if (any (cm2 /= ["fgh", "qwe", "zui" ])) call abort
- if (any (cm3 /= ["qwe", "zui" ])) call abort
- if (cm4 /= "fgh") call abort
- if (any(cm5 /= [ "fgh", "jkl", "ert" ] )) call abort
+ if (cm1 /= "zui") STOP 13
+ if (any (cm2 /= ["fgh", "qwe", "zui" ])) STOP 14
+ if (any (cm3 /= ["qwe", "zui" ])) STOP 15
+ if (cm4 /= "fgh") STOP 16
+ if (any(cm5 /= [ "fgh", "jkl", "ert" ] )) STOP 17
end program main
j4 = mclock()
j8 = mclock8()
- if (i4 > j4 .or. i8 > j8 .or. i4 > i8 .or. j4 > j8) call abort
+ if (i4 > j4 .or. i8 > j8 .or. i4 > i8 .or. j4 > j8) STOP 1
end
end interface
#define CHECK(I,J,K) \
- if (merge_bits(I,J,K) /= ior(iand(I,K),iand(J,not(K)))) call abort ; \
- if (run_merge(I,J,K) /= merge_bits(I,J,K)) call abort
+ if (merge_bits(I,J,K) /= ior(iand(I,K),iand(J,not(K)))) STOP 1; \
+ if (run_merge(I,J,K) /= merge_bits(I,J,K)) STOP 2
CHECK(13_1,18_1,22_1)
CHECK(-13_1,18_1,22_1)
! { dg-require-effective-target fortran_integer_16 }
#define CHECK(I,J,K) \
- if (merge_bits(I,J,K) /= ior(iand(I,K),iand(J,not(K)))) call abort ; \
- if (run_merge(I,J,K) /= merge_bits(I,J,K)) call abort
+ if (merge_bits(I,J,K) /= ior(iand(I,K),iand(J,not(K)))) STOP 1; \
+ if (run_merge(I,J,K) /= merge_bits(I,J,K)) STOP 2
CHECK(13_16,18_16,22_16)
CHECK(-13_16,18_16,22_16)
ll = (/ .TRUE., .FALSE. /)
c = merge( (/ "AA", "BB" /), (/ "CC", "DD" /), ll )
-if (c(1).ne."AA" .or. c(2).ne."DD") call abort ()
+if (c(1).ne."AA" .or. c(2).ne."DD") STOP 1
c = ""
c = merge( (/ "AA", "BB" /), (/ "CC", "DD" /), (/ .TRUE., .FALSE. /) )
-if (c(1).ne."AA" .or. c(2).ne."DD") call abort ()
+if (c(1).ne."AA" .or. c(2).ne."DD") STOP 2
end
INTEGER, PARAMETER :: array_7(3) = MERGE ([1,2,3], -array, mask)
- IF (scalar_1 /= 1 .OR. scalar_2 /= 1) CALL abort
- IF (.NOT. ALL (array_1 == array)) CALL abort
- IF (.NOT. ALL (array_2 == [0, 0, 0])) CALL abort
- IF (.NOT. ALL (array_3 == [0, 0, 0])) CALL abort
- IF (.NOT. ALL (array_4 == array)) CALL abort
- IF (.NOT. ALL (array_5 == [1, 0, 1])) CALL abort
- IF (.NOT. ALL (array_6 == [1, -2, 3])) CALL abort
+ IF (scalar_1 /= 1 .OR. scalar_2 /= 1) STOP 1
+ IF (.NOT. ALL (array_1 == array)) STOP 2
+ IF (.NOT. ALL (array_2 == [0, 0, 0])) STOP 3
+ IF (.NOT. ALL (array_3 == [0, 0, 0])) STOP 4
+ IF (.NOT. ALL (array_4 == array)) STOP 5
+ IF (.NOT. ALL (array_5 == [1, 0, 1])) STOP 6
+ IF (.NOT. ALL (array_6 == [1, -2, 3])) STOP 7
END
! { dg-do run }
-IF (T1(1.0,1.0) .NE. (1.0,1.0) ) CALL ABORT()
-IF (T1(1.0) .NE. (1.0,0.0)) CALL ABORT()
-IF (M1(1,2,3) .NE. 3) CALL ABORT()
-IF (M1(1,2,A4=4) .NE. 4) CALL ABORT()
+IF (T1(1.0,1.0) .NE. (1.0,1.0) ) STOP 1
+IF (T1(1.0) .NE. (1.0,0.0)) STOP 2
+IF (M1(1,2,3) .NE. 3) STOP 3
+IF (M1(1,2,A4=4) .NE. 4) STOP 4
CONTAINS
COMPLEX FUNCTION T1(X,Y)
! PR33095
!
! { dg-do run }
- if (m1(3,4) /= 4) call abort
- if (m1(3) /= 3) call abort
- if (m1() /= 2) call abort
+ if (m1(3,4) /= 4) STOP 1
+ if (m1(3) /= 3) STOP 2
+ if (m1() /= 2) STOP 3
- if (m1(3,4) /= 4) call abort
- if (m1(3) /= 3) call abort
+ if (m1(3,4) /= 4) STOP 4
+ if (m1(3) /= 3) STOP 5
contains
integer function m1(a1,a2)
integer, optional, intent(in) :: a1, a2
allocate (c(3))
a(:) = nan
ia = minloc (a)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 1
a(:) = pinf
ia = minloc (a)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 2
a(1:2) = nan
ia = minloc (a)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 3
a(2) = 1.0
ia = minloc (a)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 4
a(2) = minf
ia = minloc (a)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 5
c(:) = nan
ia = minloc (c)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 6
c(:) = pinf
ia = minloc (c)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 7
c(1:2) = nan
ia = minloc (c)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 8
c(2) = 1.0
ia = minloc (c)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 9
c(2) = minf
ia = minloc (c)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 10
l = .false.
l2(:) = .false.
a(:) = nan
ia = minloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 11
ia = minloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 12
a(:) = pinf
ia = minloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 13
ia = minloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 14
a(1:2) = nan
ia = minloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 15
ia = minloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 16
a(2) = 1.0
ia = minloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 17
ia = minloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 18
a(2) = minf
ia = minloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 19
ia = minloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 20
c(:) = nan
ia = minloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 21
ia = minloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 22
c(:) = pinf
ia = minloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 23
ia = minloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 24
c(1:2) = nan
ia = minloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 25
ia = minloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 26
c(2) = 1.0
ia = minloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 27
ia = minloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 28
c(2) = minf
ia = minloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 29
ia = minloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 30
l = .true.
l2(:) = .true.
a(:) = nan
ia = minloc (a, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 31
ia = minloc (a, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 32
a(:) = pinf
ia = minloc (a, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 33
ia = minloc (a, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 34
a(1:2) = nan
ia = minloc (a, mask = l)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 35
ia = minloc (a, mask = l2)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 36
a(2) = 1.0
ia = minloc (a, mask = l)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 37
ia = minloc (a, mask = l2)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 38
a(2) = minf
ia = minloc (a, mask = l)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 39
ia = minloc (a, mask = l2)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 40
c(:) = nan
ia = minloc (c, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 41
ia = minloc (c, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 42
c(:) = pinf
ia = minloc (c, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 43
ia = minloc (c, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 44
c(1:2) = nan
ia = minloc (c, mask = l)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 45
ia = minloc (c, mask = l2)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 46
c(2) = 1.0
ia = minloc (c, mask = l)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 47
ia = minloc (c, mask = l2)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 48
c(2) = minf
ia = minloc (c, mask = l)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 49
ia = minloc (c, mask = l2)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 50
deallocate (c)
allocate (c(-2:-3))
ia = minloc (c)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 51
end
allocate (c(3))
a(:) = 5
ia = minloc (a)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 1
a(2) = h
ia = minloc (a)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 2
a(:) = huge(h)
ia = minloc (a)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 3
a(3) = huge(h) - 1
ia = minloc (a)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 4
c(:) = 5
ia = minloc (c)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 5
c(2) = h
ia = minloc (c)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 6
c(:) = huge(h)
ia = minloc (c)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 7
c(3) = huge(h) - 1
ia = minloc (c)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 8
l = .false.
l2(:) = .false.
a(:) = 5
ia = minloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 9
ia = minloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 10
a(2) = h
ia = minloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 11
ia = minloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 12
a(:) = huge(h)
ia = minloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 13
ia = minloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 14
a(3) = huge(h) - 1
ia = minloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 15
ia = minloc (a, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 16
c(:) = 5
ia = minloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 17
ia = minloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 18
c(2) = h
ia = minloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 19
ia = minloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 20
c(:) = huge(h)
ia = minloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 21
ia = minloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 22
c(3) = huge(h) - 1
ia = minloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 23
ia = minloc (c, mask = l2)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 24
l = .true.
l2(:) = .true.
a(:) = 5
ia = minloc (a, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 25
ia = minloc (a, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 26
a(2) = h
ia = minloc (a, mask = l)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 27
ia = minloc (a, mask = l2)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 28
a(:) = huge(h)
ia = minloc (a, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 29
ia = minloc (a, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 30
a(3) = huge(h) - 1
ia = minloc (a, mask = l)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 31
ia = minloc (a, mask = l2)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 32
c(:) = 5
ia = minloc (c, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 33
ia = minloc (c, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 34
c(2) = h
ia = minloc (c, mask = l)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 35
ia = minloc (c, mask = l2)
- if (ia(1).ne.2) call abort
+ if (ia(1).ne.2) STOP 36
c(:) = huge(h)
ia = minloc (c, mask = l)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 37
ia = minloc (c, mask = l2)
- if (ia(1).ne.1) call abort
+ if (ia(1).ne.1) STOP 38
c(3) = huge(h) - 1
ia = minloc (c, mask = l)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 39
ia = minloc (c, mask = l2)
- if (ia(1).ne.3) call abort
+ if (ia(1).ne.3) STOP 40
deallocate (c)
allocate (c(-2:-3))
ia = minloc (c)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 41
end
e(7) = 6
g(7) = 6
ia = minloc (a)
- if (ia(1).ne.7) call abort
+ if (ia(1).ne.7) STOP 1
ia = minloc (a(::2))
- if (ia(1).ne.4) call abort
- if (any (minloc (a).ne.(/ 7 /))) call abort
- if (any (minloc (a(::2)).ne.(/ 4 /))) call abort
+ if (ia(1).ne.4) STOP 2
+ if (any (minloc (a).ne.(/ 7 /))) STOP 3
+ if (any (minloc (a(::2)).ne.(/ 4 /))) STOP 4
ia = minloc (c)
- if (ia(1).ne.7) call abort
+ if (ia(1).ne.7) STOP 5
ia = minloc (c(::2))
- if (ia(1).ne.4) call abort
- if (any (minloc (c).ne.(/ 7 /))) call abort
- if (any (minloc (c(::2)).ne.(/ 4 /))) call abort
+ if (ia(1).ne.4) STOP 6
+ if (any (minloc (c).ne.(/ 7 /))) STOP 7
+ if (any (minloc (c(::2)).ne.(/ 4 /))) STOP 8
ia = minloc (e)
- if (ia(1).ne.7) call abort
+ if (ia(1).ne.7) STOP 9
ia = minloc (e(::2))
- if (ia(1).ne.4) call abort
- if (any (minloc (e).ne.(/ 7 /))) call abort
- if (any (minloc (e(::2)).ne.(/ 4 /))) call abort
+ if (ia(1).ne.4) STOP 10
+ if (any (minloc (e).ne.(/ 7 /))) STOP 11
+ if (any (minloc (e(::2)).ne.(/ 4 /))) STOP 12
ia = minloc (g)
- if (ia(1).ne.7) call abort
+ if (ia(1).ne.7) STOP 13
ia = minloc (g(::2))
- if (ia(1).ne.4) call abort
- if (any (minloc (g).ne.(/ 7 /))) call abort
- if (any (minloc (g(::2)).ne.(/ 4 /))) call abort
+ if (ia(1).ne.4) STOP 14
+ if (any (minloc (g).ne.(/ 7 /))) STOP 15
+ if (any (minloc (g(::2)).ne.(/ 4 /))) STOP 16
l = .true.
ia = minloc (a, mask = l)
- if (ia(1).ne.7) call abort
+ if (ia(1).ne.7) STOP 17
ia = minloc (a(::2), mask = l(::2))
- if (ia(1).ne.4) call abort
- if (any (minloc (a, mask = l).ne.(/ 7 /))) call abort
- if (any (minloc (a(::2), mask = l(::2)).ne.(/ 4 /))) call abort
+ if (ia(1).ne.4) STOP 18
+ if (any (minloc (a, mask = l).ne.(/ 7 /))) STOP 19
+ if (any (minloc (a(::2), mask = l(::2)).ne.(/ 4 /))) STOP 20
ia = minloc (c, mask = l)
- if (ia(1).ne.7) call abort
+ if (ia(1).ne.7) STOP 21
ia = minloc (c(::2), mask = l(::2))
- if (ia(1).ne.4) call abort
- if (any (minloc (c, mask = l).ne.(/ 7 /))) call abort
- if (any (minloc (c(::2), mask = l(::2)).ne.(/ 4 /))) call abort
+ if (ia(1).ne.4) STOP 22
+ if (any (minloc (c, mask = l).ne.(/ 7 /))) STOP 23
+ if (any (minloc (c(::2), mask = l(::2)).ne.(/ 4 /))) STOP 24
ia = minloc (e, mask = l)
- if (ia(1).ne.7) call abort
+ if (ia(1).ne.7) STOP 25
ia = minloc (e(::2), mask = l(::2))
- if (ia(1).ne.4) call abort
- if (any (minloc (e, mask = l).ne.(/ 7 /))) call abort
- if (any (minloc (e(::2), mask = l(::2)).ne.(/ 4 /))) call abort
+ if (ia(1).ne.4) STOP 26
+ if (any (minloc (e, mask = l).ne.(/ 7 /))) STOP 27
+ if (any (minloc (e(::2), mask = l(::2)).ne.(/ 4 /))) STOP 28
ia = minloc (g, mask = l)
- if (ia(1).ne.7) call abort
+ if (ia(1).ne.7) STOP 29
ia = minloc (g(::2), mask = l(::2))
- if (ia(1).ne.4) call abort
- if (any (minloc (g, mask = l).ne.(/ 7 /))) call abort
- if (any (minloc (g(::2), mask = l(::2)).ne.(/ 4 /))) call abort
+ if (ia(1).ne.4) STOP 30
+ if (any (minloc (g, mask = l).ne.(/ 7 /))) STOP 31
+ if (any (minloc (g(::2), mask = l(::2)).ne.(/ 4 /))) STOP 32
l = .false.
ia = minloc (a, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 33
ia = minloc (a(::2), mask = l(::2))
- if (ia(1).ne.0) call abort
- if (any (minloc (a, mask = l).ne.(/ 0 /))) call abort
- if (any (minloc (a(::2), mask = l(::2)).ne.(/ 0 /))) call abort
+ if (ia(1).ne.0) STOP 34
+ if (any (minloc (a, mask = l).ne.(/ 0 /))) STOP 35
+ if (any (minloc (a(::2), mask = l(::2)).ne.(/ 0 /))) STOP 36
ia = minloc (c, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 37
ia = minloc (c(::2), mask = l(::2))
- if (ia(1).ne.0) call abort
- if (any (minloc (c, mask = l).ne.(/ 0 /))) call abort
- if (any (minloc (c(::2), mask = l(::2)).ne.(/ 0 /))) call abort
+ if (ia(1).ne.0) STOP 38
+ if (any (minloc (c, mask = l).ne.(/ 0 /))) STOP 39
+ if (any (minloc (c(::2), mask = l(::2)).ne.(/ 0 /))) STOP 40
ia = minloc (e, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 41
ia = minloc (e(::2), mask = l(::2))
- if (ia(1).ne.0) call abort
- if (any (minloc (e, mask = l).ne.(/ 0 /))) call abort
- if (any (minloc (e(::2), mask = l(::2)).ne.(/ 0 /))) call abort
+ if (ia(1).ne.0) STOP 42
+ if (any (minloc (e, mask = l).ne.(/ 0 /))) STOP 43
+ if (any (minloc (e(::2), mask = l(::2)).ne.(/ 0 /))) STOP 44
ia = minloc (g, mask = l)
- if (ia(1).ne.0) call abort
+ if (ia(1).ne.0) STOP 45
ia = minloc (g(::2), mask = l(::2))
- if (ia(1).ne.0) call abort
- if (any (minloc (g, mask = l).ne.(/ 0 /))) call abort
- if (any (minloc (g(::2), mask = l(::2)).ne.(/ 0 /))) call abort
+ if (ia(1).ne.0) STOP 46
+ if (any (minloc (g, mask = l).ne.(/ 0 /))) STOP 47
+ if (any (minloc (g(::2), mask = l(::2)).ne.(/ 0 /))) STOP 48
a = 7.0
c = 7.0
end
integer, parameter, dimension(2) :: b11 = minloc(i2, dim=2)
integer, parameter, dimension(3) :: b12 = minloc(i2,dim=1,mask=i2>3)
integer, parameter, dimension(2) :: b13 = minloc(i2,dim=2, mask=i2<-10)
- if (b /= 2) call abort
- if (b2 /= 0) call abort
- if (b3 /= 2) call abort
- if (b4 /= 1) call abort
- if (any(b5 /= [1, 2])) call abort
- if (any(b6 /= [0, 0])) call abort
- if (any(b7 /= [2, 1])) call abort
- if (any(b8 /= [1, 2])) call abort
- if (any(b9 /= [0, 0])) call abort
+ if (b /= 2) STOP 1
+ if (b2 /= 0) STOP 2
+ if (b3 /= 2) STOP 3
+ if (b4 /= 1) STOP 4
+ if (any(b5 /= [1, 2])) STOP 5
+ if (any(b6 /= [0, 0])) STOP 6
+ if (any(b7 /= [2, 1])) STOP 7
+ if (any(b8 /= [1, 2])) STOP 8
+ if (any(b9 /= [0, 0])) STOP 9
d = 1
- if (any(b10 /= minloc(i2,dim=d))) call abort
+ if (any(b10 /= minloc(i2,dim=d))) STOP 10
d = 2
- if (any(b11 /= minloc(i2,dim=2))) call abort
+ if (any(b11 /= minloc(i2,dim=2))) STOP 11
d = 1
- if (any(b12 /= minloc(i2, dim=d,mask=i2>3))) call abort
- if (any(b13 /= 0)) call abort
+ if (any(b12 /= minloc(i2, dim=d,mask=i2>3))) STOP 12
+ if (any(b13 /= 0)) STOP 13
end program main
res1 = minloc(c)
res2 = minloc(a)
- if (any(res1 /= res2)) call abort
+ if (any(res1 /= res2)) STOP 1
res1 = minloc(c4)
- if (any(res1 /= res2)) call abort
+ if (any(res1 /= res2)) STOP 2
amask = a < 50
res1 = minloc(c,mask=amask)
res2 = minloc(a,mask=amask)
- if (any(res1 /= res2)) call abort
+ if (any(res1 /= res2)) STOP 3
amask = .false.
res1 = minloc(c,mask=amask)
- if (any(res1 /= 0)) call abort
+ if (any(res1 /= 0)) STOP 4
amask(2,3) = .true.
res1 = minloc(c,mask=amask)
- if (any(res1 /= [2,3])) call abort
+ if (any(res1 /= [2,3])) STOP 5
res1 = minloc(c,mask=.false.)
- if (any(res1 /= 0)) call abort
+ if (any(res1 /= 0)) STOP 6
res2 = minloc(a)
res1 = minloc(c,mask=.true.)
- if (any(res1 /= res2)) call abort
+ if (any(res1 /= res2)) STOP 7
q1 = minloc(c, dim=1)
q2 = minloc(a, dim=1)
- if (any(q1 /= q2)) call abort
+ if (any(q1 /= q2)) STOP 8
q1 = minloc(c, dim=2)
q2 = minloc(a, dim=2)
- if (any(q1 /= q2)) call abort
+ if (any(q1 /= q2)) STOP 9
q1 = minloc(c, dim=1, mask=amask)
q2 = minloc(a, dim=1, mask=amask)
- if (any(q1 /= q2)) call abort
+ if (any(q1 /= q2)) STOP 10
q1 = minloc(c, dim=2, mask=amask)
q2 = minloc(a, dim=2, mask=amask)
- if (any(q1 /= q2)) call abort
+ if (any(q1 /= q2)) STOP 11
amask = a < 50
q1 = minloc(c, dim=1, mask=amask)
q2 = minloc(a, dim=1, mask=amask)
- if (any(q1 /= q2)) call abort
+ if (any(q1 /= q2)) STOP 12
q1 = minloc(c, dim=2, mask=amask)
q2 = minloc(a, dim=2, mask=amask)
- if (any(q1 /= q2)) call abort
+ if (any(q1 /= q2)) STOP 13
e = reshape(c, shape(e))
f = reshape(a, shape(f))
- if (minloc(e,dim=1) /= minloc(f,dim=1)) call abort
+ if (minloc(e,dim=1) /= minloc(f,dim=1)) STOP 14
cmask = .false.
- if (minloc(e,dim=1,mask=cmask) /= 0) call abort
+ if (minloc(e,dim=1,mask=cmask) /= 0) STOP 15
cmask = f > 50
- if ( minloc(e, dim=1, mask=cmask) /= minloc (f, dim=1, mask=cmask)) call abort
+ if ( minloc(e, dim=1, mask=cmask) /= minloc (f, dim=1, mask=cmask)) STOP 16
end program main
allocate (c(3))
a(:) = nan
- if (minloc (a, dim = 1).ne.1) call abort
- if (.not.isnan(minval (a, dim = 1))) call abort
+ if (minloc (a, dim = 1).ne.1) STOP 1
+ if (.not.isnan(minval (a, dim = 1))) STOP 2
a(:) = pinf
- if (minloc (a, dim = 1).ne.1) call abort
- if (minval (a, dim = 1).ne.pinf) call abort
+ if (minloc (a, dim = 1).ne.1) STOP 3
+ if (minval (a, dim = 1).ne.pinf) STOP 4
a(1:2) = nan
- if (minloc (a, dim = 1).ne.3) call abort
- if (minval (a, dim = 1).ne.pinf) call abort
+ if (minloc (a, dim = 1).ne.3) STOP 5
+ if (minval (a, dim = 1).ne.pinf) STOP 6
a(2) = 1.0
- if (minloc (a, dim = 1).ne.2) call abort
- if (minval (a, dim = 1).ne.1) call abort
+ if (minloc (a, dim = 1).ne.2) STOP 7
+ if (minval (a, dim = 1).ne.1) STOP 8
a(2) = minf
- if (minloc (a, dim = 1).ne.2) call abort
- if (minval (a, dim = 1).ne.minf) call abort
+ if (minloc (a, dim = 1).ne.2) STOP 9
+ if (minval (a, dim = 1).ne.minf) STOP 10
c(:) = nan
- if (minloc (c, dim = 1).ne.1) call abort
- if (.not.isnan(minval (c, dim = 1))) call abort
+ if (minloc (c, dim = 1).ne.1) STOP 11
+ if (.not.isnan(minval (c, dim = 1))) STOP 12
c(:) = pinf
- if (minloc (c, dim = 1).ne.1) call abort
- if (minval (c, dim = 1).ne.pinf) call abort
+ if (minloc (c, dim = 1).ne.1) STOP 13
+ if (minval (c, dim = 1).ne.pinf) STOP 14
c(1:2) = nan
- if (minloc (c, dim = 1).ne.3) call abort
- if (minval (c, dim = 1).ne.pinf) call abort
+ if (minloc (c, dim = 1).ne.3) STOP 15
+ if (minval (c, dim = 1).ne.pinf) STOP 16
c(2) = 1.0
- if (minloc (c, dim = 1).ne.2) call abort
- if (minval (c, dim = 1).ne.1) call abort
+ if (minloc (c, dim = 1).ne.2) STOP 17
+ if (minval (c, dim = 1).ne.1) STOP 18
c(2) = minf
- if (minloc (c, dim = 1).ne.2) call abort
- if (minval (c, dim = 1).ne.minf) call abort
+ if (minloc (c, dim = 1).ne.2) STOP 19
+ if (minval (c, dim = 1).ne.minf) STOP 20
l = .false.
l2(:) = .false.
a(:) = nan
- if (minloc (a, dim = 1, mask = l).ne.0) call abort
- if (minval (a, dim = 1, mask = l).ne.huge(pinf)) call abort
- if (minloc (a, dim = 1, mask = l2).ne.0) call abort
- if (minval (a, dim = 1, mask = l2).ne.huge(pinf)) call abort
+ if (minloc (a, dim = 1, mask = l).ne.0) STOP 21
+ if (minval (a, dim = 1, mask = l).ne.huge(pinf)) STOP 22
+ if (minloc (a, dim = 1, mask = l2).ne.0) STOP 23
+ if (minval (a, dim = 1, mask = l2).ne.huge(pinf)) STOP 24
a(:) = pinf
- if (minloc (a, dim = 1, mask = l).ne.0) call abort
- if (minval (a, dim = 1, mask = l).ne.huge(pinf)) call abort
- if (minloc (a, dim = 1, mask = l2).ne.0) call abort
- if (minval (a, dim = 1, mask = l2).ne.huge(pinf)) call abort
+ if (minloc (a, dim = 1, mask = l).ne.0) STOP 25
+ if (minval (a, dim = 1, mask = l).ne.huge(pinf)) STOP 26
+ if (minloc (a, dim = 1, mask = l2).ne.0) STOP 27
+ if (minval (a, dim = 1, mask = l2).ne.huge(pinf)) STOP 28
a(1:2) = nan
- if (minloc (a, dim = 1, mask = l).ne.0) call abort
- if (minval (a, dim = 1, mask = l).ne.huge(pinf)) call abort
- if (minloc (a, dim = 1, mask = l2).ne.0) call abort
- if (minval (a, dim = 1, mask = l2).ne.huge(pinf)) call abort
+ if (minloc (a, dim = 1, mask = l).ne.0) STOP 29
+ if (minval (a, dim = 1, mask = l).ne.huge(pinf)) STOP 30
+ if (minloc (a, dim = 1, mask = l2).ne.0) STOP 31
+ if (minval (a, dim = 1, mask = l2).ne.huge(pinf)) STOP 32
a(2) = 1.0
- if (minloc (a, dim = 1, mask = l).ne.0) call abort
- if (minval (a, dim = 1, mask = l).ne.huge(pinf)) call abort
- if (minloc (a, dim = 1, mask = l2).ne.0) call abort
- if (minval (a, dim = 1, mask = l2).ne.huge(pinf)) call abort
+ if (minloc (a, dim = 1, mask = l).ne.0) STOP 33
+ if (minval (a, dim = 1, mask = l).ne.huge(pinf)) STOP 34
+ if (minloc (a, dim = 1, mask = l2).ne.0) STOP 35
+ if (minval (a, dim = 1, mask = l2).ne.huge(pinf)) STOP 36
a(2) = minf
- if (minloc (a, dim = 1, mask = l).ne.0) call abort
- if (minval (a, dim = 1, mask = l).ne.huge(pinf)) call abort
- if (minloc (a, dim = 1, mask = l2).ne.0) call abort
- if (minval (a, dim = 1, mask = l2).ne.huge(pinf)) call abort
+ if (minloc (a, dim = 1, mask = l).ne.0) STOP 37
+ if (minval (a, dim = 1, mask = l).ne.huge(pinf)) STOP 38
+ if (minloc (a, dim = 1, mask = l2).ne.0) STOP 39
+ if (minval (a, dim = 1, mask = l2).ne.huge(pinf)) STOP 40
c(:) = nan
- if (minloc (c, dim = 1, mask = l).ne.0) call abort
- if (minval (c, dim = 1, mask = l).ne.huge(pinf)) call abort
- if (minloc (c, dim = 1, mask = l2).ne.0) call abort
- if (minval (c, dim = 1, mask = l2).ne.huge(pinf)) call abort
+ if (minloc (c, dim = 1, mask = l).ne.0) STOP 41
+ if (minval (c, dim = 1, mask = l).ne.huge(pinf)) STOP 42
+ if (minloc (c, dim = 1, mask = l2).ne.0) STOP 43
+ if (minval (c, dim = 1, mask = l2).ne.huge(pinf)) STOP 44
c(:) = pinf
- if (minloc (c, dim = 1, mask = l).ne.0) call abort
- if (minval (c, dim = 1, mask = l).ne.huge(pinf)) call abort
- if (minloc (c, dim = 1, mask = l2).ne.0) call abort
- if (minval (c, dim = 1, mask = l2).ne.huge(pinf)) call abort
+ if (minloc (c, dim = 1, mask = l).ne.0) STOP 45
+ if (minval (c, dim = 1, mask = l).ne.huge(pinf)) STOP 46
+ if (minloc (c, dim = 1, mask = l2).ne.0) STOP 47
+ if (minval (c, dim = 1, mask = l2).ne.huge(pinf)) STOP 48
c(1:2) = nan
- if (minloc (c, dim = 1, mask = l).ne.0) call abort
- if (minval (c, dim = 1, mask = l).ne.huge(pinf)) call abort
- if (minloc (c, dim = 1, mask = l2).ne.0) call abort
- if (minval (c, dim = 1, mask = l2).ne.huge(pinf)) call abort
+ if (minloc (c, dim = 1, mask = l).ne.0) STOP 49
+ if (minval (c, dim = 1, mask = l).ne.huge(pinf)) STOP 50
+ if (minloc (c, dim = 1, mask = l2).ne.0) STOP 51
+ if (minval (c, dim = 1, mask = l2).ne.huge(pinf)) STOP 52
c(2) = 1.0
- if (minloc (c, dim = 1, mask = l).ne.0) call abort
- if (minval (c, dim = 1, mask = l).ne.huge(pinf)) call abort
- if (minloc (c, dim = 1, mask = l2).ne.0) call abort
- if (minval (c, dim = 1, mask = l2).ne.huge(pinf)) call abort
+ if (minloc (c, dim = 1, mask = l).ne.0) STOP 53
+ if (minval (c, dim = 1, mask = l).ne.huge(pinf)) STOP 54
+ if (minloc (c, dim = 1, mask = l2).ne.0) STOP 55
+ if (minval (c, dim = 1, mask = l2).ne.huge(pinf)) STOP 56
c(2) = minf
- if (minloc (c, dim = 1, mask = l).ne.0) call abort
- if (minval (c, dim = 1, mask = l).ne.huge(pinf)) call abort
- if (minloc (c, dim = 1, mask = l2).ne.0) call abort
- if (minval (c, dim = 1, mask = l2).ne.huge(pinf)) call abort
+ if (minloc (c, dim = 1, mask = l).ne.0) STOP 57
+ if (minval (c, dim = 1, mask = l).ne.huge(pinf)) STOP 58
+ if (minloc (c, dim = 1, mask = l2).ne.0) STOP 59
+ if (minval (c, dim = 1, mask = l2).ne.huge(pinf)) STOP 60
l = .true.
l2(:) = .true.
a(:) = nan
- if (minloc (a, dim = 1, mask = l).ne.1) call abort
- if (.not.isnan(minval (a, dim = 1, mask = l))) call abort
- if (minloc (a, dim = 1, mask = l2).ne.1) call abort
- if (.not.isnan(minval (a, dim = 1, mask = l2))) call abort
+ if (minloc (a, dim = 1, mask = l).ne.1) STOP 61
+ if (.not.isnan(minval (a, dim = 1, mask = l))) STOP 62
+ if (minloc (a, dim = 1, mask = l2).ne.1) STOP 63
+ if (.not.isnan(minval (a, dim = 1, mask = l2))) STOP 64
a(:) = pinf
- if (minloc (a, dim = 1, mask = l).ne.1) call abort
- if (minval (a, dim = 1, mask = l).ne.pinf) call abort
- if (minloc (a, dim = 1, mask = l2).ne.1) call abort
- if (minval (a, dim = 1, mask = l2).ne.pinf) call abort
+ if (minloc (a, dim = 1, mask = l).ne.1) STOP 65
+ if (minval (a, dim = 1, mask = l).ne.pinf) STOP 66
+ if (minloc (a, dim = 1, mask = l2).ne.1) STOP 67
+ if (minval (a, dim = 1, mask = l2).ne.pinf) STOP 68
a(1:2) = nan
- if (minloc (a, dim = 1, mask = l).ne.3) call abort
- if (minval (a, dim = 1, mask = l).ne.pinf) call abort
- if (minloc (a, dim = 1, mask = l2).ne.3) call abort
- if (minval (a, dim = 1, mask = l2).ne.pinf) call abort
+ if (minloc (a, dim = 1, mask = l).ne.3) STOP 69
+ if (minval (a, dim = 1, mask = l).ne.pinf) STOP 70
+ if (minloc (a, dim = 1, mask = l2).ne.3) STOP 71
+ if (minval (a, dim = 1, mask = l2).ne.pinf) STOP 72
a(2) = 1.0
- if (minloc (a, dim = 1, mask = l).ne.2) call abort
- if (minval (a, dim = 1, mask = l).ne.1) call abort
- if (minloc (a, dim = 1, mask = l2).ne.2) call abort
- if (minval (a, dim = 1, mask = l2).ne.1) call abort
+ if (minloc (a, dim = 1, mask = l).ne.2) STOP 73
+ if (minval (a, dim = 1, mask = l).ne.1) STOP 74
+ if (minloc (a, dim = 1, mask = l2).ne.2) STOP 75
+ if (minval (a, dim = 1, mask = l2).ne.1) STOP 76
a(2) = minf
- if (minloc (a, dim = 1, mask = l).ne.2) call abort
- if (minval (a, dim = 1, mask = l).ne.minf) call abort
- if (minloc (a, dim = 1, mask = l2).ne.2) call abort
- if (minval (a, dim = 1, mask = l2).ne.minf) call abort
+ if (minloc (a, dim = 1, mask = l).ne.2) STOP 77
+ if (minval (a, dim = 1, mask = l).ne.minf) STOP 78
+ if (minloc (a, dim = 1, mask = l2).ne.2) STOP 79
+ if (minval (a, dim = 1, mask = l2).ne.minf) STOP 80
c(:) = nan
- if (minloc (c, dim = 1, mask = l).ne.1) call abort
- if (.not.isnan(minval (c, dim = 1, mask = l))) call abort
- if (minloc (c, dim = 1, mask = l2).ne.1) call abort
- if (.not.isnan(minval (c, dim = 1, mask = l2))) call abort
+ if (minloc (c, dim = 1, mask = l).ne.1) STOP 81
+ if (.not.isnan(minval (c, dim = 1, mask = l))) STOP 82
+ if (minloc (c, dim = 1, mask = l2).ne.1) STOP 83
+ if (.not.isnan(minval (c, dim = 1, mask = l2))) STOP 84
c(:) = pinf
- if (minloc (c, dim = 1, mask = l).ne.1) call abort
- if (minval (c, dim = 1, mask = l).ne.pinf) call abort
- if (minloc (c, dim = 1, mask = l2).ne.1) call abort
- if (minval (c, dim = 1, mask = l2).ne.pinf) call abort
+ if (minloc (c, dim = 1, mask = l).ne.1) STOP 85
+ if (minval (c, dim = 1, mask = l).ne.pinf) STOP 86
+ if (minloc (c, dim = 1, mask = l2).ne.1) STOP 87
+ if (minval (c, dim = 1, mask = l2).ne.pinf) STOP 88
c(1:2) = nan
- if (minloc (c, dim = 1, mask = l).ne.3) call abort
- if (minval (c, dim = 1, mask = l).ne.pinf) call abort
- if (minloc (c, dim = 1, mask = l2).ne.3) call abort
- if (minval (c, dim = 1, mask = l2).ne.pinf) call abort
+ if (minloc (c, dim = 1, mask = l).ne.3) STOP 89
+ if (minval (c, dim = 1, mask = l).ne.pinf) STOP 90
+ if (minloc (c, dim = 1, mask = l2).ne.3) STOP 91
+ if (minval (c, dim = 1, mask = l2).ne.pinf) STOP 92
c(2) = 1.0
- if (minloc (c, dim = 1, mask = l).ne.2) call abort
- if (minval (c, dim = 1, mask = l).ne.1) call abort
- if (minloc (c, dim = 1, mask = l2).ne.2) call abort
- if (minval (c, dim = 1, mask = l2).ne.1) call abort
+ if (minloc (c, dim = 1, mask = l).ne.2) STOP 93
+ if (minval (c, dim = 1, mask = l).ne.1) STOP 94
+ if (minloc (c, dim = 1, mask = l2).ne.2) STOP 95
+ if (minval (c, dim = 1, mask = l2).ne.1) STOP 96
c(2) = minf
- if (minloc (c, dim = 1, mask = l).ne.2) call abort
- if (minval (c, dim = 1, mask = l).ne.minf) call abort
- if (minloc (c, dim = 1, mask = l2).ne.2) call abort
- if (minval (c, dim = 1, mask = l2).ne.minf) call abort
+ if (minloc (c, dim = 1, mask = l).ne.2) STOP 97
+ if (minval (c, dim = 1, mask = l).ne.minf) STOP 98
+ if (minloc (c, dim = 1, mask = l2).ne.2) STOP 99
+ if (minval (c, dim = 1, mask = l2).ne.minf) STOP 100
deallocate (c)
allocate (c(-2:-3))
- if (minloc (c, dim = 1).ne.0) call abort
- if (minval (c, dim = 1).ne.huge(pinf)) call abort
+ if (minloc (c, dim = 1).ne.0) STOP 101
+ if (minval (c, dim = 1).ne.huge(pinf)) STOP 102
end
h = h - 1
allocate (c(3))
a(:) = 5
- if (minloc (a, dim = 1).ne.1) call abort
- if (minval (a, dim = 1).ne.5) call abort
+ if (minloc (a, dim = 1).ne.1) STOP 1
+ if (minval (a, dim = 1).ne.5) STOP 2
a(2) = h
- if (minloc (a, dim = 1).ne.2) call abort
- if (minval (a, dim = 1).ne.h) call abort
+ if (minloc (a, dim = 1).ne.2) STOP 3
+ if (minval (a, dim = 1).ne.h) STOP 4
a(:) = huge(h)
- if (minloc (a, dim = 1).ne.1) call abort
- if (minval (a, dim = 1).ne.huge(h)) call abort
+ if (minloc (a, dim = 1).ne.1) STOP 5
+ if (minval (a, dim = 1).ne.huge(h)) STOP 6
a(3) = huge(h) - 1
- if (minloc (a, dim = 1).ne.3) call abort
- if (minval (a, dim = 1).ne.huge(h)-1) call abort
+ if (minloc (a, dim = 1).ne.3) STOP 7
+ if (minval (a, dim = 1).ne.huge(h)-1) STOP 8
c(:) = 5
- if (minloc (c, dim = 1).ne.1) call abort
- if (minval (c, dim = 1).ne.5) call abort
+ if (minloc (c, dim = 1).ne.1) STOP 9
+ if (minval (c, dim = 1).ne.5) STOP 10
c(2) = h
- if (minloc (c, dim = 1).ne.2) call abort
- if (minval (c, dim = 1).ne.h) call abort
+ if (minloc (c, dim = 1).ne.2) STOP 11
+ if (minval (c, dim = 1).ne.h) STOP 12
c(:) = huge(h)
- if (minloc (c, dim = 1).ne.1) call abort
- if (minval (c, dim = 1).ne.huge(h)) call abort
+ if (minloc (c, dim = 1).ne.1) STOP 13
+ if (minval (c, dim = 1).ne.huge(h)) STOP 14
c(3) = huge(h) - 1
- if (minloc (c, dim = 1).ne.3) call abort
- if (minval (c, dim = 1).ne.huge(h)-1) call abort
+ if (minloc (c, dim = 1).ne.3) STOP 15
+ if (minval (c, dim = 1).ne.huge(h)-1) STOP 16
l = .false.
l2(:) = .false.
a(:) = 5
- if (minloc (a, dim = 1, mask = l).ne.0) call abort
- if (minval (a, dim = 1, mask = l).ne.huge(h)) call abort
- if (minloc (a, dim = 1, mask = l2).ne.0) call abort
- if (minval (a, dim = 1, mask = l2).ne.huge(h)) call abort
+ if (minloc (a, dim = 1, mask = l).ne.0) STOP 17
+ if (minval (a, dim = 1, mask = l).ne.huge(h)) STOP 18
+ if (minloc (a, dim = 1, mask = l2).ne.0) STOP 19
+ if (minval (a, dim = 1, mask = l2).ne.huge(h)) STOP 20
a(2) = h
- if (minloc (a, dim = 1, mask = l).ne.0) call abort
- if (minval (a, dim = 1, mask = l).ne.huge(h)) call abort
- if (minloc (a, dim = 1, mask = l2).ne.0) call abort
- if (minval (a, dim = 1, mask = l2).ne.huge(h)) call abort
+ if (minloc (a, dim = 1, mask = l).ne.0) STOP 21
+ if (minval (a, dim = 1, mask = l).ne.huge(h)) STOP 22
+ if (minloc (a, dim = 1, mask = l2).ne.0) STOP 23
+ if (minval (a, dim = 1, mask = l2).ne.huge(h)) STOP 24
a(:) = huge(h)
- if (minloc (a, dim = 1, mask = l).ne.0) call abort
- if (minval (a, dim = 1, mask = l).ne.huge(h)) call abort
- if (minloc (a, dim = 1, mask = l2).ne.0) call abort
- if (minval (a, dim = 1, mask = l2).ne.huge(h)) call abort
+ if (minloc (a, dim = 1, mask = l).ne.0) STOP 25
+ if (minval (a, dim = 1, mask = l).ne.huge(h)) STOP 26
+ if (minloc (a, dim = 1, mask = l2).ne.0) STOP 27
+ if (minval (a, dim = 1, mask = l2).ne.huge(h)) STOP 28
a(3) = huge(h) - 1
- if (minloc (a, dim = 1, mask = l).ne.0) call abort
- if (minval (a, dim = 1, mask = l).ne.huge(h)) call abort
- if (minloc (a, dim = 1, mask = l2).ne.0) call abort
- if (minval (a, dim = 1, mask = l2).ne.huge(h)) call abort
+ if (minloc (a, dim = 1, mask = l).ne.0) STOP 29
+ if (minval (a, dim = 1, mask = l).ne.huge(h)) STOP 30
+ if (minloc (a, dim = 1, mask = l2).ne.0) STOP 31
+ if (minval (a, dim = 1, mask = l2).ne.huge(h)) STOP 32
c(:) = 5
- if (minloc (c, dim = 1, mask = l).ne.0) call abort
- if (minval (c, dim = 1, mask = l).ne.huge(h)) call abort
- if (minloc (c, dim = 1, mask = l2).ne.0) call abort
- if (minval (c, dim = 1, mask = l2).ne.huge(h)) call abort
+ if (minloc (c, dim = 1, mask = l).ne.0) STOP 33
+ if (minval (c, dim = 1, mask = l).ne.huge(h)) STOP 34
+ if (minloc (c, dim = 1, mask = l2).ne.0) STOP 35
+ if (minval (c, dim = 1, mask = l2).ne.huge(h)) STOP 36
c(2) = h
- if (minloc (c, dim = 1, mask = l).ne.0) call abort
- if (minval (c, dim = 1, mask = l).ne.huge(h)) call abort
- if (minloc (c, dim = 1, mask = l2).ne.0) call abort
- if (minval (c, dim = 1, mask = l2).ne.huge(h)) call abort
+ if (minloc (c, dim = 1, mask = l).ne.0) STOP 37
+ if (minval (c, dim = 1, mask = l).ne.huge(h)) STOP 38
+ if (minloc (c, dim = 1, mask = l2).ne.0) STOP 39
+ if (minval (c, dim = 1, mask = l2).ne.huge(h)) STOP 40
c(:) = huge(h)
- if (minloc (c, dim = 1, mask = l).ne.0) call abort
- if (minval (c, dim = 1, mask = l).ne.huge(h)) call abort
- if (minloc (c, dim = 1, mask = l2).ne.0) call abort
- if (minval (c, dim = 1, mask = l2).ne.huge(h)) call abort
+ if (minloc (c, dim = 1, mask = l).ne.0) STOP 41
+ if (minval (c, dim = 1, mask = l).ne.huge(h)) STOP 42
+ if (minloc (c, dim = 1, mask = l2).ne.0) STOP 43
+ if (minval (c, dim = 1, mask = l2).ne.huge(h)) STOP 44
c(3) = huge(h) - 1
- if (minloc (c, dim = 1, mask = l).ne.0) call abort
- if (minval (c, dim = 1, mask = l).ne.huge(h)) call abort
- if (minloc (c, dim = 1, mask = l2).ne.0) call abort
- if (minval (c, dim = 1, mask = l2).ne.huge(h)) call abort
+ if (minloc (c, dim = 1, mask = l).ne.0) STOP 45
+ if (minval (c, dim = 1, mask = l).ne.huge(h)) STOP 46
+ if (minloc (c, dim = 1, mask = l2).ne.0) STOP 47
+ if (minval (c, dim = 1, mask = l2).ne.huge(h)) STOP 48
l = .true.
l2(:) = .true.
a(:) = 5
- if (minloc (a, dim = 1, mask = l).ne.1) call abort
- if (minval (a, dim = 1, mask = l).ne.5) call abort
- if (minloc (a, dim = 1, mask = l2).ne.1) call abort
- if (minval (a, dim = 1, mask = l2).ne.5) call abort
+ if (minloc (a, dim = 1, mask = l).ne.1) STOP 49
+ if (minval (a, dim = 1, mask = l).ne.5) STOP 50
+ if (minloc (a, dim = 1, mask = l2).ne.1) STOP 51
+ if (minval (a, dim = 1, mask = l2).ne.5) STOP 52
a(2) = h
- if (minloc (a, dim = 1, mask = l).ne.2) call abort
- if (minval (a, dim = 1, mask = l).ne.h) call abort
- if (minloc (a, dim = 1, mask = l2).ne.2) call abort
- if (minval (a, dim = 1, mask = l2).ne.h) call abort
+ if (minloc (a, dim = 1, mask = l).ne.2) STOP 53
+ if (minval (a, dim = 1, mask = l).ne.h) STOP 54
+ if (minloc (a, dim = 1, mask = l2).ne.2) STOP 55
+ if (minval (a, dim = 1, mask = l2).ne.h) STOP 56
a(:) = huge(h)
- if (minloc (a, dim = 1, mask = l).ne.1) call abort
- if (minval (a, dim = 1, mask = l).ne.huge(h)) call abort
- if (minloc (a, dim = 1, mask = l2).ne.1) call abort
- if (minval (a, dim = 1, mask = l2).ne.huge(h)) call abort
+ if (minloc (a, dim = 1, mask = l).ne.1) STOP 57
+ if (minval (a, dim = 1, mask = l).ne.huge(h)) STOP 58
+ if (minloc (a, dim = 1, mask = l2).ne.1) STOP 59
+ if (minval (a, dim = 1, mask = l2).ne.huge(h)) STOP 60
a(3) = huge(h) - 1
- if (minloc (a, dim = 1, mask = l).ne.3) call abort
- if (minval (a, dim = 1, mask = l).ne.huge(h)-1) call abort
- if (minloc (a, dim = 1, mask = l2).ne.3) call abort
- if (minval (a, dim = 1, mask = l2).ne.huge(h)-1) call abort
+ if (minloc (a, dim = 1, mask = l).ne.3) STOP 61
+ if (minval (a, dim = 1, mask = l).ne.huge(h)-1) STOP 62
+ if (minloc (a, dim = 1, mask = l2).ne.3) STOP 63
+ if (minval (a, dim = 1, mask = l2).ne.huge(h)-1) STOP 64
c(:) = 5
- if (minloc (c, dim = 1, mask = l).ne.1) call abort
- if (minval (c, dim = 1, mask = l).ne.5) call abort
- if (minloc (c, dim = 1, mask = l2).ne.1) call abort
- if (minval (c, dim = 1, mask = l2).ne.5) call abort
+ if (minloc (c, dim = 1, mask = l).ne.1) STOP 65
+ if (minval (c, dim = 1, mask = l).ne.5) STOP 66
+ if (minloc (c, dim = 1, mask = l2).ne.1) STOP 67
+ if (minval (c, dim = 1, mask = l2).ne.5) STOP 68
c(2) = h
- if (minloc (c, dim = 1, mask = l).ne.2) call abort
- if (minval (c, dim = 1, mask = l).ne.h) call abort
- if (minloc (c, dim = 1, mask = l2).ne.2) call abort
- if (minval (c, dim = 1, mask = l2).ne.h) call abort
+ if (minloc (c, dim = 1, mask = l).ne.2) STOP 69
+ if (minval (c, dim = 1, mask = l).ne.h) STOP 70
+ if (minloc (c, dim = 1, mask = l2).ne.2) STOP 71
+ if (minval (c, dim = 1, mask = l2).ne.h) STOP 72
c(:) = huge(h)
- if (minloc (c, dim = 1, mask = l).ne.1) call abort
- if (minval (c, dim = 1, mask = l).ne.huge(h)) call abort
- if (minloc (c, dim = 1, mask = l2).ne.1) call abort
- if (minval (c, dim = 1, mask = l2).ne.huge(h)) call abort
+ if (minloc (c, dim = 1, mask = l).ne.1) STOP 73
+ if (minval (c, dim = 1, mask = l).ne.huge(h)) STOP 74
+ if (minloc (c, dim = 1, mask = l2).ne.1) STOP 75
+ if (minval (c, dim = 1, mask = l2).ne.huge(h)) STOP 76
c(3) = huge(h) - 1
- if (minloc (c, dim = 1, mask = l).ne.3) call abort
- if (minval (c, dim = 1, mask = l).ne.huge(h)-1) call abort
- if (minloc (c, dim = 1, mask = l2).ne.3) call abort
- if (minval (c, dim = 1, mask = l2).ne.huge(h)-1) call abort
+ if (minloc (c, dim = 1, mask = l).ne.3) STOP 77
+ if (minval (c, dim = 1, mask = l).ne.huge(h)-1) STOP 78
+ if (minloc (c, dim = 1, mask = l2).ne.3) STOP 79
+ if (minval (c, dim = 1, mask = l2).ne.huge(h)-1) STOP 80
deallocate (c)
allocate (c(-2:-3))
- if (minloc (c, dim = 1).ne.0) call abort
- if (minval (c, dim = 1).ne.huge(h)) call abort
+ if (minloc (c, dim = 1).ne.0) STOP 81
+ if (minval (c, dim = 1).ne.huge(h)) STOP 82
end
h(5, 5) = 6
h(5, 6) = 5
h(6, 7) = 4
- if (minloc (a, dim = 1).ne.7) call abort
- if (minval (a, dim = 1).ne.6.0) call abort
- if (minloc (a(::2), dim = 1).ne.4) call abort
- if (minval (a(::2), dim = 1).ne.6.0) call abort
- if (any (minloc (a).ne.(/ 7 /))) call abort
- if (minval (a).ne.6.0) call abort
- if (any (minloc (a(::2)).ne.(/ 4 /))) call abort
- if (minval (a(::2)).ne.6.0) call abort
- if (any (minloc (b, dim = 1).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) call abort
- if (any (minval (b, dim = 1).ne.(/ 7.0, 7.0, 7.0, 7.0, 6.0, 5.0, 4.0, 7.0, 7.0, 7.0 /))) call abort
- if (any (minloc (b(::2,::2), dim = 1).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (b(::2,::2), dim = 1).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) call abort
- if (any (minloc (b, dim = 2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) call abort
- if (any (minval (b, dim = 2).ne.(/ 7.0, 7.0, 7.0, 7.0, 5.0, 4.0, 7.0, 7.0, 7.0, 7.0 /))) call abort
- if (any (minloc (b(::2,::2), dim = 2).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (b(::2,::2), dim = 2).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) call abort
- if (any (minloc (b).ne.(/ 6, 7 /))) call abort
- if (minval (b).ne.4.0) call abort
- if (any (minloc (b(::2,::2)).ne.(/ 3, 3 /))) call abort
- if (minval (b(::2,::2)).ne.6.0) call abort
- if (minloc (c, dim = 1).ne.7) call abort
- if (minval (c, dim = 1).ne.6.0) call abort
- if (minloc (c(::2), dim = 1).ne.4) call abort
- if (minval (c(::2), dim = 1).ne.6.0) call abort
- if (any (minloc (c).ne.(/ 7 /))) call abort
- if (minval (c).ne.6.0) call abort
- if (any (minloc (c(::2)).ne.(/ 4 /))) call abort
- if (minval (c(::2)).ne.6.0) call abort
- if (any (minloc (d, dim = 1).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) call abort
- if (any (minval (d, dim = 1).ne.(/ 7.0, 7.0, 7.0, 7.0, 6.0, 5.0, 4.0, 7.0, 7.0, 7.0 /))) call abort
- if (any (minloc (d(::2,::2), dim = 1).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (d(::2,::2), dim = 1).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) call abort
- if (any (minloc (d, dim = 2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) call abort
- if (any (minval (d, dim = 2).ne.(/ 7.0, 7.0, 7.0, 7.0, 5.0, 4.0, 7.0, 7.0, 7.0, 7.0 /))) call abort
- if (any (minloc (d(::2,::2), dim = 2).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (d(::2,::2), dim = 2).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) call abort
- if (any (minloc (d).ne.(/ 6, 7 /))) call abort
- if (minval (d).ne.4.0) call abort
- if (any (minloc (d(::2,::2)).ne.(/ 3, 3 /))) call abort
- if (minval (d(::2,::2)).ne.6.0) call abort
- if (minloc (e, dim = 1).ne.7) call abort
- if (minval (e, dim = 1).ne.6) call abort
- if (minloc (e(::2), dim = 1).ne.4) call abort
- if (minval (e(::2), dim = 1).ne.6) call abort
- if (any (minloc (e).ne.(/ 7 /))) call abort
- if (minval (e).ne.6) call abort
- if (any (minloc (e(::2)).ne.(/ 4 /))) call abort
- if (minval (e(::2)).ne.6) call abort
- if (any (minloc (f, dim = 1).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) call abort
- if (any (minval (f, dim = 1).ne.(/ 7, 7, 7, 7, 6, 5, 4, 7, 7, 7 /))) call abort
- if (any (minloc (f(::2,::2), dim = 1).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (f(::2,::2), dim = 1).ne.(/ 7, 7, 6, 7, 7 /))) call abort
- if (any (minloc (f, dim = 2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) call abort
- if (any (minval (f, dim = 2).ne.(/ 7, 7, 7, 7, 5, 4, 7, 7, 7, 7 /))) call abort
- if (any (minloc (f(::2,::2), dim = 2).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (f(::2,::2), dim = 2).ne.(/ 7, 7, 6, 7, 7 /))) call abort
- if (any (minloc (f).ne.(/ 6, 7 /))) call abort
- if (minval (f).ne.4) call abort
- if (any (minloc (f(::2,::2)).ne.(/ 3, 3 /))) call abort
- if (minval (f(::2,::2)).ne.6) call abort
- if (minloc (g, dim = 1).ne.7) call abort
- if (minval (g, dim = 1).ne.6) call abort
- if (minloc (g(::2), dim = 1).ne.4) call abort
- if (minval (g(::2), dim = 1).ne.6) call abort
- if (any (minloc (g).ne.(/ 7 /))) call abort
- if (minval (g).ne.6) call abort
- if (any (minloc (g(::2)).ne.(/ 4 /))) call abort
- if (minval (g(::2)).ne.6) call abort
- if (any (minloc (h, dim = 1).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) call abort
- if (any (minval (h, dim = 1).ne.(/ 7, 7, 7, 7, 6, 5, 4, 7, 7, 7 /))) call abort
- if (any (minloc (h(::2,::2), dim = 1).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (h(::2,::2), dim = 1).ne.(/ 7, 7, 6, 7, 7 /))) call abort
- if (any (minloc (h, dim = 2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) call abort
- if (any (minval (h, dim = 2).ne.(/ 7, 7, 7, 7, 5, 4, 7, 7, 7, 7 /))) call abort
- if (any (minloc (h(::2,::2), dim = 2).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (h(::2,::2), dim = 2).ne.(/ 7, 7, 6, 7, 7 /))) call abort
- if (any (minloc (h).ne.(/ 6, 7 /))) call abort
- if (minval (h).ne.4) call abort
- if (any (minloc (h(::2,::2)).ne.(/ 3, 3 /))) call abort
- if (minval (h(::2,::2)).ne.6) call abort
+ if (minloc (a, dim = 1).ne.7) STOP 1
+ if (minval (a, dim = 1).ne.6.0) STOP 2
+ if (minloc (a(::2), dim = 1).ne.4) STOP 3
+ if (minval (a(::2), dim = 1).ne.6.0) STOP 4
+ if (any (minloc (a).ne.(/ 7 /))) STOP 5
+ if (minval (a).ne.6.0) STOP 6
+ if (any (minloc (a(::2)).ne.(/ 4 /))) STOP 7
+ if (minval (a(::2)).ne.6.0) STOP 8
+ if (any (minloc (b, dim = 1).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) STOP 9
+ if (any (minval (b, dim = 1).ne.(/ 7.0, 7.0, 7.0, 7.0, 6.0, 5.0, 4.0, 7.0, 7.0, 7.0 /))) STOP 10
+ if (any (minloc (b(::2,::2), dim = 1).ne.(/ 1, 1, 3, 1, 1 /))) STOP 11
+ if (any (minval (b(::2,::2), dim = 1).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) STOP 12
+ if (any (minloc (b, dim = 2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) STOP 13
+ if (any (minval (b, dim = 2).ne.(/ 7.0, 7.0, 7.0, 7.0, 5.0, 4.0, 7.0, 7.0, 7.0, 7.0 /))) STOP 14
+ if (any (minloc (b(::2,::2), dim = 2).ne.(/ 1, 1, 3, 1, 1 /))) STOP 15
+ if (any (minval (b(::2,::2), dim = 2).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) STOP 16
+ if (any (minloc (b).ne.(/ 6, 7 /))) STOP 17
+ if (minval (b).ne.4.0) STOP 18
+ if (any (minloc (b(::2,::2)).ne.(/ 3, 3 /))) STOP 19
+ if (minval (b(::2,::2)).ne.6.0) STOP 20
+ if (minloc (c, dim = 1).ne.7) STOP 21
+ if (minval (c, dim = 1).ne.6.0) STOP 22
+ if (minloc (c(::2), dim = 1).ne.4) STOP 23
+ if (minval (c(::2), dim = 1).ne.6.0) STOP 24
+ if (any (minloc (c).ne.(/ 7 /))) STOP 25
+ if (minval (c).ne.6.0) STOP 26
+ if (any (minloc (c(::2)).ne.(/ 4 /))) STOP 27
+ if (minval (c(::2)).ne.6.0) STOP 28
+ if (any (minloc (d, dim = 1).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) STOP 29
+ if (any (minval (d, dim = 1).ne.(/ 7.0, 7.0, 7.0, 7.0, 6.0, 5.0, 4.0, 7.0, 7.0, 7.0 /))) STOP 30
+ if (any (minloc (d(::2,::2), dim = 1).ne.(/ 1, 1, 3, 1, 1 /))) STOP 31
+ if (any (minval (d(::2,::2), dim = 1).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) STOP 32
+ if (any (minloc (d, dim = 2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) STOP 33
+ if (any (minval (d, dim = 2).ne.(/ 7.0, 7.0, 7.0, 7.0, 5.0, 4.0, 7.0, 7.0, 7.0, 7.0 /))) STOP 34
+ if (any (minloc (d(::2,::2), dim = 2).ne.(/ 1, 1, 3, 1, 1 /))) STOP 35
+ if (any (minval (d(::2,::2), dim = 2).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) STOP 36
+ if (any (minloc (d).ne.(/ 6, 7 /))) STOP 37
+ if (minval (d).ne.4.0) STOP 38
+ if (any (minloc (d(::2,::2)).ne.(/ 3, 3 /))) STOP 39
+ if (minval (d(::2,::2)).ne.6.0) STOP 40
+ if (minloc (e, dim = 1).ne.7) STOP 41
+ if (minval (e, dim = 1).ne.6) STOP 42
+ if (minloc (e(::2), dim = 1).ne.4) STOP 43
+ if (minval (e(::2), dim = 1).ne.6) STOP 44
+ if (any (minloc (e).ne.(/ 7 /))) STOP 45
+ if (minval (e).ne.6) STOP 46
+ if (any (minloc (e(::2)).ne.(/ 4 /))) STOP 47
+ if (minval (e(::2)).ne.6) STOP 48
+ if (any (minloc (f, dim = 1).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) STOP 49
+ if (any (minval (f, dim = 1).ne.(/ 7, 7, 7, 7, 6, 5, 4, 7, 7, 7 /))) STOP 50
+ if (any (minloc (f(::2,::2), dim = 1).ne.(/ 1, 1, 3, 1, 1 /))) STOP 51
+ if (any (minval (f(::2,::2), dim = 1).ne.(/ 7, 7, 6, 7, 7 /))) STOP 52
+ if (any (minloc (f, dim = 2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) STOP 53
+ if (any (minval (f, dim = 2).ne.(/ 7, 7, 7, 7, 5, 4, 7, 7, 7, 7 /))) STOP 54
+ if (any (minloc (f(::2,::2), dim = 2).ne.(/ 1, 1, 3, 1, 1 /))) STOP 55
+ if (any (minval (f(::2,::2), dim = 2).ne.(/ 7, 7, 6, 7, 7 /))) STOP 56
+ if (any (minloc (f).ne.(/ 6, 7 /))) STOP 57
+ if (minval (f).ne.4) STOP 58
+ if (any (minloc (f(::2,::2)).ne.(/ 3, 3 /))) STOP 59
+ if (minval (f(::2,::2)).ne.6) STOP 60
+ if (minloc (g, dim = 1).ne.7) STOP 61
+ if (minval (g, dim = 1).ne.6) STOP 62
+ if (minloc (g(::2), dim = 1).ne.4) STOP 63
+ if (minval (g(::2), dim = 1).ne.6) STOP 64
+ if (any (minloc (g).ne.(/ 7 /))) STOP 65
+ if (minval (g).ne.6) STOP 66
+ if (any (minloc (g(::2)).ne.(/ 4 /))) STOP 67
+ if (minval (g(::2)).ne.6) STOP 68
+ if (any (minloc (h, dim = 1).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) STOP 69
+ if (any (minval (h, dim = 1).ne.(/ 7, 7, 7, 7, 6, 5, 4, 7, 7, 7 /))) STOP 70
+ if (any (minloc (h(::2,::2), dim = 1).ne.(/ 1, 1, 3, 1, 1 /))) STOP 71
+ if (any (minval (h(::2,::2), dim = 1).ne.(/ 7, 7, 6, 7, 7 /))) STOP 72
+ if (any (minloc (h, dim = 2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) STOP 73
+ if (any (minval (h, dim = 2).ne.(/ 7, 7, 7, 7, 5, 4, 7, 7, 7, 7 /))) STOP 74
+ if (any (minloc (h(::2,::2), dim = 2).ne.(/ 1, 1, 3, 1, 1 /))) STOP 75
+ if (any (minval (h(::2,::2), dim = 2).ne.(/ 7, 7, 6, 7, 7 /))) STOP 76
+ if (any (minloc (h).ne.(/ 6, 7 /))) STOP 77
+ if (minval (h).ne.4) STOP 78
+ if (any (minloc (h(::2,::2)).ne.(/ 3, 3 /))) STOP 79
+ if (minval (h(::2,::2)).ne.6) STOP 80
l = .true.
l2 = .true.
- if (minloc (a, dim = 1, mask = l).ne.7) call abort
- if (minval (a, dim = 1, mask = l).ne.6.0) call abort
- if (minloc (a(::2), dim = 1, mask = l(::2)).ne.4) call abort
- if (minval (a(::2), dim = 1, mask = l(::2)).ne.6.0) call abort
- if (any (minloc (a, mask = l).ne.(/ 7 /))) call abort
- if (minval (a, mask = l).ne.6.0) call abort
- if (any (minloc (a(::2), mask = l(::2)).ne.(/ 4 /))) call abort
- if (minval (a(::2), mask = l(::2)).ne.6.0) call abort
- if (any (minloc (b, dim = 1, mask = l2).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) call abort
- if (any (minval (b, dim = 1, mask = l2).ne.(/ 7.0, 7.0, 7.0, 7.0, 6.0, 5.0, 4.0, 7.0, 7.0, 7.0 /))) call abort
- if (any (minloc (b(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (b(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) call abort
- if (any (minloc (b, dim = 2, mask = l2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) call abort
- if (any (minval (b, dim = 2, mask = l2).ne.(/ 7.0, 7.0, 7.0, 7.0, 5.0, 4.0, 7.0, 7.0, 7.0, 7.0 /))) call abort
- if (any (minloc (b(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (b(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) call abort
- if (any (minloc (b, mask = l2).ne.(/ 6, 7 /))) call abort
- if (minval (b, mask = l2).ne.4.0) call abort
- if (any (minloc (b(::2,::2), mask = l2(::2,::2)).ne.(/ 3, 3 /))) call abort
- if (minval (b(::2,::2), mask = l2(::2,::2)).ne.6.0) call abort
- if (minloc (c, dim = 1, mask = l).ne.7) call abort
- if (minval (c, dim = 1, mask = l).ne.6.0) call abort
- if (minloc (c(::2), dim = 1, mask = l(::2)).ne.4) call abort
- if (minval (c(::2), dim = 1, mask = l(::2)).ne.6.0) call abort
- if (any (minloc (c, mask = l).ne.(/ 7 /))) call abort
- if (minval (c, mask = l).ne.6.0) call abort
- if (any (minloc (c(::2), mask = l(::2)).ne.(/ 4 /))) call abort
- if (minval (c(::2), mask = l(::2)).ne.6.0) call abort
- if (any (minloc (d, dim = 1, mask = l2).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) call abort
- if (any (minval (d, dim = 1, mask = l2).ne.(/ 7.0, 7.0, 7.0, 7.0, 6.0, 5.0, 4.0, 7.0, 7.0, 7.0 /))) call abort
- if (any (minloc (d(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (d(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) call abort
- if (any (minloc (d, dim = 2, mask = l2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) call abort
- if (any (minval (d, dim = 2, mask = l2).ne.(/ 7.0, 7.0, 7.0, 7.0, 5.0, 4.0, 7.0, 7.0, 7.0, 7.0 /))) call abort
- if (any (minloc (d(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (d(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) call abort
- if (any (minloc (d, mask = l2).ne.(/ 6, 7 /))) call abort
- if (minval (d, mask = l2).ne.4.0) call abort
- if (any (minloc (d(::2,::2), mask = l2(::2,::2)).ne.(/ 3, 3 /))) call abort
- if (minval (d(::2,::2), mask = l2(::2,::2)).ne.6.0) call abort
- if (minloc (e, dim = 1, mask = l).ne.7) call abort
- if (minval (e, dim = 1, mask = l).ne.6) call abort
- if (minloc (e(::2), dim = 1, mask = l(::2)).ne.4) call abort
- if (minval (e(::2), dim = 1, mask = l(::2)).ne.6) call abort
- if (any (minloc (e, mask = l).ne.(/ 7 /))) call abort
- if (minval (e, mask = l).ne.6) call abort
- if (any (minloc (e(::2), mask = l(::2)).ne.(/ 4 /))) call abort
- if (minval (e(::2), mask = l(::2)).ne.6) call abort
- if (any (minloc (f, dim = 1, mask = l2).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) call abort
- if (any (minval (f, dim = 1, mask = l2).ne.(/ 7, 7, 7, 7, 6, 5, 4, 7, 7, 7 /))) call abort
- if (any (minloc (f(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (f(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 7, 7, 6, 7, 7 /))) call abort
- if (any (minloc (f, dim = 2, mask = l2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) call abort
- if (any (minval (f, dim = 2, mask = l2).ne.(/ 7, 7, 7, 7, 5, 4, 7, 7, 7, 7 /))) call abort
- if (any (minloc (f(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (f(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 7, 7, 6, 7, 7 /))) call abort
- if (any (minloc (f, mask = l2).ne.(/ 6, 7 /))) call abort
- if (minval (f, mask = l2).ne.4) call abort
- if (any (minloc (f(::2,::2), mask = l2(::2,::2)).ne.(/ 3, 3 /))) call abort
- if (minval (f(::2,::2), mask = l2(::2,::2)).ne.6) call abort
- if (minloc (g, dim = 1, mask = l).ne.7) call abort
- if (minval (g, dim = 1, mask = l).ne.6) call abort
- if (minloc (g(::2), dim = 1, mask = l(::2)).ne.4) call abort
- if (minval (g(::2), dim = 1, mask = l(::2)).ne.6) call abort
- if (any (minloc (g, mask = l).ne.(/ 7 /))) call abort
- if (minval (g, mask = l).ne.6) call abort
- if (any (minloc (g(::2), mask = l(::2)).ne.(/ 4 /))) call abort
- if (minval (g(::2), mask = l(::2)).ne.6) call abort
- if (any (minloc (h, dim = 1, mask = l2).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) call abort
- if (any (minval (h, dim = 1, mask = l2).ne.(/ 7, 7, 7, 7, 6, 5, 4, 7, 7, 7 /))) call abort
- if (any (minloc (h(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (h(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 7, 7, 6, 7, 7 /))) call abort
- if (any (minloc (h, dim = 2, mask = l2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) call abort
- if (any (minval (h, dim = 2, mask = l2).ne.(/ 7, 7, 7, 7, 5, 4, 7, 7, 7, 7 /))) call abort
- if (any (minloc (h(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) call abort
- if (any (minval (h(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 7, 7, 6, 7, 7 /))) call abort
- if (any (minloc (h, mask = l2).ne.(/ 6, 7 /))) call abort
- if (minval (h, mask = l2).ne.4) call abort
- if (any (minloc (h(::2,::2), mask = l2(::2,::2)).ne.(/ 3, 3 /))) call abort
- if (minval (h(::2,::2), mask = l2(::2,::2)).ne.6) call abort
+ if (minloc (a, dim = 1, mask = l).ne.7) STOP 81
+ if (minval (a, dim = 1, mask = l).ne.6.0) STOP 82
+ if (minloc (a(::2), dim = 1, mask = l(::2)).ne.4) STOP 83
+ if (minval (a(::2), dim = 1, mask = l(::2)).ne.6.0) STOP 84
+ if (any (minloc (a, mask = l).ne.(/ 7 /))) STOP 85
+ if (minval (a, mask = l).ne.6.0) STOP 86
+ if (any (minloc (a(::2), mask = l(::2)).ne.(/ 4 /))) STOP 87
+ if (minval (a(::2), mask = l(::2)).ne.6.0) STOP 88
+ if (any (minloc (b, dim = 1, mask = l2).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) STOP 89
+ if (any (minval (b, dim = 1, mask = l2).ne.(/ 7.0, 7.0, 7.0, 7.0, 6.0, 5.0, 4.0, 7.0, 7.0, 7.0 /))) STOP 90
+ if (any (minloc (b(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) STOP 91
+ if (any (minval (b(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) STOP 92
+ if (any (minloc (b, dim = 2, mask = l2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) STOP 93
+ if (any (minval (b, dim = 2, mask = l2).ne.(/ 7.0, 7.0, 7.0, 7.0, 5.0, 4.0, 7.0, 7.0, 7.0, 7.0 /))) STOP 94
+ if (any (minloc (b(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) STOP 95
+ if (any (minval (b(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) STOP 96
+ if (any (minloc (b, mask = l2).ne.(/ 6, 7 /))) STOP 97
+ if (minval (b, mask = l2).ne.4.0) STOP 98
+ if (any (minloc (b(::2,::2), mask = l2(::2,::2)).ne.(/ 3, 3 /))) STOP 99
+ if (minval (b(::2,::2), mask = l2(::2,::2)).ne.6.0) STOP 100
+ if (minloc (c, dim = 1, mask = l).ne.7) STOP 101
+ if (minval (c, dim = 1, mask = l).ne.6.0) STOP 102
+ if (minloc (c(::2), dim = 1, mask = l(::2)).ne.4) STOP 103
+ if (minval (c(::2), dim = 1, mask = l(::2)).ne.6.0) STOP 104
+ if (any (minloc (c, mask = l).ne.(/ 7 /))) STOP 105
+ if (minval (c, mask = l).ne.6.0) STOP 106
+ if (any (minloc (c(::2), mask = l(::2)).ne.(/ 4 /))) STOP 107
+ if (minval (c(::2), mask = l(::2)).ne.6.0) STOP 108
+ if (any (minloc (d, dim = 1, mask = l2).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) STOP 109
+ if (any (minval (d, dim = 1, mask = l2).ne.(/ 7.0, 7.0, 7.0, 7.0, 6.0, 5.0, 4.0, 7.0, 7.0, 7.0 /))) STOP 110
+ if (any (minloc (d(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) STOP 111
+ if (any (minval (d(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) STOP 112
+ if (any (minloc (d, dim = 2, mask = l2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) STOP 113
+ if (any (minval (d, dim = 2, mask = l2).ne.(/ 7.0, 7.0, 7.0, 7.0, 5.0, 4.0, 7.0, 7.0, 7.0, 7.0 /))) STOP 114
+ if (any (minloc (d(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) STOP 115
+ if (any (minval (d(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 7.0, 7.0, 6.0, 7.0, 7.0 /))) STOP 116
+ if (any (minloc (d, mask = l2).ne.(/ 6, 7 /))) STOP 117
+ if (minval (d, mask = l2).ne.4.0) STOP 118
+ if (any (minloc (d(::2,::2), mask = l2(::2,::2)).ne.(/ 3, 3 /))) STOP 119
+ if (minval (d(::2,::2), mask = l2(::2,::2)).ne.6.0) STOP 120
+ if (minloc (e, dim = 1, mask = l).ne.7) STOP 121
+ if (minval (e, dim = 1, mask = l).ne.6) STOP 122
+ if (minloc (e(::2), dim = 1, mask = l(::2)).ne.4) STOP 123
+ if (minval (e(::2), dim = 1, mask = l(::2)).ne.6) STOP 124
+ if (any (minloc (e, mask = l).ne.(/ 7 /))) STOP 125
+ if (minval (e, mask = l).ne.6) STOP 126
+ if (any (minloc (e(::2), mask = l(::2)).ne.(/ 4 /))) STOP 127
+ if (minval (e(::2), mask = l(::2)).ne.6) STOP 128
+ if (any (minloc (f, dim = 1, mask = l2).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) STOP 129
+ if (any (minval (f, dim = 1, mask = l2).ne.(/ 7, 7, 7, 7, 6, 5, 4, 7, 7, 7 /))) STOP 130
+ if (any (minloc (f(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) STOP 131
+ if (any (minval (f(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 7, 7, 6, 7, 7 /))) STOP 132
+ if (any (minloc (f, dim = 2, mask = l2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) STOP 133
+ if (any (minval (f, dim = 2, mask = l2).ne.(/ 7, 7, 7, 7, 5, 4, 7, 7, 7, 7 /))) STOP 134
+ if (any (minloc (f(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) STOP 135
+ if (any (minval (f(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 7, 7, 6, 7, 7 /))) STOP 136
+ if (any (minloc (f, mask = l2).ne.(/ 6, 7 /))) STOP 137
+ if (minval (f, mask = l2).ne.4) STOP 138
+ if (any (minloc (f(::2,::2), mask = l2(::2,::2)).ne.(/ 3, 3 /))) STOP 139
+ if (minval (f(::2,::2), mask = l2(::2,::2)).ne.6) STOP 140
+ if (minloc (g, dim = 1, mask = l).ne.7) STOP 141
+ if (minval (g, dim = 1, mask = l).ne.6) STOP 142
+ if (minloc (g(::2), dim = 1, mask = l(::2)).ne.4) STOP 143
+ if (minval (g(::2), dim = 1, mask = l(::2)).ne.6) STOP 144
+ if (any (minloc (g, mask = l).ne.(/ 7 /))) STOP 145
+ if (minval (g, mask = l).ne.6) STOP 146
+ if (any (minloc (g(::2), mask = l(::2)).ne.(/ 4 /))) STOP 147
+ if (minval (g(::2), mask = l(::2)).ne.6) STOP 148
+ if (any (minloc (h, dim = 1, mask = l2).ne.(/ 1, 1, 1, 1, 5, 5, 6, 1, 1, 1 /))) STOP 149
+ if (any (minval (h, dim = 1, mask = l2).ne.(/ 7, 7, 7, 7, 6, 5, 4, 7, 7, 7 /))) STOP 150
+ if (any (minloc (h(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) STOP 151
+ if (any (minval (h(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 7, 7, 6, 7, 7 /))) STOP 152
+ if (any (minloc (h, dim = 2, mask = l2).ne.(/ 1, 1, 1, 1, 6, 7, 1, 1, 1, 1 /))) STOP 153
+ if (any (minval (h, dim = 2, mask = l2).ne.(/ 7, 7, 7, 7, 5, 4, 7, 7, 7, 7 /))) STOP 154
+ if (any (minloc (h(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 1, 1, 3, 1, 1 /))) STOP 155
+ if (any (minval (h(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 7, 7, 6, 7, 7 /))) STOP 156
+ if (any (minloc (h, mask = l2).ne.(/ 6, 7 /))) STOP 157
+ if (minval (h, mask = l2).ne.4) STOP 158
+ if (any (minloc (h(::2,::2), mask = l2(::2,::2)).ne.(/ 3, 3 /))) STOP 159
+ if (minval (h(::2,::2), mask = l2(::2,::2)).ne.6) STOP 160
l = .false.
l2 = .false.
- if (minloc (a, dim = 1, mask = l).ne.0) call abort
- if (minval (a, dim = 1, mask = l).ne.m) call abort
- if (minloc (a(::2), dim = 1, mask = l(::2)).ne.0) call abort
- if (minval (a(::2), dim = 1, mask = l(::2)).ne.m) call abort
- if (any (minloc (a, mask = l).ne.(/ 0 /))) call abort
- if (minval (a, mask = l).ne.m) call abort
- if (any (minloc (a(::2), mask = l(::2)).ne.(/ 0 /))) call abort
- if (minval (a(::2), mask = l(::2)).ne.m) call abort
- if (any (minloc (b, dim = 1, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (b, dim = 1, mask = l2).ne.(/ m, m, m, m, m, m, m, m, m, m /))) call abort
- if (any (minloc (b(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (b(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ m, m, m, m, m /))) call abort
- if (any (minloc (b, dim = 2, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (b, dim = 2, mask = l2).ne.(/ m, m, m, m, m, m, m, m, m, m /))) call abort
- if (any (minloc (b(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (b(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ m, m, m, m, m /))) call abort
- if (any (minloc (b, mask = l2).ne.(/ 0, 0 /))) call abort
- if (minval (b, mask = l2).ne.m) call abort
- if (any (minloc (b(::2,::2), mask = l2(::2,::2)).ne.(/ 0, 0 /))) call abort
- if (minval (b(::2,::2), mask = l2(::2,::2)).ne.m) call abort
- if (minloc (c, dim = 1, mask = l).ne.0) call abort
- if (minval (c, dim = 1, mask = l).ne.m) call abort
- if (minloc (c(::2), dim = 1, mask = l(::2)).ne.0) call abort
- if (minval (c(::2), dim = 1, mask = l(::2)).ne.m) call abort
- if (any (minloc (c, mask = l).ne.(/ 0 /))) call abort
- if (minval (c, mask = l).ne.m) call abort
- if (any (minloc (c(::2), mask = l(::2)).ne.(/ 0 /))) call abort
- if (minval (c(::2), mask = l(::2)).ne.m) call abort
- if (any (minloc (d, dim = 1, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (d, dim = 1, mask = l2).ne.(/ m, m, m, m, m, m, m, m, m, m /))) call abort
- if (any (minloc (d(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (d(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ m, m, m, m, m /))) call abort
- if (any (minloc (d, dim = 2, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (d, dim = 2, mask = l2).ne.(/ m, m, m, m, m, m, m, m, m, m /))) call abort
- if (any (minloc (d(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (d(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ m, m, m, m, m /))) call abort
- if (any (minloc (d, mask = l2).ne.(/ 0, 0 /))) call abort
- if (minval (d, mask = l2).ne.m) call abort
- if (any (minloc (d(::2,::2), mask = l2(::2,::2)).ne.(/ 0, 0 /))) call abort
- if (minval (d(::2,::2), mask = l2(::2,::2)).ne.m) call abort
- if (minloc (e, dim = 1, mask = l).ne.0) call abort
- if (minval (e, dim = 1, mask = l).ne.n) call abort
- if (minloc (e(::2), dim = 1, mask = l(::2)).ne.0) call abort
- if (minval (e(::2), dim = 1, mask = l(::2)).ne.n) call abort
- if (any (minloc (e, mask = l).ne.(/ 0 /))) call abort
- if (minval (e, mask = l).ne.n) call abort
- if (any (minloc (e(::2), mask = l(::2)).ne.(/ 0 /))) call abort
- if (minval (e(::2), mask = l(::2)).ne.n) call abort
- if (any (minloc (f, dim = 1, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (f, dim = 1, mask = l2).ne.(/ n, n, n, n, n, n, n, n, n, n /))) call abort
- if (any (minloc (f(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (f(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ n, n, n, n, n /))) call abort
- if (any (minloc (f, dim = 2, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (f, dim = 2, mask = l2).ne.(/ n, n, n, n, n, n, n, n, n, n /))) call abort
- if (any (minloc (f(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (f(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ n, n, n, n, n /))) call abort
- if (any (minloc (f, mask = l2).ne.(/ 0, 0 /))) call abort
- if (minval (f, mask = l2).ne.n) call abort
- if (any (minloc (f(::2,::2), mask = l2(::2,::2)).ne.(/ 0, 0 /))) call abort
- if (minval (f(::2,::2), mask = l2(::2,::2)).ne.n) call abort
- if (minloc (g, dim = 1, mask = l).ne.0) call abort
- if (minval (g, dim = 1, mask = l).ne.n) call abort
- if (minloc (g(::2), dim = 1, mask = l(::2)).ne.0) call abort
- if (minval (g(::2), dim = 1, mask = l(::2)).ne.n) call abort
- if (any (minloc (g, mask = l).ne.(/ 0 /))) call abort
- if (minval (g, mask = l).ne.n) call abort
- if (any (minloc (g(::2), mask = l(::2)).ne.(/ 0 /))) call abort
- if (minval (g(::2), mask = l(::2)).ne.n) call abort
- if (any (minloc (h, dim = 1, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (h, dim = 1, mask = l2).ne.(/ n, n, n, n, n, n, n, n, n, n /))) call abort
- if (any (minloc (h(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (h(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ n, n, n, n, n /))) call abort
- if (any (minloc (h, dim = 2, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (h, dim = 2, mask = l2).ne.(/ n, n, n, n, n, n, n, n, n, n /))) call abort
- if (any (minloc (h(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) call abort
- if (any (minval (h(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ n, n, n, n, n /))) call abort
- if (any (minloc (h, mask = l2).ne.(/ 0, 0 /))) call abort
- if (minval (h, mask = l2).ne.n) call abort
- if (any (minloc (h(::2,::2), mask = l2(::2,::2)).ne.(/ 0, 0 /))) call abort
- if (minval (h(::2,::2), mask = l2(::2,::2)).ne.n) call abort
+ if (minloc (a, dim = 1, mask = l).ne.0) STOP 161
+ if (minval (a, dim = 1, mask = l).ne.m) STOP 162
+ if (minloc (a(::2), dim = 1, mask = l(::2)).ne.0) STOP 163
+ if (minval (a(::2), dim = 1, mask = l(::2)).ne.m) STOP 164
+ if (any (minloc (a, mask = l).ne.(/ 0 /))) STOP 165
+ if (minval (a, mask = l).ne.m) STOP 166
+ if (any (minloc (a(::2), mask = l(::2)).ne.(/ 0 /))) STOP 167
+ if (minval (a(::2), mask = l(::2)).ne.m) STOP 168
+ if (any (minloc (b, dim = 1, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) STOP 169
+ if (any (minval (b, dim = 1, mask = l2).ne.(/ m, m, m, m, m, m, m, m, m, m /))) STOP 170
+ if (any (minloc (b(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) STOP 171
+ if (any (minval (b(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ m, m, m, m, m /))) STOP 172
+ if (any (minloc (b, dim = 2, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) STOP 173
+ if (any (minval (b, dim = 2, mask = l2).ne.(/ m, m, m, m, m, m, m, m, m, m /))) STOP 174
+ if (any (minloc (b(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) STOP 175
+ if (any (minval (b(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ m, m, m, m, m /))) STOP 176
+ if (any (minloc (b, mask = l2).ne.(/ 0, 0 /))) STOP 177
+ if (minval (b, mask = l2).ne.m) STOP 178
+ if (any (minloc (b(::2,::2), mask = l2(::2,::2)).ne.(/ 0, 0 /))) STOP 179
+ if (minval (b(::2,::2), mask = l2(::2,::2)).ne.m) STOP 180
+ if (minloc (c, dim = 1, mask = l).ne.0) STOP 181
+ if (minval (c, dim = 1, mask = l).ne.m) STOP 182
+ if (minloc (c(::2), dim = 1, mask = l(::2)).ne.0) STOP 183
+ if (minval (c(::2), dim = 1, mask = l(::2)).ne.m) STOP 184
+ if (any (minloc (c, mask = l).ne.(/ 0 /))) STOP 185
+ if (minval (c, mask = l).ne.m) STOP 186
+ if (any (minloc (c(::2), mask = l(::2)).ne.(/ 0 /))) STOP 187
+ if (minval (c(::2), mask = l(::2)).ne.m) STOP 188
+ if (any (minloc (d, dim = 1, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) STOP 189
+ if (any (minval (d, dim = 1, mask = l2).ne.(/ m, m, m, m, m, m, m, m, m, m /))) STOP 190
+ if (any (minloc (d(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) STOP 191
+ if (any (minval (d(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ m, m, m, m, m /))) STOP 192
+ if (any (minloc (d, dim = 2, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) STOP 193
+ if (any (minval (d, dim = 2, mask = l2).ne.(/ m, m, m, m, m, m, m, m, m, m /))) STOP 194
+ if (any (minloc (d(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) STOP 195
+ if (any (minval (d(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ m, m, m, m, m /))) STOP 196
+ if (any (minloc (d, mask = l2).ne.(/ 0, 0 /))) STOP 197
+ if (minval (d, mask = l2).ne.m) STOP 198
+ if (any (minloc (d(::2,::2), mask = l2(::2,::2)).ne.(/ 0, 0 /))) STOP 199
+ if (minval (d(::2,::2), mask = l2(::2,::2)).ne.m) STOP 200
+ if (minloc (e, dim = 1, mask = l).ne.0) STOP 201
+ if (minval (e, dim = 1, mask = l).ne.n) STOP 202
+ if (minloc (e(::2), dim = 1, mask = l(::2)).ne.0) STOP 203
+ if (minval (e(::2), dim = 1, mask = l(::2)).ne.n) STOP 204
+ if (any (minloc (e, mask = l).ne.(/ 0 /))) STOP 205
+ if (minval (e, mask = l).ne.n) STOP 206
+ if (any (minloc (e(::2), mask = l(::2)).ne.(/ 0 /))) STOP 207
+ if (minval (e(::2), mask = l(::2)).ne.n) STOP 208
+ if (any (minloc (f, dim = 1, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) STOP 209
+ if (any (minval (f, dim = 1, mask = l2).ne.(/ n, n, n, n, n, n, n, n, n, n /))) STOP 210
+ if (any (minloc (f(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) STOP 211
+ if (any (minval (f(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ n, n, n, n, n /))) STOP 212
+ if (any (minloc (f, dim = 2, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) STOP 213
+ if (any (minval (f, dim = 2, mask = l2).ne.(/ n, n, n, n, n, n, n, n, n, n /))) STOP 214
+ if (any (minloc (f(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) STOP 215
+ if (any (minval (f(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ n, n, n, n, n /))) STOP 216
+ if (any (minloc (f, mask = l2).ne.(/ 0, 0 /))) STOP 217
+ if (minval (f, mask = l2).ne.n) STOP 218
+ if (any (minloc (f(::2,::2), mask = l2(::2,::2)).ne.(/ 0, 0 /))) STOP 219
+ if (minval (f(::2,::2), mask = l2(::2,::2)).ne.n) STOP 220
+ if (minloc (g, dim = 1, mask = l).ne.0) STOP 221
+ if (minval (g, dim = 1, mask = l).ne.n) STOP 222
+ if (minloc (g(::2), dim = 1, mask = l(::2)).ne.0) STOP 223
+ if (minval (g(::2), dim = 1, mask = l(::2)).ne.n) STOP 224
+ if (any (minloc (g, mask = l).ne.(/ 0 /))) STOP 225
+ if (minval (g, mask = l).ne.n) STOP 226
+ if (any (minloc (g(::2), mask = l(::2)).ne.(/ 0 /))) STOP 227
+ if (minval (g(::2), mask = l(::2)).ne.n) STOP 228
+ if (any (minloc (h, dim = 1, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) STOP 229
+ if (any (minval (h, dim = 1, mask = l2).ne.(/ n, n, n, n, n, n, n, n, n, n /))) STOP 230
+ if (any (minloc (h(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) STOP 231
+ if (any (minval (h(::2,::2), dim = 1, mask = l2(::2,::2)).ne.(/ n, n, n, n, n /))) STOP 232
+ if (any (minloc (h, dim = 2, mask = l2).ne.(/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /))) STOP 233
+ if (any (minval (h, dim = 2, mask = l2).ne.(/ n, n, n, n, n, n, n, n, n, n /))) STOP 234
+ if (any (minloc (h(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ 0, 0, 0, 0, 0 /))) STOP 235
+ if (any (minval (h(::2,::2), dim = 2, mask = l2(::2,::2)).ne.(/ n, n, n, n, n /))) STOP 236
+ if (any (minloc (h, mask = l2).ne.(/ 0, 0 /))) STOP 237
+ if (minval (h, mask = l2).ne.n) STOP 238
+ if (any (minloc (h(::2,::2), mask = l2(::2,::2)).ne.(/ 0, 0 /))) STOP 239
+ if (minval (h(::2,::2), mask = l2(::2,::2)).ne.n) STOP 240
a = 7.0
b = 7.0
c = 7.0
l5(1,2) = .false.
l5(2,3) = .false.
a = reshape ((/ nan, nan, nan, pinf, pinf, pinf, pinf, minf, pinf /), (/ 3, 3 /))
- if (minval (a).ne.minf) call abort
- if (any (minloc (a).ne.(/ 2, 3 /))) call abort
+ if (minval (a).ne.minf) STOP 1
+ if (any (minloc (a).ne.(/ 2, 3 /))) STOP 2
b = minval (a, dim = 1)
- if (.not.isnan(b(1))) call abort
+ if (.not.isnan(b(1))) STOP 3
b(1) = 0.0
- if (any (b.ne.(/ 0.0, pinf, minf /))) call abort
- if (any (minloc (a, dim = 1).ne.(/ 1, 1, 2 /))) call abort
+ if (any (b.ne.(/ 0.0, pinf, minf /))) STOP 4
+ if (any (minloc (a, dim = 1).ne.(/ 1, 1, 2 /))) STOP 5
b = minval (a, dim = 2)
- if (any (b.ne.(/ pinf, minf, pinf /))) call abort
- if (any (minloc (a, dim = 2).ne.(/ 2, 3, 2 /))) call abort
- if (minval (a, mask = l).ne.h) call abort
- if (any (minloc (a, mask = l).ne.(/ 0, 0 /))) call abort
+ if (any (b.ne.(/ pinf, minf, pinf /))) STOP 6
+ if (any (minloc (a, dim = 2).ne.(/ 2, 3, 2 /))) STOP 7
+ if (minval (a, mask = l).ne.h) STOP 8
+ if (any (minloc (a, mask = l).ne.(/ 0, 0 /))) STOP 9
b = minval (a, dim = 1, mask = l)
- if (any (b.ne.(/ h, h, h /))) call abort
- if (any (minloc (a, dim = 1, mask = l).ne.(/ 0, 0, 0 /))) call abort
+ if (any (b.ne.(/ h, h, h /))) STOP 10
+ if (any (minloc (a, dim = 1, mask = l).ne.(/ 0, 0, 0 /))) STOP 11
b = minval (a, dim = 2, mask = l)
- if (any (b.ne.(/ h, h, h /))) call abort
- if (any (minloc (a, dim = 2, mask = l).ne.(/ 0, 0, 0 /))) call abort
- if (minval (a, mask = l3).ne.h) call abort
- if (any (minloc (a, mask = l3).ne.(/ 0, 0 /))) call abort
+ if (any (b.ne.(/ h, h, h /))) STOP 12
+ if (any (minloc (a, dim = 2, mask = l).ne.(/ 0, 0, 0 /))) STOP 13
+ if (minval (a, mask = l3).ne.h) STOP 14
+ if (any (minloc (a, mask = l3).ne.(/ 0, 0 /))) STOP 15
b = minval (a, dim = 1, mask = l3)
- if (any (b.ne.(/ h, h, h /))) call abort
- if (any (minloc (a, dim = 1, mask = l3).ne.(/ 0, 0, 0 /))) call abort
+ if (any (b.ne.(/ h, h, h /))) STOP 16
+ if (any (minloc (a, dim = 1, mask = l3).ne.(/ 0, 0, 0 /))) STOP 17
b = minval (a, dim = 2, mask = l3)
- if (any (b.ne.(/ h, h, h /))) call abort
- if (any (minloc (a, dim = 2, mask = l3).ne.(/ 0, 0, 0 /))) call abort
- if (minval (a, mask = l2).ne.minf) call abort
- if (minval (a, mask = l4).ne.minf) call abort
- if (any (minloc (a, mask = l2).ne.(/ 2, 3 /))) call abort
- if (any (minloc (a, mask = l4).ne.(/ 2, 3 /))) call abort
+ if (any (b.ne.(/ h, h, h /))) STOP 18
+ if (any (minloc (a, dim = 2, mask = l3).ne.(/ 0, 0, 0 /))) STOP 19
+ if (minval (a, mask = l2).ne.minf) STOP 20
+ if (minval (a, mask = l4).ne.minf) STOP 21
+ if (any (minloc (a, mask = l2).ne.(/ 2, 3 /))) STOP 22
+ if (any (minloc (a, mask = l4).ne.(/ 2, 3 /))) STOP 23
b = minval (a, dim = 1, mask = l2)
- if (.not.isnan(b(1))) call abort
+ if (.not.isnan(b(1))) STOP 24
b(1) = 0.0
- if (any (b.ne.(/ 0.0, pinf, minf /))) call abort
- if (any (minloc (a, dim = 1, mask = l2).ne.(/ 1, 1, 2 /))) call abort
+ if (any (b.ne.(/ 0.0, pinf, minf /))) STOP 25
+ if (any (minloc (a, dim = 1, mask = l2).ne.(/ 1, 1, 2 /))) STOP 26
b = minval (a, dim = 2, mask = l2)
- if (any (b.ne.(/ pinf, minf, pinf /))) call abort
- if (any (minloc (a, dim = 2, mask = l2).ne.(/ 2, 3, 2 /))) call abort
+ if (any (b.ne.(/ pinf, minf, pinf /))) STOP 27
+ if (any (minloc (a, dim = 2, mask = l2).ne.(/ 2, 3, 2 /))) STOP 28
b = minval (a, dim = 1, mask = l4)
- if (.not.isnan(b(1))) call abort
+ if (.not.isnan(b(1))) STOP 29
b(1) = 0.0
- if (any (b.ne.(/ 0.0, pinf, minf /))) call abort
- if (any (minloc (a, dim = 1, mask = l2).ne.(/ 1, 1, 2 /))) call abort
+ if (any (b.ne.(/ 0.0, pinf, minf /))) STOP 30
+ if (any (minloc (a, dim = 1, mask = l2).ne.(/ 1, 1, 2 /))) STOP 31
b = minval (a, dim = 2, mask = l4)
- if (any (b.ne.(/ pinf, minf, pinf /))) call abort
- if (any (minloc (a, dim = 2, mask = l2).ne.(/ 2, 3, 2 /))) call abort
- if (minval (a, mask = l5).ne.pinf) call abort
- if (any (minloc (a, mask = l5).ne.(/ 2, 2 /))) call abort
+ if (any (b.ne.(/ pinf, minf, pinf /))) STOP 32
+ if (any (minloc (a, dim = 2, mask = l2).ne.(/ 2, 3, 2 /))) STOP 33
+ if (minval (a, mask = l5).ne.pinf) STOP 34
+ if (any (minloc (a, mask = l5).ne.(/ 2, 2 /))) STOP 35
b = minval (a, dim = 1, mask = l5)
- if (.not.isnan(b(1))) call abort
+ if (.not.isnan(b(1))) STOP 36
b(1) = 0.0
- if (any (b.ne.(/ 0.0, pinf, pinf /))) call abort
- if (any (minloc (a, dim = 1, mask = l5).ne.(/ 2, 2, 1 /))) call abort
+ if (any (b.ne.(/ 0.0, pinf, pinf /))) STOP 37
+ if (any (minloc (a, dim = 1, mask = l5).ne.(/ 2, 2, 1 /))) STOP 38
b = minval (a, dim = 2, mask = l5)
- if (any (b.ne.(/ pinf, pinf, pinf /))) call abort
- if (any (minloc (a, dim = 2, mask = l5).ne.(/ 3, 2, 2 /))) call abort
+ if (any (b.ne.(/ pinf, pinf, pinf /))) STOP 39
+ if (any (minloc (a, dim = 2, mask = l5).ne.(/ 3, 2, 2 /))) STOP 40
a = nan
- if (.not.isnan(minval (a))) call abort
- if (minval (a, mask = l).ne.h) call abort
- if (.not.isnan(minval (a, mask = l2))) call abort
- if (minval (a, mask = l3).ne.h) call abort
- if (.not.isnan(minval (a, mask = l4))) call abort
- if (.not.isnan(minval (a, mask = l5))) call abort
- if (any (minloc (a).ne.(/ 1, 1 /))) call abort
- if (any (minloc (a, mask = l).ne.(/ 0, 0 /))) call abort
- if (any (minloc (a, mask = l2).ne.(/ 1, 1 /))) call abort
- if (any (minloc (a, mask = l3).ne.(/ 0, 0 /))) call abort
- if (any (minloc (a, mask = l4).ne.(/ 1, 1 /))) call abort
- if (any (minloc (a, mask = l5).ne.(/ 2, 1 /))) call abort
+ if (.not.isnan(minval (a))) STOP 41
+ if (minval (a, mask = l).ne.h) STOP 42
+ if (.not.isnan(minval (a, mask = l2))) STOP 43
+ if (minval (a, mask = l3).ne.h) STOP 44
+ if (.not.isnan(minval (a, mask = l4))) STOP 45
+ if (.not.isnan(minval (a, mask = l5))) STOP 46
+ if (any (minloc (a).ne.(/ 1, 1 /))) STOP 47
+ if (any (minloc (a, mask = l).ne.(/ 0, 0 /))) STOP 48
+ if (any (minloc (a, mask = l2).ne.(/ 1, 1 /))) STOP 49
+ if (any (minloc (a, mask = l3).ne.(/ 0, 0 /))) STOP 50
+ if (any (minloc (a, mask = l4).ne.(/ 1, 1 /))) STOP 51
+ if (any (minloc (a, mask = l5).ne.(/ 2, 1 /))) STOP 52
a = pinf
- if (minval (a).ne.pinf) call abort
- if (minval (a, mask = l).ne.h) call abort
- if (minval (a, mask = l2).ne.pinf) call abort
- if (minval (a, mask = l3).ne.h) call abort
- if (minval (a, mask = l4).ne.pinf) call abort
- if (minval (a, mask = l5).ne.pinf) call abort
- if (any (minloc (a).ne.(/ 1, 1 /))) call abort
- if (any (minloc (a, mask = l).ne.(/ 0, 0 /))) call abort
- if (any (minloc (a, mask = l2).ne.(/ 1, 1 /))) call abort
- if (any (minloc (a, mask = l3).ne.(/ 0, 0 /))) call abort
- if (any (minloc (a, mask = l4).ne.(/ 1, 1 /))) call abort
- if (any (minloc (a, mask = l5).ne.(/ 2, 1 /))) call abort
+ if (minval (a).ne.pinf) STOP 53
+ if (minval (a, mask = l).ne.h) STOP 54
+ if (minval (a, mask = l2).ne.pinf) STOP 55
+ if (minval (a, mask = l3).ne.h) STOP 56
+ if (minval (a, mask = l4).ne.pinf) STOP 57
+ if (minval (a, mask = l5).ne.pinf) STOP 58
+ if (any (minloc (a).ne.(/ 1, 1 /))) STOP 59
+ if (any (minloc (a, mask = l).ne.(/ 0, 0 /))) STOP 60
+ if (any (minloc (a, mask = l2).ne.(/ 1, 1 /))) STOP 61
+ if (any (minloc (a, mask = l3).ne.(/ 0, 0 /))) STOP 62
+ if (any (minloc (a, mask = l4).ne.(/ 1, 1 /))) STOP 63
+ if (any (minloc (a, mask = l5).ne.(/ 2, 1 /))) STOP 64
a = nan
a(1,3) = pinf
- if (minval (a).ne.pinf) call abort
- if (minval (a, mask = l).ne.h) call abort
- if (minval (a, mask = l2).ne.pinf) call abort
- if (minval (a, mask = l3).ne.h) call abort
- if (minval (a, mask = l4).ne.pinf) call abort
- if (minval (a, mask = l5).ne.pinf) call abort
- if (any (minloc (a).ne.(/ 1, 3 /))) call abort
- if (any (minloc (a, mask = l).ne.(/ 0, 0 /))) call abort
- if (any (minloc (a, mask = l2).ne.(/ 1, 3 /))) call abort
- if (any (minloc (a, mask = l3).ne.(/ 0, 0 /))) call abort
- if (any (minloc (a, mask = l4).ne.(/ 1, 3 /))) call abort
- if (any (minloc (a, mask = l5).ne.(/ 1, 3 /))) call abort
+ if (minval (a).ne.pinf) STOP 65
+ if (minval (a, mask = l).ne.h) STOP 66
+ if (minval (a, mask = l2).ne.pinf) STOP 67
+ if (minval (a, mask = l3).ne.h) STOP 68
+ if (minval (a, mask = l4).ne.pinf) STOP 69
+ if (minval (a, mask = l5).ne.pinf) STOP 70
+ if (any (minloc (a).ne.(/ 1, 3 /))) STOP 71
+ if (any (minloc (a, mask = l).ne.(/ 0, 0 /))) STOP 72
+ if (any (minloc (a, mask = l2).ne.(/ 1, 3 /))) STOP 73
+ if (any (minloc (a, mask = l3).ne.(/ 0, 0 /))) STOP 74
+ if (any (minloc (a, mask = l4).ne.(/ 1, 3 /))) STOP 75
+ if (any (minloc (a, mask = l5).ne.(/ 1, 3 /))) STOP 76
end
v = "da"
w = "flunch"
- if (.not. equal(min("foo", "bar"), "bar")) call abort
- if (.not. equal(max("foo", "bar"), "foo")) call abort
- if (.not. equal(min("bar", "foo"), "bar")) call abort
- if (.not. equal(max("bar", "foo"), "foo")) call abort
+ if (.not. equal(min("foo", "bar"), "bar")) STOP 1
+ if (.not. equal(max("foo", "bar"), "foo")) STOP 2
+ if (.not. equal(min("bar", "foo"), "bar")) STOP 3
+ if (.not. equal(max("bar", "foo"), "foo")) STOP 4
- if (.not. equal(min("bar", "foo", sp), "bar")) call abort
- if (.not. equal(max("bar", "foo", sp), "gee")) call abort
- if (.not. equal(min("bar", sp, "foo"), "bar")) call abort
- if (.not. equal(max("bar", sp, "foo"), "gee")) call abort
- if (.not. equal(min(sp, "bar", "foo"), "bar")) call abort
- if (.not. equal(max(sp, "bar", "foo"), "gee")) call abort
+ if (.not. equal(min("bar", "foo", sp), "bar")) STOP 5
+ if (.not. equal(max("bar", "foo", sp), "gee")) STOP 6
+ if (.not. equal(min("bar", sp, "foo"), "bar")) STOP 7
+ if (.not. equal(max("bar", sp, "foo"), "gee")) STOP 8
+ if (.not. equal(min(sp, "bar", "foo"), "bar")) STOP 9
+ if (.not. equal(max(sp, "bar", "foo"), "gee")) STOP 10
- if (.not. equal(min("foo", "bar", s), "bar")) call abort
- if (.not. equal(max("foo", "bar", s), "gee")) call abort
- if (.not. equal(min("foo", s, "bar"), "bar")) call abort
- if (.not. equal(max("foo", s, "bar"), "gee")) call abort
- if (.not. equal(min(s, "foo", "bar"), "bar")) call abort
- if (.not. equal(max(s, "foo", "bar"), "gee")) call abort
+ if (.not. equal(min("foo", "bar", s), "bar")) STOP 11
+ if (.not. equal(max("foo", "bar", s), "gee")) STOP 12
+ if (.not. equal(min("foo", s, "bar"), "bar")) STOP 13
+ if (.not. equal(max("foo", s, "bar"), "gee")) STOP 14
+ if (.not. equal(min(s, "foo", "bar"), "bar")) STOP 15
+ if (.not. equal(max(s, "foo", "bar"), "gee")) STOP 16
- if (.not. equal(min("", ""), "")) call abort
- if (.not. equal(max("", ""), "")) call abort
- if (.not. equal(min("", " "), " ")) call abort
- if (.not. equal(max("", " "), " ")) call abort
+ if (.not. equal(min("", ""), "")) STOP 17
+ if (.not. equal(max("", ""), "")) STOP 18
+ if (.not. equal(min("", " "), " ")) STOP 19
+ if (.not. equal(max("", " "), " ")) STOP 20
- if (.not. equal(min(u,v,w), "az ")) call abort
- if (.not. equal(max(u,v,w), "flunch")) call abort
- if (.not. equal(min(u,vp,w), "az ")) call abort
- if (.not. equal(max(u,vp,w), "flunch")) call abort
- if (.not. equal(min(u,v,wp), "az ")) call abort
- if (.not. equal(max(u,v,wp), "flunch")) call abort
- if (.not. equal(min(up,v,w), "az ")) call abort
- if (.not. equal(max(up,v,w), "flunch")) call abort
+ if (.not. equal(min(u,v,w), "az ")) STOP 21
+ if (.not. equal(max(u,v,w), "flunch")) STOP 22
+ if (.not. equal(min(u,vp,w), "az ")) STOP 23
+ if (.not. equal(max(u,vp,w), "flunch")) STOP 24
+ if (.not. equal(min(u,v,wp), "az ")) STOP 25
+ if (.not. equal(max(u,v,wp), "flunch")) STOP 26
+ if (.not. equal(min(up,v,w), "az ")) STOP 27
+ if (.not. equal(max(up,v,w), "flunch")) STOP 28
call foo("gee ","az ",s,t,u,v)
call foo("gee ","az ",s,t,u,v)
character(len=*) :: res_min, res_max
character(len=*), optional :: a, b, c, d
- if (.not. equal(min(a,b,c,d), res_min)) call abort
- if (.not. equal(max(a,b,c,d), res_max)) call abort
+ if (.not. equal(min(a,b,c,d), res_min)) STOP 29
+ if (.not. equal(max(a,b,c,d), res_max)) STOP 30
end subroutine foo
pure function equal(a,b)
subroutine check(n, i,j)
integer, value, intent(in) :: i,j,n
if(i /= j) then
- call abort()
+ STOP 1
! print *, 'ERROR: Test',n,' expected ',i,' received ', j
end if
end subroutine check
subroutine check(n, i,j)
integer, value, intent(in) :: i,j,n
if(i /= j) then
- call abort()
+ STOP 1
! print *, 'ERROR: Test',n,' expected ',i,' received ', j
end if
end subroutine check
character(len=3), dimension(2) :: a
a(1) = 'aaa'
a(2) = 'bbb'
- if (maxloc(a,dim=1) /= 2) call abort
- if (minloc(a,dim=1) /= 1) call abort
+ if (maxloc(a,dim=1) /= 2) STOP 1
+ if (minloc(a,dim=1) /= 1) STOP 2
end program main
K(I) = MAXLOC (ABS (A - B), 1)
END DO
- if (any (J .NE. (/1,2,3,4,5,6,7/))) call abort ()
- if (any (K .NE. (/7,7,1,1,1,1,1/))) call abort ()
+ if (any (J .NE. (/1,2,3,4,5,6,7/))) STOP 1
+ if (any (K .NE. (/7,7,1,1,1,1,1/))) STOP 2
STOP
subroutine check(n, i,j)
integer, value, intent(in) :: i,j,n
if(i /= j) then
- call abort()
+ STOP 1
! print *, 'ERROR: Test',n,' expected ',i,' received ', j
end if
end subroutine check
!WRITE(*,*) SUM(A(:,1:3),1)
!WRITE(*,*) MINLOC(SUM(A(:,1:3),1),1)
- if (minloc(sum(a(:,1:3),1),1) .ne. 1) call abort()
- if (maxloc(sum(a(:,1:3),1),1) .ne. 3) call abort()
+ if (minloc(sum(a(:,1:3),1),1) .ne. 1) STOP 1
+ if (maxloc(sum(a(:,1:3),1),1) .ne. 3) STOP 2
END PROGRAM TST
REAL DDA(100)
dda = (/(J1,J1=1,100)/)
IDS = MAXLOC(DDA,1)
- if (ids.ne.100) call abort !expect 100
+ if (ids.ne.100) STOP 1!expect 100
IDS = MAXLOC(DDA,1, (/(J1,J1=1,100)/) > 50)
- if (ids.ne.100) call abort !expect 100
+ if (ids.ne.100) STOP 2!expect 100
IDS = minLOC(DDA,1)
- if (ids.ne.1) call abort !expect 1
+ if (ids.ne.1) STOP 3!expect 1
IDS = MinLOC(DDA,1, (/(J1,J1=1,100)/) > 50)
- if (ids.ne.51) call abort !expect 51
+ if (ids.ne.51) STOP 4!expect 51
END
dda = (/(J1,J1=1,100)/)
IDS = MAXLOC(DDA,1)
- if (ids.ne.100) call abort !expect 100
+ if (ids.ne.100) STOP 1!expect 100
IDS = MAXLOC(DDA,1, (/(J1,J1=1,100)/) > 50)
- if (ids.ne.100) call abort !expect 100
+ if (ids.ne.100) STOP 2!expect 100
END
call sub2 (minloc(A),11)
call sub2 (maxloc(A, mask=mask),9)
A = minloc(A)
- if (size (A) /= 1 .or. A(1) /= 11) call abort ()
+ if (size (A) /= 1 .or. A(1) /= 11) STOP 1
contains
subroutine sub2(A,n)
integer :: A(:),n
- if (A(1) /= n .or. size (A) /= 1) call abort ()
+ if (A(1) /= n .or. size (A) /= 1) STOP 2
end subroutine sub2
end program test
a = [ 1.0, 3.0, 2.0]
write (unit=l1,fmt=*) 2_1
write (unit=l2,fmt=*) maxloc(a,kind=1)
- if (l1 /= l2) call abort
+ if (l1 /= l2) STOP 1
write (unit=l1,fmt=*) 2_2
write (unit=l2,fmt=*) maxloc(a,kind=2)
- if (l1 /= l2) call abort
+ if (l1 /= l2) STOP 2
write (unit=l1,fmt=*) 2_4
write (unit=l2,fmt=*) maxloc(a,kind=4)
- if (l1 /= l2) call abort
+ if (l1 /= l2) STOP 3
write (unit=l1,fmt=*) 2_8
write (unit=l2,fmt=*) maxloc(a,kind=8)
- if (l1 /= l2) call abort
+ if (l1 /= l2) STOP 4
a = [ 3.0, -1.0, 2.0]
write (unit=l1,fmt=*) 2_1
write (unit=l2,fmt=*) minloc(a,kind=1)
- if (l1 /= l2) call abort
+ if (l1 /= l2) STOP 5
write (unit=l1,fmt=*) 2_2
write (unit=l2,fmt=*) minloc(a,kind=2)
- if (l1 /= l2) call abort
+ if (l1 /= l2) STOP 6
write (unit=l1,fmt=*) 2_4
write (unit=l2,fmt=*) minloc(a,kind=4)
- if (l1 /= l2) call abort
+ if (l1 /= l2) STOP 7
write (unit=l1,fmt=*) 2_8
write (unit=l2,fmt=*) minloc(a,kind=8)
- if (l1 /= l2) call abort
+ if (l1 /= l2) STOP 8
end program main
EXTERNAL fun4a, fun4b
integer fun4a, fun4b
- if (fun4a () .ne. 15) call abort
- if (fun4b () .ne. 25) call abort
+ if (fun4a () .ne. 15) STOP 1
+ if (fun4b () .ne. 25) STOP 2
end
write (unit=a,fmt='(I5.5)') (21-i*i+6*i,i=1,n)
res = minval(a)
- if (res /= '00026') call abort
+ if (res /= '00026') STOP 1
do
call random_number(r)
v = int(r * 100)
end do
write (unit=b,fmt='(I5.5)') v
write (unit=res,fmt='(I5.5)') minval(v)
- if (res /= minval(b)) call abort
+ if (res /= minval(b)) STOP 2
smask = .true.
- if (res /= minval(b, smask)) call abort
+ if (res /= minval(b, smask)) STOP 3
smask = .false.
- if (all_full /= minval(b, smask)) call abort
+ if (all_full /= minval(b, smask)) STOP 4
mask = v < 30
write (unit=res,fmt='(I5.5)') minval(v,mask)
- if (res /= minval(b, mask)) call abort
+ if (res /= minval(b, mask)) STOP 5
mask = .false.
- if (minval(b, mask) /= all_full) call abort
+ if (minval(b, mask) /= all_full) STOP 6
allocate (empty(0:3,0))
res = minval(empty)
- if (res /= all_full) call abort
+ if (res /= all_full) STOP 7
end program main
all_full = transfer(kmin,all_full)
write (unit=a,fmt='(I5.5)') (21-i*i+6*i,i=1,n)
res = minval(a)
- if (res /= 4_'00026') call abort
+ if (res /= 4_'00026') STOP 1
do
call random_number(r)
v = int(r * 100)
end do
write (unit=b,fmt='(I5.5)') v
write (unit=res,fmt='(I5.5)') minval(v)
- if (res /= minval(b)) call abort
+ if (res /= minval(b)) STOP 2
smask = .true.
- if (res /= minval(b, smask)) call abort
+ if (res /= minval(b, smask)) STOP 3
smask = .false.
- if (all_full /= minval(b, smask)) call abort
+ if (all_full /= minval(b, smask)) STOP 4
mask = v < 30
write (unit=res,fmt='(I5.5)') minval(v,mask)
- if (res /= minval(b, mask)) call abort
+ if (res /= minval(b, mask)) STOP 5
mask = .false.
- if (minval(b, mask) /= all_full) call abort
+ if (minval(b, mask) /= all_full) STOP 6
allocate (empty(0:3,0))
res = minval(empty)
- if (res /= all_full) call abort
+ if (res /= all_full) STOP 7
end program main
r1 = minval(a,dim=1)
write (unit=r2,fmt='(I6.6)') minval(v,dim=1)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 1
r1 = 'x'
write (unit=r1,fmt='(I6.6)') minval(v,dim=1)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 2
r1 = 'y'
r1 = minval(a,dim=2)
write (unit=r2,fmt='(I6.6)') minval(v,dim=2)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 3
r1 = 'z'
write (unit=r1,fmt='(I6.6)') minval(v,dim=2)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 4
allocate (a_alloc(0,1), v_alloc(0,1))
ret = 'what'
ret = minval(a_alloc,dim=1)
- if (ret(1) /= all_full) call abort
+ if (ret(1) /= all_full) STOP 5
r1 = 'qq'
r1 = minval(a, dim=1, mask=a>"000200");
- if (any(r1 /= all_full .neqv. minval(v,dim=1, mask=v>200) < 1000)) call abort
- if (any(minval(a, dim=1, mask=a>"000200") /= all_full .neqv. minval(v,dim=1, mask=v>200) < 1000)) call abort
+ if (any(r1 /= all_full .neqv. minval(v,dim=1, mask=v>200) < 1000)) STOP 6
+ if (any(minval(a, dim=1, mask=a>"000200") /= all_full .neqv. minval(v,dim=1, mask=v>200) < 1000)) STOP 7
r1 = 'rr'
r1 = minval(a, dim=2, mask=a>"000200");
- if (any(r1 /= all_full .neqv. minval(v,dim=2, mask=v>200) < 1000)) call abort
- if (any(minval(a, dim=2, mask=a>"000200") /= all_full .neqv. minval(v,dim=2, mask=v>200) < 1000)) call abort
+ if (any(r1 /= all_full .neqv. minval(v,dim=2, mask=v>200) < 1000)) STOP 8
+ if (any(minval(a, dim=2, mask=a>"000200") /= all_full .neqv. minval(v,dim=2, mask=v>200) < 1000)) STOP 9
mask = .true.
forall (i=1:n)
r1 = 'aa'
r1 = minval(a, dim=1, mask=mask)
write(unit=r2,fmt='(I6.6)') minval(v,dim=1, mask=mask)
- if (any(r1 /= r2)) call abort
+ if (any(r1 /= r2)) STOP 10
r1 = 'xyz'
smask = .true.
r1 = minval(a, dim=1, mask=smask)
write (unit=r2,fmt='(I6.6)') minval(v,dim=1)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 11
smask = .false.
r1 = 'foobar'
r1 = minval(a, dim=1, mask=smask)
- if (any(r1 /= all_full)) call abort
+ if (any(r1 /= all_full)) STOP 12
end program main
r1 = minval(a,dim=1)
write (unit=r2,fmt='(I6.6)') minval(v,dim=1)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 1
r1 = 4_'x'
write (unit=r1,fmt='(I6.6)') minval(v,dim=1)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 2
r1 = 4_'y'
r1 = minval(a,dim=2)
write (unit=r2,fmt='(I6.6)') minval(v,dim=2)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 3
r1 = 4_'z'
write (unit=r1,fmt='(I6.6)') minval(v,dim=2)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 4
allocate (a_alloc(0,1), v_alloc(0,1))
ret = 4_'what'
ret = minval(a_alloc,dim=1)
- if (ret(1) /= all_full) call abort
+ if (ret(1) /= all_full) STOP 5
r1 = 4_'qq'
r1 = minval(a, dim=1, mask=a>4_"000200");
- if (any(r1 /= all_full .neqv. minval(v,dim=1, mask=v>200) < 1000)) call abort
- if (any(minval(a, dim=1, mask=a>4_"000200") /= all_full .neqv. minval(v,dim=1, mask=v>200) < 1000)) call abort
+ if (any(r1 /= all_full .neqv. minval(v,dim=1, mask=v>200) < 1000)) STOP 6
+ if (any(minval(a, dim=1, mask=a>4_"000200") /= all_full .neqv. minval(v,dim=1, mask=v>200) < 1000)) STOP 7
r1 = 4_'rr'
r1 = minval(a, dim=2, mask=a>4_"000200");
- if (any(r1 /= all_full .neqv. minval(v,dim=2, mask=v>200) < 1000)) call abort
- if (any(minval(a, dim=2, mask=a>4_"000200") /= all_full .neqv. minval(v,dim=2, mask=v>200) < 1000)) call abort
+ if (any(r1 /= all_full .neqv. minval(v,dim=2, mask=v>200) < 1000)) STOP 8
+ if (any(minval(a, dim=2, mask=a>4_"000200") /= all_full .neqv. minval(v,dim=2, mask=v>200) < 1000)) STOP 9
mask = .true.
forall (i=1:n)
r1 = 4_'aa'
r1 = minval(a, dim=1, mask=mask)
write(unit=r2,fmt='(I6.6)') minval(v,dim=1, mask=mask)
- if (any(r1 /= r2)) call abort
+ if (any(r1 /= r2)) STOP 10
r1 = 4_'xyz'
smask = .true.
r1 = minval(a, dim=1, mask=smask)
write (unit=r2,fmt='(I6.6)') minval(v,dim=1)
- if (any (r1 /= r2)) call abort
+ if (any (r1 /= r2)) STOP 11
smask = .false.
r1 = 4_'foobar'
r1 = minval(a, dim=1, mask=smask)
- if (any(r1 /= all_full)) call abort
+ if (any(r1 /= all_full)) STOP 12
end program main
character(len=*), parameter :: s(3) = (/"a", "b", "c"/)
if (minval(s) /= b) then
- call abort
+ STOP 1
end if
if (maxval(s) /= e) then
- call abort
+ STOP 2
end if
end program tminmaxval
character(len=3), parameter :: cm4 = minval (c, c>"g")
character(len=3), dimension(3), parameter :: cm5 = minval(c,dim=1,mask=c>"g")
- if (any (im1 /= [ -1, -3, -7])) call abort
- if (im2 /= 5) call abort
- if (any (im3 /= [ -7,2])) call abort
- if (im4 /= 2) call abort
- if (any (im5 /= [huge(im5), 5, 11])) call abort
- if (any (im6 /= [huge(im6), 5])) call abort
+ if (any (im1 /= [ -1, -3, -7])) STOP 1
+ if (im2 /= 5) STOP 2
+ if (any (im3 /= [ -7,2])) STOP 3
+ if (im4 /= 2) STOP 4
+ if (any (im5 /= [huge(im5), 5, 11])) STOP 5
+ if (any (im6 /= [huge(im6), 5])) STOP 6
- if (any (rm1 /= [ -1., -3., -7.])) call abort
- if (rm2 /= 5) call abort
- if (any (rm3 /= [ -7.,2.])) call abort
- if (rm4 /= 2) call abort
- if (any (rm5 /= [huge(rm5), 5., 11.])) call abort
- if (any (rm6 /= [huge(rm6), 5.])) call abort
+ if (any (rm1 /= [ -1., -3., -7.])) STOP 7
+ if (rm2 /= 5) STOP 8
+ if (any (rm3 /= [ -7.,2.])) STOP 9
+ if (rm4 /= 2) STOP 10
+ if (any (rm5 /= [huge(rm5), 5., 11.])) STOP 11
+ if (any (rm6 /= [huge(rm6), 5.])) STOP 12
- if (cm1 /= "asd") call abort
- if (any (cm2 /= ["asd", "jkl", "ert" ])) call abort
- if (any (cm3 /= ["asd", "fgh" ])) call abort
- if (cm4 /= "jkl") call abort
- if (any(cm5 /= [ maxv, "jkl", "zui" ] )) call abort
+ if (cm1 /= "asd") STOP 13
+ if (any (cm2 /= ["asd", "jkl", "ert" ])) STOP 14
+ if (any (cm3 /= ["asd", "fgh" ])) STOP 15
+ if (cm4 /= "jkl") STOP 16
+ if (any(cm5 /= [ maxv, "jkl", "zui" ] )) STOP 17
end program main
! This was the case that would fail - PR case was an intrinsic call.
if (scan ("A quick brown fox jumps over the lazy dog", "lazy", back) &
.ne. myscan ("A quick brown fox jumps over the lazy dog", "lazy")) &
- call abort ()
+ STOP 1
! Check that the patch works with non-intrinsic functions.
if (myscan ("A quick brown fox jumps over the lazy dog", "fox", back) &
.ne. thyscan ("A quick brown fox jumps over the lazy dog", "fox")) &
- call abort ()
+ STOP 2
! Check that missing, optional character actual arguments are OK.
if (scan ("A quick brown fox jumps over the lazy dog", "over", back) &
.ne. thyscan ("A quick brown fox jumps over the lazy dog")) &
- call abort ()
+ STOP 3
contains
integer function myscan (str, substr, back)
END SUBROUTINE SUB
END MODULE myint
- if (isscan () /= 0) call abort
+ if (isscan () /= 0) STOP 1
contains
integer function isscan (substr)
character(*), optional :: substr
! Called functions
subroutine assumed_shape2 (as2)
integer, dimension(:),optional :: as2
- if (present (as2)) call abort()
+ if (present (as2)) STOP 1
end subroutine assumed_shape2
subroutine explicit_shape2 (es2)
integer, dimension(5),optional :: es2
- if (present (es2)) call abort()
+ if (present (es2)) STOP 2
end subroutine explicit_shape2
subroutine scalar2 (slr2)
integer, optional :: slr2
- if (present (slr2)) call abort()
+ if (present (slr2)) STOP 3
end subroutine scalar2
end program test
real(kind=8),dimension(3,3)::r3
character(25) :: a
a = 'I am not a )))))'')''.'
-if ((((((a /= "I am not a )))))')'.")))))) call abort
-if ((((((a /= 'I am not a )))))'')''.')))))) call abort
+if ((((((a /= "I am not a )))))')'.")))))) STOP 1
+if ((((((a /= 'I am not a )))))'')''.')))))) STOP 2
a = "I am not a )))))"")""."
-if ((((((a /= "I am not a )))))"")"".")))))) call abort
+if ((((((a /= "I am not a )))))"")"".")))))) STOP 3
if (((3*r1)**2)>= 0) a = "good"
if ((3*r1)**2)>= 0) a = "bad" ! { dg-error "Missing '\\(' in statement" }
r3((2,2)) = 4.3 ! { dg-error "found COMPLEX" }
real(kind=8)::r1=0
character(25) :: a
a = 'I am not a )))))'')''.'
-if ((((((a /= "I am not a )))))')'.")))))) call abort
-if ((((((a /= 'I am not a )))))'')''.')))))) call abort
+if ((((((a /= "I am not a )))))')'.")))))) STOP 1
+if ((((((a /= 'I am not a )))))'')''.')))))) STOP 2
a = "I am not a )))))"")""."
-if ((((((a /= "I am not a )))))"")"".")))))) call abort
+if ((((((a /= "I am not a )))))"")"".")))))) STOP 3
if (((3*r1)**2)>= 0) a = "good"
-if (a /= "good") call abort
+if (a /= "good") STOP 4
end
implicit none
real :: r1
r1 = mod (1e22, 1.7)
- if (abs(r1 - 0.995928764) > 1e-5) call abort
+ if (abs(r1 - 0.995928764) > 1e-5) STOP 1
r1 = modulo (1e22, -1.7)
- if (abs(r1 + 0.704071283) > 1e-5) call abort
+ if (abs(r1 + 0.704071283) > 1e-5) STOP 2
end program mod_large_1
r = mod (4., 2.)
t = sign (1., r)
- if (t < 0.) call abort
+ if (t < 0.) STOP 1
r = modulo (4., 2.)
t = sign (1., r)
- if (t < 0.) call abort
+ if (t < 0.) STOP 2
r = mod (-4., 2.)
t = sign (1., r)
- if (t > 0.) call abort
+ if (t > 0.) STOP 3
r = modulo (-4., 2.)
t = sign (1., r)
- if (t < 0.) call abort
+ if (t < 0.) STOP 4
r = mod (4., -2.)
t = sign (1., r)
- if (t < 0.) call abort
+ if (t < 0.) STOP 5
r = modulo (4., -2.)
t = sign (1., r)
- if (t > 0.) call abort
+ if (t > 0.) STOP 6
r = mod (-4., -2.)
t = sign (1., r)
- if (t > 0.) call abort
+ if (t > 0.) STOP 7
r = modulo (-4., -2.)
t = sign (1., r)
- if (t > 0.) call abort
+ if (t > 0.) STOP 8
end program mod_sign0_1
complex z
a = 999.0_4
b = -999.0_4
- if (z.ne.cmplx (a,b)) call abort ()
+ if (z.ne.cmplx (a,b)) STOP 1
end program blank_common
subroutine foo ()
use m2
- if (a.ne.99.0) call abort ()
+ if (a.ne.99.0) STOP 1
end subroutine foo
program collision
CONTAINS
subroutine FOOBAR (CHECK)
CHARACTER(LEN=80) :: CHECK
- IF (TESTCHAR .NE. CHECK) CALL ABORT
+ IF (TESTCHAR .NE. CHECK) STOP 1
end subroutine
END MODULE TEST4
end subroutine
subroutine BAR (CHECK)
CHARACTER(LEN=80) :: CHECK
- IF (TESTCHAR .NE. CHECK) CALL ABORT
- IF (CHR .NE. CHECK) CALL ABORT
+ IF (TESTCHAR .NE. CHECK) STOP 2
+ IF (CHR .NE. CHECK) STOP 3
end subroutine
END MODULE TEST2
x = 1.e0_e
y = 1.e0_f
u = 99.0
- if (kind(x).ne.kind(y)) call abort ()
- if (v.ne.u) call abort ()
+ if (kind(x).ne.kind(y)) STOP 1
+ if (v.ne.u) STOP 2
end program d
subroutine foo ()
use test_equiv, z=>b
- if (any (d(5:8)/=z)) call abort ()
+ if (any (d(5:8)/=z)) STOP 1
end subroutine foo
program module_equiv
use a
use b
- if (reM .ne. 1.77d0) call abort ()
+ if (reM .ne. 1.77d0) STOP 1
reM = 0.57d1
- if (M .ne. 0.57d1) call abort ()
+ if (M .ne. 0.57d1) STOP 2
end
contains
subroutine foo
use aap, only : c=>b
- if (any(c .ne. b)) call abort ()
+ if (any(c .ne. b)) STOP 1
end subroutine
subroutine bar
use aap, only : a
- if (any(a(3:5) .ne. b)) call abort ()
+ if (any(a(3:5) .ne. b)) STOP 2
end subroutine
! Make sure that bad things do not happen if we do not USE a or b.
subroutine foobar
use aap, only : d
- if (any(d(3:5) .ne. b)) call abort ()
+ if (any(d(3:5) .ne. b)) STOP 3
end subroutine
end
QLA3 = QCA
QLA3( 2:10:3) = QCA ( 1:5:2) + 1
QLA1( 2:10:3) = QLA2( 1:5:2) + 1 !failed because of dependency
- if (any (qla1 .ne. qla3)) call abort
+ if (any (qla1 .ne. qla3)) STOP 1
END SUBROUTINE
end module
integer, intent (in), dimension(:) :: Unsorted
integer, dimension (1) :: N
N = Max_Location (Unsorted)
- if (N(1).ne.5) call abort ()
+ if (N(1).ne.5) STOP 1
return
end subroutine Selection_Sort
end program module_interface
use nonordinal
implicit none
character(len=20) :: str
- if (log(abs(inf)) < huge(inf)) call abort()
- if (log(abs(minf)) < huge(inf)) call abort()
- if (.not. isnan(nan)) call abort()
+ if (log(abs(inf)) < huge(inf)) STOP 1
+ if (log(abs(minf)) < huge(inf)) STOP 2
+ if (.not. isnan(nan)) STOP 3
write(str,"(sp,f10.2)") inf
- if (adjustl(str) /= "+Infinity") call abort()
+ if (adjustl(str) /= "+Infinity") STOP 4
write(str,*) minf
- if (adjustl(str) /= "-Infinity") call abort()
+ if (adjustl(str) /= "-Infinity") STOP 5
write(str,*) nan
- if (adjustl(str) /= "NaN") call abort()
+ if (adjustl(str) /= "NaN") STOP 6
end program a
subroutine mysub(n, parray1)
integer, intent(in) :: n
real, dimension(a(n):b(n)) :: parray1
- if ((n == 1) .and. size(parray1, 1) /= 10) call abort ()
- if ((n == 2) .and. size(parray1, 1) /= 42) call abort ()
+ if ((n == 1) .and. size(parray1, 1) /= 10) STOP 1
+ if ((n == 2) .and. size(parray1, 1) /= 42) STOP 2
end subroutine mysub
end module bar
input1 = (/0,1/)
input2 = (/3,3/)
mysum = input1 .myadd. input2
- if (mysum(1) /= 3 .and. mysum(2) /= 4) call abort
+ if (mysum(1) /= 3 .and. mysum(2) /= 4) STOP 1
call test_sub(input1, input2)
integer mysum(2)
mysum = input1 .myadd. input2
- if (mysum(1) /= 3 .and. mysum(2) /= 4) call abort
+ if (mysum(1) /= 3 .and. mysum(2) /= 4) STOP 2
end subroutine test_sub
program test
use foo
- if(len(pop(0)) /= 0) call abort()
- if(len(pop(1)) /= 1) call abort()
- if(len(push(0)) /= 0) call abort()
- if(len(push(1)) /= 1) call abort()
+ if(len(pop(0)) /= 0) STOP 1
+ if(len(pop(1)) /= 1) STOP 2
+ if(len(push(0)) /= 0) STOP 3
+ if(len(push(1)) /= 1) STOP 4
end program
type(t_string) :: str
allocate(str%string(5))
str%string = ['H','e','l','l','o']
-if (len (string_to_char (str)) /= 5) call abort ()
-if (string_to_char (str) /= "Hello") call abort ()
+if (len (string_to_char (str)) /= 5) STOP 1
+if (string_to_char (str) /= "Hello") STOP 2
end
use m
character(len=20) :: s
- if (a /= 'H\0z') call abort
- if (ichar(a(2:2)) /= 0) call abort
+ if (a /= 'H\0z') STOP 1
+ if (ichar(a(2:2)) /= 0) STOP 2
write (s,"(A)") a
end
x = [ 42, 77 ]
call move_alloc (x, y)
- if (allocated(x)) call abort()
- if (.not.allocated(y)) call abort()
- if (any(y /= [ 42, 77 ])) call abort()
+ if (allocated(x)) STOP 1
+ if (.not.allocated(y)) STOP 2
+ if (any(y /= [ 42, 77 ])) STOP 3
a = [ "abcd", "efgh" ]
call move_alloc (a, b)
- if (allocated(a)) call abort()
- if (.not.allocated(b)) call abort()
- if (any(b /= [ "abcd", "efgh" ])) call abort()
+ if (allocated(a)) STOP 4
+ if (.not.allocated(b)) STOP 5
+ if (any(b /= [ "abcd", "efgh" ])) STOP 6
! Now one of the intended applications of move_alloc; resizing
call move_alloc (y, temp)
allocate (y(6), stat=i)
- if (i /= 0) call abort()
+ if (i /= 0) STOP 7
y(1:2) = temp
y(3:) = 99
deallocate(temp)
- if (any(y /= [ 42, 77, 99, 99, 99, 99 ])) call abort()
+ if (any(y /= [ 42, 77, 99, 99, 99, 99 ])) STOP 8
end program test_move_alloc
allocate (tmp)
- if (tmp%i /= 2 .or. tmp%j /= 77) call abort()
+ if (tmp%i /= 2 .or. tmp%j /= 77) STOP 1
tmp%i = 5
tmp%j = 88
select type(a)
type is(base_type)
- if (a%i /= -44) call abort()
+ if (a%i /= -44) STOP 2
a%i = -99
class default
- call abort ()
+ STOP 3
end select
call move_alloc (from=tmp, to=a)
select type(a)
type is(extended_type)
- if (a%i /= 5) call abort()
- if (a%j /= 88) call abort()
+ if (a%i /= 5) STOP 4
+ if (a%j /= 88) STOP 5
a%i = 123
a%j = 9498
class default
- call abort ()
+ STOP 6
end select
- if (allocated (tmp)) call abort()
+ if (allocated (tmp)) STOP 7
end subroutine myallocate
end module myalloc
select type(a)
type is(base_type)
- if (a%i /= 2) call abort()
+ if (a%i /= 2) STOP 8
a%i = -44
class default
- call abort ()
+ STOP 9
end select
call myallocate (a)
select type(a)
type is(extended_type)
- if (a%i /= 123) call abort()
- if (a%j /= 9498) call abort()
+ if (a%i /= 123) STOP 10
+ if (a%j /= 9498) STOP 11
class default
- call abort ()
+ STOP 12
end select
end program main
select type(z)
type is(t2)
- if (any (z(:)%a /= [2, 3])) call abort()
+ if (any (z(:)%a /= [2, 3])) STOP 1
class default
- call abort()
+ STOP 2
end select
contains
call move_alloc (from=a2, to=b2)
!print *, same_type_as (a,c), same_type_as (a,b)
!print *, same_type_as (a2,c2), same_type_as (a2,b2)
-if (.not. same_type_as (a,c) .or. same_type_as (a,b)) call abort ()
-if (.not. same_type_as (a2,c2) .or. same_type_as (a2,b2)) call abort ()
+if (.not. same_type_as (a,c) .or. same_type_as (a,b)) STOP 1
+if (.not. same_type_as (a2,c2) .or. same_type_as (a2,b2)) STOP 2
end
integer :: i
do i = 1, OLDSIZE
if (.not.flag .and. allocated (myarray(i)%i)) then
- if (any (myarray(i)%i .ne. [1,2,3,4,5])) call abort
+ if (any (myarray(i)%i .ne. [1,2,3,4,5])) STOP 1
else
- if (.not.flag) call abort
+ if (.not.flag) STOP 2
end if
end do
end subroutine
! functioning when it should not if the lhs is a substring - PR67977
tmpstr%text(1:3) = 'foo'
- if (.not.allocated (teststrs%strlist(1)%text)) call abort
- if (len (tmpstr%text) .ne. strlen) call abort
+ if (.not.allocated (teststrs%strlist(1)%text)) STOP 1
+ if (len (tmpstr%text) .ne. strlen) STOP 2
call move_alloc(tmpstr%text,teststrs%strlist(1)%text)
- if (.not.allocated (teststrs%strlist(1)%text)) call abort
- if (len (teststrs%strlist(1)%text) .ne. strlen) call abort
- if (trim (teststrs%strlist(1)%text(1:3)) .ne. 'foo') call abort
+ if (.not.allocated (teststrs%strlist(1)%text)) STOP 3
+ if (len (teststrs%strlist(1)%text) .ne. strlen) STOP 4
+ if (trim (teststrs%strlist(1)%text(1:3)) .ne. 'foo') STOP 5
! Clean up so that valgrind reports all allocated memory freed.
if (allocated (teststrs%strlist(1)%text)) deallocate (teststrs%strlist(1)%text)
allocate(foo :: afab)
afab%i = 8
call move_alloc(afab, bb%bf)
- if (.not. allocated(bb%bf)) call abort()
- if (allocated(afab)) call abort()
- if (bb%bf%i/=8) call abort()
+ if (.not. allocated(bb%bf)) STOP 1
+ if (allocated(afab)) STOP 2
+ if (bb%bf%i/=8) STOP 3
end program bug18
allocate (sm2)
call move_alloc (sm2,sm)
- if (allocated(sm2)) call abort()
- if (.not. allocated(sm)) call abort()
+ if (allocated(sm2)) STOP 1
+ if (.not. allocated(sm)) STOP 2
end program
select type(tmp)
type is(base_type)
- call abort ()
+ STOP 1
type is(extended_type)
- if (tmp%i /= 2 .or. tmp%j /= 77) call abort()
+ if (tmp%i /= 2 .or. tmp%j /= 77) STOP 2
tmp%i = 5
tmp%j = 88
end select
select type(a)
type is(base_type)
- if (a%i /= -44) call abort()
+ if (a%i /= -44) STOP 3
a%i = -99
class default
- call abort ()
+ STOP 4
end select
call move_alloc (from=tmp, to=a)
select type(a)
type is(extended_type)
- if (a%i /= 5) call abort()
- if (a%j /= 88) call abort()
+ if (a%i /= 5) STOP 5
+ if (a%j /= 88) STOP 6
a%i = 123
a%j = 9498
class default
- call abort ()
+ STOP 7
end select
- if (allocated (tmp)) call abort()
+ if (allocated (tmp)) STOP 8
end subroutine myallocate
end module myalloc
select type(a)
type is(base_type)
- if (a%i /= 2) call abort()
+ if (a%i /= 2) STOP 9
a%i = -44
class default
- call abort ()
+ STOP 10
end select
call myallocate (a)
select type(a)
type is(extended_type)
- if (a%i /= 123) call abort()
- if (a%j /= 9498) call abort()
+ if (a%i /= 123) STOP 11
+ if (a%j /= 9498) STOP 12
class default
- call abort ()
+ STOP 13
end select
end program main
allocate (sm2)
call move_alloc (sm,sm2) ! { dg-error "must be polymorphic if FROM is polymorphic" }
- if (allocated(sm2)) call abort()
- if (.not. allocated(sm)) call abort()
+ if (allocated(sm2)) STOP 1
+ if (.not. allocated(sm)) STOP 2
end program
allocate(a(4))
! This should set the stat code but not change the size.
allocate(a(3),stat=i)
- if (i == 0) call abort
- if (.not. allocated(a)) call abort
- if (size(a) /= 4) call abort
+ if (i == 0) STOP 1
+ if (.not. allocated(a)) STOP 2
+ if (size(a) /= 4) STOP 3
! It's OK to allocate pointers twice (even though this causes
! a memory leak)
allocate (A(5,5), stat=stat)
! Expected: Error stat and previous allocation status
- if (stat == 0) call abort ()
- if (any (shape (A) /= [20, 20])) call abort ()
- if (any (A /= 42)) call abort ()
+ if (stat == 0) STOP 1
+ if (any (shape (A) /= [20, 20])) STOP 2
+ if (any (A /= 42)) STOP 3
end program
i1=-1
call mvbits(1_1, 0,n,i1,0)
j1=-1-2_1**n+2
- if(i1.ne.j1)call abort
+ if(i1.ne.j1)STOP 1
enddo
ibits=bit_size(1_2)
do n=1,ibits
i2=-1
call mvbits(1_2, 0,n,i2,0)
j2=-1-2_2**n+2
- if(i2.ne.j2)call abort
+ if(i2.ne.j2)STOP 2
enddo
ibits=bit_size(1_4)
do n=1,ibits
i4=-1
call mvbits(1_4, 0,n,i4,0)
j4=-1-2_4**n+2
- if(i4.ne.j4)call abort
+ if(i4.ne.j4)STOP 3
enddo
ibits=bit_size(1_8)
do n=1,ibits
i8=-1
call mvbits(1_8, 0,n,i8,0)
j8=-1-2_8**n+2
- if(i8.ne.j8)call abort
+ if(i8.ne.j8)STOP 4
enddo
end
integer(kind=2) :: i2 = 0
integer(kind=1) :: i1 = 0
call mvbits (1_1, 0, 8, i1, 0)
- if (i1 /= 1) call abort
+ if (i1 /= 1) STOP 1
call mvbits (1_2, 0, 16, i2, 0)
- if (i2 /= 1) call abort
+ if (i2 /= 1) STOP 2
call mvbits (1_4, 0, 16, i4, 0)
- if (i4 /= 1) call abort
+ if (i4 /= 1) STOP 3
call mvbits (1_8, 0, 16, i8, 0)
- if (i8 /= 1) call abort
+ if (i8 /= 1) STOP 4
end
! write (*, *) 'y: ', y
! write (*, *)
- if ( any (b /= y) ) call abort()
+ if ( any (b /= y) ) STOP 1
end program main
! Argument is already packed.
call mvbits (ila1(INDEX_VECTOR), 2, 4, ila1, 3)
write (*,'(10(I3))') ila1
- if (any (ila1 /= SHOULD_BE)) call abort ()
+ if (any (ila1 /= SHOULD_BE)) STOP 1
! Argument is not packed.
call mvbits (ila2(2*INDEX_VECTOR), 2, 4, ila2(2:20:2), 3)
write (*,'(10(I3))') ila2(2:20:2)
- if (any (ila2(2:20:2) /= SHOULD_BE)) call abort ()
+ if (any (ila2(2:20:2) /= SHOULD_BE)) STOP 2
! Pointer and target
ila3_ptr => ila3
call mvbits (ila3(INDEX_VECTOR), 2, 4, ila3_ptr, 3)
write (*,'(10(I3))') ila3
- if (any (ila3 /= SHOULD_BE)) call abort ()
+ if (any (ila3 /= SHOULD_BE)) STOP 3
end
call foo (x)
y = reshape ([((t (i*j*2, "a"),i = 1,4), j=1,3)], [4,3])
call bar(y, 4, 3, 1, -1, -4, -3)
- if (any (x%i .ne. y%i)) call abort
+ if (any (x%i .ne. y%i)) STOP 1
contains
SUBROUTINE foo (x)
TYPE(t) x(4, 3) ! No dependency at all
CALL foobar (var, 1, 2)
- IF (ANY (var%comp%i /= (/ 1, 2 /))) CALL abort ()
- IF (ANY (var%comp%j /= (/ 3, 4 /))) CALL abort ()
+ IF (ANY (var%comp%i /= (/ 1, 2 /))) STOP 1
+ IF (ANY (var%comp%j /= (/ 3, 4 /))) STOP 2
CONTAINS
rewind (10)
read (10, nml=mynml, IOSTAT=ier)
- if (ier.ne.0) call abort
+ if (ier.ne.0) STOP 1
rewind (10)
do i = 1 , 10
- if ( abs( x(i) - real(i) ) .gt. 1e-8 ) call abort
+ if ( abs( x(i) - real(i) ) .gt. 1e-8 ) STOP 2
end do
- if ( abs( xx - 10d0 ) .gt. 1e-8 ) call abort
+ if ( abs( xx - 10d0 ) .gt. 1e-8 ) STOP 3
write (10, nml=mynml, iostat=ier)
- if (ier.ne.0) call abort
+ if (ier.ne.0) STOP 4
rewind (10)
read (10, NML=mynml, IOSTAT=ier)
- if (ier.ne.0) call abort
+ if (ier.ne.0) STOP 5
close (10)
do i = 1 , 10
- if ( abs( x(i) - real(i) ) .gt. 1e-8 ) call abort
+ if ( abs( x(i) - real(i) ) .gt. 1e-8 ) STOP 6
end do
- if ( abs( xx - 10d0 ) .gt. 1e-8 ) call abort
+ if ( abs( xx - 10d0 ) .gt. 1e-8 ) STOP 7
end program
rewind (10)
read (10, nml=mynml, IOSTAT=ier)
- if (ier.ne.0) call abort
+ if (ier.ne.0) STOP 1
rewind (10)
write (10, nml=mynml, iostat=ier)
- if (ier.ne.0) call abort
+ if (ier.ne.0) STOP 2
rewind (10)
read (10, NML=mynml, IOSTAT=ier)
- if (ier.ne.0) call abort
+ if (ier.ne.0) STOP 3
close (10)
do i = 1 , 10
- if ( abs( x(i) - i ) .ne. 0 ) call abort ()
- if ( ch(i:i).ne.check(I:I) ) call abort
+ if ( abs( x(i) - i ) .ne. 0 ) STOP 1
+ if ( ch(i:i).ne.check(I:I) ) STOP 4
end do
- if (xx.ne.42) call abort ()
+ if (xx.ne.42) STOP 2
end program
open(10,status="scratch", delim="apostrophe")
write (10, nml=mynml, iostat=ier)
- if (ier.ne.0) call abort
+ if (ier.ne.0) STOP 1
rewind (10)
read (10, NML=mynml, IOSTAT=ier)
- if (ier.ne.0) call abort
+ if (ier.ne.0) STOP 2
close (10)
end program namelist_13
open (10, status = "scratch", delim='apostrophe')
write (10, nml = z, iostat = ier)
- if (ier /= 0 ) call abort()
+ if (ier /= 0 ) STOP 1
rewind (10)
i = 0
chl = ""
read (10, nml = z, iostat = ier)
- if (ier /= 0 ) call abort()
+ if (ier /= 0 ) STOP 2
close (10)
if (.not.(dttest (dt(1), mt ((/99,999,9999,99999/))) .and. &
(chs == "singleton") .and. &
(chl == "abcdefg") .and. &
(cha(1)(1:10) == "first ") .and. &
- (cha(2)(1:10) == "second "))) call abort ()
+ (cha(2)(1:10) == "second "))) STOP 3
end subroutine foo
end program namelist_14
rewind (10)
read (10, nml = mynml, iostat = ier)
- if (ier .ne. 0) call abort ()
+ if (ier .ne. 0) STOP 1
close (10)
open (10, status = "scratch", delim='apostrophe')
rewind (10)
read (10, nml = mynml, iostat = ier)
- if (ier .ne. 0) call abort ()
+ if (ier .ne. 0) STOP 2
close(10)
if (.not. ((x(1)%i(1) == 3) .and. &
(x(2)%m(1)%ch(1) == "hz") .and. &
(x(2)%m(1)%ch(2) == "qz") .and. &
(x(2)%m(2)%ch(1) == "wz") .and. &
- (x(2)%m(2)%ch(2) == "kz"))) call abort ()
+ (x(2)%m(2)%ch(2) == "kz"))) STOP 3
end program namelist_15
rewind (10)
read (10, mynml, iostat = ier)
- if (ier .ne. 0) call abort ()
+ if (ier .ne. 0) STOP 1
close (10)
open (10, status = "scratch")
write (10, mynml, iostat = ier)
- if (ier .ne. 0) call abort ()
+ if (ier .ne. 0) STOP 2
rewind (10)
z = (/(1.0,2.0), (3.0,4.0)/)
read (10, mynml, iostat = ier)
- if (ier .ne. 0) call abort ()
+ if (ier .ne. 0) STOP 3
close (10)
- if ((z(1) .ne. (5.0,6.0)) .or. (z(2) .ne. (7.0,8.0))) call abort ()
+ if ((z(1) .ne. (5.0,6.0)) .or. (z(2) .ne. (7.0,8.0))) STOP 4
end program namelist_16
rewind (10)
read (10, mynml, iostat = ier)
- if (ier .ne. 0) call abort ()
+ if (ier .ne. 0) STOP 1
close (10)
open (10, status = "scratch")
write (10, mynml, iostat = ier)
- if (ier .ne. 0) call abort ()
+ if (ier .ne. 0) STOP 2
rewind (10)
l = (/.true., .false./)
read (10, mynml, iostat = ier)
- if (ier .ne. 0) call abort ()
+ if (ier .ne. 0) STOP 3
close (10)
- if (l(1) .or. (.not.l(2))) call abort ()
+ if (l(1) .or. (.not.l(2))) STOP 4
end program namelist_17
rewind (10)
read (10, '(a)', iostat = ier) buffer
read (10, '(a)', iostat = ier) buffer
- if (ier .ne. 0) call abort ()
+ if (ier .ne. 0) STOP 1
close (10)
- If ((buffer(6:6) /= "f") .or. (buffer(9:9) /= """")) call abort ()
+ If ((buffer(6:6) /= "f") .or. (buffer(9:9) /= """")) STOP 2
open (10, status = "scratch", delim ="quote")
write (10, mynml)
rewind (10)
read (10, '(a)', iostat = ier) buffer
read (10, '(a)', iostat = ier) buffer
- if (ier .ne. 0) call abort ()
+ if (ier .ne. 0) STOP 3
close (10)
- If ((buffer(5:5) /= """") .or. (buffer(9:9) /= """")) call abort ()
+ If ((buffer(5:5) /= """") .or. (buffer(9:9) /= """")) STOP 4
open (10, status = "scratch", delim ="apostrophe")
write (10, mynml)
rewind (10)
read (10, '(a)', iostat = ier) buffer
read (10, '(a)', iostat = ier) buffer
- if (ier .ne. 0) call abort ()
+ if (ier .ne. 0) STOP 5
close (10)
- If ((buffer(5:5) /= "'") .or. (buffer(9:9) /= "'")) call abort ()
+ If ((buffer(5:5) /= "'") .or. (buffer(9:9) /= "'")) STOP 6
end program namelist_18
rewind (10)
read (10, z, iostat = ier)
close(10)
- if (ier == 0) call abort ()
+ if (ier == 0) STOP 1
! Check that right namelist input gives no error
rewind (10)
read (10, z, iostat = ier)
close(10)
- if (ier /= 0) call abort ()
+ if (ier /= 0) STOP 2
end subroutine test_err
end program namelist_19
ier=0
read(10, a, iostat=ier)
- if (ier == 0) call abort ()
+ if (ier == 0) STOP 1
ier=0
read(10, a, iostat=ier)
- if (ier == 0) call abort ()
+ if (ier == 0) STOP 2
ier=0
read(10, a, iostat=ier)
- if (ier == 0) call abort ()
+ if (ier == 0) STOP 3
ier=0
read(10, a, iostat=ier)
- if (ier /= 0) call abort ()
+ if (ier /= 0) STOP 4
do i = -4,-2
- if (x(i) /= i) call abort ()
+ if (x(i) /= i) STOP 5
end do
end program namelist_20
rewind (12)
read (12, nml=ccsopr, iostat=ier)
- if (ier.ne.0) call abort()
+ if (ier.ne.0) STOP 1
rewind (12)
write(12,nml=ccsopr)
rewind (12)
read (12, nml=ccsopr, iostat=ier)
- if (ier.ne.0) call abort()
+ if (ier.ne.0) STOP 2
- if (namea(2).ne."spi02o ") call abort()
- if (namea(9).ne." ") call abort()
- if (namea(15).ne." ") call abort()
- if (nameb(1).ne."spi01h ") call abort()
- if (nameb(6).ne." ") call abort()
- if (nameb(15).ne." ") call abort()
+ if (namea(2).ne."spi02o ") STOP 3
+ if (namea(9).ne." ") STOP 4
+ if (namea(15).ne." ") STOP 5
+ if (nameb(1).ne."spi01h ") STOP 6
+ if (nameb(6).ne." ") STOP 7
+ if (nameb(15).ne." ") STOP 8
close (12)
end program pr24794
rewind (12)
read (12, nml=ccsopr, iostat=ier)
- if (ier.ne.0) call abort()
+ if (ier.ne.0) STOP 1
rewind (12)
write(12,nml=ccsopr)
rewind (12)
read (12, nml=ccsopr, iostat=ier)
- if (ier.ne.0) call abort()
- if (namea(2).ne."spi02o ") call abort()
- if (namea(9).ne." ") call abort()
- if (namea(15).ne." ") call abort()
- if (nameb(1).ne."spi01h ") call abort()
- if (nameb(6).ne." ") call abort()
- if (nameb(15).ne." ") call abort()
+ if (ier.ne.0) STOP 2
+ if (namea(2).ne."spi02o ") STOP 3
+ if (namea(9).ne." ") STOP 4
+ if (namea(15).ne." ") STOP 5
+ if (nameb(1).ne."spi01h ") STOP 6
+ if (nameb(6).ne." ") STOP 7
+ if (nameb(15).ne." ") STOP 8
close (12)
end program pr24794
write(10,*) "/"
rewind(10)
read (10, nml=mynml, err = 1000)
- if (.not.all(truely(1:3))) call abort()
- if (.not.all(truely_a_very_long_variable_name(1:3).eq.4)) call abort()
+ if (.not.all(truely(1:3))) STOP 1
+ if (.not.all(truely_a_very_long_variable_name(1:3).eq.4)) STOP 2
truely = .false.
truely_a_very_long_variable_name = 0
write(10,*) "/"
rewind(10)
read (10, nml=mynml, err = 1000)
- if (.not.all(truely(1:2))) call abort()
- if (.not.all(truely_a_very_long_variable_name(1:3).eq.4)) call abort()
+ if (.not.all(truely(1:2))) STOP 3
+ if (.not.all(truely_a_very_long_variable_name(1:3).eq.4)) STOP 4
truely = .true.
truely_a_very_long_variable_name = 0
write(10,*) "/"
rewind(10)
read (10, nml=mynml, err = 1000)
- if (all(truely(1:2))) call abort()
- if (.not.all(truely_a_very_long_variable_name(1:3).eq.4)) call abort()
+ if (all(truely(1:2))) STOP 5
+ if (.not.all(truely_a_very_long_variable_name(1:3).eq.4)) STOP 6
close(10)
stop
-1000 call abort()
+1000 STOP 7
end program read_logical
write (20, '(a)') "/"
rewind(20)
read(20,nml=mynml, iostat=ier)
- if (ier.ne.0) call abort()
- if (any(names(:,3:5).ne."0")) call abort()
- if (names(2,2).ne."frogger") call abort()
- if (names(1,1).ne."E123") call abort()
- if (names(2,1).ne."E456") call abort()
- if (names(3,1).ne."D789") call abort()
- if (names(4,1).ne."P135") call abort()
- if (names(5,1).ne."P246") call abort()
- if (any(names2(:,1).ne."0")) call abort()
- if (any(names2(:,3:5).ne."0")) call abort()
- if (names2(1,2).ne."abcde") call abort()
- if (names2(2,2).ne."0") call abort()
- if (names2(3,2).ne."fghij") call abort()
- if (names2(4,2).ne."0") call abort()
- if (names2(5,2).ne."klmno") call abort()
- if (any(names3.ne.names)) call abort()
+ if (ier.ne.0) STOP 1
+ if (any(names(:,3:5).ne."0")) STOP 2
+ if (names(2,2).ne."frogger") STOP 3
+ if (names(1,1).ne."E123") STOP 4
+ if (names(2,1).ne."E456") STOP 5
+ if (names(3,1).ne."D789") STOP 6
+ if (names(4,1).ne."P135") STOP 7
+ if (names(5,1).ne."P246") STOP 8
+ if (any(names2(:,1).ne."0")) STOP 9
+ if (any(names2(:,3:5).ne."0")) STOP 10
+ if (names2(1,2).ne."abcde") STOP 11
+ if (names2(2,2).ne."0") STOP 12
+ if (names2(3,2).ne."fghij") STOP 13
+ if (names2(4,2).ne."0") STOP 14
+ if (names2(5,2).ne."klmno") STOP 15
+ if (any(names3.ne.names)) STOP 16
end
if (ios /= 0) exit
iuse = iuse + 1
end do
- if (iuse /= 1) call abort()
+ if (iuse /= 1) STOP 1
end program gfcbug58
! Read /REPORT/ the first time
rewind (12)
call position_nml (12, "REPORT", stat)
- if (stat.ne.0) call abort()
+ if (stat.ne.0) STOP 1
if (stat == 0) call read_report (12, stat)
! Comment out the following lines to hide the bug
rewind (12)
call position_nml (12, "MISSING", stat)
- if (stat.ne.-1) call abort ()
+ if (stat.ne.-1) STOP 2
! Read /REPORT/ again
rewind (12)
call position_nml (12, "REPORT", stat)
- if (stat.ne.0) call abort()
+ if (stat.ne.0) STOP 3
contains
if (ios /= 0) exit
iuse = iuse + 1
end do
- if (iuse.ne.1) call abort()
+ if (iuse.ne.1) STOP 4
status = ios
end subroutine read_report
return
end if
end do
- if (k.gt.10) call abort
+ if (k.gt.10) STOP 1
end subroutine position_nml
subroutine read_report (unit, status)
call position_nml (unit, "REPORT", status)
if (stat /= 0) then
ios = status
- if (iuse /= 2) call abort()
+ if (iuse /= 2) STOP 1
return
end if
read (unit, nml=REPORT, iostat=ios)
if (ios /= 0) exit
iuse = iuse + 1
end do
- if (k.gt.10) call abort
+ if (k.gt.10) STOP 2
status = ios
end subroutine read_report
! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
!
character(80) :: buffer
- if (f1 (buffer) .ne. 42) call abort ()
+ if (f1 (buffer) .ne. 42) STOP 1
CONTAINS
INTEGER FUNCTION F1 (buffer)
NAMELIST /mynml/ F1
CHAR = 'Initialize string ***'\r
X = -777.\r
READ(10, nml=CODE, END=999)
-if (x.ne.-3.0) call abort
+if (x.ne.-3.0) STOP 1
READ(10, nml=CODE, END=999)
-if (x.ne.44.0) call abort
+if (x.ne.44.0) STOP 2
READ(10, nml=CODE, END=999)
-if (x.ne.66.0) call abort
+if (x.ne.66.0) STOP 3
READ(10, nml=CODE, END=999)
- 999 if (x.ne.77.0) call abort\r
+ 999 if (x.ne.77.0) STOP 1
END PROGRAM namelist\r
rewind 10
a = ""
read (10,foo) ! This gave a runtime error before the patch.
- if (a.ne.'a"a') call abort
+ if (a.ne.'a"a') STOP 1
close (10)
open(10, status="scratch", delim="apostrophe")
rewind 10
a = ""
read (10,foo)
- if (a.ne."a'a") call abort
+ if (a.ne."a'a") STOP 2
close (10)
open(10, status="scratch", delim="none")
write(10,foo)
rewind (10)
read(10,"(a)") b
- if (b .ne. "&FOO") call abort
+ if (b .ne. "&FOO") STOP 3
read(10,"(a)") b
- if (b .ne. " A=a'a") call abort
+ if (b .ne. " A=a'a") STOP 4
read(10,"(a)") b
- if (b .ne. " /") call abort
+ if (b .ne. " /") STOP 5
close(10)
end program main
close(99)
if (b01234567890123456789012345678901234567890123456789012345678901(1).ne.&
- " AAP NOOT MIES WIM ZUS JET ") call abort
+ " AAP NOOT MIES WIM ZUS JET ") STOP 1
if (b01234567890123456789012345678901234567890123456789012345678901(2).ne.&
- "SURF.PRESSURE ") call abort
+ "SURF.PRESSURE ") STOP 2
if (b01234567890123456789012345678901234567890123456789012345678901(3).ne.&
- "APEKOOL ") call abort
+ "APEKOOL ") STOP 3
end program test
write (10, '(A)') "/"
rewind (10)
read (10, nml = mynml, iostat=ierror, iomsg=errmessage)
- if (ierror == 0) call abort
+ if (ierror == 0) STOP 1
print '(a)', trim(errmessage)
close (10)
write (11, *) "&end"
rewind (11)
read(11,nml=inx)
- if (var(1) /= 'hello' .and. var(2) /= 'goodbye') call abort
+ if (var(1) /= 'hello' .and. var(2) /= 'goodbye') STOP 1
var = "goodbye"
rewind (11)
write (11, *) "$inx"
write (11, *) "$end"
rewind (11)
read(11,nml=inx)
- if (var(1) /= 'hello' .and. var(2) /= 'goodbye') call abort
+ if (var(1) /= 'hello' .and. var(2) /= 'goodbye') STOP 2
end
READ (10, NML = nl)
close (10)
- if(infinity /= 1) call abort()
+ if(infinity /= 1) STOP 1
if(any(foo(1:3) /= [5.0, 5.0, 5.0]) .or. .not.isnan(foo(4)) &
.or. foo(5) <= huge(foo) .or. any(foo(6:11) /= -1.0)) &
- call abort()
+ STOP 2
! Works too:
foo = -1.0
infinity = -1
READ (10, NML = nl)
CLOSE (10)
- if(infinity /= 1) call abort()
+ if(infinity /= 1) STOP 3
if(any(foo(1:3) /= [5.0, 5.0, 5.0]) .or. .not.isnan(foo(4)) &
.or. foo(5) <= huge(foo) .or. any(foo(6:11) /= -1.0)) &
- call abort()
+ STOP 4
END PROGRAM TEST
rewind (10)
READ (10, NML = nl)
CLOSE (10)
- if(infinity /= 1) call abort
+ if(infinity /= 1) STOP 1
if(any(foo(1:3) /= [5.0, 5.0, 5.0]) .or. .not.isnan(foo(4)) &
.or. (foo(5) <= huge(foo)) .or. any(foo(6:10) /= -1.0)) &
- call abort
+ STOP 2
END PROGRAM TEST
rewind(nnml)
read (nnml, nml=BLACKLIST)
close(nnml,status="delete")
- if(file /= "myfile" .or. default) call abort()
+ if(file /= "myfile" .or. default) STOP 1
! write (*,nml=BLACKLIST)
end program gfcbug77
write (10, '(A)') "/"
rewind (10)
read (10, nml = mynml, iostat=ierror, iomsg=errmessage)
- if (ierror == 0) call abort
+ if (ierror == 0) STOP 1
print '(a)', trim(errmessage)
close (10)
rewind(1)
x = 0
read(1,casein)
- if (x.ne.1) call abort
+ if (x.ne.1) STOP 1
end
b = 0.0
c = 0.0
read(1,casedat)
- if ((a.ne.1.0) .or. (b.ne.2.0) .or. (c.ne.3.0)) call abort
+ if ((a.ne.1.0) .or. (b.ne.2.0) .or. (c.ne.3.0)) STOP 1
end
write(nnml,*) "/"
rewind(nnml)
read (nnml, nml=NML)
- if (model /= 'foo') call abort
+ if (model /= 'foo') STOP 1
close(nnml)
end program gfcbug79
write(101,'(a)')"&END"
rewind(101)
read(unit = 101, nml = INPUT)
-if (nxc /= 100) call abort
+if (nxc /= 100) STOP 1
close(unit = 101)
endsubroutine
end program mem_nml
write(31, '(a)') "/"
rewind(31)
read(31,nml=info_adjoint)
-if (adjoint%solver_type /= 'direct') call abort
-if (adjoint%screen_io_fs_ntime%begin /= 42) call abort
+if (adjoint%solver_type /= 'direct') STOP 1
+if (adjoint%screen_io_fs_ntime%begin /= 42) STOP 2
end program gfortran_error_2
a%n=[97,98,99]
read(l,namlis)
if (a(1)%m /= 1 .or. a(2)%m /= 2 .or. a(1)%n /= 5 .or. a(2)%n /= 6 .or. &
- & a(3)%m /= 89 .or. a(3)%n /= 99) call abort
+ & a(3)%m /= 89 .or. a(3)%n /= 99) STOP 1
end
namelist /naminterp/outgeo,ahalf,bhalf,atmkey
print *, outgeo%nlev
read(l,nml=naminterp)
-if (outgeo%nlev /= 10) call abort
-if (any(ahalf(1:10) .ne. [0.,1.,2.,3.,4.,5.,6.,7.,8.,9.])) call abort
-if (any(bhalf(1:10) .ne. [0.,1.,2.,3.,4.,5.,6.,7.,8.,9.])) call abort
-if (any(atmkey(1:4)%ppp .ne. [076,058,062,079])) call abort
-if (any(atmkey(1:4)%nnn .ne. [0,0,0,0])) call abort
+if (outgeo%nlev /= 10) STOP 1
+if (any(ahalf(1:10) .ne. [0.,1.,2.,3.,4.,5.,6.,7.,8.,9.])) STOP 2
+if (any(bhalf(1:10) .ne. [0.,1.,2.,3.,4.,5.,6.,7.,8.,9.])) STOP 3
+if (any(atmkey(1:4)%ppp .ne. [076,058,062,079])) STOP 4
+if (any(atmkey(1:4)%nnn .ne. [0,0,0,0])) STOP 5
if (any(atmkey(1:4)%name .ne. ['LIQUID_WATER','SOLID_WATER ','SNOW ',&
- &'RAIN '])) call abort
+ &'RAIN '])) STOP 6
end
j = -54
str = 'XXXX'
read(99,nml)
- if (j.ne.5) call abort
- if (any(str.ne.["a ","b ","cde "," "])) call abort
+ if (j.ne.5) STOP 1
+ if (any(str.ne.["a ","b ","cde "," "])) STOP 2
close(99)
end
n = 123
line = ""
write(line,nml=stuff)
- if (line(1) .ne. "&STUFF") call abort
- if (line(2) .ne. " N=123 ,") call abort
- if (line(3) .ne. " /") call abort
+ if (line(1) .ne. "&STUFF") STOP 1
+ if (line(2) .ne. " N=123 ,") STOP 2
+ if (line(3) .ne. " /") STOP 3
end
write(10,'(a)')"/"
rewind(10)
read (10, nml = params)
- if (any(plot_page%size .ne. (/ 5, 2 /))) call abort
+ if (any(plot_page%size .ne. (/ 5, 2 /))) STOP 1
close (10)
end program
lines(3)='/'
read(lines,nml=cmd,iostat=ios,iomsg=message)
- if (ios.ne.0) call abort
+ if (ios.ne.0) STOP 1
end subroutine process
write(10,'(a)') "/"
rewind(10)
read(10,nml=nl_setup)
-if (field_setup%vel(1)%number .ne. 3) call abort
-if (field_setup%vel(2)%number .ne. 9) call abort
-if (field_setup%vel(3)%number .ne. 27) call abort
+if (field_setup%vel(1)%number .ne. 3) STOP 1
+if (field_setup%vel(2)%number .ne. 9) STOP 2
+if (field_setup%vel(3)%number .ne. 27) STOP 3
! write(*,nml=nl_setup)
end program test_nml
a = -1
str = '&nml a(1,:) = 1 2 3 /'
read(str, nml=nml)
-if (any (a(1,:) /= [1, 2, 3])) call abort ()
-if (any (a([2,3],:) /= -1)) call abort ()
+if (any (a(1,:) /= [1, 2, 3])) STOP 1
+if (any (a([2,3],:) /= -1)) STOP 2
a = -1
str = '&nml a(1,1) = 1 2 3 4 /'
read(str, nml=nml)
-if (any (a(:,1) /= [1, 2, 3])) call abort ()
-if (any (a(:,2) /= [4, -1, -1])) call abort ()
-if (any (a(:,3) /= -1)) call abort ()
+if (any (a(:,1) /= [1, 2, 3])) STOP 3
+if (any (a(:,2) /= [4, -1, -1])) STOP 4
+if (any (a(:,3) /= -1)) STOP 5
str = '&nml a(1,:) = 1 2 3 , &
& a(2,:) = 4,5,6 &
& a(3,:) = 7 8 9/'
read(str, nml=nml)
-if (any (a(1,:) /= [1, 2, 3])) call abort ()
-if (any (a(2,:) /= [4, 5, 6])) call abort ()
-if (any (a(3,:) /= [7, 8, 9])) call abort ()
+if (any (a(1,:) /= [1, 2, 3])) STOP 6
+if (any (a(2,:) /= [4, 5, 6])) STOP 7
+if (any (a(3,:) /= [7, 8, 9])) STOP 8
!print *, a(:,1)
!print *, a(:,2)
write(10,*) "/"
rewind(10)
read (10, nml = params)
-if (curve(1)%symbol%typee /= 1234) call abort
+if (curve(1)%symbol%typee /= 1234) STOP 1
close(10)
end program
enddo
write(out,nl1)
-if (out(1).ne."&NL1") call abort
-if (out(2).ne." A= 1.00000000 ,") call abort
-if (out(3).ne." B= 2.00000000 ,") call abort
-if (out(4).ne." C= 3.00000000 ,") call abort
-if (out(5).ne." /") call abort
+if (out(1).ne."&NL1") STOP 1
+if (out(2).ne." A= 1.00000000 ,") STOP 2
+if (out(3).ne." B= 2.00000000 ,") STOP 3
+if (out(4).ne." C= 3.00000000 ,") STOP 4
+if (out(5).ne." /") STOP 5
end program oneline
read(str,nml=nml)
! Check result
- if (any (a /= [1,2])) call abort()
- if (any (ap /= [98, 99])) call abort()
- if (b /= 7) call abort()
- if (bp /= 101) call abort()
- if (c /= 8) call abort()
- if (any (d /= [-1, -2, -3])) call abort()
-
- if (e%c1 /= -701) call abort()
- if (any (e%c2 /= [-702,-703,-704])) call abort()
- if (f(1)%c1 /= 33001) call abort()
- if (f(2)%c1 /= 33002) call abort()
- if (any (f(1)%c2 /= [44001,44002,44003])) call abort()
- if (any (f(2)%c2 /= [44011,44012,44013])) call abort()
-
- if (g%c1 /= -601) call abort()
- if (any(g%c2 /= [-602,6703,-604])) call abort()
- if (h(1)%c1 /= 35001) call abort()
- if (h(2)%c1 /= 35002) call abort()
- if (any (h(1)%c2 /= [45001,45002,45003])) call abort()
- if (any (h(2)%c2 /= [45011,45012,45013])) call abort()
-
- if (i%c1 /= -501) call abort()
- if (any (i%c2 /= [-502,-503,-504])) call abort()
- if (j(1)%c1 /= 36001) call abort()
- if (j(2)%c1 /= 36002) call abort()
- if (any (j(1)%c2 /= [46001,46002,46003])) call abort()
- if (any (j(2)%c2 /= [46011,46012,46013])) call abort()
+ if (any (a /= [1,2])) STOP 1
+ if (any (ap /= [98, 99])) STOP 2
+ if (b /= 7) STOP 3
+ if (bp /= 101) STOP 4
+ if (c /= 8) STOP 5
+ if (any (d /= [-1, -2, -3])) STOP 6
+
+ if (e%c1 /= -701) STOP 7
+ if (any (e%c2 /= [-702,-703,-704])) STOP 8
+ if (f(1)%c1 /= 33001) STOP 9
+ if (f(2)%c1 /= 33002) STOP 10
+ if (any (f(1)%c2 /= [44001,44002,44003])) STOP 11
+ if (any (f(2)%c2 /= [44011,44012,44013])) STOP 12
+
+ if (g%c1 /= -601) STOP 13
+ if (any(g%c2 /= [-602,6703,-604])) STOP 14
+ if (h(1)%c1 /= 35001) STOP 15
+ if (h(2)%c1 /= 35002) STOP 16
+ if (any (h(1)%c2 /= [45001,45002,45003])) STOP 17
+ if (any (h(2)%c2 /= [45011,45012,45013])) STOP 18
+
+ if (i%c1 /= -501) STOP 19
+ if (any (i%c2 /= [-502,-503,-504])) STOP 20
+ if (j(1)%c1 /= 36001) STOP 21
+ if (j(2)%c1 /= 36002) STOP 22
+ if (any (j(1)%c2 /= [46001,46002,46003])) STOP 23
+ if (any (j(2)%c2 /= [46011,46012,46013])) STOP 24
! Check argument passing (dummy processing)
call test2(a,b,c,d,ap,bp,e,f,g,h,i,j,2)
read(str,nml=nml2)
! Check result
- if (any (x1 /= [1,2])) call abort()
- if (any (x1p /= [98, 99])) call abort()
- if (x2 /= 7) call abort()
- if (x2p /= 101) call abort()
- if (x3 /= 8) call abort()
- if (any (x4 /= [-1, -2, -3])) call abort()
-
- if (x6%c1 /= -701) call abort()
- if (any (x6%c2 /= [-702,-703,-704])) call abort()
- if (x7(1)%c1 /= 33001) call abort()
- if (x7(2)%c1 /= 33002) call abort()
- if (any (x7(1)%c2 /= [44001,44002,44003])) call abort()
- if (any (x7(2)%c2 /= [44011,44012,44013])) call abort()
-
- if (x8%c1 /= -601) call abort()
- if (any(x8%c2 /= [-602,6703,-604])) call abort()
- if (x9(1)%c1 /= 35001) call abort()
- if (x9(2)%c1 /= 35002) call abort()
- if (any (x9(1)%c2 /= [45001,45002,45003])) call abort()
- if (any (x9(2)%c2 /= [45011,45012,45013])) call abort()
-
- if (x10%c1 /= -501) call abort()
- if (any (x10%c2 /= [-502,-503,-504])) call abort()
- if (x11(1)%c1 /= 36001) call abort()
- if (x11(2)%c1 /= 36002) call abort()
- if (any (x11(1)%c2 /= [46001,46002,46003])) call abort()
- if (any (x11(2)%c2 /= [46011,46012,46013])) call abort()
-
- if (any (x5 /= [ 42, 53 ])) call abort()
-
- if (x12(1)%c1 /= 37001) call abort()
- if (x12(2)%c1 /= 37002) call abort()
- if (any (x12(1)%c2 /= [47001,47002,47003])) call abort()
- if (any (x12(2)%c2 /= [47011,47012,47013])) call abort()
+ if (any (x1 /= [1,2])) STOP 25
+ if (any (x1p /= [98, 99])) STOP 26
+ if (x2 /= 7) STOP 27
+ if (x2p /= 101) STOP 28
+ if (x3 /= 8) STOP 29
+ if (any (x4 /= [-1, -2, -3])) STOP 30
+
+ if (x6%c1 /= -701) STOP 31
+ if (any (x6%c2 /= [-702,-703,-704])) STOP 32
+ if (x7(1)%c1 /= 33001) STOP 33
+ if (x7(2)%c1 /= 33002) STOP 34
+ if (any (x7(1)%c2 /= [44001,44002,44003])) STOP 35
+ if (any (x7(2)%c2 /= [44011,44012,44013])) STOP 36
+
+ if (x8%c1 /= -601) STOP 37
+ if (any(x8%c2 /= [-602,6703,-604])) STOP 38
+ if (x9(1)%c1 /= 35001) STOP 39
+ if (x9(2)%c1 /= 35002) STOP 40
+ if (any (x9(1)%c2 /= [45001,45002,45003])) STOP 41
+ if (any (x9(2)%c2 /= [45011,45012,45013])) STOP 42
+
+ if (x10%c1 /= -501) STOP 43
+ if (any (x10%c2 /= [-502,-503,-504])) STOP 44
+ if (x11(1)%c1 /= 36001) STOP 45
+ if (x11(2)%c1 /= 36002) STOP 46
+ if (any (x11(1)%c2 /= [46001,46002,46003])) STOP 47
+ if (any (x11(2)%c2 /= [46011,46012,46013])) STOP 48
+
+ if (any (x5 /= [ 42, 53 ])) STOP 49
+
+ if (x12(1)%c1 /= 37001) STOP 50
+ if (x12(2)%c1 /= 37002) STOP 51
+ if (any (x12(1)%c2 /= [47001,47002,47003])) STOP 52
+ if (any (x12(2)%c2 /= [47011,47012,47013])) STOP 53
end subroutine test2
end program nml_test
read(str,nml=nml)
! Check result
- if (any (a /= ['aa01','aa02'])) call abort()
- if (any (ap /= ['98', '99'])) call abort()
- if (b /= '7') call abort()
- if (bp /= '101') call abort()
- if (c /= '8') call abort()
- if (any (d /= ['-1', '-2', '-3'])) call abort()
-
- if (e%c1 /= '-701') call abort()
- if (any (e%c2 /= ['-702','-703','-704'])) call abort()
- if (f(1)%c1 /= '33001') call abort()
- if (f(2)%c1 /= '33002') call abort()
- if (any (f(1)%c2 /= ['44001','44002','44003'])) call abort()
- if (any (f(2)%c2 /= ['44011','44012','44013'])) call abort()
-
- if (g%c1 /= '-601') call abort()
- if (any(g%c2 /= ['-602','6703','-604'])) call abort()
- if (h(1)%c1 /= '35001') call abort()
- if (h(2)%c1 /= '35002') call abort()
- if (any (h(1)%c2 /= ['45001','45002','45003'])) call abort()
- if (any (h(2)%c2 /= ['45011','45012','45013'])) call abort()
-
- if (i%c1 /= '-501') call abort()
- if (any (i%c2 /= ['-502','-503','-504'])) call abort()
- if (j(1)%c1 /= '36001') call abort()
- if (j(2)%c1 /= '36002') call abort()
- if (any (j(1)%c2 /= ['46001','46002','46003'])) call abort()
- if (any (j(2)%c2 /= ['46011','46012','46013'])) call abort()
+ if (any (a /= ['aa01','aa02'])) STOP 1
+ if (any (ap /= ['98', '99'])) STOP 2
+ if (b /= '7') STOP 3
+ if (bp /= '101') STOP 4
+ if (c /= '8') STOP 5
+ if (any (d /= ['-1', '-2', '-3'])) STOP 6
+
+ if (e%c1 /= '-701') STOP 7
+ if (any (e%c2 /= ['-702','-703','-704'])) STOP 8
+ if (f(1)%c1 /= '33001') STOP 9
+ if (f(2)%c1 /= '33002') STOP 10
+ if (any (f(1)%c2 /= ['44001','44002','44003'])) STOP 11
+ if (any (f(2)%c2 /= ['44011','44012','44013'])) STOP 12
+
+ if (g%c1 /= '-601') STOP 13
+ if (any(g%c2 /= ['-602','6703','-604'])) STOP 14
+ if (h(1)%c1 /= '35001') STOP 15
+ if (h(2)%c1 /= '35002') STOP 16
+ if (any (h(1)%c2 /= ['45001','45002','45003'])) STOP 17
+ if (any (h(2)%c2 /= ['45011','45012','45013'])) STOP 18
+
+ if (i%c1 /= '-501') STOP 19
+ if (any (i%c2 /= ['-502','-503','-504'])) STOP 20
+ if (j(1)%c1 /= '36001') STOP 21
+ if (j(2)%c1 /= '36002') STOP 22
+ if (any (j(1)%c2 /= ['46001','46002','46003'])) STOP 23
+ if (any (j(2)%c2 /= ['46011','46012','46013'])) STOP 24
! Check argument passing (dummy processing)
call test2(a,b,c,d,ap,bp,e,f,g,h,i,j,2)
read(str,nml=nml2)
! Check result
- if (any (x1 /= ['aa01','aa02'])) call abort()
- if (any (x1p /= ['98', '99'])) call abort()
- if (x2 /= '7') call abort()
- if (x2p /= '101') call abort()
- if (x3 /= '8') call abort()
- if (any (x4 /= ['-1', '-2', '-3'])) call abort()
-
- if (x6%c1 /= '-701') call abort()
- if (any (x6%c2 /= ['-702','-703','-704'])) call abort()
- if (x7(1)%c1 /= '33001') call abort()
- if (x7(2)%c1 /= '33002') call abort()
- if (any (x7(1)%c2 /= ['44001','44002','44003'])) call abort()
- if (any (x7(2)%c2 /= ['44011','44012','44013'])) call abort()
-
- if (x8%c1 /= '-601') call abort()
- if (any(x8%c2 /= ['-602','6703','-604'])) call abort()
- if (x9(1)%c1 /= '35001') call abort()
- if (x9(2)%c1 /= '35002') call abort()
- if (any (x9(1)%c2 /= ['45001','45002','45003'])) call abort()
- if (any (x9(2)%c2 /= ['45011','45012','45013'])) call abort()
+ if (any (x1 /= ['aa01','aa02'])) STOP 25
+ if (any (x1p /= ['98', '99'])) STOP 26
+ if (x2 /= '7') STOP 27
+ if (x2p /= '101') STOP 28
+ if (x3 /= '8') STOP 29
+ if (any (x4 /= ['-1', '-2', '-3'])) STOP 30
+
+ if (x6%c1 /= '-701') STOP 31
+ if (any (x6%c2 /= ['-702','-703','-704'])) STOP 32
+ if (x7(1)%c1 /= '33001') STOP 33
+ if (x7(2)%c1 /= '33002') STOP 34
+ if (any (x7(1)%c2 /= ['44001','44002','44003'])) STOP 35
+ if (any (x7(2)%c2 /= ['44011','44012','44013'])) STOP 36
+
+ if (x8%c1 /= '-601') STOP 37
+ if (any(x8%c2 /= ['-602','6703','-604'])) STOP 38
+ if (x9(1)%c1 /= '35001') STOP 39
+ if (x9(2)%c1 /= '35002') STOP 40
+ if (any (x9(1)%c2 /= ['45001','45002','45003'])) STOP 41
+ if (any (x9(2)%c2 /= ['45011','45012','45013'])) STOP 42
- if (x10%c1 /= '-501') call abort()
- if (any (x10%c2 /= ['-502','-503','-504'])) call abort()
- if (x11(1)%c1 /= '36001') call abort()
- if (x11(2)%c1 /= '36002') call abort()
- if (any (x11(1)%c2 /= ['46001','46002','46003'])) call abort()
- if (any (x11(2)%c2 /= ['46011','46012','46013'])) call abort()
-
- if (any (x5 /= [ 'x5-42', 'x5-53' ])) call abort()
-
- if (x12(1)%c1 /= '37001') call abort()
- if (x12(2)%c1 /= '37002') call abort()
- if (any (x12(1)%c2 /= ['47001','47002','47003'])) call abort()
- if (any (x12(2)%c2 /= ['47011','47012','47013'])) call abort()
+ if (x10%c1 /= '-501') STOP 43
+ if (any (x10%c2 /= ['-502','-503','-504'])) STOP 44
+ if (x11(1)%c1 /= '36001') STOP 45
+ if (x11(2)%c1 /= '36002') STOP 46
+ if (any (x11(1)%c2 /= ['46001','46002','46003'])) STOP 47
+ if (any (x11(2)%c2 /= ['46011','46012','46013'])) STOP 48
+
+ if (any (x5 /= [ 'x5-42', 'x5-53' ])) STOP 49
+
+ if (x12(1)%c1 /= '37001') STOP 50
+ if (x12(2)%c1 /= '37002') STOP 51
+ if (any (x12(1)%c2 /= ['47001','47002','47003'])) STOP 52
+ if (any (x12(2)%c2 /= ['47011','47012','47013'])) STOP 53
end subroutine test2
subroutine test3(x1,x2,x3,x4,x1p,x2p,x6,x7,x8,x9,x10,x11,n,ll)
read(str,nml=nml2)
! Check result
- if (any (x1 /= ['aa01','aa02'])) call abort()
- if (any (x1p /= ['98', '99'])) call abort()
- if (x2 /= '7') call abort()
- if (x2p /= '101') call abort()
- if (x3 /= '8') call abort()
- if (any (x4 /= ['-1', '-2', '-3'])) call abort()
-
- if (x6%c1 /= '-701') call abort()
- if (any (x6%c2 /= ['-702','-703','-704'])) call abort()
- if (x7(1)%c1 /= '33001') call abort()
- if (x7(2)%c1 /= '33002') call abort()
- if (any (x7(1)%c2 /= ['44001','44002','44003'])) call abort()
- if (any (x7(2)%c2 /= ['44011','44012','44013'])) call abort()
-
- if (x8%c1 /= '-601') call abort()
- if (any(x8%c2 /= ['-602','6703','-604'])) call abort()
- if (x9(1)%c1 /= '35001') call abort()
- if (x9(2)%c1 /= '35002') call abort()
- if (any (x9(1)%c2 /= ['45001','45002','45003'])) call abort()
- if (any (x9(2)%c2 /= ['45011','45012','45013'])) call abort()
+ if (any (x1 /= ['aa01','aa02'])) STOP 54
+ if (any (x1p /= ['98', '99'])) STOP 55
+ if (x2 /= '7') STOP 56
+ if (x2p /= '101') STOP 57
+ if (x3 /= '8') STOP 58
+ if (any (x4 /= ['-1', '-2', '-3'])) STOP 59
+
+ if (x6%c1 /= '-701') STOP 60
+ if (any (x6%c2 /= ['-702','-703','-704'])) STOP 61
+ if (x7(1)%c1 /= '33001') STOP 62
+ if (x7(2)%c1 /= '33002') STOP 63
+ if (any (x7(1)%c2 /= ['44001','44002','44003'])) STOP 64
+ if (any (x7(2)%c2 /= ['44011','44012','44013'])) STOP 65
+
+ if (x8%c1 /= '-601') STOP 66
+ if (any(x8%c2 /= ['-602','6703','-604'])) STOP 67
+ if (x9(1)%c1 /= '35001') STOP 68
+ if (x9(2)%c1 /= '35002') STOP 69
+ if (any (x9(1)%c2 /= ['45001','45002','45003'])) STOP 70
+ if (any (x9(2)%c2 /= ['45011','45012','45013'])) STOP 71
- if (x10%c1 /= '-501') call abort()
- if (any (x10%c2 /= ['-502','-503','-504'])) call abort()
- if (x11(1)%c1 /= '36001') call abort()
- if (x11(2)%c1 /= '36002') call abort()
- if (any (x11(1)%c2 /= ['46001','46002','46003'])) call abort()
- if (any (x11(2)%c2 /= ['46011','46012','46013'])) call abort()
-
- if (any (x5 /= [ 'x5-42', 'x5-53' ])) call abort()
-
- if (x12(1)%c1 /= '37001') call abort()
- if (x12(2)%c1 /= '37002') call abort()
- if (any (x12(1)%c2 /= ['47001','47002','47003'])) call abort()
- if (any (x12(2)%c2 /= ['47011','47012','47013'])) call abort()
+ if (x10%c1 /= '-501') STOP 72
+ if (any (x10%c2 /= ['-502','-503','-504'])) STOP 73
+ if (x11(1)%c1 /= '36001') STOP 74
+ if (x11(2)%c1 /= '36002') STOP 75
+ if (any (x11(1)%c2 /= ['46001','46002','46003'])) STOP 76
+ if (any (x11(2)%c2 /= ['46011','46012','46013'])) STOP 77
+
+ if (any (x5 /= [ 'x5-42', 'x5-53' ])) STOP 78
+
+ if (x12(1)%c1 /= '37001') STOP 79
+ if (x12(2)%c1 /= '37002') STOP 80
+ if (any (x12(1)%c2 /= ['47001','47002','47003'])) STOP 81
+ if (any (x12(2)%c2 /= ['47011','47012','47013'])) STOP 82
end subroutine test3
subroutine test4(x1,x2,x3,x4,x1p,x2p,x6,x7,x8,x9,x10,x11,n)
read(str,nml=nml2)
! Check result
- if (any (x1 /= ['aa01','aa02'])) call abort()
- if (any (x1p /= ['98', '99'])) call abort()
- if (x2 /= '7') call abort()
- if (x2p /= '101') call abort()
- if (x3 /= '8') call abort()
- if (any (x4 /= ['-1', '-2', '-3'])) call abort()
-
- if (x6%c1 /= '-701') call abort()
- if (any (x6%c2 /= ['-702','-703','-704'])) call abort()
- if (x7(1)%c1 /= '33001') call abort()
- if (x7(2)%c1 /= '33002') call abort()
- if (any (x7(1)%c2 /= ['44001','44002','44003'])) call abort()
- if (any (x7(2)%c2 /= ['44011','44012','44013'])) call abort()
-
- if (x8%c1 /= '-601') call abort()
- if (any(x8%c2 /= ['-602','6703','-604'])) call abort()
- if (x9(1)%c1 /= '35001') call abort()
- if (x9(2)%c1 /= '35002') call abort()
- if (any (x9(1)%c2 /= ['45001','45002','45003'])) call abort()
- if (any (x9(2)%c2 /= ['45011','45012','45013'])) call abort()
+ if (any (x1 /= ['aa01','aa02'])) STOP 83
+ if (any (x1p /= ['98', '99'])) STOP 84
+ if (x2 /= '7') STOP 85
+ if (x2p /= '101') STOP 86
+ if (x3 /= '8') STOP 87
+ if (any (x4 /= ['-1', '-2', '-3'])) STOP 88
+
+ if (x6%c1 /= '-701') STOP 89
+ if (any (x6%c2 /= ['-702','-703','-704'])) STOP 90
+ if (x7(1)%c1 /= '33001') STOP 91
+ if (x7(2)%c1 /= '33002') STOP 92
+ if (any (x7(1)%c2 /= ['44001','44002','44003'])) STOP 93
+ if (any (x7(2)%c2 /= ['44011','44012','44013'])) STOP 94
+
+ if (x8%c1 /= '-601') STOP 95
+ if (any(x8%c2 /= ['-602','6703','-604'])) STOP 96
+ if (x9(1)%c1 /= '35001') STOP 97
+ if (x9(2)%c1 /= '35002') STOP 98
+ if (any (x9(1)%c2 /= ['45001','45002','45003'])) STOP 99
+ if (any (x9(2)%c2 /= ['45011','45012','45013'])) STOP 100
- if (x10%c1 /= '-501') call abort()
- if (any (x10%c2 /= ['-502','-503','-504'])) call abort()
- if (x11(1)%c1 /= '36001') call abort()
- if (x11(2)%c1 /= '36002') call abort()
- if (any (x11(1)%c2 /= ['46001','46002','46003'])) call abort()
- if (any (x11(2)%c2 /= ['46011','46012','46013'])) call abort()
-
- if (any (x5 /= [ 'x5-42', 'x5-53' ])) call abort()
-
- if (x12(1)%c1 /= '37001') call abort()
- if (x12(2)%c1 /= '37002') call abort()
- if (any (x12(1)%c2 /= ['47001','47002','47003'])) call abort()
- if (any (x12(2)%c2 /= ['47011','47012','47013'])) call abort()
+ if (x10%c1 /= '-501') STOP 101
+ if (any (x10%c2 /= ['-502','-503','-504'])) STOP 102
+ if (x11(1)%c1 /= '36001') STOP 103
+ if (x11(2)%c1 /= '36002') STOP 104
+ if (any (x11(1)%c2 /= ['46001','46002','46003'])) STOP 105
+ if (any (x11(2)%c2 /= ['46011','46012','46013'])) STOP 106
+
+ if (any (x5 /= [ 'x5-42', 'x5-53' ])) STOP 107
+
+ if (x12(1)%c1 /= '37001') STOP 108
+ if (x12(2)%c1 /= '37002') STOP 109
+ if (any (x12(1)%c2 /= ['47001','47002','47003'])) STOP 110
+ if (any (x12(2)%c2 /= ['47011','47012','47013'])) STOP 111
end subroutine test4
end program nml_test
write(10,'(a)') "/"
rewind(10)
read(10,nml=nl_setup)
-if (field_setup%vel(1)%number .ne. 3) call abort
-if (field_setup%vel(2)%number .ne. 9) call abort
-if (field_setup%vel(3)%number .ne. 27) call abort
-if (field_setup%scal(1)%number .ne. 2) call abort
-if (field_setup%scal(2)%number .ne. 4) call abort
-if (field_setup%scal(3)%number .ne. 8) call abort
+if (field_setup%vel(1)%number .ne. 3) STOP 1
+if (field_setup%vel(2)%number .ne. 9) STOP 2
+if (field_setup%vel(3)%number .ne. 27) STOP 3
+if (field_setup%scal(1)%number .ne. 2) STOP 4
+if (field_setup%scal(2)%number .ne. 4) STOP 5
+if (field_setup%scal(3)%number .ne. 8) STOP 6
!write(*,nml=nl_setup)
end program test_nml
!print *, 'xpos', xpos(1:10), 'ypos', ypos(1:10)
- if (any (xpos(1:5) /= [0.00, 0.10, 0.20, 0.30, 0.40]))call abort()
- if (any (ypos(1:5) /= [0.50, 0.60, 0.70, 0.80, 0.90]))call abort()
- if (any (xpos(6:) /= -huge(xpos))) call abort ()
- if (any (ypos(6:) /= -huge(ypos))) call abort ()
+ if (any (xpos(1:5) /= [0.00, 0.10, 0.20, 0.30, 0.40]))STOP 1
+ if (any (ypos(1:5) /= [0.50, 0.60, 0.70, 0.80, 0.90]))STOP 2
+ if (any (xpos(6:) /= -huge(xpos))) STOP 3
+ if (any (ypos(6:) /= -huge(ypos))) STOP 4
end
close(4)
! write(*,*) nfp
- if (nfp /= 5) call abort()
+ if (nfp /= 5) STOP 1
end
read(10, nml=error_params)
close (10)
- if (beam_init%chars(1) /= 'JUNK') call abort
- if (beam_init%grid(1)%n_x /= 3) call abort
- if (beam_init%grid(1)%n_px /= 2) call abort
+ if (beam_init%chars(1) /= 'JUNK') STOP 1
+ if (beam_init%grid(1)%n_x /= 3) STOP 2
+ if (beam_init%grid(1)%n_px /= 2) STOP 3
end program
read(10, nml=nmlst)
close (10)
- if (der%d(1)%k%j /= 1) call abort
- if (der%d(2)%k%j /= 2) call abort
+ if (der%d(1)%k%j /= 1) STOP 1
+ if (der%d(2)%k%j /= 2) STOP 2
end program namelist
read(10, nml=namtoptrc)
close (10)
- if (getal /= 7) call abort
- if (tracer(1)%sname /= 'DIC ') call abort
- if (tracer(2)%sname /= 'Alkalini') call abort
- if (tracer(3)%sname /= 'O2 ') call abort
- if (.not. tracer(1)%lini) call abort
- if (.not. tracer(2)%lini) call abort
- if (.not. tracer(3)%lini) call abort
+ if (getal /= 7) STOP 1
+ if (tracer(1)%sname /= 'DIC ') STOP 2
+ if (tracer(2)%sname /= 'Alkalini') STOP 3
+ if (tracer(3)%sname /= 'O2 ') STOP 4
+ if (.not. tracer(1)%lini) STOP 5
+ if (.not. tracer(2)%lini) STOP 6
+ if (.not. tracer(3)%lini) STOP 7
end program testje
READ (53, temp)
CLOSE (53)
- if (int1 /= 1 .or. int2 /= 2 .or. int3 /= 3) call abort()
+ if (int1 /= 1 .or. int2 /= 2 .or. int3 /= 3) STOP 1
END PROGRAM
rewind(99)
read(99,nml=nml)
close(99)
-if (i(1)/=-42 .or. i(2)/=-42 .or. i(3)/=5) call abort()
+if (i(1)/=-42 .or. i(2)/=-42 .or. i(3)/=5) STOP 1
! Shorten the file so the read hits EOF
write(99,'(a)') '&nml i(3 ) = 5 '
rewind(99)
read(99,nml=nml, end=30)
-call abort()
+STOP 2
! Shorten some more
30 close(99)
open(99,status='scratch')
write(99,'(a)') '&nml i(3 ) ='
rewind(99)
read(99,nml=nml, end=40)
-call abort()
+STOP 3
! Shorten some more
40 close(99)
open(99,status='scratch')
write(99,'(a)') '&nml i(3 )'
rewind(99)
read(99,nml=nml, end=50)
-call abort()
+STOP 4
! Shorten some more
50 close(99)
open(99,status='scratch')
write(99,'(a)') '&nml i(3 '
rewind(99)
read(99,nml=nml, end=60)
-call abort()
+STOP 5
60 close(99)
end
read (99, nml=naml1)
close (99, status="delete")
-if (tracer(1)%sname.ne.'aa') call abort()
-if (.not.tracer(1)%lini) call abort()
-if (tracer(2)%sname.ne.'bb') call abort()
-if (.not.tracer(2)%lini) call abort()
-if (tracer(3)%sname.ne.'XX') call abort()
-if (tracer(3)%lini) call abort()
+if (tracer(1)%sname.ne.'aa') STOP 1
+if (.not.tracer(1)%lini) STOP 2
+if (tracer(2)%sname.ne.'bb') STOP 3
+if (.not.tracer(2)%lini) STOP 4
+if (tracer(3)%sname.ne.'XX') STOP 5
+if (tracer(3)%lini) STOP 6
!write (*, nml=naml1)
rewind(10)
do i=1,5
read(10,'(a)') internal_unit
- if (i.eq.2 .and. internal_unit .ne. " MYSTRING=mon tue wed thu fri ,") call abort
+ if (i.eq.2 .and. internal_unit .ne. " MYSTRING=mon tue wed thu fri ,") STOP 1
if (scan(internal_unit,"""'").ne.0) print *, internal_unit
end do
close(10)
rewind(10)
read(10,NML=test_NML)
- if (tke%x - 3.14000010 > .00001) call abort
- if (tke%string /= "kf7rcc") call abort
- if (answer /= 42) call abort ! hitchkikers guide to the galaxy
+ if (tke%x - 3.14000010 > .00001) STOP 1
+ if (tke%string /= "kf7rcc") STOP 2
+ if (answer /= 42) STOP 3! hitchkikers guide to the galaxy
end program test_type_extension
! { dg-do run }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003 " }
! PR65596 Namelist reads too far.
integer ,parameter :: CL=80
integer ,parameter :: AL=4
read (27, nml=theList, iostat=ierr)
-if (ierr .ne. 0) call abort
+if (ierr .ne. 0) STOP 1
rslt = ['Rover ','Spot ','________','________']
-if (any(dogs.ne.rslt)) call abort
+if (any(dogs.ne.rslt)) STOP 2
rslt = ['Fluffy ','Hairball','________','________']
-if (any(cats.ne.rslt)) call abort
+if (any(cats.ne.rslt)) STOP 3
close(27)
!write (*, nml=nml)
close (99, status="delete")
- if (r1 /= 43) call abort ()
- if (r2 /= 43) call abort ()
- if (r3 /= r3 .or. r3 <= huge(r3)) call abort ()
- if (r4 == r4) call abort ()
- if (r5 /= 300000) call abort ()
- if (c /= cmplx(4,2)) call abort ()
- if (.not. ll) call abort ()
- if (c1 /= "a") call abort ()
- if (c2 /= "bc") call abort ()
- if (c3 /= "ax") call abort ()
+ if (r1 /= 43) STOP 1
+ if (r2 /= 43) STOP 2
+ if (r3 /= r3 .or. r3 <= huge(r3)) STOP 3
+ if (r4 == r4) STOP 4
+ if (r5 /= 300000) STOP 5
+ if (c /= cmplx(4,2)) STOP 6
+ if (.not. ll) STOP 7
+ if (c1 /= "a") STOP 8
+ if (c2 /= "bc") STOP 9
+ if (c3 /= "ax") STOP 10
end
close(unit=23)
- if (tab(1).ne.'in1') call abort
- if (tab(2).ne.'in2') call abort
- if (any(tab(3:tabsz).ne.'invalid')) call abort
+ if (tab(1).ne.'in1') STOP 1
+ if (tab(2).ne.'in2') STOP 2
+ if (any(tab(3:tabsz).ne.'invalid')) STOP 3
end program namelist
rewind(99)
read (99, nml=nml, iostat=ios, iomsg=errormsg)
-if (ios.ne.5010) call abort
-if (scan(errormsg, "5").ne.44) call abort
+if (ios.ne.5010) STOP 1
+if (scan(errormsg, "5").ne.44) STOP 2
rewind(99)
rewind(99)
read (99, nml=nml, iostat=ios, iomsg=errormsg)
-if (ios.ne.5010) call abort
-if (scan(errormsg, "2").ne.25) call abort
+if (ios.ne.5010) STOP 3
+if (scan(errormsg, "2").ne.25) STOP 4
close (99)
open(unit=7,file='test.out',form='formatted')
read(7,nml=fith, iostat=ierr)
close(7, status="delete")
- if (ierr.ne.0) call abort
- if (any(senid.ne.res)) call abort
+ if (ierr.ne.0) STOP 1
+ if (any(senid.ne.res)) STOP 2
end
open(UNIT, file=FILE)
read(UNIT, nml=complex_namelist)
close(UNIT, status="delete")
-if (any(a.ne.(/ (0.0, 0.0), (0.0, 0.0), (3.0, 4.0) /))) call abort
+if (any(a.ne.(/ (0.0, 0.0), (0.0, 0.0), (3.0, 4.0) /))) STOP 1
end program test
READ(11,*) a
CLOSE(11)
- if (a /= "alls_well") call abort ()
+ if (a /= "alls_well") STOP 1
END
rewind(7)
read(7,NML=input)
close(7)
- if (var.ne.'') call abort
+ if (var.ne.'') STOP 1
end
! { dg-do run }
-! { dg-options "-fall-intrinsics -std=f2003" }
+! { dg-options " -std=f2003" }
! Checks internal file read/write of namelists
! (Fortran 2003 feature)
! PR fortran/28224
j = 10
r = sin(1.0)
read(str,nml=nam)
- if(i /= 42 .or. j /= -718 .or. abs(r-exp(1.0)) > 1e-5) call abort()
+ if(i /= 42 .or. j /= -718 .or. abs(r-exp(1.0)) > 1e-5) STOP 1
end program nml_internal
write (10,*) "&NML2 aa='pqrs' ii=2 rrr=3.5 /"
rewind (10)
read (10,nml=nml1,iostat=i)
- if ((i.ne.0).or.(aa.ne."lmno").or.(ii.ne.1).or.(rr.ne.2.5)) call abort ()
+ if ((i.ne.0).or.(aa.ne."lmno").or.(ii.ne.1).or.(rr.ne.2.5)) STOP 1
read (10,nml=nml2,iostat=i)
- if ((i.ne.0).or.(aa.ne."pqrs").or.(ii.ne.2).or.(rrr.ne.3.5)) call abort ()
+ if ((i.ne.0).or.(aa.ne."pqrs").or.(ii.ne.2).or.(rrr.ne.3.5)) STOP 2
close (10)
end program namelist_use
write (10,'(a)') "&NML2 aaa='pqrs' iii=2 rrr=3.5 /"
rewind (10)
read (10,nml=nml1,iostat=i)
- if ((i.ne.0).or.(aa.ne."lmno").or.(ii.ne.1).or.(rr.ne.2.5)) call abort ()
+ if ((i.ne.0).or.(aa.ne."lmno").or.(ii.ne.1).or.(rr.ne.2.5)) STOP 1
read (10,nml=nml2,iostat=i)
- if ((i.ne.0).or.(rrrr.ne.3.5).or.foo()) call abort ()
+ if ((i.ne.0).or.(rrrr.ne.3.5).or.foo()) STOP 2
close (10)
end program namelist_use_only
str2 = 4_'YYYY'
read(99,nml=nml)
read(99, *) str2
-if (str2 /= str) call abort
+if (str2 /= str) STOP 1
rewind(99)
read(99,'(A)') str3
-if (str3 /= 4_'&nml str = "' // str // 4_'" /') call abort
+if (str3 /= 4_'&nml str = "' // str // 4_'" /') STOP 2
read(99,*) str3
-if (str3 /= str) call abort
+if (str3 /= str) STOP 3
close(99, status='delete')
end
nan = 0
nan = nan / nan
if (nan == nan .or. nan > nan .or. nan < nan .or. nan >= nan &
- .or. nan <= nan) call abort
+ .or. nan <= nan) STOP 1
if (isnan (2.d0) .or. (.not. isnan(nan)) .or. &
- (.not. isnan(real(nan,kind=kind(2.d0))))) call abort
+ (.not. isnan(real(nan,kind=kind(2.d0))))) STOP 2
! Create an INF and check it
large = huge(large)
inf = 2 * large
- if (isinf(nan) .or. isinf(large) .or. .not. isinf(inf)) call abort
- if (isinf(-nan) .or. isinf(-large) .or. .not. isinf(-inf)) call abort
+ if (isinf(nan) .or. isinf(large) .or. .not. isinf(inf)) STOP 3
+ if (isinf(-nan) .or. isinf(-large) .or. .not. isinf(-inf)) STOP 4
! Check that MIN and MAX behave correctly
- if (max(2.0, nan) /= 2.0) call abort
- if (min(2.0, nan) /= 2.0) call abort
- if (max(nan, 2.0) /= 2.0) call abort
- if (min(nan, 2.0) /= 2.0) call abort
+ if (max(2.0, nan) /= 2.0) STOP 5
+ if (min(2.0, nan) /= 2.0) STOP 6
+ if (max(nan, 2.0) /= 2.0) STOP 7
+ if (min(nan, 2.0) /= 2.0) STOP 8
- if (max(2.d0, nan) /= 2.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (min(2.d0, nan) /= 2.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (max(nan, 2.d0) /= 2.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (min(nan, 2.d0) /= 2.d0) call abort ! { dg-warning "Extension: Different type kinds" }
+ if (max(2.d0, nan) /= 2.d0) STOP 9! { dg-warning "Extension: Different type kinds" }
+ if (min(2.d0, nan) /= 2.d0) STOP 10! { dg-warning "Extension: Different type kinds" }
+ if (max(nan, 2.d0) /= 2.d0) STOP 11! { dg-warning "Extension: Different type kinds" }
+ if (min(nan, 2.d0) /= 2.d0) STOP 12! { dg-warning "Extension: Different type kinds" }
- if (.not. isnan(min(nan,nan))) call abort
- if (.not. isnan(max(nan,nan))) call abort
+ if (.not. isnan(min(nan,nan))) STOP 13
+ if (.not. isnan(max(nan,nan))) STOP 14
! Same thing, with more arguments
- if (max(3.0, 2.0, nan) /= 3.0) call abort
- if (min(3.0, 2.0, nan) /= 2.0) call abort
- if (max(3.0, nan, 2.0) /= 3.0) call abort
- if (min(3.0, nan, 2.0) /= 2.0) call abort
- if (max(nan, 3.0, 2.0) /= 3.0) call abort
- if (min(nan, 3.0, 2.0) /= 2.0) call abort
-
- if (max(3.d0, 2.d0, nan) /= 3.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (min(3.d0, 2.d0, nan) /= 2.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (max(3.d0, nan, 2.d0) /= 3.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (min(3.d0, nan, 2.d0) /= 2.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (max(nan, 3.d0, 2.d0) /= 3.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (min(nan, 3.d0, 2.d0) /= 2.d0) call abort ! { dg-warning "Extension: Different type kinds" }
-
- if (.not. isnan(min(nan,nan,nan))) call abort
- if (.not. isnan(max(nan,nan,nan))) call abort
- if (.not. isnan(min(nan,nan,nan,nan))) call abort
- if (.not. isnan(max(nan,nan,nan,nan))) call abort
- if (.not. isnan(min(nan,nan,nan,nan,nan))) call abort
- if (.not. isnan(max(nan,nan,nan,nan,nan))) call abort
+ if (max(3.0, 2.0, nan) /= 3.0) STOP 15
+ if (min(3.0, 2.0, nan) /= 2.0) STOP 16
+ if (max(3.0, nan, 2.0) /= 3.0) STOP 17
+ if (min(3.0, nan, 2.0) /= 2.0) STOP 18
+ if (max(nan, 3.0, 2.0) /= 3.0) STOP 19
+ if (min(nan, 3.0, 2.0) /= 2.0) STOP 20
+
+ if (max(3.d0, 2.d0, nan) /= 3.d0) STOP 21! { dg-warning "Extension: Different type kinds" }
+ if (min(3.d0, 2.d0, nan) /= 2.d0) STOP 22! { dg-warning "Extension: Different type kinds" }
+ if (max(3.d0, nan, 2.d0) /= 3.d0) STOP 23! { dg-warning "Extension: Different type kinds" }
+ if (min(3.d0, nan, 2.d0) /= 2.d0) STOP 24! { dg-warning "Extension: Different type kinds" }
+ if (max(nan, 3.d0, 2.d0) /= 3.d0) STOP 25! { dg-warning "Extension: Different type kinds" }
+ if (min(nan, 3.d0, 2.d0) /= 2.d0) STOP 26! { dg-warning "Extension: Different type kinds" }
+
+ if (.not. isnan(min(nan,nan,nan))) STOP 27
+ if (.not. isnan(max(nan,nan,nan))) STOP 28
+ if (.not. isnan(min(nan,nan,nan,nan))) STOP 29
+ if (.not. isnan(max(nan,nan,nan,nan))) STOP 30
+ if (.not. isnan(min(nan,nan,nan,nan,nan))) STOP 31
+ if (.not. isnan(max(nan,nan,nan,nan,nan))) STOP 32
! Large values, INF and NaNs
- if (.not. isinf(max(large, inf))) call abort
- if (isinf(min(large, inf))) call abort
- if (.not. isinf(max(nan, large, inf))) call abort
- if (isinf(min(nan, large, inf))) call abort
- if (.not. isinf(max(large, nan, inf))) call abort
- if (isinf(min(large, nan, inf))) call abort
- if (.not. isinf(max(large, inf, nan))) call abort
- if (isinf(min(large, inf, nan))) call abort
-
- if (.not. isinf(min(-large, -inf))) call abort
- if (isinf(max(-large, -inf))) call abort
- if (.not. isinf(min(nan, -large, -inf))) call abort
- if (isinf(max(nan, -large, -inf))) call abort
- if (.not. isinf(min(-large, nan, -inf))) call abort
- if (isinf(max(-large, nan, -inf))) call abort
- if (.not. isinf(min(-large, -inf, nan))) call abort
- if (isinf(max(-large, -inf, nan))) call abort
+ if (.not. isinf(max(large, inf))) STOP 33
+ if (isinf(min(large, inf))) STOP 34
+ if (.not. isinf(max(nan, large, inf))) STOP 35
+ if (isinf(min(nan, large, inf))) STOP 36
+ if (.not. isinf(max(large, nan, inf))) STOP 37
+ if (isinf(min(large, nan, inf))) STOP 38
+ if (.not. isinf(max(large, inf, nan))) STOP 39
+ if (isinf(min(large, inf, nan))) STOP 40
+
+ if (.not. isinf(min(-large, -inf))) STOP 41
+ if (isinf(max(-large, -inf))) STOP 42
+ if (.not. isinf(min(nan, -large, -inf))) STOP 43
+ if (isinf(max(nan, -large, -inf))) STOP 44
+ if (.not. isinf(min(-large, nan, -inf))) STOP 45
+ if (isinf(max(-large, nan, -inf))) STOP 46
+ if (.not. isinf(min(-large, -inf, nan))) STOP 47
+ if (isinf(max(-large, -inf, nan))) STOP 48
end program test
real, parameter :: nan = 0.0/0.0, large = huge(large), inf = 1.0/0.0
if (nan == nan .or. nan > nan .or. nan < nan .or. nan >= nan &
- .or. nan <= nan) call abort
+ .or. nan <= nan) STOP 1
if (isnan (2.d0) .or. (.not. isnan(nan)) .or. &
- (.not. isnan(real(nan,kind=kind(2.d0))))) call abort
+ (.not. isnan(real(nan,kind=kind(2.d0))))) STOP 2
! Create an INF and check it
- if (isinf(nan) .or. isinf(large) .or. .not. isinf(inf)) call abort
- if (isinf(-nan) .or. isinf(-large) .or. .not. isinf(-inf)) call abort
+ if (isinf(nan) .or. isinf(large) .or. .not. isinf(inf)) STOP 3
+ if (isinf(-nan) .or. isinf(-large) .or. .not. isinf(-inf)) STOP 4
! Check that MIN and MAX behave correctly
- if (max(2.0, nan) /= 2.0) call abort
- if (min(2.0, nan) /= 2.0) call abort
- if (max(nan, 2.0) /= 2.0) call abort
- if (min(nan, 2.0) /= 2.0) call abort
+ if (max(2.0, nan) /= 2.0) STOP 5
+ if (min(2.0, nan) /= 2.0) STOP 6
+ if (max(nan, 2.0) /= 2.0) STOP 7
+ if (min(nan, 2.0) /= 2.0) STOP 8
- if (max(2.d0, nan) /= 2.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (min(2.d0, nan) /= 2.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (max(nan, 2.d0) /= 2.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (min(nan, 2.d0) /= 2.d0) call abort ! { dg-warning "Extension: Different type kinds" }
+ if (max(2.d0, nan) /= 2.d0) STOP 9! { dg-warning "Extension: Different type kinds" }
+ if (min(2.d0, nan) /= 2.d0) STOP 10! { dg-warning "Extension: Different type kinds" }
+ if (max(nan, 2.d0) /= 2.d0) STOP 11! { dg-warning "Extension: Different type kinds" }
+ if (min(nan, 2.d0) /= 2.d0) STOP 12! { dg-warning "Extension: Different type kinds" }
- if (.not. isnan(min(nan,nan))) call abort
- if (.not. isnan(max(nan,nan))) call abort
+ if (.not. isnan(min(nan,nan))) STOP 13
+ if (.not. isnan(max(nan,nan))) STOP 14
! Same thing, with more arguments
- if (max(3.0, 2.0, nan) /= 3.0) call abort
- if (min(3.0, 2.0, nan) /= 2.0) call abort
- if (max(3.0, nan, 2.0) /= 3.0) call abort
- if (min(3.0, nan, 2.0) /= 2.0) call abort
- if (max(nan, 3.0, 2.0) /= 3.0) call abort
- if (min(nan, 3.0, 2.0) /= 2.0) call abort
-
- if (max(3.d0, 2.d0, nan) /= 3.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (min(3.d0, 2.d0, nan) /= 2.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (max(3.d0, nan, 2.d0) /= 3.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (min(3.d0, nan, 2.d0) /= 2.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (max(nan, 3.d0, 2.d0) /= 3.d0) call abort ! { dg-warning "Extension: Different type kinds" }
- if (min(nan, 3.d0, 2.d0) /= 2.d0) call abort ! { dg-warning "Extension: Different type kinds" }
-
- if (.not. isnan(min(nan,nan,nan))) call abort
- if (.not. isnan(max(nan,nan,nan))) call abort
- if (.not. isnan(min(nan,nan,nan,nan))) call abort
- if (.not. isnan(max(nan,nan,nan,nan))) call abort
- if (.not. isnan(min(nan,nan,nan,nan,nan))) call abort
- if (.not. isnan(max(nan,nan,nan,nan,nan))) call abort
+ if (max(3.0, 2.0, nan) /= 3.0) STOP 15
+ if (min(3.0, 2.0, nan) /= 2.0) STOP 16
+ if (max(3.0, nan, 2.0) /= 3.0) STOP 17
+ if (min(3.0, nan, 2.0) /= 2.0) STOP 18
+ if (max(nan, 3.0, 2.0) /= 3.0) STOP 19
+ if (min(nan, 3.0, 2.0) /= 2.0) STOP 20
+
+ if (max(3.d0, 2.d0, nan) /= 3.d0) STOP 21! { dg-warning "Extension: Different type kinds" }
+ if (min(3.d0, 2.d0, nan) /= 2.d0) STOP 22! { dg-warning "Extension: Different type kinds" }
+ if (max(3.d0, nan, 2.d0) /= 3.d0) STOP 23! { dg-warning "Extension: Different type kinds" }
+ if (min(3.d0, nan, 2.d0) /= 2.d0) STOP 24! { dg-warning "Extension: Different type kinds" }
+ if (max(nan, 3.d0, 2.d0) /= 3.d0) STOP 25! { dg-warning "Extension: Different type kinds" }
+ if (min(nan, 3.d0, 2.d0) /= 2.d0) STOP 26! { dg-warning "Extension: Different type kinds" }
+
+ if (.not. isnan(min(nan,nan,nan))) STOP 27
+ if (.not. isnan(max(nan,nan,nan))) STOP 28
+ if (.not. isnan(min(nan,nan,nan,nan))) STOP 29
+ if (.not. isnan(max(nan,nan,nan,nan))) STOP 30
+ if (.not. isnan(min(nan,nan,nan,nan,nan))) STOP 31
+ if (.not. isnan(max(nan,nan,nan,nan,nan))) STOP 32
! Large values, INF and NaNs
- if (.not. isinf(max(large, inf))) call abort
- if (isinf(min(large, inf))) call abort
- if (.not. isinf(max(nan, large, inf))) call abort
- if (isinf(min(nan, large, inf))) call abort
- if (.not. isinf(max(large, nan, inf))) call abort
- if (isinf(min(large, nan, inf))) call abort
- if (.not. isinf(max(large, inf, nan))) call abort
- if (isinf(min(large, inf, nan))) call abort
-
- if (.not. isinf(min(-large, -inf))) call abort
- if (isinf(max(-large, -inf))) call abort
- if (.not. isinf(min(nan, -large, -inf))) call abort
- if (isinf(max(nan, -large, -inf))) call abort
- if (.not. isinf(min(-large, nan, -inf))) call abort
- if (isinf(max(-large, nan, -inf))) call abort
- if (.not. isinf(min(-large, -inf, nan))) call abort
- if (isinf(max(-large, -inf, nan))) call abort
+ if (.not. isinf(max(large, inf))) STOP 33
+ if (isinf(min(large, inf))) STOP 34
+ if (.not. isinf(max(nan, large, inf))) STOP 35
+ if (isinf(min(nan, large, inf))) STOP 36
+ if (.not. isinf(max(large, nan, inf))) STOP 37
+ if (isinf(min(large, nan, inf))) STOP 38
+ if (.not. isinf(max(large, inf, nan))) STOP 39
+ if (isinf(min(large, inf, nan))) STOP 40
+
+ if (.not. isinf(min(-large, -inf))) STOP 41
+ if (isinf(max(-large, -inf))) STOP 42
+ if (.not. isinf(min(nan, -large, -inf))) STOP 43
+ if (isinf(max(nan, -large, -inf))) STOP 44
+ if (.not. isinf(min(-large, nan, -inf))) STOP 45
+ if (isinf(max(-large, nan, -inf))) STOP 46
+ if (.not. isinf(min(-large, -inf, nan))) STOP 47
+ if (isinf(max(-large, -inf, nan))) STOP 48
end program test
str = "nan"
read(str,*) r
- if (.not.isnan(r)) call abort()
+ if (.not.isnan(r)) STOP 1
str = "(nan,4.0)"
read(str,*) z
- if (.not.isnan(real(z)) .or. aimag(z) /= 4.0) call abort()
+ if (.not.isnan(real(z)) .or. aimag(z) /= 4.0) STOP 2
str = "(7.0,nan)"
read(str,*) z
- if (.not.isnan(aimag(z)) .or. real(z) /= 7.0) call abort()
+ if (.not.isnan(aimag(z)) .or. real(z) /= 7.0) STOP 3
str = "inFinity"
read(str,*) r
- if (r <= huge(r)) call abort()
+ if (r <= huge(r)) STOP 4
str = "(+inFinity,4.0)"
read(str,*) z
- if ((real(z) <= huge(r)) .or. aimag(z) /= 4.0) call abort()
+ if ((real(z) <= huge(r)) .or. aimag(z) /= 4.0) STOP 5
str = "(7.0,-inFinity)"
read(str,*) z
- if ((aimag(z) >= -huge(r)) .or. real(z) /= 7.0) call abort()
+ if ((aimag(z) >= -huge(r)) .or. real(z) /= 7.0) STOP 6
str = "inf"
read(str,*) r
- if (r <= huge(r)) call abort()
+ if (r <= huge(r)) STOP 7
str = "(+inf,4.0)"
read(str,*) z
- if ((real(z) <= huge(r)) .or. aimag(z) /= 4.0) call abort()
+ if ((real(z) <= huge(r)) .or. aimag(z) /= 4.0) STOP 8
str = "(7.0,-inf)"
read(str,*) z
- if ((aimag(z) >= -huge(r)) .or. real(z) /= 7.0) call abort()
+ if ((aimag(z) >= -huge(r)) .or. real(z) /= 7.0) STOP 9
end program main
r = 1.0
str = 'INfinity' ; read(str,*) r
-if (r < 0 .or. r /= r*1.1) call abort()
+if (r < 0 .or. r /= r*1.1) STOP 1
r = 1.0
str = '-INF' ; read(str,*) r
-if (r > 0 .or. r /= r*1.1) call abort()
+if (r > 0 .or. r /= r*1.1) STOP 2
r = 1.0
str = '+INF' ; read(str,*) r
-if (r < 0 .or. r /= r*1.1) call abort()
+if (r < 0 .or. r /= r*1.1) STOP 3
r = 1.0
str = '-inFiniTY' ; read(str,*) r
-if (r > 0 .or. r /= r*1.1) call abort()
+if (r > 0 .or. r /= r*1.1) STOP 4
r = 1.0
str = 'NAN' ; read(str,*) r
-if (.not. isnan(r)) call abort()
+if (.not. isnan(r)) STOP 5
r = 1.0
str = '-NAN' ; read(str,*) r
-if (.not. isnan(r)) call abort()
+if (.not. isnan(r)) STOP 6
r = 1.0
str = '+NAN' ; read(str,*) r
-if (.not. isnan(r)) call abort()
+if (.not. isnan(r)) STOP 7
r = 1.0
str = 'NAN(0x111)' ; read(str,*) r
-if (.not. isnan(r)) call abort()
+if (.not. isnan(r)) STOP 8
r = 1.0
str = '-NAN(123)' ; read(str,*) r
-if (.not. isnan(r)) call abort()
+if (.not. isnan(r)) STOP 9
r = 1.0
str = '+NAN(0xFFE)' ; read(str,*) r
-if (.not. isnan(r)) call abort()
+if (.not. isnan(r)) STOP 10
! parse_real
z = cmplx(-2.0,-4.0)
str = '(0.0,INfinity)' ; read(str,*) z
-if (aimag(z) < 0 .or. aimag(z) /= aimag(z)*1.1) call abort()
+if (aimag(z) < 0 .or. aimag(z) /= aimag(z)*1.1) STOP 11
z = cmplx(-2.0,-4.0)
str = '(-INF,0.0)' ; read(str,*) z
-if (real(z) > 0 .or. real(z) /= real(z)*1.1) call abort()
+if (real(z) > 0 .or. real(z) /= real(z)*1.1) STOP 12
z = cmplx(-2.0,-4.0)
str = '(0.0,+INF)' ; read(str,*) z
-if (aimag(z) < 0 .or. aimag(z) /= aimag(z)*1.1) call abort()
+if (aimag(z) < 0 .or. aimag(z) /= aimag(z)*1.1) STOP 13
z = cmplx(-2.0,-4.0)
str = '(-inFiniTY,0.0)' ; read(str,*) z
-if (real(z) > 0 .or. real(z) /= real(z)*1.1) call abort()
+if (real(z) > 0 .or. real(z) /= real(z)*1.1) STOP 14
z = cmplx(-2.0,-4.0)
str = '(NAN,0.0)' ; read(str,*) z
-if (.not. isnan(real(z))) call abort()
+if (.not. isnan(real(z))) STOP 15
z = cmplx(-2.0,-4.0)
str = '(0.0,-NAN)' ; read(str,*) z
-if (.not. isnan(aimag(z))) call abort()
+if (.not. isnan(aimag(z))) STOP 16
z = cmplx(-2.0,-4.0)
str = '(+NAN,0.0)' ; read(str,*) z
-if (.not. isnan(real(z))) call abort()
+if (.not. isnan(real(z))) STOP 17
z = cmplx(-2.0,-4.0)
str = '(NAN(0x111),0.0)' ; read(str,*) z
-if (.not. isnan(real(z))) call abort()
+if (.not. isnan(real(z))) STOP 18
z = cmplx(-2.0,-4.0)
str = '(0.0,-NaN(123))' ; read(str,*) z
-if (.not. isnan(aimag(z))) call abort()
+if (.not. isnan(aimag(z))) STOP 19
z = cmplx(-2.0,-4.0)
str = '(+nan(0xFFE),0.0)' ; read(str,*) z
-if (.not. isnan(real(z))) call abort()
+if (.not. isnan(real(z))) STOP 20
end
str = 'NAN' ; read(str,*) r
k2 = transfer(r,k2)
k2 = iand(k2, z'fff80000000000000000000000000000')
-if (k2.ne.quietnan) call abort
+if (k2.ne.quietnan) STOP 1
end
y = nearest(tiny(o),-1.0)/2.0
ix = transfer(x,ix)
iy = transfer(y,iy)
- if (ix /= iy) call abort
+ if (ix /= iy) STOP 1
end program chop
! 0+ > 0
if (nearest(0.0, 1.0) &
<= 0.0) &
- call abort()
+ STOP 1
! 0++ > 0+
if (nearest(nearest(0.0, 1.0), 1.0) &
<= nearest(0.0, 1.0)) &
- call abort()
+ STOP 2
! 0+++ > 0++
if (nearest(nearest(nearest(0.0, 1.0), 1.0), 1.0) &
<= nearest(nearest(0.0, 1.0), 1.0)) &
- call abort()
+ STOP 3
! 0+- = 0
if (nearest(nearest(0.0, 1.0), -1.0) &
/= 0.0) &
- call abort()
+ STOP 4
! 0++- = 0+
if (nearest(nearest(nearest(0.0, 1.0), 1.0), -1.0) &
/= nearest(0.0, 1.0)) &
- call abort()
+ STOP 5
! 0++-- = 0
if (nearest(nearest(nearest(nearest(0.0, 1.0), 1.0), -1.0), -1.0) &
/= 0.0) &
- call abort()
+ STOP 6
! 0- < 0
if (nearest(0.0, -1.0) &
>= 0.0) &
- call abort()
+ STOP 7
! 0-- < 0+
if (nearest(nearest(0.0, -1.0), -1.0) &
>= nearest(0.0, -1.0)) &
- call abort()
+ STOP 8
! 0--- < 0--
if (nearest(nearest(nearest(0.0, -1.0), -1.0), -1.0) &
>= nearest(nearest(0.0, -1.0), -1.0)) &
- call abort()
+ STOP 9
! 0-+ = 0
if (nearest(nearest(0.0, -1.0), 1.0) &
/= 0.0) &
- call abort()
+ STOP 10
! 0--+ = 0-
if (nearest(nearest(nearest(0.0, -1.0), -1.0), 1.0) &
/= nearest(0.0, -1.0)) &
- call abort()
+ STOP 11
! 0--++ = 0
if (nearest(nearest(nearest(nearest(0.0, -1.0), -1.0), 1.0), 1.0) &
/= 0.0) &
- call abort()
+ STOP 12
! 42++ > 42+
if (nearest(nearest(42.0, 1.0), 1.0) &
<= nearest(42.0, 1.0)) &
- call abort()
+ STOP 13
! 42-- < 42-
if (nearest(nearest(42.0, -1.0), -1.0) &
>= nearest(42.0, -1.0)) &
- call abort()
+ STOP 14
! 42-+ = 42
if (nearest(nearest(42.0, -1.0), 1.0) &
/= 42.0) &
- call abort()
+ STOP 15
! 42+- = 42
if (nearest(nearest(42.0, 1.0), -1.0) &
/= 42.0) &
- call abort()
+ STOP 16
! INF+ = INF
- if (nearest(1.0/0.0, 1.0) /= 1.0/0.0) call abort()
+ if (nearest(1.0/0.0, 1.0) /= 1.0/0.0) STOP 17
! -INF- = -INF
- if (nearest(-1.0/0.0, -1.0) /= -1.0/0.0) call abort()
+ if (nearest(-1.0/0.0, -1.0) /= -1.0/0.0) STOP 18
! NAN- = NAN
- if (.not.isnan(nearest(0.0d0/0.0, 1.0))) call abort()
+ if (.not.isnan(nearest(0.0d0/0.0, 1.0))) STOP 19
! NAN+ = NAN
- if (.not.isnan(nearest(0.0d0/0.0, -1.0))) call abort()
+ if (.not.isnan(nearest(0.0d0/0.0, -1.0))) STOP 20
! Double precision
! 0+ > 0
if (nearest(0.0d0, 1.0) &
<= 0.0d0) &
- call abort()
+ STOP 21
! 0++ > 0+
if (nearest(nearest(0.0d0, 1.0), 1.0) &
<= nearest(0.0d0, 1.0)) &
- call abort()
+ STOP 22
! 0+++ > 0++
if (nearest(nearest(nearest(0.0d0, 1.0), 1.0), 1.0) &
<= nearest(nearest(0.0d0, 1.0), 1.0)) &
- call abort()
+ STOP 23
! 0+- = 0
if (nearest(nearest(0.0d0, 1.0), -1.0) &
/= 0.0d0) &
- call abort()
+ STOP 24
! 0++- = 0+
if (nearest(nearest(nearest(0.0d0, 1.0), 1.0), -1.0) &
/= nearest(0.0d0, 1.0)) &
- call abort()
+ STOP 25
! 0++-- = 0
if (nearest(nearest(nearest(nearest(0.0d0, 1.0), 1.0), -1.0), -1.0) &
/= 0.0d0) &
- call abort()
+ STOP 26
! 0- < 0
if (nearest(0.0d0, -1.0) &
>= 0.0d0) &
- call abort()
+ STOP 27
! 0-- < 0+
if (nearest(nearest(0.0d0, -1.0), -1.0) &
>= nearest(0.0d0, -1.0)) &
- call abort()
+ STOP 28
! 0--- < 0--
if (nearest(nearest(nearest(0.0d0, -1.0), -1.0), -1.0) &
>= nearest(nearest(0.0d0, -1.0), -1.0)) &
- call abort()
+ STOP 29
! 0-+ = 0
if (nearest(nearest(0.0d0, -1.0), 1.0) &
/= 0.0d0) &
- call abort()
+ STOP 30
! 0--+ = 0-
if (nearest(nearest(nearest(0.0d0, -1.0), -1.0), 1.0) &
/= nearest(0.0d0, -1.0)) &
- call abort()
+ STOP 31
! 0--++ = 0
if (nearest(nearest(nearest(nearest(0.0d0, -1.0), -1.0), 1.0), 1.0) &
/= 0.0d0) &
- call abort()
+ STOP 32
! 42++ > 42+
if (nearest(nearest(42.0d0, 1.0), 1.0) &
<= nearest(42.0d0, 1.0)) &
- call abort()
+ STOP 33
! 42-- < 42-
if (nearest(nearest(42.0d0, -1.0), -1.0) &
>= nearest(42.0d0, -1.0)) &
- call abort()
+ STOP 34
! 42-+ = 42
if (nearest(nearest(42.0d0, -1.0), 1.0) &
/= 42.0d0) &
- call abort()
+ STOP 35
! 42+- = 42
if (nearest(nearest(42.0d0, 1.0), -1.0) &
/= 42.0d0) &
- call abort()
+ STOP 36
! INF+ = INF
- if (nearest(1.0d0/0.0d0, 1.0) /= 1.0d0/0.0d0) call abort()
+ if (nearest(1.0d0/0.0d0, 1.0) /= 1.0d0/0.0d0) STOP 37
! -INF- = -INF
- if (nearest(-1.0d0/0.0d0, -1.0) /= -1.0d0/0.0d0) call abort()
+ if (nearest(-1.0d0/0.0d0, -1.0) /= -1.0d0/0.0d0) STOP 38
! NAN- = NAN
- if (.not.isnan(nearest(0.0d0/0.0, 1.0))) call abort()
+ if (.not.isnan(nearest(0.0d0/0.0, 1.0))) STOP 39
! NAN+ = NAN
- if (.not.isnan(nearest(0.0d0/0.0, -1.0))) call abort()
+ if (.not.isnan(nearest(0.0d0/0.0, -1.0))) STOP 40
end program test
! 0+ > 0
if (nearest(r4, 1.0) &
<= r4) &
- call abort()
+ STOP 1
! 0++ > 0+
if (nearest(nearest(r4, 1.0), 1.0) &
<= nearest(r4, 1.0)) &
- call abort()
+ STOP 2
! 0+++ > 0++
if (nearest(nearest(nearest(r4, 1.0), 1.0), 1.0) &
<= nearest(nearest(r4, 1.0), 1.0)) &
- call abort()
+ STOP 3
! 0+- = 0
if (nearest(nearest(r4, 1.0), -1.0) &
/= r4) &
- call abort()
+ STOP 4
! 0++- = 0+
if (nearest(nearest(nearest(r4, 1.0), 1.0), -1.0) &
/= nearest(r4, 1.0)) &
- call abort()
+ STOP 5
! 0++-- = 0
if (nearest(nearest(nearest(nearest(r4, 1.0), 1.0), -1.0), -1.0) &
/= r4) &
- call abort()
+ STOP 6
! 0- < 0
if (nearest(r4, -1.0) &
>= r4) &
- call abort()
+ STOP 7
! 0-- < 0+
if (nearest(nearest(r4, -1.0), -1.0) &
>= nearest(r4, -1.0)) &
- call abort()
+ STOP 8
! 0--- < 0--
if (nearest(nearest(nearest(r4, -1.0), -1.0), -1.0) &
>= nearest(nearest(r4, -1.0), -1.0)) &
- call abort()
+ STOP 9
! 0-+ = 0
if (nearest(nearest(r4, -1.0), 1.0) &
/= r4) &
- call abort()
+ STOP 10
! 0--+ = 0-
if (nearest(nearest(nearest(r4, -1.0), -1.0), 1.0) &
/= nearest(r4, -1.0)) &
- call abort()
+ STOP 11
! 0--++ = 0
if (nearest(nearest(nearest(nearest(r4, -1.0), -1.0), 1.0), 1.0) &
/= r4) &
- call abort()
+ STOP 12
r4 = 42.0_4
! 42++ > 42+
if (nearest(nearest(r4, 1.0), 1.0) &
<= nearest(r4, 1.0)) &
- call abort()
+ STOP 13
! 42-- < 42-
if (nearest(nearest(r4, -1.0), -1.0) &
>= nearest(r4, -1.0)) &
- call abort()
+ STOP 14
! 42-+ = 42
if (nearest(nearest(r4, -1.0), 1.0) &
/= r4) &
- call abort()
+ STOP 15
! 42+- = 42
if (nearest(nearest(r4, 1.0), -1.0) &
/= r4) &
- call abort()
+ STOP 16
r4 = 0.0
! INF+ = INF
- if (nearest(1.0/r4, 1.0) /= 1.0/r4) call abort()
+ if (nearest(1.0/r4, 1.0) /= 1.0/r4) STOP 17
! -INF- = -INF
- if (nearest(-1.0/r4, -1.0) /= -1.0/r4) call abort()
+ if (nearest(-1.0/r4, -1.0) /= -1.0/r4) STOP 18
! NAN- = NAN
- if (.not.isnan(nearest(0.0/r4, 1.0))) call abort()
+ if (.not.isnan(nearest(0.0/r4, 1.0))) STOP 19
! NAN+ = NAN
- if (.not.isnan(nearest(0.0/r4, -1.0))) call abort()
+ if (.not.isnan(nearest(0.0/r4, -1.0))) STOP 20
! Double precision with single-precision sign
! 0+ > 0
if (nearest(r8, 1.0) &
<= r8) &
- call abort()
+ STOP 21
! 0++ > 0+
if (nearest(nearest(r8, 1.0), 1.0) &
<= nearest(r8, 1.0)) &
- call abort()
+ STOP 22
! 0+++ > 0++
if (nearest(nearest(nearest(r8, 1.0), 1.0), 1.0) &
<= nearest(nearest(r8, 1.0), 1.0)) &
- call abort()
+ STOP 23
! 0+- = 0
if (nearest(nearest(r8, 1.0), -1.0) &
/= r8) &
- call abort()
+ STOP 24
! 0++- = 0+
if (nearest(nearest(nearest(r8, 1.0), 1.0), -1.0) &
/= nearest(r8, 1.0)) &
- call abort()
+ STOP 25
! 0++-- = 0
if (nearest(nearest(nearest(nearest(r8, 1.0), 1.0), -1.0), -1.0) &
/= r8) &
- call abort()
+ STOP 26
! 0- < 0
if (nearest(r8, -1.0) &
>= r8) &
- call abort()
+ STOP 27
! 0-- < 0+
if (nearest(nearest(r8, -1.0), -1.0) &
>= nearest(r8, -1.0)) &
- call abort()
+ STOP 28
! 0--- < 0--
if (nearest(nearest(nearest(r8, -1.0), -1.0), -1.0) &
>= nearest(nearest(r8, -1.0), -1.0)) &
- call abort()
+ STOP 29
! 0-+ = 0
if (nearest(nearest(r8, -1.0), 1.0) &
/= r8) &
- call abort()
+ STOP 30
! 0--+ = 0-
if (nearest(nearest(nearest(r8, -1.0), -1.0), 1.0) &
/= nearest(r8, -1.0)) &
- call abort()
+ STOP 31
! 0--++ = 0
if (nearest(nearest(nearest(nearest(r8, -1.0), -1.0), 1.0), 1.0) &
/= r8) &
- call abort()
+ STOP 32
r8 = 42.0_8
! 42++ > 42+
if (nearest(nearest(r8, 1.0), 1.0) &
<= nearest(r8, 1.0)) &
- call abort()
+ STOP 33
! 42-- < 42-
if (nearest(nearest(r8, -1.0), -1.0) &
>= nearest(r8, -1.0)) &
- call abort()
+ STOP 34
! 42-+ = 42
if (nearest(nearest(r8, -1.0), 1.0) &
/= r8) &
- call abort()
+ STOP 35
! 42+- = 42
if (nearest(nearest(r8, 1.0), -1.0) &
/= r8) &
- call abort()
+ STOP 36
r4 = 0.0
! INF+ = INF
- if (nearest(1.0/r4, 1.0) /= 1.0/r4) call abort()
+ if (nearest(1.0/r4, 1.0) /= 1.0/r4) STOP 37
! -INF- = -INF
- if (nearest(-1.0/r4, -1.0) /= -1.0/r4) call abort()
+ if (nearest(-1.0/r4, -1.0) /= -1.0/r4) STOP 38
! NAN- = NAN
- if (.not.isnan(nearest(0.0/r4, 1.0))) call abort()
+ if (.not.isnan(nearest(0.0/r4, 1.0))) STOP 39
! NAN+ = NAN
- if (.not.isnan(nearest(0.0/r4, -1.0))) call abort()
+ if (.not.isnan(nearest(0.0/r4, -1.0))) STOP 40
! Single precision with double-precision sign
! 0+ > 0
if (nearest(r4, 1.0d0) &
<= r4) &
- call abort()
+ STOP 41
! 0++ > 0+
if (nearest(nearest(r4, 1.0d0), 1.0d0) &
<= nearest(r4, 1.0d0)) &
- call abort()
+ STOP 42
! 0+++ > 0++
if (nearest(nearest(nearest(r4, 1.0d0), 1.0d0), 1.0d0) &
<= nearest(nearest(r4, 1.0d0), 1.0d0)) &
- call abort()
+ STOP 43
! 0+- = 0
if (nearest(nearest(r4, 1.0d0), -1.0d0) &
/= r4) &
- call abort()
+ STOP 44
! 0++- = 0+
if (nearest(nearest(nearest(r4, 1.0d0), 1.0d0), -1.0d0) &
/= nearest(r4, 1.0d0)) &
- call abort()
+ STOP 45
! 0++-- = 0
if (nearest(nearest(nearest(nearest(r4, 1.0d0), 1.0d0), -1.0d0), -1.0d0) &
/= r4) &
- call abort()
+ STOP 46
! 0- < 0
if (nearest(r4, -1.0d0) &
>= r4) &
- call abort()
+ STOP 47
! 0-- < 0+
if (nearest(nearest(r4, -1.0d0), -1.0d0) &
>= nearest(r4, -1.0d0)) &
- call abort()
+ STOP 48
! 0--- < 0--
if (nearest(nearest(nearest(r4, -1.0d0), -1.0d0), -1.0d0) &
>= nearest(nearest(r4, -1.0d0), -1.0d0)) &
- call abort()
+ STOP 49
! 0-+ = 0
if (nearest(nearest(r4, -1.0d0), 1.0d0) &
/= r4) &
- call abort()
+ STOP 50
! 0--+ = 0-
if (nearest(nearest(nearest(r4, -1.0d0), -1.0d0), 1.0d0) &
/= nearest(r4, -1.0d0)) &
- call abort()
+ STOP 51
! 0--++ = 0
if (nearest(nearest(nearest(nearest(r4, -1.0d0), -1.0d0), 1.0d0), 1.0d0) &
/= r4) &
- call abort()
+ STOP 52
r4 = 42.0_4
! 42++ > 42+
if (nearest(nearest(r4, 1.0d0), 1.0d0) &
<= nearest(r4, 1.0d0)) &
- call abort()
+ STOP 53
! 42-- < 42-
if (nearest(nearest(r4, -1.0d0), -1.0d0) &
>= nearest(r4, -1.0d0)) &
- call abort()
+ STOP 54
! 42-+ = 42
if (nearest(nearest(r4, -1.0d0), 1.0d0) &
/= r4) &
- call abort()
+ STOP 55
! 42+- = 42
if (nearest(nearest(r4, 1.0d0), -1.0d0) &
/= r4) &
- call abort()
+ STOP 56
r4 = 0.0
! INF+ = INF
- if (nearest(1.0d0/r4, 1.0d0) /= 1.0d0/r4) call abort()
+ if (nearest(1.0d0/r4, 1.0d0) /= 1.0d0/r4) STOP 57
! -INF- = -INF
- if (nearest(-1.0d0/r4, -1.0d0) /= -1.0d0/r4) call abort()
+ if (nearest(-1.0d0/r4, -1.0d0) /= -1.0d0/r4) STOP 58
! NAN- = NAN
- if (.not.isnan(nearest(0.0/r4, 1.0d0))) call abort()
+ if (.not.isnan(nearest(0.0/r4, 1.0d0))) STOP 59
! NAN+ = NAN
- if (.not.isnan(nearest(0.0/r4, -1.0d0))) call abort()
+ if (.not.isnan(nearest(0.0/r4, -1.0d0))) STOP 60
! Double precision with double-precision sign
! 0+ > 0
if (nearest(r8, 1.0d0) &
<= r8) &
- call abort()
+ STOP 61
! 0++ > 0+
if (nearest(nearest(r8, 1.0d0), 1.0d0) &
<= nearest(r8, 1.0d0)) &
- call abort()
+ STOP 62
! 0+++ > 0++
if (nearest(nearest(nearest(r8, 1.0d0), 1.0d0), 1.0d0) &
<= nearest(nearest(r8, 1.0d0), 1.0d0)) &
- call abort()
+ STOP 63
! 0+- = 0
if (nearest(nearest(r8, 1.0d0), -1.0d0) &
/= r8) &
- call abort()
+ STOP 64
! 0++- = 0+
if (nearest(nearest(nearest(r8, 1.0d0), 1.0d0), -1.0d0) &
/= nearest(r8, 1.0d0)) &
- call abort()
+ STOP 65
! 0++-- = 0
if (nearest(nearest(nearest(nearest(r8, 1.0d0), 1.0d0), -1.0d0), -1.0d0) &
/= r8) &
- call abort()
+ STOP 66
! 0- < 0
if (nearest(r8, -1.0d0) &
>= r8) &
- call abort()
+ STOP 67
! 0-- < 0+
if (nearest(nearest(r8, -1.0d0), -1.0d0) &
>= nearest(r8, -1.0d0)) &
- call abort()
+ STOP 68
! 0--- < 0--
if (nearest(nearest(nearest(r8, -1.0d0), -1.0d0), -1.0d0) &
>= nearest(nearest(r8, -1.0d0), -1.0d0)) &
- call abort()
+ STOP 69
! 0-+ = 0
if (nearest(nearest(r8, -1.0d0), 1.0d0) &
/= r8) &
- call abort()
+ STOP 70
! 0--+ = 0-
if (nearest(nearest(nearest(r8, -1.0d0), -1.0d0), 1.0d0) &
/= nearest(r8, -1.0d0)) &
- call abort()
+ STOP 71
! 0--++ = 0
if (nearest(nearest(nearest(nearest(r8, -1.0d0), -1.0d0), 1.0d0), 1.0d0) &
/= r8) &
- call abort()
+ STOP 72
r8 = 42.0_8
! 42++ > 42+
if (nearest(nearest(r8, 1.0d0), 1.0d0) &
<= nearest(r8, 1.0d0)) &
- call abort()
+ STOP 73
! 42-- < 42-
if (nearest(nearest(r8, -1.0d0), -1.0d0) &
>= nearest(r8, -1.0d0)) &
- call abort()
+ STOP 74
! 42-+ = 42
if (nearest(nearest(r8, -1.0d0), 1.0d0) &
/= r8) &
- call abort()
+ STOP 75
! 42+- = 42
if (nearest(nearest(r8, 1.0d0), -1.0d0) &
/= r8) &
- call abort()
+ STOP 76
r4 = 0.0
! INF+ = INF
- if (nearest(1.0d0/r4, 1.0d0) /= 1.0d0/r4) call abort()
+ if (nearest(1.0d0/r4, 1.0d0) /= 1.0d0/r4) STOP 77
! -INF- = -INF
- if (nearest(-1.0d0/r4, -1.0d0) /= -1.0d0/r4) call abort()
+ if (nearest(-1.0d0/r4, -1.0d0) /= -1.0d0/r4) STOP 78
! NAN- = NAN
- if (.not.isnan(nearest(0.0/r4, 1.0d0))) call abort()
+ if (.not.isnan(nearest(0.0/r4, 1.0d0))) STOP 79
! NAN+ = NAN
- if (.not.isnan(nearest(0.0/r4, -1.0d0))) call abort()
+ if (.not.isnan(nearest(0.0/r4, -1.0d0))) STOP 80
end program test
character(len=70) line
character(len=20) fmt
write(unit=line,fmt='(Z4)') -1_1
- if (line(1:4) .ne. ' FF') call abort
+ if (line(1:4) .ne. ' FF') STOP 1
write(unit=line,fmt='(Z5)') -1_2
- if (line(1:5) .ne. ' FFFF') call abort
+ if (line(1:5) .ne. ' FFFF') STOP 2
write(unit=line,fmt='(Z9)') -1_4
- if (line(1:9) .ne. ' FFFFFFFF') call abort
+ if (line(1:9) .ne. ' FFFFFFFF') STOP 3
write(unit=line,fmt='(Z17)') -2_8
- if (line(1:17) .ne. ' FFFFFFFFFFFFFFFE') call abort
+ if (line(1:17) .ne. ' FFFFFFFFFFFFFFFE') STOP 4
write(unit=line,fmt='(Z2)') 10_8
- if (line(1:2) .ne. ' A') call abort
+ if (line(1:2) .ne. ' A') STOP 5
write(unit=line,fmt='(Z8)') -43_8
- if (line(1:1) .ne. '*') call abort
+ if (line(1:1) .ne. '*') STOP 6
write(unit=line,fmt='(B65)') -1_8
- if (line(1:2) .ne. ' 1') call abort
- if (line(64:66) .ne. '11 ') call abort
+ if (line(1:2) .ne. ' 1') STOP 7
+ if (line(64:66) .ne. '11 ') STOP 8
write(unit=line,fmt='(O4)') -2_1
- if (line(1:4) .ne. ' 376') call abort
+ if (line(1:4) .ne. ' 376') STOP 9
end
subroutine jackal (b, c)
integer :: b, c
integer :: jello(b:c), cake(1:2, b:c), soda(b:c, 1:2)
- if (lbound (jello, 1) <= ubound (jello, 1)) call abort ()
- if (size (jello) /= 0) call abort ()
+ if (lbound (jello, 1) <= ubound (jello, 1)) STOP 1
+ if (size (jello) /= 0) STOP 2
- if (.not.any(lbound (cake) <= ubound (cake))) call abort ()
- if (size (cake) /= 0) call abort ()
+ if (.not.any(lbound (cake) <= ubound (cake))) STOP 3
+ if (size (cake) /= 0) STOP 4
if ((lbound (soda, 1) > ubound (soda, 1)) .and. &
- (lbound (soda, 2) > ubound (soda, 2))) call abort ()
- if (size (soda) /= 0) call abort ()
+ (lbound (soda, 2) > ubound (soda, 2))) STOP 5
+ if (size (soda) /= 0) STOP 6
end subroutine jackal
i = -1
! gfortran created a 'fort.-1' file and wrote "Hello" in it
write (unit=i, fmt=*, iostat=j) "Hello"
- if (j <= 0) call abort
+ if (j <= 0) STOP 1
i = -11
open (unit=i, file="xxx", iostat=j)
- if (j <= 0) call abort
+ if (j <= 0) STOP 2
i = -42
inquire (unit=i, exist=l)
- if (l) call abort
+ if (l) STOP 3
end
! i should be <= NEWUNIT_FIRST in libgfortran/io/unit.c
i = -100
write(unit=i,fmt=*, iostat=j) 10
- if (j == 0) call abort
+ if (j == 0) STOP 1
end program negative_unit2
i = -1
! gfortran created a 'fort.-1' file and wrote "Hello" in it
write (unit=i, fmt=*, iostat=i) "Hello"
- if (i <= 0) call abort
+ if (i <= 0) STOP 1
i = -11
open (unit=i, file="xxx", iostat=i)
- if (i <= 0) call abort
+ if (i <= 0) STOP 2
i = -42
inquire (unit=i, exist=l)
- if (l) call abort
+ if (l) STOP 3
i = 2_8*huge(0_4)+20_8
! This one is nasty
inquire (unit=i, exist=l, iostat=i)
- if (l) call abort
- if (i.ne.0) call abort
+ if (l) STOP 4
+ if (i.ne.0) STOP 5
end
print *, c
if (c(1) /= 'ac' .or. c(2) /= 'ac' .or. c(3) /= 'cd') then
- call abort ()
+ STOP 1
end if
end
WRITE (*,*) str
IF (str(1) /= 'ac' .OR. str(2) /= 'ac') THEN
- CALL abort ()
+ STOP 1
END IF
END SUBROUTINE sub
length = LEN ( (/ TRIM(x), 'a' /) // 'c')
IF (length /= 2) THEN
- CALL abort ()
+ STOP 1
END IF
END PROGRAM
contains
subroutine tigger (w)
complex(kind=8) w
- if (FOO.ne.(1.0d0, 1.0d0)) call abort ()
- if (KANGA.ne.(-1.0d0, -1.0d0)) call abort ()
- if (ROBIN.ne.(99.0d0, 99.0d0)) CALL abort ()
- if (w.ne.cmplx(re,im)) call abort ()
+ if (FOO.ne.(1.0d0, 1.0d0)) STOP 1
+ if (KANGA.ne.(-1.0d0, -1.0d0)) STOP 2
+ if (ROBIN.ne.(99.0d0, 99.0d0)) STOP 3
+ if (w.ne.cmplx(re,im)) STOP 4
end subroutine tigger
end module mod2
call sub1 (l)
i = 1
call sub2 (l)
- if (any (l.ne.(/84,42,0/))) call abort ()
+ if (any (l.ne.(/84,42,0/))) STOP 1
end program testfoobar
CALL sub2 (z, j)
z%i1 = 1
CALL sub3 (z, j)
- IF (ALL (j.ne.(/3,2,1/))) CALL abort ()
+ IF (ALL (j.ne.(/3,2,1/))) STOP 1
END PROGRAM use_foobar
end subroutine b
subroutine c(m)
- if (m/=1) call abort
+ if (m/=1) STOP 1
end subroutine c
end subroutine a
character(len=10), parameter :: a4(2) = "1234567890"
character(len=10), parameter :: a5(2) = repeat("1234567890",2)
- if(achar(10) /= new_line('a')) call abort
+ if(achar(10) /= new_line('a')) STOP 1
- if (iachar(new_line(a1)) /= 10) call abort
- if (iachar(new_line(a2)) /= 10) call abort
- if (iachar(new_line(a3)) /= 10) call abort
- if (iachar(new_line(a4)) /= 10) call abort
- if (iachar(new_line(a5)) /= 10) call abort
+ if (iachar(new_line(a1)) /= 10) STOP 2
+ if (iachar(new_line(a2)) /= 10) STOP 3
+ if (iachar(new_line(a3)) /= 10) STOP 4
+ if (iachar(new_line(a4)) /= 10) STOP 5
+ if (iachar(new_line(a5)) /= 10) STOP 6
end program new_line_check
rewind(myunit)
rewind(myunit2)
read(myunit2,'(a)') str
- if (str.ne." abcdefghijklmnop") call abort
+ if (str.ne." abcdefghijklmnop") STOP 1
close(myunit)
close(myunit2, status="delete")
end program newunit_1
program test_newunit
integer :: st, un = 0
open (newunit=un, file='nonexisting.dat', status='old', iostat=st)
- if (un /= 0) call abort
+ if (un /= 0) STOP 1
end program test_newunit
message = "12"
read(message, *) this
- if (this.ne.12) call abort
+ if (this.ne.12) STOP 1
open(newunit=funit, status="scratch")
write(funit, *) "13"
read(funit, *) another
!write(*,*) another
close(funit)
- if (another.ne.13) call abort
+ if (another.ne.13) STOP 2
end
! { dg-do run }
program nint_1
- if (int(anint(8388609.0)) /= 8388609) call abort
- if (int(anint(0.49999997)) /= 0) call abort
- if (nint(8388609.0) /= 8388609) call abort
- if (nint(0.49999997) /= 0) call abort
- if (int(dnint(4503599627370497.0d0),8) /= 4503599627370497_8) call abort
- if (int(dnint(0.49999999999999994d0)) /= 0) call abort
- if (int(anint(-8388609.0)) /= -8388609) call abort
- if (int(anint(-0.49999997)) /= 0) call abort
- if (nint(-8388609.0) /= -8388609) call abort
- if (nint(-0.49999997) /= 0) call abort
- if (int(dnint(-4503599627370497.0d0),8) /= -4503599627370497_8) call abort
- if (int(dnint(-0.49999999999999994d0)) /= 0) call abort
+ if (int(anint(8388609.0)) /= 8388609) STOP 1
+ if (int(anint(0.49999997)) /= 0) STOP 2
+ if (nint(8388609.0) /= 8388609) STOP 3
+ if (nint(0.49999997) /= 0) STOP 4
+ if (int(dnint(4503599627370497.0d0),8) /= 4503599627370497_8) STOP 5
+ if (int(dnint(0.49999999999999994d0)) /= 0) STOP 6
+ if (int(anint(-8388609.0)) /= -8388609) STOP 7
+ if (int(anint(-0.49999997)) /= 0) STOP 8
+ if (nint(-8388609.0) /= -8388609) STOP 9
+ if (nint(-0.49999997) /= 0) STOP 10
+ if (int(dnint(-4503599627370497.0d0),8) /= -4503599627370497_8) STOP 11
+ if (int(dnint(-0.49999999999999994d0)) /= 0) STOP 12
end program nint_1
a = nearest(0.5_8,-1.0_8)
i2 = nint(nearest(0.5_8,-1.0_8))
i1 = nint(a)
- if (i1 /= 0 .or. i2 /= 0) call abort
+ if (i1 /= 0 .or. i2 /= 0) STOP 1
a = 0.5_8
i2 = nint(0.5_8)
i1 = nint(a)
- if (i1 /= 1 .or. i2 /= 1) call abort
+ if (i1 /= 1 .or. i2 /= 1) STOP 2
a = nearest(0.5_8,1.0_8)
i2 = nint(nearest(0.5_8,1.0_8))
i1 = nint(a)
- if (i1 /= 1 .or. i2 /= 1) call abort
+ if (i1 /= 1 .or. i2 /= 1) STOP 3
b = nearest(0.5,-1.0)
j2 = nint(nearest(0.5,-1.0))
j1 = nint(b)
- if (j1 /= 0 .or. j2 /= 0) call abort
+ if (j1 /= 0 .or. j2 /= 0) STOP 4
b = 0.5
j2 = nint(0.5)
j1 = nint(b)
- if (j1 /= 1 .or. j2 /= 1) call abort
+ if (j1 /= 1 .or. j2 /= 1) STOP 5
b = nearest(0.5,1.0)
j2 = nint(nearest(0.5,1.0))
j1 = nint(b)
- if (j1 /= 1 .or. j2 /= 1) call abort
+ if (j1 /= 1 .or. j2 /= 1) STOP 6
a = 4503599627370497.0_8
i1 = nint(a,kind=8)
i2 = nint(4503599627370497.0_8,kind=8)
- if (i1 /= i2 .or. i1 /= 4503599627370497_8) call abort
+ if (i1 /= i2 .or. i1 /= 4503599627370497_8) STOP 7
a = -4503599627370497.0_8
i1 = nint(a,kind=8)
i2 = nint(-4503599627370497.0_8,kind=8)
- if (i1 /= i2 .or. i1 /= -4503599627370497_8) call abort
+ if (i1 /= i2 .or. i1 /= -4503599627370497_8) STOP 8
end
logical :: presnt
type(c_ptr) :: cpt
!GCC$ attributes NO_ARG_CHECK :: arg1
- if (presnt .neqv. present (arg1)) call abort ()
+ if (presnt .neqv. present (arg1)) STOP 1
cpt = c_loc (arg1)
end subroutine sub_scalar
b = -huge(b) / 7
a = a ** 73
b = 7894_8 * b - 78941_8
- if ((-3)**73 /= a) call abort
- if (7894_8 * (-huge(b) / 7) - 78941_8 /= b) call abort
+ if ((-3)**73 /= a) STOP 1
+ if (7894_8 * (-huge(b) / 7) - 78941_8 /= b) STOP 2
a = 1234789786453123
- if (a - 1234789786453123 /= a - (-426244989)) call abort
+ if (a - 1234789786453123 /= a - (-426244989)) STOP 3
end
integer*4 smallest
read(inputline,100) smallest
100 format(1i11)
-if (smallest.ne.-2147483648) call abort
+if (smallest.ne.-2147483648) STOP 1
end
program test
integer :: i
i = int(z'FFFFFFFF',kind(i))
- if (i /= -1) call abort
- if (int(z'FFFFFFFF',kind(i)) /= -1) call abort
+ if (i /= -1) STOP 1
+ if (int(z'FFFFFFFF',kind(i)) /= -1) STOP 2
- if (popcnt(int(z'0F00F00080000001',8)) /= 10) call abort
- if (popcnt(int(z'800F0001',4)) /= 6) call abort
+ if (popcnt(int(z'0F00F00080000001',8)) /= 10) STOP 3
+ if (popcnt(int(z'800F0001',4)) /= 6) STOP 4
end program test
write(77,'(A)') '123'
rewind(77)
read(77,'(2I2)',advance='no',iostat=k,size=n) i1,i2
- if (k >=0) call abort
- if (n /= 3) call abort
- if (i1 /= 12 .or. i2 /= 3) call abort
+ if (k >=0) STOP 1
+ if (n /= 3) STOP 2
+ if (i1 /= 12 .or. i2 /= 3) STOP 3
end program main
read(unit=c,fmt='(A)') i
select case(i)
case(1)
- call abort
+ STOP 1
call abort_should_be_noreturn
case(2)
stop 65
! Check compile-time version
if (abs (NORM2 ([real :: 1, 2, huge(3.0)]) - huge(3.0)) &
- > epsilon(0.0)*huge(3.0)) call abort()
+ > epsilon(0.0)*huge(3.0)) STOP 1
if (abs (SNORM2([real :: 1, 2, huge(3.0)],3) - huge(3.0)) &
- > epsilon(0.0)*huge(3.0)) call abort()
+ > epsilon(0.0)*huge(3.0)) STOP 2
if (abs (SNORM2([real :: 1, 2, 3],3) - NORM2([real :: 1, 2, 3])) &
- > epsilon(0.0)*SNORM2([real :: 1, 2, 3],3)) call abort()
+ > epsilon(0.0)*SNORM2([real :: 1, 2, 3],3)) STOP 3
-if (NORM2([real :: ]) /= 0.0) call abort()
-if (abs (NORM2([real :: 0, 0, 3, 0]) - 3.0) > epsilon(0.0)) call abort()
+if (NORM2([real :: ]) /= 0.0) STOP 4
+if (abs (NORM2([real :: 0, 0, 3, 0]) - 3.0) > epsilon(0.0)) STOP 5
! Check TREE version
if (abs (NORM2 (a) - huge(3.0)) &
- > epsilon(0.0)*huge(3.0)) call abort()
+ > epsilon(0.0)*huge(3.0)) STOP 6
if (abs (SNORM2(b,3) - NORM2(b)) &
- > epsilon(0.0)*SNORM2(b,3)) call abort()
+ > epsilon(0.0)*SNORM2(b,3)) STOP 7
if (abs (SNORM2(c,4) - NORM2(c)) &
- > epsilon(0.0)*SNORM2(c,4)) call abort()
+ > epsilon(0.0)*SNORM2(c,4)) STOP 8
if (ANY (abs (abs(d(:,1)) - NORM2(d, 2)) &
- > epsilon(0.0))) call abort()
+ > epsilon(0.0))) STOP 9
! Check libgfortran version
if (ANY (abs (SNORM2(d,4) - NORM2(d, 1)) &
- > epsilon(0.0)*SNORM2(d,4))) call abort()
+ > epsilon(0.0)*SNORM2(d,4))) STOP 10
if (abs (SNORM2(f,4) - NORM2(f, 1)) &
- > epsilon(0.0)*SNORM2(d,4)) call abort()
+ > epsilon(0.0)*SNORM2(d,4)) STOP 11
if (ANY (abs (abs(g(:,1)) - NORM2(g, 2)) &
- > epsilon(0.0))) call abort()
+ > epsilon(0.0))) STOP 12
contains
! NORM2 algorithm based on BLAS, cf.
! Check compile-time version
if (abs (NORM2 ([real(qp) :: 1, 2, huge(3.0_qp)]) - huge(3.0_qp)) &
- > epsilon(0.0_qp)*huge(3.0_qp)) call abort()
+ > epsilon(0.0_qp)*huge(3.0_qp)) STOP 1
if (abs (SNORM2([real(qp) :: 1, 2, huge(3.0_qp)],3) - huge(3.0_qp)) &
- > epsilon(0.0_qp)*huge(3.0_qp)) call abort()
+ > epsilon(0.0_qp)*huge(3.0_qp)) STOP 2
if (abs (SNORM2([real(qp) :: 1, 2, 3],3) - NORM2([real(qp) :: 1, 2, 3])) &
- > epsilon(0.0_qp)*SNORM2([real(qp) :: 1, 2, 3],3)) call abort()
+ > epsilon(0.0_qp)*SNORM2([real(qp) :: 1, 2, 3],3)) STOP 3
-if (NORM2([real(qp) :: ]) /= 0.0_qp) call abort()
-if (abs (NORM2([real(qp) :: 0, 0, 3, 0]) - 3.0_qp) > epsilon(0.0_qp)) call abort()
+if (NORM2([real(qp) :: ]) /= 0.0_qp) STOP 4
+if (abs (NORM2([real(qp) :: 0, 0, 3, 0]) - 3.0_qp) > epsilon(0.0_qp)) STOP 5
! Check TREE version
if (abs (NORM2 (a) - huge(3.0_qp)) &
- > epsilon(0.0_qp)*huge(3.0_qp)) call abort()
+ > epsilon(0.0_qp)*huge(3.0_qp)) STOP 6
if (abs (SNORM2(b,3) - NORM2(b)) &
- > epsilon(0.0_qp)*SNORM2(b,3)) call abort()
+ > epsilon(0.0_qp)*SNORM2(b,3)) STOP 7
if (abs (SNORM2(c,4) - NORM2(c)) &
- > epsilon(0.0_qp)*SNORM2(c,4)) call abort()
+ > epsilon(0.0_qp)*SNORM2(c,4)) STOP 8
if (ANY (abs (abs(d(:,1)) - NORM2(d, 2)) &
- > epsilon(0.0_qp))) call abort()
+ > epsilon(0.0_qp))) STOP 9
! Check libgfortran version
if (ANY (abs (SNORM2(d,4) - NORM2(d, 1)) &
- > epsilon(0.0_qp)*SNORM2(d,4))) call abort()
+ > epsilon(0.0_qp)*SNORM2(d,4))) STOP 10
if (abs (SNORM2(f,4) - NORM2(f, 1)) &
- > epsilon(0.0_qp)*SNORM2(d,4)) call abort()
+ > epsilon(0.0_qp)*SNORM2(d,4)) STOP 11
if (ANY (abs (abs(g(:,1)) - NORM2(g, 2)) &
- > epsilon(0.0_qp))) call abort()
+ > epsilon(0.0_qp))) STOP 12
contains
! NORM2 algorithm based on BLAS, cf.
program s
x = sign(1.,0.)
y = sign(1.,-0.)
- if (x /= 1.) call abort()
- if (y /= -1.) call abort()
+ if (x /= 1.) STOP 1
+ if (y /= -1.) STOP 2
x = 1.
y = 0.
x = sign(x, y)
y = sign(x, -y)
- if (x /= 1.) call abort()
- if (y /= -1.) call abort()
+ if (x /= 1.) STOP 3
+ if (y /= -1.) STOP 4
end program s
program s
x = sign(1.,0.)
y = sign(1.,-0.)
- if (x /= 1.) call abort()
- if (y /= 1.) call abort()
+ if (x /= 1.) STOP 1
+ if (y /= 1.) STOP 2
x = 1.
y = 0.
x = sign(x, y)
y = sign(x, -y)
- if (x /= 1.) call abort()
- if (y /= 1.) call abort()
+ if (x /= 1.) STOP 3
+ if (y /= 1.) STOP 4
end program s
real(4) :: x = -1.2e-3
real(8) :: y = -1.2e-3
write(s,'(7f10.3)') x
- if (trim(adjustl(s)) /= "-0.001") call abort
+ if (trim(adjustl(s)) /= "-0.001") STOP 1
write(s, '(7f10.3)') y
- if (trim(adjustl(s)) /= "-0.001") call abort
+ if (trim(adjustl(s)) /= "-0.001") STOP 2
end program nosigned_zero_3
CONTAINS
SUBROUTINE SUB(I)
INTEGER, POINTER :: I(:,:,:)
- IF (ASSOCIATED (I)) CALL ABORT ()
+ IF (ASSOCIATED (I)) STOP 1
END SUBROUTINE SUB
END PROGRAM PASSES_NULL
TYPE(tb) :: b
b = tb(null())
- if (allocated( b%b_comp )) call abort()
+ if (allocated( b%b_comp )) STOP 1
END SUBROUTINE proc
END MODULE fold_convert_loc_ice
nullify(p(i)%ket)
end do
do i = 1, 2
- if (associated (p(i)%bra)) call abort ()
- if (associated (p(i)%ket)) call abort ()
+ if (associated (p(i)%bra)) STOP 1
+ if (associated (p(i)%ket)) STOP 2
end do
end program
integer k, l(3) /2*2,1/ ! { dg-warning "" }
real pi /3.1416/, e ! { dg-warning "" }
- if (j /= 1) call abort ()
- if (g /= 2) call abort ()
- if (any(l /= (/2,2,1/))) call abort ()
- if (pi /= 3.1416) call abort ()
+ if (j /= 1) STOP 1
+ if (g /= 2) STOP 2
+ if (any(l /= (/2,2,1/))) STOP 3
+ if (pi /= 3.1416) STOP 4
end
open (10,file="foo")
read (10,*) i
- if (i /= 42) call abort
+ if (i /= 42) STOP 1
read (10,*) i
- if (i /= -42) call abort
+ if (i /= -42) STOP 2
close (10,status="delete")
end
! { dg-do run }
! Testcase for the GNU extension OPEN(...,ACCESS="APPEND")
open (10,err=900,access="append",position="asis") ! { dg-warning "Extension: ACCESS specifier in OPEN statement" }
- call abort
+ STOP 1
900 end
! { dg-output ".*Extension.*" }
endif
msg=""
open(77,file=n,status="new", iomsg=msg, iostat=i)
-if (i == 0) call abort()
-if (msg(1:33) /= "Cannot open file 'temptestfile': ") call abort()
+if (i == 0) STOP 1
+if (msg(1:33) /= "Cannot open file 'temptestfile': ") STOP 2
open(77,file=n,status="old")
close(77, status="delete")
open(77,file=n,status="old", iomsg=msg, iostat=i)
-if (i == 0) call abort()
-if (msg(1:33) /= "Cannot open file 'temptestfile': ") call abort()
+if (i == 0) STOP 3
+if (msg(1:33) /= "Cannot open file 'temptestfile': ") STOP 4
open(77,file="./", iomsg=msg, iostat=i)
if (msg(1:23) /= "Cannot open file './': " &
- .and. msg /= "Invalid argument") call abort()
+ .and. msg /= "Invalid argument") STOP 5
open(77,file=n,status="new")
i = chmod(n, "-w")
if (i == 0 .and. getuid() /= 0) then
close(77, status="keep")
open(77,file=n, iomsg=msg, iostat=i, action="write")
- if (i == 0) call abort()
- if (msg(1:33) /= "Cannot open file 'temptestfile': ") call abort()
+ if (i == 0) STOP 6
+ if (msg(1:33) /= "Cannot open file 'temptestfile': ") STOP 7
endif
i = chmod(n,"+w")
integer id, ios
open(newunit=id, file="foo_open_negative_unit_1.txt", iostat=ios)
- if (ios /= 0) call abort
+ if (ios /= 0) STOP 1
open(id, file="bar.txt", iostat=ios)
- if (ios /= 0) call abort
+ if (ios /= 0) STOP 2
close(id, status="delete")
open(unit=10, file="foo_open_negative_unit_1.txt", status="old", iostat=ios)
- if (ios /= 0) call abort
+ if (ios /= 0) STOP 3
close(10, status="delete")
open(-10, file="foo_open_negative_unit_1.txt", iostat=ios)
- if (ios == 0) call abort
+ if (ios == 0) STOP 4
inquire(file="foo_open_negative_unit_1.txt", exist=l)
- if (l) call abort
+ if (l) STOP 5
end program nutest
open(nout, file="foo_open_new.dat", status="replace") ! make sure foo_open_new.dat exists
close(nout)
open(nout, file="foo_open_new.dat", status="new",err=100)
- call abort ! This should never happen
+ STOP 1! This should never happen
100 call unlink ("foo_open_new.dat")
end program main
close (10)
open (unit=10, file='PR19451.dat', action="read")
write (10,*,err=20) "Hello World"
- call abort()
+ STOP 1
20 close (10, status='delete')
end program
complex, dimension(2) :: bc, cc
ai = reshape((/-2,-4,7,8/),(/2,2/)) ; bi = 3
- if (any((ai*bi) /= matmul(ai,bi))) call abort()
- if (any((ai .or. ai) /= ai+ai)) call abort()
- if (any((ai // ai) /= ai+ai)) call abort()
+ if (any((ai*bi) /= matmul(ai,bi))) STOP 1
+ if (any((ai .or. ai) /= ai+ai)) STOP 2
+ if (any((ai // ai) /= ai+ai)) STOP 3
ar = reshape((/-2,-4,7,8/),(/2,2/)) ; br = 3
- if (any((ar*br) /= matmul(ar,br))) call abort()
+ if (any((ar*br) /= matmul(ar,br))) STOP 4
ac = reshape((/-2,-4,7,8/),(/2,2/)) ; bc = 3
- if (any((ac*bc) /= matmul(ac,bc))) call abort()
+ if (any((ac*bc) /= matmul(ac,bc))) STOP 5
end
! { dg-do run }
-! { dg-options "-std=f2008 -fall-intrinsics" }
+! { dg-options "-std=f2008 " }
!
! Passing a null pointer or deallocated variable to an
! optional, non-pointer, non-allocatable dummy.
contains
subroutine scalar(a)
integer, optional :: a
- if (present(a)) call abort()
+ if (present(a)) STOP 1
end subroutine scalar
subroutine assumed_size(a)
integer, optional :: a(*)
- if (present(a)) call abort()
+ if (present(a)) STOP 2
end subroutine assumed_size
subroutine assumed_shape(a)
integer, optional :: a(:)
- if (present(a)) call abort()
+ if (present(a)) STOP 3
end subroutine assumed_shape
subroutine ptr_func(is_psnt, a)
integer, optional, pointer :: a
logical :: is_psnt
- if (is_psnt .neqv. present(a)) call abort()
+ if (is_psnt .neqv. present(a)) STOP 4
end subroutine ptr_func
end program test
a = 0
a = foo((/ 1, 1 /), null())
! print *, a
- if (any(a /= 2)) call abort
+ if (any(a /= 2)) STOP 1
a = 0
a = bar((/ 1, 1 /), null())
! print *, a
- if (any(a /= 2)) call abort
+ if (any(a /= 2)) STOP 2
b = 0
b = bar(1, null())
! print *, b
- if (b /= 2) call abort
+ if (b /= 2) STOP 3
contains
integer, optional :: b(:)
integer :: foo(size(a))
- if (present(b)) call abort
+ if (present(b)) STOP 4
foo = 2
end function foo
logical, value :: ll
integer, value :: val
integer, value, optional :: x
- if (ll .neqv. present(x)) call abort
+ if (ll .neqv. present(x)) STOP 1
if (present(x)) then
- if (x /= val) call abort ()
+ if (x /= val) STOP 1
endif
end subroutine int_test
logical, value :: ll
real, value :: val
real, value, optional :: x
- if (ll .neqv. present(x)) call abort
+ if (ll .neqv. present(x)) STOP 2
if (present(x)) then
- if (x /= val) call abort ()
+ if (x /= val) STOP 2
endif
end subroutine real_test
logical, value :: ll
complex, value :: val
complex, value, optional :: x
- if (ll .neqv. present(x)) call abort
+ if (ll .neqv. present(x)) STOP 3
if (present(x)) then
- if (x /= val) call abort ()
+ if (x /= val) STOP 3
endif
end subroutine cmplx_test
logical, value :: ll
logical, value :: val
logical, value, optional :: x
- if (ll .neqv. present(x)) call abort
+ if (ll .neqv. present(x)) STOP 4
if (present(x)) then
- if (x .neqv. val) call abort ()
+ if (x .neqv. val) STOP 4
endif
end subroutine bool_test
end program main
allocate (xca(1), source = t(42))
select type (xca)
type is (t)
- if (any (xca%i .ne. [42])) call abort
+ if (any (xca%i .ne. [42])) STOP 1
end select
call opt (xca = xca)
select type (xca)
type is (t)
- if (any (xca%i .ne. [9,99,999])) call abort
+ if (any (xca%i .ne. [9,99,999])) STOP 2
end select
end
lotto = .false.
lotto = cshift((/.true.,.false.,.true.,.false./),1,dim=dimmy)
write(testbuf,*) lotto
- if (trim(testbuf).ne." F T F T") call abort
+ if (trim(testbuf).ne." F T F T") STOP 1
lotto = .false.
lotto = eoshift((/.true.,.true.,.true.,.true./),1,boundary=bound,dim=dimmy)
lotto = eoshift(lotto,1,dim=dimmy)
write(testbuf,*) lotto
- if (trim(testbuf).ne." T T F F") call abort
+ if (trim(testbuf).ne." T T F F") STOP 2
end subroutine
end program test
\ No newline at end of file
real, dimension(:,:) :: a
s1 = (/1, 1/)
write(testbuf,'(4F10.2)') cshift(a, shift=s1)
- if (testbuf /= " 2.00 1.00 4.00 3.00") CALL abort
+ if (testbuf /= " 2.00 1.00 4.00 3.00") STOP 1
write(testbuf,'(4F10.2)') cshift(a,shift=s1,dim=n2)
- if (testbuf /= " 2.00 1.00 4.00 3.00") CALL abort
+ if (testbuf /= " 2.00 1.00 4.00 3.00") STOP 2
write(testbuf,'(4F10.2)') eoshift(a,shift=s1,dim=n1)
- if (testbuf /= " 2.00 0.00 4.00 0.00") CALL abort
+ if (testbuf /= " 2.00 0.00 4.00 0.00") STOP 3
write(testbuf,'(4F10.2)') eoshift(a,shift=s1,dim=n2)
- if (testbuf /= " 2.00 0.00 4.00 0.00") CALL abort
+ if (testbuf /= " 2.00 0.00 4.00 0.00") STOP 4
end subroutine tst_optional
subroutine sub(bound, dimmy)
integer(kind=8), optional :: dimmy
lotto = .false.
lotto = cshift((/.true.,.false.,.true.,.false./),1,dim=dimmy)
write(testbuf,*) lotto
- if (trim(testbuf).ne." F T F T") call abort
+ if (trim(testbuf).ne." F T F T") STOP 5
lotto = .false.
lotto = eoshift((/.true.,.true.,.true.,.true./),1,boundary=bound,dim=dimmy)
lotto = eoshift(lotto,1,dim=dimmy)
write(testbuf,*) lotto
- if (trim(testbuf).ne." T T F F") call abort
+ if (trim(testbuf).ne." T T F F") STOP 6
end subroutine
end module tst_foo
! we used to take the logarithm of zero in this special case
character*10 c
write (c,'(e10.4)') 1.0
- if(c /= "0.1000E+01") call abort
+ if(c /= "0.1000E+01") STOP 1
write (c,'(e10.4)') 0.0
- if(c /= "0.0000E+00") call abort
+ if(c /= "0.0000E+00") STOP 2
write (c,'(e10.4)') 1.0d100
- if(c /= "0.1000+101") call abort
+ if(c /= "0.1000+101") STOP 3
write (c,'(e10.4)') 1.0d-102
- if(c /= "0.1000-101") call abort
+ if(c /= "0.1000-101") STOP 4
end
r1 = (/ a == b, a /= b, a < b, a <= b, a > b, a >= b /)
r2 = (/ a.eq.b, a.ne.b, a.lt.b, a.le.b, a.gt.b, a.ge.b /)
- if (any (r1.neqv.r2)) call abort
+ if (any (r1.neqv.r2)) STOP 1
if (any (r1.neqv. &
(/ .false.,.true.,.true., .true., .false.,.false. /) )) call&
& abort
r1 = (/ a == b, a /= b, a < b, a <= b, a > b, a >= b /)
r2 = (/ a.eq.b, a.ne.b, a.lt.b, a.le.b, a.gt.b, a.ge.b /)
- if (any (r1.neqv.r2)) call abort
+ if (any (r1.neqv.r2)) STOP 2
if (any (r1.neqv. &
(/ .false.,.true.,.true., .true., .false.,.false. /) )) call&
& abort
character :: str
external len
call len(str)
- if(str /= "X") call abort()
+ if(str /= "X") STOP 1
end subroutine test
PROGRAM VAL
external test
intrinsic len
call test()
- if(len(" ") /= 1) call abort()
+ if(len(" ") /= 1) STOP 2
END
close(1)
open(1,form='FORMATTED')
read(1,*)i
- if(i(1).ne.9.and.i(2).ne.8.and.i(3).ne.7.and.i(4).ne.9)call abort
+ if(i(1).ne.9.and.i(2).ne.8.and.i(3).ne.7.and.i(4).ne.9)STOP 1
read(1,*,end=200)i
! should only be able to read one line from the file
- call abort
+ STOP 2
200 continue
close(1,STATUS='DELETE')
end
write(77,'(A)') 'a','b'
rewind(77)
read(77,'(2A)',iostat=i) line(1)
- if (line(1) /= 'a' .or. line(2) /= 'x') call abort
+ if (line(1) /= 'a' .or. line(2) /= 'x') STOP 1
rewind(77)
line = 'y'
read(77,'(2A)',iostat=i,advance='no') line
- if (line(1) /= 'a' .or. line(2) /= 'y') call abort
+ if (line(1) /= 'a' .or. line(2) /= 'y') STOP 2
end program main
!
INTEGER :: K(3) = 1
INTEGER, PARAMETER :: J(3) = 2
- IF (ANY (MAXLOC (K, J<3) .NE. 1)) CALL ABORT ()
- IF (ANY (J .NE. 2)) CALL ABORT ()
+ IF (ANY (MAXLOC (K, J<3) .NE. 1)) STOP 1
+ IF (ANY (J .NE. 2)) STOP 2
END
!
integer,parameter :: i(1,1) = 0, j(2) = 42\r
\r
- if (any (maxloc(j+j,mask=(j==2)) .ne. 0)) call abort ()\r
- if (size(j+j) .ne. 2) call abort ()\r
- if (minval(j+j) .ne. 84) call abort ()\r
- if (minval(j,mask=(j==2)) .ne. huge (j)) call abort ()\r
- if (maxval(j+j) .ne. 84) call abort ()\r
- if (maxval(j,mask=(j==2)) .ne. -huge (j)-1) call abort ()\r
- if (sum(j,mask=j==2) .ne. 0) call abort ()\r
- if (sum(j+j) .ne. 168) call abort ()\r
- if (product(j+j) .ne. 7056) call abort ()\r
- if (any(ubound(j+j) .ne. 2)) call abort ()\r
- if (any(lbound(j+j) .ne. 1)) call abort ()\r
- if (dot_product(j+j,j) .ne. 7056) call abort ()\r
- if (dot_product(j,j+j) .ne. 7056) call abort ()\r
- if (count(i==1) .ne. 0) call abort ()\r
- if (any(i==1)) call abort ()\r
- if (all(i==1)) call abort ()\r
+ if (any (maxloc(j+j,mask=(j==2)) .ne. 0)) STOP 1\r
+ if (size(j+j) .ne. 2) STOP 2\r
+ if (minval(j+j) .ne. 84) STOP 3\r
+ if (minval(j,mask=(j==2)) .ne. huge (j)) STOP 4\r
+ if (maxval(j+j) .ne. 84) STOP 5\r
+ if (maxval(j,mask=(j==2)) .ne. -huge (j)-1) STOP 6\r
+ if (sum(j,mask=j==2) .ne. 0) STOP 7\r
+ if (sum(j+j) .ne. 168) STOP 8\r
+ if (product(j+j) .ne. 7056) STOP 9\r
+ if (any(ubound(j+j) .ne. 2)) STOP 10\r
+ if (any(lbound(j+j) .ne. 1)) STOP 11\r
+ if (dot_product(j+j,j) .ne. 7056) STOP 12\r
+ if (dot_product(j,j+j) .ne. 7056) STOP 13\r
+ if (count(i==1) .ne. 0) STOP 14\r
+ if (any(i==1)) STOP 15\r
+ if (all(i==1)) STOP 16\r
end\r
character(kind=4,len=*), parameter :: str4(2) = [ 4_'Ac',4_'cc']
character(kind=4,len=*), parameter :: str_s4 = 4_'Acc'
-if(len(MY_STRING) /= 1) call abort()
+if(len(MY_STRING) /= 1) STOP 1
if( MY_STRING(1) /= "A" &
.or.MY_STRING(2) /= "B" &
- .or.MY_STRING(3) /= "C") call abort()
-if(len(MY_STRING_s) /= 4) call abort()
-if(MY_STRING_S /= "AB C") call abort()
-if(len(str) /= 2) call abort()
-if(str(1) /= "Ac" .or. str(2) /= "cc") call abort()
-if(len(str_s) /= 3) call abort()
-if(str_s /= 'Acc') call abort()
+ .or.MY_STRING(3) /= "C") STOP 2
+if(len(MY_STRING_s) /= 4) STOP 3
+if(MY_STRING_S /= "AB C") STOP 4
+if(len(str) /= 2) STOP 5
+if(str(1) /= "Ac" .or. str(2) /= "cc") STOP 6
+if(len(str_s) /= 3) STOP 7
+if(str_s /= 'Acc') STOP 8
-if(len(MY_STRING1) /= 1) call abort()
+if(len(MY_STRING1) /= 1) STOP 9
if( MY_STRING1(1) /= 1_"A" &
.or.MY_STRING1(2) /= 1_"B" &
- .or.MY_STRING1(3) /= 1_"C") call abort()
-if(len(MY_STRING_s1) /= 4) call abort()
-if(MY_STRING_S1 /= 1_"AB C") call abort()
-if(len(str1) /= 2) call abort()
-if(str1(1) /= 1_"Ac" .or. str1(2) /= 1_"cc") call abort()
-if(len(str_s1) /= 3) call abort()
-if(str_s1 /= 1_'Acc') call abort()
+ .or.MY_STRING1(3) /= 1_"C") STOP 10
+if(len(MY_STRING_s1) /= 4) STOP 11
+if(MY_STRING_S1 /= 1_"AB C") STOP 12
+if(len(str1) /= 2) STOP 13
+if(str1(1) /= 1_"Ac" .or. str1(2) /= 1_"cc") STOP 14
+if(len(str_s1) /= 3) STOP 15
+if(str_s1 /= 1_'Acc') STOP 16
-if(len(MY_STRING4) /= 1) call abort()
+if(len(MY_STRING4) /= 1) STOP 17
if( MY_STRING4(1) /= 4_"A" &
.or.MY_STRING4(2) /= 4_"B" &
- .or.MY_STRING4(3) /= 4_"C") call abort()
-if(len(MY_STRING_s4) /= 4) call abort()
-if(MY_STRING_S4 /= 4_"AB C") call abort()
-if(len(str4) /= 2) call abort()
-if(str4(1) /= 4_"Ac" .or. str4(2) /= 4_"cc") call abort()
-if(len(str_s4) /= 3) call abort()
-if(str_s4 /= 4_'Acc') call abort()
+ .or.MY_STRING4(3) /= 4_"C") STOP 18
+if(len(MY_STRING_s4) /= 4) STOP 19
+if(MY_STRING_S4 /= 4_"AB C") STOP 20
+if(len(str4) /= 2) STOP 21
+if(str4(1) /= 4_"Ac" .or. str4(2) /= 4_"cc") STOP 22
+if(len(str_s4) /= 3) STOP 23
+if(str_s4 /= 4_'Acc') STOP 24
end
parameter(parm=(/'xo ','yo ','ag ','xr ','yr '/))
str = 'XXXXXXXXXXXXXXXXXXXX'
- if(str /='XXXXXXXXXXXXXXXXXXXX') call abort()
+ if(str /='XXXXXXXXXXXXXXXXXXXX') STOP 1
write(str,*) parm
- if(str /= ' xo yo ag xr yr') call abort()
+ if(str /= ' xo yo ag xr yr') STOP 2
end subroutine SR
end Module BUG3
!
implicit none
real(kind=8),dimension(2),parameter::v2=(/1,2/)
real(kind=8),dimension(4),parameter::v4=(/1,2,3,4/)
- if (any (v2*v4(1:3:2) .ne. (/1,6/))) call abort ()
- if (any (v2*v4(3:1:-2) .ne. (/3,2/))) call abort ()
+ if (any (v2*v4(1:3:2) .ne. (/1,6/))) STOP 1
+ if (any (v2*v4(3:1:-2) .ne. (/3,2/))) STOP 2
end
k => l
j = tryme((i),i)
- if (j .ne. 3) call abort ()
+ if (j .ne. 3) STOP 1
j = tryme((k),k)
- if (j .ne. 5) call abort ()
+ if (j .ne. 5) STOP 2
n = tryyou((m),m)
- if (any(n .ne. 7)) call abort ()
+ if (any(n .ne. 7)) STOP 3
END
INTEGER FUNCTION TRYME(RTNME,HITME)
implicit none
character*5 c
c = bobo(5)
- if (c .ne. "12345") call abort
+ if (c .ne. "12345") STOP 1
end program test
character*1 :: c, d
if (any( (/ kind(i .and. j), kind(.not. (i .and. j)), kind((a + b)), &
kind((42_1)), kind((j .and. i)), kind((.true._1)), &
- kind(c // d), kind((c) // d), kind((c//d)) /) /= 1 )) call abort()
- if (any( (/ len(c // d), len((c) // d), len ((c // d)) /) /= 2)) call abort()
+ kind(c // d), kind((c) // d), kind((c//d)) /) /= 1 )) STOP 1
+ if (any( (/ len(c // d), len((c) // d), len ((c // d)) /) /= 2)) STOP 2
end
end function f\r
\r
integer, external :: f\r
- if (f ().ne.2) call abort ()\r
+ if (f ().ne.2) STOP 1\r
end\r
end function g
character(4), external :: f, g\r
- if (f ().ne."wxyz") call abort ()
- if (g ().ne."WXYZ") call abort ()
+ if (f ().ne."wxyz") STOP 1
+ if (g ().ne."WXYZ") STOP 2
end\r
end function f\r
\r
integer, external :: f, g\r
- if (f ().ne.2) call abort ()
- if (g ().ne.33) call abort ()\r
+ if (f ().ne.2) STOP 1
+ if (g ().ne.33) STOP 2\r
end\r
end module m\r
\r
use m\r
- if (f ().ne.2) call abort ()\r
+ if (f ().ne.2) STOP 1\r
end\r
logical :: Ltf(2) = [ .true., .false. ]
logical :: Ltftf(4) = [.true., .false., .true.,.false.]
-if (parity([logical ::]) .neqv. .false.) call abort()
-if (parity([.true., .false.]) .neqv. .true.) call abort()
-if (parity([.true.]) .neqv. .true.) call abort()
-if (parity([.false.]) .neqv. .false.) call abort()
-if (parity([.true., .false., .true.,.false.]) .neqv. .false.) call abort()
+if (parity([logical ::]) .neqv. .false.) STOP 1
+if (parity([.true., .false.]) .neqv. .true.) STOP 2
+if (parity([.true.]) .neqv. .true.) STOP 3
+if (parity([.false.]) .neqv. .false.) STOP 4
+if (parity([.true., .false., .true.,.false.]) .neqv. .false.) STOP 5
if (parity(reshape([.true., .false., .true.,.false.],[2,2])) &
- .neqv. .false.) call abort()
+ .neqv. .false.) STOP 6
if (any (parity(reshape([.true., .false., .true.,.false.],[2,2]),dim=1) &
- .neqv. [.true., .true.])) call abort()
+ .neqv. [.true., .true.])) STOP 7
if (any (parity(reshape([.true., .false., .true.,.false.],[2,2]),dim=2) &
- .neqv. [.false., .false.])) call abort()
+ .neqv. [.false., .false.])) STOP 8
i = 0
-if (parity(Lt(1:i)) .neqv. .false.) call abort()
-if (parity(Ltf) .neqv. .true.) call abort()
-if (parity(Lt) .neqv. .true.) call abort()
-if (parity(Lf) .neqv. .false.) call abort()
-if (parity(Ltftf) .neqv. .false.) call abort()
+if (parity(Lt(1:i)) .neqv. .false.) STOP 9
+if (parity(Ltf) .neqv. .true.) STOP 10
+if (parity(Lt) .neqv. .true.) STOP 11
+if (parity(Lf) .neqv. .false.) STOP 12
+if (parity(Ltftf) .neqv. .false.) STOP 13
if (parity(reshape(Ltftf,[2,2])) &
- .neqv. .false.) call abort()
+ .neqv. .false.) STOP 14
if (any (parity(reshape(Ltftf,[2,2]),dim=1) &
- .neqv. [.true., .true.])) call abort()
+ .neqv. [.true., .true.])) STOP 15
if (any (parity(reshape(Ltftf,[2,2]),dim=2) &
- .neqv. [.false., .false.])) call abort()
+ .neqv. [.false., .false.])) STOP 16
end
READ (UNIT=buffer,FMT=10) a, b, c, d
10 FORMAT (2(2(G7.5,1X),2X),2(G10.4E2,1X),1X,2(G11.7E4,1X))
- if (any (a.ne.e).or.any (b.ne.e).or.any (c.ne.e).or.any (d.ne.e)) call abort ()
+ if (any (a.ne.e).or.any (b.ne.e).or.any (c.ne.e).or.any (d.ne.e)) STOP 1
end program past_eor
end subroutine
subroutine bar (arg)
type(mytype(b=4)) :: arg(:)
- if (int (sum (arg(1)%d)) .ne. 136) call abort
- if (trim (arg(2)%chr) .ne. "goodbye pdt") call abort
+ if (int (sum (arg(1)%d)) .ne. 136) STOP 1
+ if (trim (arg(2)%chr) .ne. "goodbye pdt") STOP 2
end subroutine
subroutine foobar (arg)
type(mytype(ftype, pdt_len)) :: arg
- if (int (sum (arg%d)) .ne. 1344) call abort
- if (trim (arg%chr) .ne. "scalar pdt") call abort
+ if (int (sum (arg%d)) .ne. 1344) STOP 3
+ if (trim (arg%chr) .ne. "scalar pdt") STOP 4
end subroutine
end
type(pdt_t(k = kind (c), l=12)) :: foo_4
foo%s = "Hello World!"
- if (foo%s .ne. "Hello World!") call abort
- if (KIND (foo%s) .ne. 1) call abort
- if (len (foo%s) .ne. 12) call abort
+ if (foo%s .ne. "Hello World!") STOP 1
+ if (KIND (foo%s) .ne. 1) STOP 2
+ if (len (foo%s) .ne. 12) STOP 3
foo_4%s = hello
- if (foo_4%s .ne. hello) call abort
- if (KIND (foo_4%s) .ne. 4) call abort
- if (len (foo_4%s) .ne. 12) call abort
+ if (foo_4%s .ne. hello) STOP 4
+ if (KIND (foo_4%s) .ne. 4) STOP 5
+ if (len (foo_4%s) .ne. 12) STOP 6
end program
write(*,*) 'o_matrix OK'
else
write(*,*) 'o_matrix FAIL'
- call abort
+ STOP 1
end if
allocate(fdef(n=12)::o_fdef)
write(*,*) 'o_fdef OK'
else
write(*,*) 'o_fdef FAIL'
- call abort
+ STOP 2
end if
end program test
write(*,*) 'OK'
else
write(*,*) 'FAIL'
- call abort
+ STOP 1
end if
end associate
current => push_8 (root, 2.0_8)
current => push_8 (root, 3.0_8)
- if (int (pop_8 (root)) .ne. 3) call abort
- if (int (pop_8 (root)) .ne. 2) call abort
- if (int (pop_8 (root)) .ne. 1) call abort
- if (int (pop_8 (root)) .ne. 0) call abort
+ if (int (pop_8 (root)) .ne. 3) STOP 1
+ if (int (pop_8 (root)) .ne. 2) STOP 2
+ if (int (pop_8 (root)) .ne. 1) STOP 3
+ if (int (pop_8 (root)) .ne. 0) STOP 4
end program ch2701
current => push_8 (root, 2.0_8)
current => push_8 (root, 3.0_8)
- if (int (pop_8 (root)) .ne. 3) call abort
- if (int (pop_8 (root)) .ne. 2) call abort
- if (int (pop_8 (root)) .ne. 1) call abort
- if (int (pop_8 (root)) .ne. 0) call abort
+ if (int (pop_8 (root)) .ne. 3) STOP 1
+ if (int (pop_8 (root)) .ne. 2) STOP 2
+ if (int (pop_8 (root)) .ne. 1) STOP 3
+ if (int (pop_8 (root)) .ne. 0) STOP 4
end program ch2701
current => push_8 (root, 2.0_8)
current => push_8 (root, 3.0_8)
- if (int (pop_8 (root)) .ne. 3) call abort
- if (int (pop_8 (root)) .ne. 2) call abort
- if (int (pop_8 (root)) .ne. 1) call abort
-! if (int (pop_8 (root)) .ne. 0) call abort
+ if (int (pop_8 (root)) .ne. 3) STOP 1
+ if (int (pop_8 (root)) .ne. 2) STOP 2
+ if (int (pop_8 (root)) .ne. 1) STOP 3
+! if (int (pop_8 (root)) .ne. 0) STOP 4
end subroutine
end program ch2701
! { dg-final { scan-tree-dump-times "Pdtlink_8._deallocate " 5 "original" } }
type(t(8, :)), allocatable :: x
real(x%a) :: y ! Used to die here because initializers were mixed up.
allocate(t(8, 2) :: x)
- if (kind(y) .ne. x%a) call abort
+ if (kind(y) .ne. x%a) STOP 1
deallocate(x)
end
end type
type(t2(:)), allocatable :: x
allocate (t2(3) :: x) ! Used to segfault in trans-array.c.
- if (x%b .ne. 3) call abort
- if (x%b .ne. size (x%r, 1)) call abort
- if (any (x%r%a .ne. 1)) call abort
+ if (x%b .ne. 3) STOP 1
+ if (x%b .ne. size (x%r, 1)) STOP 2
+ if (any (x%r%a .ne. 1)) STOP 3
end
type(t2(3)) :: x
write (buffer,*) x
read (buffer,*) i
- if (any (i .ne. [3,1,1,1])) call abort
+ if (any (i .ne. [3,1,1,1])) STOP 1
end
x = t(2,'ab')
write (buffer, *) x%c ! Tests the fix for PR82720
read (buffer, *) chr
- if (trim (chr) .ne. 'ab') call abort
+ if (trim (chr) .ne. 'ab') STOP 1
x = t(3,'xyz')
- if (len (x%c) .ne. 3) call abort
+ if (len (x%c) .ne. 3) STOP 2
write (buffer, *) x ! Tests the fix for PR82719
read (buffer, *) i, chr
- if (i .ne. 3) call abort
- if (chr .ne. 'xyz') call abort
+ if (i .ne. 3) STOP 3
+ if (chr .ne. 'xyz') STOP 4
buffer = " 3 lmn"
read (buffer, *) x ! Some thought will be needed for PDT reads.
- if (x%c .ne. 'lmn') call abort
+ if (x%c .ne. 'lmn') STOP 5
end
! Kind tests appear because of problem identified in comment #!
! due to Dominque d'Humieres <dominiq@lps.ens.fr>
- if (kind (x2%chr) .ne. 1) call abort
- if (kind (x3%chr) .ne. 4) call abort
+ if (kind (x2%chr) .ne. 1) STOP 1
+ if (kind (x3%chr) .ne. 4) STOP 2
contains
type(pdt_t(1, *)) :: x
integer :: i
- if (x%l .ne. i) call abort
- if (len(x%chr) .ne. i) call abort
- if (size(x%i,1) .ne. i) call abort
+ if (x%l .ne. i) STOP 3
+ if (len(x%chr) .ne. i) STOP 4
+ if (size(x%i,1) .ne. i) STOP 5
end subroutine
end
u%foo=[1,2,3]
v%foo=[2,3,4]
w=addvv(u,v)
- if (any (w%foo .ne. [3,5,7])) call abort
+ if (any (w%foo .ne. [3,5,7])) STOP 1
do i = 1 , a(1)%k
a%foo(i) = i + 4
b%foo(i) = i + 7
end do
c = addvv(a,b)
- if (any (c(1)%foo .ne. [13,15,17])) call abort
+ if (any (c(1)%foo .ne. [13,15,17])) STOP 2
end program test_pdt
! { dg-final { scan-tree-dump-times "__builtin_free" 8 "original" } }
! { dg-final { scan-tree-dump-times "__builtin_malloc" 9 "original" } }
use pdt_m
implicit none
type(vec) :: u,v
- if (any (u%foo .ne. [1,2,3])) call abort
+ if (any (u%foo .ne. [1,2,3])) STOP 1
u%foo = [7,8,9]
v = u
- if (any (v%foo .ne. [7,8,9])) call abort
+ if (any (v%foo .ne. [7,8,9])) STOP 2
end program test_pdt
type(vec(k=123)) :: u
u%foo=1
- if (total(u) .ne. u%k) call abort
+ if (total(u) .ne. u%k) STOP 1
end program test_pdt
w%d = reshape ([(real(i), i = 1, d_dim*d_dim)],[d_dim,d_dim])
! Make sure that the type extension is ordering the parameters correctly.
- if (w%a .ne. ftype) call abort
- if (w%b .ne. 4) call abort
- if (w%h .ne. 4) call abort
- if (size (w%d) .ne. 16) call abort
- if (int (w%d(2,4)) .ne. 14) call abort
- if (kind (w%j) .ne. w%h) call abort
+ if (w%a .ne. ftype) STOP 1
+ if (w%b .ne. 4) STOP 2
+ if (w%h .ne. 4) STOP 3
+ if (size (w%d) .ne. 16) STOP 4
+ if (int (w%d(2,4)) .ne. 14) STOP 5
+ if (kind (w%j) .ne. w%h) STOP 6
! As a side issue, ensure PDT components are OK
- if (q%mat1%b .ne. q%s) call abort
- if (q%mat2%b .ne. q%s*2) call abort
- if (size (q%mat1%d) .ne. mat_dim**2) call abort
- if (size (q%mat2%d) .ne. 4*mat_dim**2) call abort
+ if (q%mat1%b .ne. q%s) STOP 7
+ if (q%mat2%b .ne. q%s*2) STOP 8
+ if (size (q%mat1%d) .ne. mat_dim**2) STOP 9
+ if (size (q%mat2%d) .ne. 4*mat_dim**2) STOP 10
! Now check some basic OOP with PDTs
matrix = w%d
allocate (cz, source = mytype(ftype, d_dim, 0, matrix))
select type (cz)
type is (mytype(ftype, *))
- if (int (sum (cz%d)) .ne. 136) call abort
+ if (int (sum (cz%d)) .ne. 136) STOP 11
type is (thytype(ftype, *, 8))
- call abort
+ STOP 12
end select
deallocate (cz)
cz%d = reshape ([(i*10, i = 1, cz%b**2)], [cz%b,cz%b])
select type (cz)
type is (mytype(ftype, *))
- call abort
+ STOP 13
type is (thytype(ftype, *, 8))
- if (int (sum (cz%d)) .ne. 20800) call abort
+ if (int (sum (cz%d)) .ne. 20800) STOP 14
end select
deallocate (cz)
allocate (cz, source = mytype(ftype, :, 0, matrix)) ! { dg-error "Syntax error" }
select type (cz)
type is (mytype(ftype, d_dim)) ! { dg-error "must be ASSUMED" }
- if (int (sum (cz%d)) .ne. 136) call abort ! { dg-error "Expected TYPE IS" }
+ if (int (sum (cz%d)) .ne. 136) STOP 1! { dg-error "Expected TYPE IS" }
type is (thytype(ftype, *, 8))
- call abort
+ STOP 2
end select
deallocate (cz)
cz%d = reshape ([(i*10, i = 1, cz%b**2)], [cz%b,cz%b])
select type (cz)
type is (mytype(4, *)) ! { dg-error "must be an extension" }
- call abort
+ STOP 3
type is (thytype(ftype, *, 8))
- if (int (sum (cz%d)) .ne. 20800) call abort
+ if (int (sum (cz%d)) .ne. 20800) STOP 4
end select
deallocate (cz)
contains
! Check constructor of PDT and instrinsic assignment
adj = adj_matrix(INT(8,8),2,4)
- if (adj%k .ne. 8) call abort
- if (adj%c .ne. 2) call abort
- if (adj%r .ne. 4) call abort
+ if (adj%k .ne. 8) STOP 1
+ if (adj%c .ne. 2) STOP 2
+ if (adj%r .ne. 4) STOP 3
a = reshape ([(i, i = 1, 6)], [2,3])
adj = a
b = adj
- if (any (b .ne. a)) call abort
+ if (any (b .ne. a)) STOP 4
! Check allocation with MOLD of PDT. Note that only KIND parameters set.
allocate (adj_4, mold = adj_matrix(4,3,2)) ! Added check of KIND = 4
- if (adj_4%k .ne. 4) call abort
+ if (adj_4%k .ne. 4) STOP 5
a_4 = reshape (a, [3,2])
adj_4 = a_4
b_4 = adj_4
- if (any (b_4 .ne. a_4)) call abort
+ if (any (b_4 .ne. a_4)) STOP 6
end program adj3
type(param_matrix(8,3,2)) :: mat
real(kind=mat%k) :: m ! Corrected error: Parameter ‘mat’ at (1) has not been declared or ...
-if (kind(m) .ne. 8) call abort
+if (kind(m) .ne. 8) STOP 1
end
enddo
z => x
do i = 0,12
- if (x(i) /= i .or. z(i) /= i) call abort
+ if (x(i) /= i .or. z(i) /= i) STOP 1
enddo
end
if (any (values .ne. [1,2])) print *, values(2)
else
values => d(:)%tag
- if (any (values .ne. [101,102])) call abort
+ if (any (values .ne. [101,102])) STOP 1
end if
END SUBROUTINE
allocate (d, source = [my_type(1,101), my_type(2,102)])
if (switch .eq. 1) then
values => d(:)%value
- if (any (values .ne. [1,2])) call abort
+ if (any (values .ne. [1,2])) STOP 2
else
values => d(:)%tag
- if (any (values([2,1]) .ne. [102,101])) call abort
+ if (any (values([2,1]) .ne. [102,101])) STOP 3
end if
END function
END MODULE
type(your_type) :: y
call get_values (x, 1)
- if (any (x .ne. [1,2])) call abort
+ if (any (x .ne. [1,2])) STOP 4
call get_values (y%x, 2)
- if (any (y%x .ne. [101,102])) call abort
+ if (any (y%x .ne. [101,102])) STOP 5
x => return_values (2)
- if (any (x .ne. [101,102])) call abort
+ if (any (x .ne. [101,102])) STOP 6
y%x => return_values (1)
- if (any (y%x .ne. [1,2])) call abort
+ if (any (y%x .ne. [1,2])) STOP 7
end
program test_prog
use test_mod
call as_set_alias(1)
- if (any (p .ne. ["abcdefgh","ijklmnop"])) call abort
+ if (any (p .ne. ["abcdefgh","ijklmnop"])) STOP 1
deallocate (as_typ(1)%as%fp)
deallocate (as_typ(1)%as)
deallocate (as_typ)
if (size(v) == 2 .and. all (v == [2.0, 3.0])) then
deallocate(o)
else
- call abort
+ STOP 1
end if
allocate(o(3), source=[foo(1.0, 1), foo(4.0, 4), foo(5.0, 5)])
if (size(v) == 2 .and. all (v == [4.0, 5.0])) then
deallocate(o)
else
- call abort
+ STOP 2
end if
! The rest tests the case in comment 2 <janus@gcc.gnu.org>
call extract1 (v, 1)
- if (any (v /= [1.0, 2.0])) call abort
+ if (any (v /= [1.0, 2.0])) STOP 3
call extract1 (v, 2) ! Call to deallocate pointer.
contains
scalar_vector( 1.2, (/ -1.4, 0.4, 0.8 /) ) /) )
call extract_vec(one_d_field, 1, 2)
- if (any (abs (vector_comp - [0.0,0.2,0.4]) .gt. 1e-4)) call abort
+ if (any (abs (vector_comp - [0.0,0.2,0.4]) .gt. 1e-4)) STOP 1
deallocate(one_d_field) ! v1 becomes undefined
allocate(one_d_field(1), &
(/3, 3/) ) ) /) )
call extract_vec(one_d_field, 2, 1)
- if (abs (vector_comp(1) + 1.0) > 1e-4) call abort
+ if (abs (vector_comp(1) + 1.0) > 1e-4) STOP 2
call extract_vec(one_d_field, 2, 3)
- if (abs (vector_comp(1) - 1.0) > 1e-4) call abort
+ if (abs (vector_comp(1) - 1.0) > 1e-4) STOP 3
deallocate(one_d_field) ! v1 becomes undefined
contains
subroutine extract_vec(field, tag, ic)
pArray => pCellArray%Ele
v_pointer => pArray(1,1)%v;
v_pointer = v_real !OK %%%%%%%%%%%%
- if (any (int (pArray(1,1)%v) .ne. 99)) call abort
+ if (any (int (pArray(1,1)%v) .ne. 99)) STOP 1
v_real = 88
pArray(1,1)%v = v_real !SEGFAULT %%%%%%%%%%%%%%%%%%%%%%%%
- if (any (int (v_pointer) .ne. 88)) call abort
+ if (any (int (v_pointer) .ne. 88)) STOP 2
end
call printit(pc, s3)
s1 = transfer(c_loc(a(2)%c),s1)
- if (s1 /= s3) call abort
+ if (s1 /= s3) STOP 1
s2 = transfer(c_loc(pc(2)),s2)
- if (s2 /= s3) call abort
+ if (s2 /= s3) STOP 2
end program main
tgt = [(thytype(int(i), i, mytype(int(2*i), 2*i)), i= 1,3)]
cptr => tgt%i
- if (lbound (cptr, 1) .ne. 1) Call abort ! Not a whole array target!
+ if (lbound (cptr, 1) .ne. 1) STOP 1! Not a whole array target!
s1 = loc(cptr)
call foo (cptr, s2) ! Check bounds not changed...
- if (s1 .ne. s2) Call abort ! ...and that the descriptor is passed.
+ if (s1 .ne. s2) STOP 2! ...and that the descriptor is passed.
select type (cptr)
type is (integer)
- if (any (cptr .ne. [1,2,3])) call abort ! Check the the scalarizer works.
- if (cptr(2) .ne. 2) call abort ! Check ordinary array indexing.
+ if (any (cptr .ne. [1,2,3])) STOP 3! Check the the scalarizer works.
+ if (cptr(2) .ne. 2) STOP 4! Check ordinary array indexing.
end select
cptr(1:3) => tgt%der%r ! Something a tad more complicated!
select type (cptr)
type is (real)
- if (any (int(cptr) .ne. [2,4,6])) call abort
- if (any (int(cptr([2,3,1])) .ne. [4,6,2])) call abort
- if (int(cptr(3)) .ne. 6) call abort
+ if (any (int(cptr) .ne. [2,4,6])) STOP 5
+ if (any (int(cptr([2,3,1])) .ne. [4,6,2])) STOP 6
+ if (int(cptr(3)) .ne. 6) STOP 7
end select
cptr1(1:3) => tgt%der
s1 = loc(cptr1)
call bar(cptr1, s2)
- if (s1 .ne. s2) Call abort ! Check that the descriptor is passed.
+ if (s1 .ne. s2) STOP 8! Check that the descriptor is passed.
select type (cptr1)
type is (mytype)
- if (any (cptr1%i .ne. [2,4,6])) call abort
- if (cptr1(2)%i .ne. 4) call abort
+ if (any (cptr1%i .ne. [2,4,6])) STOP 9
+ if (cptr1(2)%i .ne. 4) STOP 10
end select
contains
addr = loc(arg)
select type (arg)
type is (integer)
- if (any (arg .ne. [1,2,3])) call abort ! Check the the scalarizer works.
- if (arg(2) .ne. 2) call abort ! Check ordinary array indexing.
+ if (any (arg .ne. [1,2,3])) STOP 11! Check the the scalarizer works.
+ if (arg(2) .ne. 2) STOP 12! Check ordinary array indexing.
end select
end subroutine
addr = loc(arg)
select type (arg)
type is (mytype)
- if (any (arg%i .ne. [2,4,6])) call abort
- if (arg(2)%i .ne. 4) call abort
+ if (any (arg%i .ne. [2,4,6])) STOP 13
+ if (arg(2)%i .ne. 4) STOP 14
end select
end subroutine
end
a = reshape ([cmplx(1, 1), cmplx(2, 2), cmplx(1, 2), cmplx(2, 1)], [2,2])
else
b = transpose(a)
- if (merge("PASSED", "FAILED", all (transpose (a) .eq. b)) .eq. "FAILED") call abort
+ if (merge("PASSED", "FAILED", all (transpose (a) .eq. b)) .eq. "FAILED") STOP 1
end if
end subroutine s
end program r187
x = [real_vars (11.0, 1.0), real_vars (42.0, 2.0)]
vtab_r%rvar => x%r
- if (any (abs (vtab_r%rvar - [11.0, 42.0]) > 1.0e-5)) call abort ! Check skipping 'index; is OK.
+ if (any (abs (vtab_r%rvar - [11.0, 42.0]) > 1.0e-5)) STOP 1! Check skipping 'index; is OK.
y = vtab_r%rvar
- if (any (abs (y - [11.0, 42.0]) > 1.0e-5)) call abort ! Check that the component is usable in assignment.
+ if (any (abs (y - [11.0, 42.0]) > 1.0e-5)) STOP 2! Check that the component is usable in assignment.
call foobar (vtab_r, [11.0, 42.0])
subroutine foobar (vtab, array)
type(var_tables) :: vtab
real :: array (:)
- if (any (abs (vtab%rvar - array) > 1.0e-5)) call abort ! Check passing as a dummy.
- if (abs (vtab%rvar(2) - array(2)) > 1.0e-5) call abort ! Check component reference.
+ if (any (abs (vtab%rvar - array) > 1.0e-5)) STOP 3! Check passing as a dummy.
+ if (abs (vtab%rvar(2) - array(2)) > 1.0e-5) STOP 4! Check component reference.
end subroutine
function barfoo () result(res)
end do
! These lines would segfault.
- if (int (sum (z%s(1)%x)) .ne. 3) call abort
- if (int (sum (z%s(1)%x * z%s(2)%x)) .ne. 10) call abort
+ if (int (sum (z%s(1)%x)) .ne. 3) STOP 1
+ if (int (sum (z%s(1)%x * z%s(2)%x)) .ne. 10) STOP 2
end
implicit none
type(t), pointer :: p1, p2(:), p3(:,:)
p1 => f1()
- if (p1%ii /= 123) call abort ()
+ if (p1%ii /= 123) STOP 1
p2 => f2()
- if (any (p2%ii /= [-11,-22,-33])) call abort ()
+ if (any (p2%ii /= [-11,-22,-33])) STOP 2
p3(2:2,1:3) => f2()
- if (any (p3(2,:)%ii /= [-11,-22,-33])) call abort ()
+ if (any (p3(2,:)%ii /= [-11,-22,-33])) STOP 3
end program test
type(t2) :: my_t2
allocate (t2 :: p1, p2(1), p3(1,1))
- if (.not. same_type_as (p1, my_t2)) call abort()
- if (.not. same_type_as (p2, my_t2)) call abort()
- if (.not. same_type_as (p3, my_t2)) call abort()
+ if (.not. same_type_as (p1, my_t2)) STOP 1
+ if (.not. same_type_as (p2, my_t2)) STOP 2
+ if (.not. same_type_as (p3, my_t2)) STOP 3
p1 => f1()
- if (p1%ii /= 123) call abort ()
- if (.not. same_type_as (p1, my_t)) call abort()
+ if (p1%ii /= 123) STOP 4
+ if (.not. same_type_as (p1, my_t)) STOP 5
p2 => f2()
- if (any (p2%ii /= [-11,-22,-33])) call abort ()
- if (.not. same_type_as (p2, my_t)) call abort()
+ if (any (p2%ii /= [-11,-22,-33])) STOP 6
+ if (.not. same_type_as (p2, my_t)) STOP 7
p3(2:2,1:3) => f2()
- if (any (p3(2,:)%ii /= [-11,-22,-33])) call abort ()
- if (.not. same_type_as (p3, my_t)) call abort()
+ if (any (p3(2,:)%ii /= [-11,-22,-33])) STOP 8
+ if (.not. same_type_as (p3, my_t)) STOP 9
end program test
p => a
p2 => p
if((lbound(p, dim=1) /= -10) .or. (ubound(p, dim=1) /= 10)) &
- call abort()
+ STOP 1
if((lbound(p2,dim=1) /= -10) .or. (ubound(p2,dim=1) /= 10)) &
- call abort()
+ STOP 2
do i = -10, 10
- if(p(i) /= real(i)) call abort()
- if(p2(i) /= real(i)) call abort()
+ if(p(i) /= real(i)) STOP 3
+ if(p2(i) /= real(i)) STOP 4
end do
p => a(:)
p2 => p
if((lbound(p, dim=1) /= 1) .or. (ubound(p, dim=1) /= 21)) &
- call abort()
+ STOP 5
if((lbound(p2,dim=1) /= 1) .or. (ubound(p2,dim=1) /= 21)) &
- call abort()
+ STOP 6
p2 => p(:)
if((lbound(p2,dim=1) /= 1) .or. (ubound(p2,dim=1) /= 21)) &
- call abort()
+ STOP 7
call multdim()
contains
subroutine multdim()
if((lbound(ptr,dim=1) /= -5) .or. (ubound(ptr,dim=1) /= 5) .or. &
(lbound(ptr,dim=2) /= 10) .or. (ubound(ptr,dim=2) /= 20) .or. &
(lbound(ptr,dim=3) /= 0) .or. (ubound(ptr,dim=3) /= 3)) &
- call abort()
+ STOP 8
do i = 0, 3
do j = 10, 20
do k = -5, 5
- if(ptr(k,j,i) /= real(i+10*j+100*k)) call abort()
+ if(ptr(k,j,i) /= real(i+10*j+100*k)) STOP 9
end do
end do
end do
if((lbound(ptr,dim=1) /= 1) .or. (ubound(ptr,dim=1) /= 11) .or. &
(lbound(ptr,dim=2) /= 1) .or. (ubound(ptr,dim=2) /= 11) .or. &
(lbound(ptr,dim=3) /= 1) .or. (ubound(ptr,dim=3) /= 4)) &
- call abort()
+ STOP 10
end subroutine multdim
end program prog
class(t), target :: tgt, tgt2(:)
type(t), pointer :: ptr, ptr2(:), ptr3(:,:)
- if (tgt%ii /= 43) call abort()
- if (size (tgt2) /= 3) call abort()
- if (any (tgt2(:)%ii /= [11,22,33])) call abort()
+ if (tgt%ii /= 43) STOP 1
+ if (size (tgt2) /= 3) STOP 2
+ if (any (tgt2(:)%ii /= [11,22,33])) STOP 3
ptr => tgt ! TYPE => CLASS
ptr2 => tgt2 ! TYPE => CLASS
ptr3(-3:-3,1:3) => tgt2 ! TYPE => CLASS
- if (.not. associated(ptr)) call abort()
- if (.not. associated(ptr2)) call abort()
- if (.not. associated(ptr3)) call abort()
- if (.not. associated(ptr,tgt)) call abort()
- if (.not. associated(ptr2,tgt2)) call abort()
- if (ptr%ii /= 43) call abort()
- if (size (ptr2) /= 3) call abort()
- if (size (ptr3) /= 3) call abort()
- if (any (ptr2(:)%ii /= [11,22,33])) call abort()
- if (any (shape (ptr3) /= [1,3])) call abort()
- if (any (ptr3(-3,:)%ii /= [11,22,33])) call abort()
+ if (.not. associated(ptr)) STOP 4
+ if (.not. associated(ptr2)) STOP 5
+ if (.not. associated(ptr3)) STOP 6
+ if (.not. associated(ptr,tgt)) STOP 7
+ if (.not. associated(ptr2,tgt2)) STOP 8
+ if (ptr%ii /= 43) STOP 9
+ if (size (ptr2) /= 3) STOP 10
+ if (size (ptr3) /= 3) STOP 11
+ if (any (ptr2(:)%ii /= [11,22,33])) STOP 12
+ if (any (shape (ptr3) /= [1,3])) STOP 13
+ if (any (ptr3(-3,:)%ii /= [11,22,33])) STOP 14
end subroutine sub
end module m
implicit none
type(t), pointer :: p1, p2(:),p3(:,:)
p1 => f1()
- if (p1%ii /= 123) call abort ()
+ if (p1%ii /= 123) STOP 1
p2 => f2()
- if (any (p2%ii /= [-11,-22,-33])) call abort ()
+ if (any (p2%ii /= [-11,-22,-33])) STOP 2
p3(2:2,1:3) => f2()
- if (any (p3(2,:)%ii /= [-11,-22,-33])) call abort ()
+ if (any (p3(2,:)%ii /= [-11,-22,-33])) STOP 3
end program test
! { dg-do run }
-! { dg-options "-fcheck=all -std=f2003 -fall-intrinsics" }
+! { dg-options "-fcheck=all -std=f2003 " }
! { dg-shouldfail "Pointer actual argument 'ptr' is not associated" }
!
! PR fortran/49255
contains
subroutine foo (x)
integer, optional :: x
- if (present (x)) call abort ()
+ if (present (x)) STOP 1
end subroutine foo
end
! { dg-do run }
-! { dg-options "-fcheck=all -std=f2008 -fall-intrinsics" }
+! { dg-options "-fcheck=all -std=f2008 " }
!
! PR fortran/49255
!
contains
subroutine foo (x)
integer, optional :: x
- if (present (x)) call abort ()
+ if (present (x)) STOP 1
end subroutine foo
end
CALL S1(F,*1,*2)
1 CONTINUE
- CALL ABORT()
+ STOP 1
GOTO 3
2 CONTINUE
REAL,TARGET :: targ
REAL,POINTER :: p
p => targ
- IF (.NOT. ASSOCIATED(p,x)) CALL ABORT()
+ IF (.NOT. ASSOCIATED(p,x)) STOP 1
END SUBROUTINE
END
INTEGER, POINTER, DIMENSION(:) :: ptr_array_fifth => NULL()
ptr_array => array
array_fifth = every_fifth (ptr_array)
- if (any (array_fifth .ne. [1,11])) call abort
- if (any (every_fifth(ptr_array) .ne. [1,11])) call abort
+ if (any (array_fifth .ne. [1,11])) STOP 1
+ if (any (every_fifth(ptr_array) .ne. [1,11])) STOP 2
CONTAINS
FUNCTION every_fifth (ptr_array) RESULT (ptr_fifth)
IMPLICIT NONE
real, pointer :: b => NULL()
character, pointer :: c => NULL()
integer, pointer, dimension(:) :: d => NULL()
- if (associated(a)) call abort()
- if (associated(b)) call abort()
- if (associated(c)) call abort()
- if (associated(d)) call abort()
+ if (associated(a)) STOP 1
+ if (associated(b)) STOP 2
+ if (associated(c)) STOP 3
+ if (associated(d)) STOP 4
end
integer, pointer :: dp3 => u%i
dp = 5
-if (i0/=5) call abort()
+if (i0/=5) STOP 1
u%dpc = 6
-if (i0/=6) call abort()
+if (i0/=6) STOP 2
dp2 = 3
-if (vec(2)/=3) call abort()
+if (vec(2)/=3) STOP 3
dp3 = 4
-if (u%i/=4) call abort()
+if (u%i/=4) STOP 4
end
type (t) :: u
-if (pp()/=42) call abort()
-if (u%ppc()/=43) call abort()
+if (pp()/=42) STOP 1
+if (u%ppc()/=43) STOP 2
end
type (t) :: u
-if (pp()/=42) call abort()
-if (u%ppc()/=43) call abort()
+if (pp()/=42) STOP 1
+if (u%ppc()/=43) STOP 2
end
class(c), pointer :: px => x
class(c), pointer :: py => y
- if (.not. associated(px, x)) call abort()
- if (.not. same_type_as(px, x)) call abort()
- if (.not. associated(py, y)) call abort()
- if (.not. same_type_as(py, y)) call abort()
+ if (.not. associated(px, x)) STOP 1
+ if (.not. same_type_as(px, x)) STOP 2
+ if (.not. associated(py, y)) STOP 3
+ if (.not. same_type_as(py, y)) STOP 4
end
! { dg-do run }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003 " }
! Pointer intent test
! PR fortran/29624
!
allocate(t2%point)
t2%point = 42
call nonpointer(t2)
- if(t2%point /= 7) call abort()
+ if(t2%point /= 7) STOP 1
contains
subroutine a(p,t)
integer, pointer,intent(in) :: p
type(myT), pointer, intent(in) :: t
integer, pointer :: tmp
if(.not.associated(p)) return
- if(p /= 33) call abort()
+ if(p /= 33) STOP 2
p = 7
if (associated(t)) then
! allocating is valid as we don't change the status
! of the pointer "t", only of it's target
t%x = -15
- if(.not.associated(t%point)) call abort()
- if(t%point /= 55) call abort()
+ if(.not.associated(t%point)) STOP 3
+ if(t%point /= 55) STOP 4
nullify(t%point)
allocate(tmp)
t%point => tmp
tmp => null(tmp)
allocate(t%point)
t%point = 27
- if(t%point /= 27) call abort()
- if(t%x /= -15) call abort()
+ if(t%point /= 27) STOP 5
+ if(t%x /= -15) STOP 6
call foo(t)
- if(t%x /= 32) call abort()
- if(t%point /= -98) call abort()
+ if(t%x /= 32) STOP 7
+ if(t%point /= -98) STOP 8
end if
call b(p)
- if(p /= 5) call abort()
+ if(p /= 5) STOP 9
end subroutine
subroutine b(v)
integer, intent(out) :: v
end subroutine b
subroutine foo(comp)
type(myT), intent(inout) :: comp
- if(comp%x /= -15) call abort()
- if(comp%point /= 27) call abort()
+ if(comp%x /= -15) STOP 10
+ if(comp%point /= 27) STOP 11
comp%x = 32
comp%point = -98
end subroutine foo
subroutine nonpointer(t)
type(myT), intent(in) :: t
- if(t%x /= 5 ) call abort()
- if(t%point /= 42) call abort()
+ if(t%x /= 5 ) STOP 12
+ if(t%point /= 42) STOP 13
t%point = 7
end subroutine nonpointer
end program
allocate(t2%point)
t2%point = 42
call nonpointer(t2)
- if(t2%point /= 7) call abort()
+ if(t2%point /= 7) STOP 1
t2%point = 42
call nonpointer2(t2)
- if(t2%point /= 66) call abort()
+ if(t2%point /= 66) STOP 2
contains
subroutine nonpointer(t)
type(myT), intent(in) :: t
allocate(array(4))
array = 0
call sub(array)
- if (sum(array)/=1) call abort
+ if (sum(array)/=1) STOP 1
contains
do i = 1, ubound(ptr,dim=2)
do j = 1, ubound(ptr,dim=1)
if (negative) then
- if (-cnt /= ptr(j, i)) call abort()
+ if (-cnt /= ptr(j, i)) STOP 1
cnt = cnt + 1
negative = .false.
else
- if (cnt /= ptr(j, i)) call abort()
+ if (cnt /= ptr(j, i)) STOP 2
negative = .true.
end if
end do
! { dg-do run }
-! { dg-options "-std=f2003 -fall-intrinsics -fcheck=bounds" }
+! { dg-options "-std=f2003 -fcheck=bounds" }
! PR fortran/45016
! Check pointer bounds remapping at runtime.
basem = RESHAPE (arr, SHAPE (basem))
vec(0:) => arr
- IF (LBOUND (vec, 1) /= 0 .OR. UBOUND (vec, 1) /= 3) CALL abort ()
- IF (ANY (vec /= arr)) CALL abort ()
- IF (vec(0) /= 1 .OR. vec(2) /= 3) CALL abort ()
+ IF (LBOUND (vec, 1) /= 0 .OR. UBOUND (vec, 1) /= 3) STOP 1
+ IF (ANY (vec /= arr)) STOP 2
+ IF (vec(0) /= 1 .OR. vec(2) /= 3) STOP 3
! Test with bound different of index type, so conversion is necessary.
vec2(-5_1:) => vec
- IF (LBOUND (vec2, 1) /= -5 .OR. UBOUND (vec2, 1) /= -2) CALL abort ()
- IF (ANY (vec2 /= arr)) CALL abort ()
- IF (vec2(-5) /= 1 .OR. vec2(-3) /= 3) CALL abort ()
+ IF (LBOUND (vec2, 1) /= -5 .OR. UBOUND (vec2, 1) /= -2) STOP 4
+ IF (ANY (vec2 /= arr)) STOP 5
+ IF (vec2(-5) /= 1 .OR. vec2(-3) /= 3) STOP 6
mat(1:, 2:) => basem
IF (ANY (LBOUND (mat) /= (/ 1, 2 /) .OR. UBOUND (mat) /= (/ 2, 3 /))) &
- CALL abort ()
- IF (ANY (mat /= basem)) CALL abort ()
- IF (mat(1, 2) /= 1 .OR. mat(1, 3) /= 3 .OR. mat(2, 3) /= 4) CALL abort ()
+ STOP 7
+ IF (ANY (mat /= basem)) STOP 8
+ IF (mat(1, 2) /= 1 .OR. mat(1, 3) /= 3 .OR. mat(2, 3) /= 4) STOP 9
END PROGRAM main
! { dg-do run }
-! { dg-options "-std=f2008 -fall-intrinsics -fcheck=bounds" }
+! { dg-options "-std=f2008 -fcheck=bounds" }
! PR fortran/29785
! Check pointer rank remapping at runtime.
! We need not necessarily change the rank...
vec(2_1:5) => arr(1_1:12_1:2_1)
- IF (LBOUND (vec, 1) /= 2 .OR. UBOUND (vec, 1) /= 5) CALL abort ()
- IF (ANY (vec /= (/ 1, 3, 5, 7 /))) CALL abort ()
- IF (vec(2) /= 1 .OR. vec(5) /= 7) CALL abort ()
+ IF (LBOUND (vec, 1) /= 2 .OR. UBOUND (vec, 1) /= 5) STOP 1
+ IF (ANY (vec /= (/ 1, 3, 5, 7 /))) STOP 2
+ IF (vec(2) /= 1 .OR. vec(5) /= 7) STOP 3
! ...but it is of course the more interesting. Also try remapping a pointer.
vec => arr(1:12:2)
mat(1:3, 1:2) => vec
IF (ANY (LBOUND (mat) /= (/ 1, 1 /) .OR. UBOUND (mat) /= (/ 3, 2 /))) &
- CALL abort ()
- IF (ANY (mat /= RESHAPE (arr(1:12:2), SHAPE (mat)))) CALL abort ()
- IF (mat(1, 1) /= 1 .OR. mat(1, 2) /= 7) CALL abort ()
+ STOP 4
+ IF (ANY (mat /= RESHAPE (arr(1:12:2), SHAPE (mat)))) STOP 5
+ IF (mat(1, 1) /= 1 .OR. mat(1, 2) /= 7) STOP 6
! Remap with target of rank > 1.
vec(1:12_1) => basem
- IF (LBOUND (vec, 1) /= 1 .OR. UBOUND (vec, 1) /= 12) CALL abort ()
- IF (ANY (vec /= arr)) CALL abort ()
- IF (vec(1) /= 1 .OR. vec(5) /= 5 .OR. vec(12) /= 12) CALL abort ()
+ IF (LBOUND (vec, 1) /= 1 .OR. UBOUND (vec, 1) /= 12) STOP 7
+ IF (ANY (vec /= arr)) STOP 8
+ IF (vec(1) /= 1 .OR. vec(5) /= 5 .OR. vec(12) /= 12) STOP 9
END PROGRAM main
ptr(-5:) => tgt(5:) ! Okay
-if (size(ptr) /= 6 .or. lbound(ptr,1) /= -5) call abort()
-if (any (ptr /= [5,6,7,8,9,10])) call abort()
+if (size(ptr) /= 6 .or. lbound(ptr,1) /= -5) STOP 1
+if (any (ptr /= [5,6,7,8,9,10])) STOP 2
ptr(-5:) => tgt2(5:) ! wrongly associates the whole array
print '(*(i4))', size(ptr), lbound(ptr)
print '(*(i4))', ptr
-if (size(ptr) /= 6 .or. lbound(ptr,1) /= -5) call abort()
-if (any (ptr /= [5,6,7,8,9,10])) call abort()
+if (size(ptr) /= 6 .or. lbound(ptr,1) /= -5) STOP 3
+if (any (ptr /= [5,6,7,8,9,10])) STOP 4
end
integer, target :: a
a = 66
call foo(a)
- if (a /= 647) call abort()
+ if (a /= 647) STOP 1
contains
subroutine foo(p)
integer, pointer, intent(in) :: p
- if (a /= 66) call abort()
- if (p /= 66) call abort()
+ if (a /= 66) STOP 2
+ if (p /= 66) STOP 3
p = 647
- if (p /= 647) call abort()
- if (a /= 647) call abort()
+ if (p /= 647) STOP 4
+ if (a /= 647) STOP 5
end subroutine foo
end program test
integer, target :: a
a = 66
call foo(a) ! { dg-error "Fortran 2008: Non-pointer actual argument" }
- if (a /= 647) call abort()
+ if (a /= 647) STOP 1
contains
subroutine foo(p)
integer, pointer, intent(in) :: p
- if (a /= 66) call abort()
- if (p /= 66) call abort()
+ if (a /= 66) STOP 2
+ if (p /= 66) STOP 3
p = 647
- if (p /= 647) call abort()
- if (a /= 647) call abort()
+ if (p /= 647) STOP 4
+ if (a /= 647) STOP 5
end subroutine foo
end program test
end interface
#define CHECK(val,res) \
- if (popcnt(val) /= res) call abort ; \
- if (runtime_popcnt(val) /= res) call abort
+ if (popcnt(val) /= res) STOP 1; \
+ if (runtime_popcnt(val) /= res) STOP 2
#define CHECK2(val) \
- if (poppar(val) /= modulo(popcnt(val),2)) call abort ; \
- if (runtime_poppar(val) /= poppar(val)) call abort
+ if (poppar(val) /= modulo(popcnt(val),2)) STOP 3; \
+ if (runtime_poppar(val) /= poppar(val)) STOP 4
CHECK(0_1, 0)
CHECK(0_2, 0)
! { dg-require-effective-target fortran_integer_16 }
#define CHECK(val,res) \
- if (popcnt(val) /= res) call abort ; \
- if (runtime_popcnt(val) /= res) call abort
+ if (popcnt(val) /= res) STOP 1; \
+ if (runtime_popcnt(val) /= res) STOP 2
#define CHECK2(val) \
- if (poppar(val) /= modulo(popcnt(val),2)) call abort ; \
- if (runtime_poppar(val) /= poppar(val)) call abort
+ if (poppar(val) /= modulo(popcnt(val),2)) STOP 3; \
+ if (runtime_poppar(val) /= poppar(val)) STOP 4
CHECK(0_16, 0)
CHECK(1_16, 1)
! { dg-do run }
integer i
i = 0
-if ( a (i) ** 5 .ne. 1) call abort ()
+if ( a (i) ** 5 .ne. 1) STOP 1
contains
function a (i)
integer a, i
real(d), parameter :: eps_d = 1.e-10_d
real(e), parameter :: eps_e = 1.e-10_e
- if (abs(ris - 4) > eps_s) call abort
- if (abs(rid - 4) > eps_d) call abort
- if (abs(rie - 4) > eps_e) call abort
- if (abs(real(cis, s) - 3) > eps_s .or. abs(aimag(cis) - 4) > eps_s) call abort
- if (abs(real(cid, d) - 3) > eps_d .or. abs(aimag(cid) - 4) > eps_d) call abort
- if (abs(real(cie, e) - 3) > eps_e .or. abs(aimag(cie) - 4) > eps_e) call abort
-
- if (abs(rrs - 4) > eps_s) call abort
- if (abs(rrd - 4) > eps_d) call abort
- if (abs(rre - 4) > eps_e) call abort
- if (abs(real(crs, s) - 3) > eps_s .or. abs(aimag(crs) - 4) > eps_s) call abort
- if (abs(real(crd, d) - 3) > eps_d .or. abs(aimag(crd) - 4) > eps_d) call abort
- if (abs(real(cre, e) - 3) > eps_e .or. abs(aimag(cre) - 4) > eps_e) call abort
-
- if (abs(rds - 4) > eps_s) call abort
- if (abs(rdd - 4) > eps_d) call abort
- if (abs(rde - 4) > eps_e) call abort
- if (abs(real(cds, s) - 3) > eps_s .or. abs(aimag(cds) - 4) > eps_s) call abort
- if (abs(real(cdd, d) - 3) > eps_d .or. abs(aimag(cdd) - 4) > eps_d) call abort
- if (abs(real(cde, e) - 3) > eps_e .or. abs(aimag(cde) - 4) > eps_e) call abort
+ if (abs(ris - 4) > eps_s) STOP 1
+ if (abs(rid - 4) > eps_d) STOP 2
+ if (abs(rie - 4) > eps_e) STOP 3
+ if (abs(real(cis, s) - 3) > eps_s .or. abs(aimag(cis) - 4) > eps_s) STOP 4
+ if (abs(real(cid, d) - 3) > eps_d .or. abs(aimag(cid) - 4) > eps_d) STOP 5
+ if (abs(real(cie, e) - 3) > eps_e .or. abs(aimag(cie) - 4) > eps_e) STOP 6
+
+ if (abs(rrs - 4) > eps_s) STOP 7
+ if (abs(rrd - 4) > eps_d) STOP 8
+ if (abs(rre - 4) > eps_e) STOP 9
+ if (abs(real(crs, s) - 3) > eps_s .or. abs(aimag(crs) - 4) > eps_s) STOP 10
+ if (abs(real(crd, d) - 3) > eps_d .or. abs(aimag(crd) - 4) > eps_d) STOP 11
+ if (abs(real(cre, e) - 3) > eps_e .or. abs(aimag(cre) - 4) > eps_e) STOP 12
+
+ if (abs(rds - 4) > eps_s) STOP 13
+ if (abs(rdd - 4) > eps_d) STOP 14
+ if (abs(rde - 4) > eps_e) STOP 15
+ if (abs(real(cds, s) - 3) > eps_s .or. abs(aimag(cds) - 4) > eps_s) STOP 16
+ if (abs(real(cdd, d) - 3) > eps_d .or. abs(aimag(cdd) - 4) > eps_d) STOP 17
+ if (abs(real(cde, e) - 3) > eps_e .or. abs(aimag(cde) - 4) > eps_e) STOP 18
end program power
v = -1
! Test in scalar expressions
do i=-n,n
- if (v**i /= (-1)**i) call abort
+ if (v**i /= (-1)**i) STOP 1
end do
! Test in array constructors
a(-m:m) = [ ((-1)**i, i= -m, m) ]
b(-m:m) = [ ( v**i, i= -m, m) ]
- if (any(a .ne. b)) call abort
+ if (any(a .ne. b)) STOP 2
! Test in array expressions
c = [ ( i, i = -n , n ) ]
d = (-1)**c
e = v**c
- if (any(d .ne. e)) call abort
+ if (any(d .ne. e)) STOP 3
! Test in different kind expressions
do i2=-n,n
- if (v**i2 /= (-1)**i2) call abort
+ if (v**i2 /= (-1)**i2) STOP 4
end do
end program main
v = 2
! Test scalar expressions.
do i=-n,n
- if (2**i /= v**i) call abort
+ if (2**i /= v**i) STOP 1
end do
! Test array constructors
b = [(2**i,i=-m,m)]
c = [(v**i,i=-m,m)]
- if (any(b /= c)) call abort
+ if (any(b /= c)) STOP 2
! Test array expressions
a = [(i,i=-m,m)]
d = 2**a
e = v**a
- if (any(d /= e)) call abort
+ if (any(d /= e)) STOP 3
end program main
! { dg-final { scan-tree-dump-times "_gfortran_pow_i4_i4" 3 "original" } }
m = n
! Test in scalar expressions
do i=-n,n
- if (v /= 1**i) call abort
+ if (v /= 1**i) STOP 1
end do
! Test in array constructors
a(-m:m) = [ (1**i, i= -m, m) ]
- if (any(a .ne. v)) call abort
+ if (any(a .ne. v)) STOP 2
! Test in array expressions
c = [ ( i, i = -n , n ) ]
d = 1**c
- if (any(d .ne. v)) call abort
+ if (any(d .ne. v)) STOP 3
! Test in different kind expressions
do i2=-n,n
- if (v /= 1**i2) call abort
+ if (v /= 1**i2) STOP 4
end do
end program main
rewind (10)
read (10, cntrl)
if ((ispher.ne.1).or.(nosym.ne.2).or.(runflg.ne.3).or.
- & (noprop.ne.4)) call abort ()
+ & (noprop.ne.4)) STOP 1
end
contains
SUBROUTINE T(A,B)
CHARACTER*(*) A,B
-if(len(a)/=10) call abort()
-if(len(b)/=8) call abort()
+if(len(a)/=10) STOP 1
+if(len(b)/=8) STOP 2
END SUBROUTINE
end
! argument of the subroutine directly, but instead use a copy of it.
function M(NAMES)
CHARACTER*(*) NAMES(*)
- if (any(names(1:2).ne."asdfg")) call abort
+ if (any(names(1:2).ne."asdfg")) STOP 1
m = LEN(NAMES(1))
END function M
character(5) :: c(2)
c = "asdfg"
-if(m(c).ne.5) call abort()
+if(m(c).ne.5) STOP 1
end
contains
subroutine foo(x)
character (len = *), dimension(:) :: x
- if (any (x .ne. "BLUBB")) CALL abort()
+ if (any (x .ne. "BLUBB")) STOP 1
end subroutine foo
end
subroutine bar(x,n)
character (len = *), dimension(n) :: x
- if (any (x .ne. "BLUBB")) CALL abort()
+ if (any (x .ne. "BLUBB")) STOP 2
end subroutine bar
character*12 c
write (c,100) 0, 1
- if (c .ne. 'i = 0, j = 1') call abort
+ if (c .ne. 'i = 0, j = 1') STOP 1
write (c,100) 0
- if (c .ne. 'i = 0 ') call abort
+ if (c .ne. 'i = 0 ') STOP 2
100 format ('i = ',i1,:,', j = ',i1)
end
m(2,:) = (/ 5, 6, 0, 0 /)
! check that reshape does the right thing while constant folding
-if (any(i /= k)) call abort()
-if (any(j /= m)) call abort()
+if (any(i /= k)) STOP 1
+if (any(j /= m)) STOP 2
! check that reshape does the right thing at runtime
n = reshape ((/1,2,3,4,5,6/), (/2,3/))
-if (any(n /= k)) call abort()
+if (any(n /= k)) STOP 3
o = reshape ((/1,2,3,4,5,6/), (/2,4/), (/0,0/), (/2,1/))
-if (any(o /= m)) call abort()
+if (any(o /= m)) STOP 4
end
! { dg-do run }
! Test initializer of character array. PR15959
character (*), parameter :: a (1:2) = (/'ab ', 'abc'/)
-if (a(2) .ne. 'abc') call abort()
+if (a(2) .ne. 'abc') STOP 1
end
write (iunit, rec=1) 'ABCD'
read (iunit, rec=1) string
close (iunit, status = 'delete')
- if (string.ne.'ABCD') call abort
+ if (string.ne.'ABCD') STOP 1
open (UNIT=iunit,FORM='unformatted',ACCESS='direct',STATUS='scratch',RECL=strlen)
write (iunit, rec=1) 'ABCD'
read (iunit, rec=1) string
close (iunit)
- if (string.ne.'ABCD') call abort
+ if (string.ne.'ABCD') STOP 2
end
integer :: n
do n = 1, i
- if (j(n) /= n**2) call abort
+ if (j(n) /= n**2) STOP 1
end do
end subroutine baz
end module bar
ElementTable%Data(2) = Compound(2,"two")
ElementTable%L_size = 2
- if (elementtable%data(1)%count /= 1) call abort
- if (elementtable%data(2)%count /= 2) call abort
- if (elementtable%data(1)%name /= "one ") call abort
- if (elementtable%data(2)%name /= "two ") call abort
- if (elementtable%l_size /= 2) call abort
+ if (elementtable%data(1)%count /= 1) STOP 1
+ if (elementtable%data(2)%count /= 2) STOP 2
+ if (elementtable%data(1)%name /= "one ") STOP 3
+ if (elementtable%data(2)%name /= "two ") STOP 4
+ if (elementtable%l_size /= 2) STOP 5
end program Array_List
do i = 1,14
sum = sum + a(i)
end do
- if (sum.ne.105) call abort
+ if (sum.ne.105) STOP 1
end
if (l.ne.' -9223372036854775808') then
! ^
! the space is required before a number
- call abort
+ STOP 1
endif
end
integer i
x='12345'
i=index(x,'blablabl')
- if (i.ne.0) call abort
+ if (i.ne.0) STOP 1
end
if (l) if (i) 999,999,30 ! { dg-warning "Obsolescent feature" }
go to 999
- 999 call abort
+ 999 STOP 1
30 end
number = 0
read (10, nml = mynml, iostat = ierr)
if ((ierr /= 0) .or. (any (number /= 42))) &
- call abort ()
+ STOP 1
end do
close(10)
end program pr17285
if (dbg) write(*,mynml1)
else
if (dbg) print *, 'expected 16 32 got ',num1,num2
- call abort
+ STOP 1
endif
num3 = -1
num4 = -1
if (dbg) write(*,mynml2)
else
if (dbg) print *, 'expected 42 56 got ',num3,num4
- call abort
+ STOP 2
endif
close(10)
data a / 1,2,3,4,5,6,7,8,9,10 /
namelist /ints/ a
do ctr = 1,10
- if (a(ctr).ne.ctr) call abort ()
+ if (a(ctr).ne.ctr) STOP 1
end do
end
! A full arrays.
c = (/"ab","cd","ef","gh"/)
call n(p)
- if (any (c /= p%els)) call abort
+ if (any (c /= p%els)) STOP 1
! An array section that needs a new array descriptor.
v%s(1) = "hello"
v%s(2) = "world"
subroutine test(s)
character(len=*) :: s(:)
- if ((len (s) .ne. 5) .or. (any (s .ne. (/"hello", "world"/)))) call abort
+ if ((len (s) .ne. 5) .or. (any (s .ne. (/"hello", "world"/)))) STOP 2
end subroutine
end program
s = x
write (s, '(F4.1)') small
! The plus is optional. We choose not to display it.
- if (s .ne. " 0.0") call abort
+ if (s .ne. " 0.0") STOP 1
s = x
write (s, '(SS,F4.1)') small
- if (s .ne. " 0.0") call abort
+ if (s .ne. " 0.0") STOP 2
s = x
write (s, '(SP,F4.1)') small
- if (s .ne. "+0.0") call abort
+ if (s .ne. "+0.0") STOP 3
end program
! { dg-do run }
character(len=80) :: c
write(c, "('#',F0.2,'#')") 1.23
- if (c /= '#1.23#') call abort
+ if (c /= '#1.23#') STOP 1
write(c, "('#',F0.2,'#')") -1.23
- if (c /= '#-1.23#') call abort
+ if (c /= '#-1.23#') STOP 2
end
if ((z /= 1) .or. (dg /= 58.4_dr) .or. (a /= 48.0_dr) .or. &
(delta /= 0.4_dr).or. (s /= 0.4_dr) .or. (nk /= 6) .or. &
(rb(1) /= 60._dr).or. (rb(2) /= 0.0_dr).or. (rb(3) /=40.0_dr).or. &
- (alpha0 /= 20.0_dr)) call abort ()
+ (alpha0 /= 20.0_dr)) STOP 1
end program sechs_w
write (10,foo)
rewind (10)
read (10, '(a)') buffer
- if (buffer(2:4) /= "FOO") call abort ()
+ if (buffer(2:4) /= "FOO") STOP 1
read (10, '(a)') buffer
- if (buffer(1:2) /= " A") call abort ()
+ if (buffer(1:2) /= " A") STOP 2
close (10)
end program pr18210
rewind (10)
read (10,nl)
close (10)
- IF (a%a /= 10.0) call abort ()
+ IF (a%a /= 10.0) STOP 1
end program pr18392
write (19,'(A15)') 'E+00'
rewind (19)
read (19,'(E15.8)') a
- if (a .ne. 0) call abort
+ if (a .ne. 0) STOP 1
close (19)
c = "+ "
read (c,"(F10.4)") a
- if (a /= 0) call abort
+ if (a /= 0) STOP 2
end
write (20,'(A)') '5 6 7 8'
rewind (20)
read (20,*) (dat(i), i=1,3)
- if (dat(1).ne.3 .or. dat(2).ne.2 .or. dat(3).ne.1) call abort
+ if (dat(1).ne.3 .or. dat(2).ne.2 .or. dat(3).ne.1) STOP 1
read (20,*) I,J
- if (i .ne. 1 .or. j .ne. 2) call abort
+ if (i .ne. 1 .or. j .ne. 2) STOP 2
read (20,*) I,J
- if (i .ne. 5 .or. j .ne. 6) call abort
+ if (i .ne. 5 .or. j .ne. 6) STOP 3
close(20)
end
rewind (10)
READ (10,nml=a, iostat = ier)
close (10)
- if ((ier /= 0) .or. (any (ch /= dh))) call abort ()
+ if ((ier /= 0) .or. (any (ch /= dh))) STOP 1
end program pr19467
rewind (10)
do ctr = 1,3
read (10,nm,end=190)
- if (i.ne.ctr) call abort ()
+ if (i.ne.ctr) STOP 1
enddo
190 continue
end
type(cat) z
integer :: i = 0, j(4,3,2) = 0
call string_comp(i)
- if (i /= 3) call abort
+ if (i /= 3) STOP 1
call string_comp(z%i)
- if (z%i /= 3) call abort
+ if (z%i /= 3) STOP 2
call string_comp(j(1,2,1))
- if (j(1,2,1) /= 3) call abort
+ if (j(1,2,1) /= 3) STOP 3
end program a
subroutine string_comp(i)
character (len = 3), dimension (2) :: b
a = (/ 'abcde', 'ghijk' /)
b = a(:)(2:4)
- if (b(1) .ne. 'bcd' .or. b(2) .ne. 'hij') call abort
+ if (b(1) .ne. 'bcd' .or. b(2) .ne. 'hij') STOP 1
end program main
forall (i = 1:2, j = 1:5) a(i)%field(j) = i * 100 + j
calls = 0
- if (sum (a%field(foo(calls))) .ne. 304) call abort
- if (calls .ne. 1) call abort
- if (sum (a(foo(calls))%field) .ne. 1015) call abort
- if (calls .ne. 2) call abort
+ if (sum (a%field(foo(calls))) .ne. 304) STOP 1
+ if (calls .ne. 1) STOP 2
+ if (sum (a(foo(calls))%field) .ne. 1015) STOP 3
+ if (calls .ne. 2) STOP 4
contains
function foo (calls)
integer :: calls, foo
implicit none
character*80 line
write(line,2070)
- if (line.ne.' stiffness reformed for this high step')call abort
+ if (line.ne.' stiffness reformed for this high step')STOP 1
write(line,2090)
- if (line.ne.' stiffness reformed for hello hello')call abort
+ if (line.ne.' stiffness reformed for hello hello')STOP 2
stop
2070 format (2x,37hstiffness reformed for this high step)
x = -.01
y = .01
write(line,'(2f10.2)') x, y
- if (line.ne.' -0.01 0.01') call abort
+ if (line.ne.' -0.01 0.01') STOP 1
end
! { dg-do run }
open(10,status="foo",err=100) ! { dg-warning "STATUS specifier in OPEN statement .* has invalid value" }
- call abort
+ STOP 1
100 continue
open(10,status="scratch")
end
! fxcoudert@gcc.gnu.org
character(len=80) c
write (c,'(ES12.3)') 0.0
- if (trim(adjustl(c)) .ne. '0.000E+00') call abort ()
+ if (trim(adjustl(c)) .ne. '0.000E+00') STOP 1
write (c,'(EN12.3)') 0.0
- if (trim(adjustl(c)) .ne. '0.000E+00') call abort ()
+ if (trim(adjustl(c)) .ne. '0.000E+00') STOP 2
end
character*30 s
write (s,2000) 0.0, 0.02
- if (s .ne. " 0.00 2.000E-02") call abort
+ if (s .ne. " 0.00 2.000E-02") STOP 1
write (s,2000) 0.01, 0.02
- if (s .ne. " 1.000E-02 2.000E-02") call abort
+ if (s .ne. " 1.000E-02 2.000E-02") STOP 2
2000 format (1PG12.3,G12.3)
end
!
character*20 c
inquire (33, sequential = c)
- if (c .ne. "UNKNOWN") call abort
+ if (c .ne. "UNKNOWN") STOP 1
end
complex(4), pointer :: c4
complex(8), pointer :: c8
- if (tt(l) /= 0) call abort()
- if (tt(i) /= 1) call abort()
- if (tt(r) /= 2) call abort()
- if (tt(c4) /= 3) call abort()
- if (tt(c8) /= 4) call abort()
- if (tt(null(l)) /= 0) call abort()
- if (tt(null(i)) /= 1) call abort()
- if (tt(null(r)) /= 2) call abort()
- if (tt(null(c4)) /= 3) call abort()
- if (tt(null(c8)) /= 4) call abort()
+ if (tt(l) /= 0) STOP 1
+ if (tt(i) /= 1) STOP 2
+ if (tt(r) /= 2) STOP 3
+ if (tt(c4) /= 3) STOP 4
+ if (tt(c8) /= 4) STOP 5
+ if (tt(null(l)) /= 0) STOP 6
+ if (tt(null(i)) /= 1) STOP 7
+ if (tt(null(r)) /= 2) STOP 8
+ if (tt(null(c4)) /= 3) STOP 9
+ if (tt(null(c8)) /= 4) STOP 10
end program test
parameter (a="12")
parameter (b = a)
write (c,'("#",A,"#")') b
- if (c .ne. '#12 #') call abort
+ if (c .ne. '#12 #') STOP 1
end
parameter (a="12")
parameter (b = a)
write (c,'("#",A,"#")') b
- if (c .ne. '#12 #') call abort
+ if (c .ne. '#12 #') STOP 1
end
DIMENSION WORK(*)
if (XSTART .NE. 201.0) then
- call abort
+ STOP 1
endif
LHELPA = 1
implicit none
integer :: n
character(len=n + 6), intent(in) :: string
- if (string .eq. 'abc') call abort
+ if (string .eq. 'abc') STOP 1
end subroutine foo
! { dg-final { scan-tree-dump-times "static int" 0 "original" } }
!
real(kind(0d0)), parameter :: r(1) = &
transfer(transfer(sqrt(2d0), (/ .true. /) ), (/ 0d0 /), 1)
- if (r(1) .ne. sqrt(2d0)) call abort ()
+ if (r(1) .ne. sqrt(2d0)) STOP 1
end
subcells=2.0_dp
sab_max=0.590060749244805_dp
CALL T(nsubcell,sab_max,subcells)
-IF (ANY(nsubcell.NE.2.0_dp)) CALL ABORT()
+IF (ANY(nsubcell.NE.2.0_dp)) STOP 1
END
tan(alpha)**2)
expected = 3.66008420600434162E-002_dp
if (abs(self_l - expected) / expected > 1e-3) &
- call abort
+ STOP 1
end subroutine self_ind_cir_coil
end module scc_m
real :: x, y, z
x = 3.1415926535897932384626433832795029
call f (x, y, z)
- if (abs (y) > 1.0e-5 .or. abs (z + 1.0) > 1.0e-5) call abort
+ if (abs (y) > 1.0e-5 .or. abs (z + 1.0) > 1.0e-5) STOP 1
x = x / 2.0
call f (x, y, z)
- if (abs (y - 1.0) > 1.0e-5 .or. abs (z) > 1.0e-5) call abort
+ if (abs (y - 1.0) > 1.0e-5 .or. abs (z) > 1.0e-5) STOP 2
end program pr35662
rDA1 = MOD (1.1*(rDA(1)-5.0), P=(rDA-2.5))
DO i = 1, 10
rVAL = MOD (1.1*(rDA(1)-5.0), P=(rDA(i)-2.5))
- if (rval /= rda1(i)) call abort
+ if (rval /= rda1(i)) STOP 1
enddo
dda = (/ 1,2,3,4,5,6,7,8,9,10 /)
dDA1 = MOD (1.1d0*(dDA(1)-5.0d0), P=(dDA-2.5d0))
DO i = 1, 10
dVAL = MOD (1.1d0*(dDA(1)-5.0d0), P=(dDA(i)-2.5d0))
- if (dval /= dda1(i)) call abort
+ if (dval /= dda1(i)) STOP 2
enddo
end
QDA1 = MOD (1.1_k*(QDA(1)-5.0_k), P=(QDA-2.5_k))
DO i = 1, 10
QVAL = MOD (1.1_k*(QDA(1)-5.0_k), P=(QDA(i)-2.5_k))
- if (qval /= qda1(i)) call abort
+ if (qval /= qda1(i)) STOP 1
enddo
end
DD = descr(c_loc(buf))
i = transfer (DD%address, 0_c_intptr_t)
j = transfer (c_loc(buf), 0_c_intptr_t)
- if (any((/ i,j /) == 0_c_intptr_t)) call abort
- if (i /= j) call abort
+ if (any((/ i,j /) == 0_c_intptr_t)) STOP 1
+ if (i /= j) STOP 2
end program main
character(len=12) :: b
character(len=1) :: c(2:10)
write (b, a) 'Hell', 'o wo', 'rld!'
- if (b .ne. 'Hello world!') call abort
+ if (b .ne. 'Hello world!') STOP 1
write (b, a(:)) 'hell', 'o Wo', 'rld!'
- if (b .ne. 'hello World!') call abort
+ if (b .ne. 'hello World!') STOP 2
write (b, a(8:)) 'Hell', 'o wo', 'rld!'
- if (b .ne. 'Hello world!') call abort
+ if (b .ne. 'Hello world!') STOP 3
c(2) = ' '
c(3) = '('
c(4) = '3'
c(6) = '4'
c(7) = ')'
write (b, c) 'hell', 'o Wo', 'rld!'
- if (b .ne. 'hello World!') call abort
+ if (b .ne. 'hello World!') STOP 4
write (b, c(:)) 'Hell', 'o wo', 'rld!'
- if (b .ne. 'Hello world!') call abort
+ if (b .ne. 'Hello world!') STOP 5
write (b, c(3:)) 'hell', 'o Wo', 'rld!'
- if (b .ne. 'hello World!') call abort
+ if (b .ne. 'hello World!') STOP 6
end subroutine f1
subroutine f2 (a)
character(len=1) :: a(10:,20:)
character(len=12) :: b
write (b, a) 'Hell', 'o wo', 'rld!'
- if (b .ne. 'Hello world!') call abort
+ if (b .ne. 'Hello world!') STOP 7
write (b, a) 'hell', 'o Wo', 'rld!'
- if (b .ne. 'hello World!') call abort
+ if (b .ne. 'hello World!') STOP 8
end subroutine f2
function f3 ()
call f2 (f)
call f2 (e(2:4,8:9))
write (b, f3 ()) 'Hell', 'o wo', 'rld!'
- if (b .ne. 'Hello world!') call abort
+ if (b .ne. 'Hello world!') STOP 9
end
program m
double precision :: y,z
call b(1.0d0,y,z)
- if (ABS (z - 1.213) > 0.1) call abort
+ if (ABS (z - 1.213) > 0.1) STOP 1
contains
subroutine b( x, y, z)
implicit none
x(2) = a((/1,2,3,4/)+10)
y(1) = b((/x(1),x(2)/))
y(2) = b((/x(1),x(2)/))
- if (y(1)%j(1)%i(1) .ne. 1) call abort
+ if (y(1)%j(1)%i(1) .ne. 1) STOP 1
end
if (any (b .ne. (/"1","1","2","3"/))) i = 2
print *, b
print *, b .ne. (/"1","1","2","3"/)
- if (i == 2) call abort
+ if (i == 2) STOP 1
end
! { dg-do run }
program main
- if (bug() /= "abcdefghij") call abort
+ if (bug() /= "abcdefghij") STOP 1
contains
function bug()
character(len=10) :: bug
time = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
call date_and_time (date, time)
if (index (date, 'a') /= 0 .or. index (time, 'a') /= 0) &
- call abort
+ STOP 1
end
real r1(5), r2(5), r3(5)
real s1(2), s2(2), s3(2)
double precision d1, d2, d3
- if (s1(1) .ne. 1.) call abort
- if (s3(1) .ne. 3.) call abort
- if (r3(1) .ne. 3.) call abort
- if (d3 .ne. 30.) call abort
- if (i3 .ne. 3) call abort
+ if (s1(1) .ne. 1.) STOP 1
+ if (s3(1) .ne. 3.) STOP 2
+ if (r3(1) .ne. 3.) STOP 3
+ if (d3 .ne. 30.) STOP 4
+ if (i3 .ne. 3) STOP 5
end
character(len = 4) :: ins = ' no!'
character(len = 20) st, aufun
st = aufun(ins)
- if (trim(st) /= 'Oh no!') call abort
+ if (trim(st) /= 'Oh no!') STOP 1
end
integer, dimension (3) :: expected
integer :: i, i1, i2, i3
do i = 1, 3
- if (size (x, i) .ne. expected (i)) call abort
+ if (size (x, i) .ne. expected (i)) STOP 1
end do
do i1 = 1, expected (1)
do i2 = 1, expected (2)
do i3 = 1, expected (3)
- if (x (i1, i2, i3) .ne. i1 + i2 * 10 + i3 * 100) call abort
+ if (x (i1, i2, i3) .ne. i1 + i2 * 10 + i3 * 100) STOP 2
end do
end do
end do
do i2 = 1, n2
do i1 = 1, n1
i2p = mod (shift1 (i1, i3) + i2 - 1, n2) + 1
- if (b (i1, i2, i3) .ne. a (i1, i2p, i3)) call abort
+ if (b (i1, i2, i3) .ne. a (i1, i2p, i3)) STOP 1
end do
end do
end do
allocate (p)
p = t (123455, "", p)
r => entry ("", 123456, 1, "", 99, "", p)
- if (p%i /= 123455) call abort
+ if (p%i /= 123455) STOP 1
contains
function entry (x, i, j, c, k, d, p) result (q)
integer :: i, j, k
50 continue
call sfcpar(ar1,10,d2,d3,d1)
- if (d1.ne.10.0) call abort()
+ if (d1.ne.10.0) STOP 1
end
write (99, '(5i3)') 1, 2, 3
rewind (99)
read (99, '(5i3)') a
- if (any (a.ne.(/1, 2, 3, 0, 0/))) call abort
+ if (any (a.ne.(/1, 2, 3, 0, 0/))) STOP 1
close (99, status = 'delete')
end
rewind (10)
do i = 0, 7
read (10, *) a
- if (any (a .ne. mod (i, 2))) call abort
+ if (any (a .ne. mod (i, 2))) STOP 1
end do
close (10)
end
character(LEN=6) :: a(1) = "123456"
forall (i = 3:4) a(1)(i:i+2) = a(1)(i-2:i)
!print *,a ! displays '12@' must be '121234'
- IF (a(1) .ne. "121234") call abort
+ IF (a(1) .ne. "121234") STOP 1
end
type(ivs) :: v_str
integer :: i
call foo(v_str, i)
- if (v_str%chars(1) .ne. "a") call abort
- if (i .ne. 0) call abort
+ if (v_str%chars(1) .ne. "a") STOP 1
+ if (i .ne. 0) STOP 2
call foo(flag = i)
- if (i .ne. 1) call abort
+ if (i .ne. 1) STOP 3
contains
subroutine foo (arg, flag)
type(ivs), optional, intent(out) :: arg
" .8765 8.765 87.65")
WRITE (s,35043) AAVS,AAVS,AAVS
WRITE (s2,5043)
- if (s(2) /= s2(2)) call abort()
+ if (s(2) /= s2(2)) STOP 1
end program fm110_snippet
forall (j = 1:2) a(j:j) = b(j:j)
- if (a /= "12cdefg") call abort
+ if (a /= "12cdefg") STOP 1
forall (j = 2:3) a(j:j) = v(j:j)
- if (a /= "123defg") call abort
+ if (a /= "123defg") STOP 2
forall (j = 3:4) u(j:j) = b(j:j)
- if (a /= "1234efg") call abort
+ if (a /= "1234efg") STOP 3
forall (j = 4:5) u(j:j) = v(j:j)
- if (a /= "12345fg") call abort
+ if (a /= "12345fg") STOP 4
end
forall (j = 1:2) a(j:j) = b(j:j)
- if (a /= "12cdefg") call abort
+ if (a /= "12cdefg") STOP 1
forall (j = 2:3) a(j:j) = v(j:j)
- if (a /= "123defg") call abort
+ if (a /= "123defg") STOP 2
forall (j = 3:4) u(j:j) = b(j:j)
- if (a /= "1234efg") call abort
+ if (a /= "1234efg") STOP 3
forall (j = 4:5) u(j:j) = v(j:j)
- if (a /= "12345fg") call abort
+ if (a /= "12345fg") STOP 4
end
call test_sub(s%a(1, 1), 1000) ! Test the original problem.
- if ( any (s(1, 1)%a(:, :) /= reshape ([1111, 112, 121, 122], [2, 2]))) call abort ()
- if ( any (s(1, 2)%a(:, :) /= reshape ([1121, 122, 141, 142], [2, 2]))) call abort ()
- if ( any (s(2, 1)%a(:, :) /= reshape ([1112, 114, 122, 124], [2, 2]))) call abort ()
- if ( any (s(2, 2)%a(:, :) /= reshape ([1122, 124, 142, 144], [2, 2]))) call abort ()
+ if ( any (s(1, 1)%a(:, :) /= reshape ([1111, 112, 121, 122], [2, 2]))) STOP 1
+ if ( any (s(1, 2)%a(:, :) /= reshape ([1121, 122, 141, 142], [2, 2]))) STOP 2
+ if ( any (s(2, 1)%a(:, :) /= reshape ([1112, 114, 122, 124], [2, 2]))) STOP 3
+ if ( any (s(2, 2)%a(:, :) /= reshape ([1122, 124, 142, 144], [2, 2]))) STOP 4
call test_sub(s(1, 1)%a(:, :), 1000) ! Check "normal" references.
- if ( any (s(1, 1)%a(:, :) /= reshape ([2111,1112,1121,1122], [2, 2]))) call abort ()
- if ( any (s(1, 2)%a(:, :) /= reshape ([1121, 122, 141, 142], [2, 2]))) call abort ()
- if ( any (s(2, 1)%a(:, :) /= reshape ([1112, 114, 122, 124], [2, 2]))) call abort ()
- if ( any (s(2, 2)%a(:, :) /= reshape ([1122, 124, 142, 144], [2, 2]))) call abort ()
+ if ( any (s(1, 1)%a(:, :) /= reshape ([2111,1112,1121,1122], [2, 2]))) STOP 5
+ if ( any (s(1, 2)%a(:, :) /= reshape ([1121, 122, 141, 142], [2, 2]))) STOP 6
+ if ( any (s(2, 1)%a(:, :) /= reshape ([1112, 114, 122, 124], [2, 2]))) STOP 7
+ if ( any (s(2, 2)%a(:, :) /= reshape ([1122, 124, 142, 144], [2, 2]))) STOP 8
contains
subroutine test_sub(array, offset)
integer array(:, :), offset
end subroutine
subroutine redirect_ (ch)
character(*) :: ch(:)
- if (ch(1) /= line) call abort ()
+ if (ch(1) /= line) STOP 1
end subroutine redirect_
end module global
use global
type(point), pointer :: ptr
character(128) :: io(:)
- if (associated (ptr)) call abort ()
- if (io(1) .ne. line) call abort ()
+ if (associated (ptr)) STOP 2
+ if (io(1) .ne. line) STOP 3
end subroutine r
end module my_module
end subroutine option_stopwatch_s
subroutine option_stopwatch_a (a)
character (*) :: a(:)
- if (any (a .ne. (/'hello ','hola! ','goddag'/))) call abort ()
+ if (any (a .ne. (/'hello ','hola! ','goddag'/))) STOP 4
end subroutine option_stopwatch_a
end program main
contains
subroutine foo (p)
complex*16 p(10)
- if (any (p .ne. (-0.2d0, 0.1d0))) call abort
+ if (any (p .ne. (-0.2d0, 0.1d0))) STOP 1
end subroutine
end program pr56015
my_str = fstr(slen)
if (slen /= slen_init .or. len(my_str) /= slen .or. my_str /= ' ') then
- call abort
+ STOP 1
endif
contains
rewind(fd)
msg = 'ok'
read(fd, *, err=10, iomsg=msg) i1, i2, i3, i4
-10 if (msg /= 'Bad integer for item 3 in list input') call abort
+10 if (msg /= 'Bad integer for item 3 in list input') STOP 1
rewind(fd)
msg = 'ok'
read(fd, *, err=20, iomsg=msg) x1, x2, x3, x4
-20 if (msg /= 'Bad real number in item 4 of list input') call abort
+20 if (msg /= 'Bad real number in item 4 of list input') STOP 2
rewind(fd)
msg = 'ok'
read(fd, *, err=30, iomsg=msg) i1, x2, x1, a
-30 if (msg /= 'Bad logical value while reading item 4') call abort
+30 if (msg /= 'Bad logical value while reading item 4') STOP 3
rewind(fd)
read(fd, *, err=31, iomsg=msg) i1, x2, a, x1
-31 if (msg /= 'Bad repeat count in item 3 of list input') call abort
+31 if (msg /= 'Bad repeat count in item 3 of list input') STOP 4
close(fd)
open(unit=fd, status='scratch')
write(fd, '(A)') '(1, 2) (3.4, q)'
rewind(fd)
msg = 'ok'
read(fd, *, err=40, iomsg=msg) c1, c2
-40 if (msg /= 'Bad complex floating point number for item 2') call abort
+40 if (msg /= 'Bad complex floating point number for item 2') STOP 5
close(fd)
end program foo
contains
subroutine s(u)
class(t1), intent(in) :: u
- if(.not.u%l) call abort()
+ if(.not.u%l) STOP 1
select type(u); class is(t2)
- if(u%i.ne.2) call abort()
+ if(u%i.ne.2) STOP 2
select type(u); class is(t3)
- if(u%x.ne.3.5) call abort()
+ if(u%x.ne.3.5) STOP 3
end select
end select
end subroutine s
tmp(:) = 0.d0
call buggy(2.d0,asize,ave,old,tmp)
- if (any (tmp(:) .ne. 3.5)) call abort
+ if (any (tmp(:) .ne. 3.5)) STOP 1
end
subroutine buggy(scale_factor, asize, ave, old, tmp)
character(*), parameter :: u(*) = [ 'qwerty', 'asdfgh', 'zxcvbn']
character(*), parameter :: v(*) = ['','']
- if ((size(s) /= 2).or.(len(s)/=5)) call abort
- if ((size(t) /= 0).or.(len(t)/=31)) call abort
- if ((size(u) /= 3).or.(len(u)/=6)) call abort
- if ((size(v) /= 2).or.(len(v)/=0)) call abort
- if ((s(1)/='abcde').or.(s(2)/='fghij')) call abort
- if ((u(1)/='qwerty').or.(u(2)/='asdfgh').or.(u(3)/='zxcvbn')) call abort
+ if ((size(s) /= 2).or.(len(s)/=5)) STOP 1
+ if ((size(t) /= 0).or.(len(t)/=31)) STOP 2
+ if ((size(u) /= 3).or.(len(u)/=6)) STOP 3
+ if ((size(v) /= 2).or.(len(v)/=0)) STOP 4
+ if ((s(1)/='abcde').or.(s(2)/='fghij')) STOP 5
+ if ((u(1)/='qwerty').or.(u(2)/='asdfgh').or.(u(3)/='zxcvbn')) STOP 6
end program foo
m = n
n = i
end do
- if (abs (v(17, 23) + h(17, 23, 2) + 768.0d0) > 0.5d0) call abort
+ if (abs (v(17, 23) + h(17, 23, 2) + 768.0d0) > 0.5d0) STOP 1
contains
function foo(a)
double precision :: a(:,:)
type (T) :: d
c = foo ("test")
d = foo ("test")
- if (trim(c%b) .ne. "foo") call abort
+ if (trim(c%b) .ne. "foo") STOP 1
contains
type (T) function foo (x) result (v)
character(len=*), intent(in) :: x
300 format ("&!")
write(astring,100)
-if (astring.ne."& notblank !") call abort
+if (astring.ne."& notblank !") STOP 1
!print *, astring
write(astring,200)
-if (astring.ne."& !") call abort
+if (astring.ne."& !") STOP 2
!print *, astring
write(astring,300)
-if (astring.ne."&!") call abort
+if (astring.ne."&!") STOP 3
!print *, astring
end
character(len=100) :: buffer
write(buffer,*) i
- if (adjustl(buffer) /= adjustl(str)) call abort
+ if (adjustl(buffer) /= adjustl(str)) STOP 1
end subroutine
end
implicit none
real(8) x
x = 2.0d0**26.5d0
- if (floor(x) /= 94906265) call abort
- if (floor(2.0d0**26.5d0)/= 94906265) call abort
+ if (floor(x) /= 94906265) STOP 1
+ if (floor(2.0d0**26.5d0)/= 94906265) STOP 2
x = 777666555.6d0
- if (floor(x) /= 777666555) call abort
- if (floor(777666555.6d0) /= 777666555) call abort
+ if (floor(x) /= 777666555) STOP 3
+ if (floor(777666555.6d0) /= 777666555) STOP 4
x = 2000111222.6d0
- if (floor(x) /= 2000111222) call abort
- if (floor(2000111222.6d0) /= 2000111222) call abort
+ if (floor(x) /= 2000111222) STOP 5
+ if (floor(2000111222.6d0) /= 2000111222) STOP 6
end program t
integer(kind=k) :: i = 6
call mvbits(7_k,2,2,i,0)
- if (i /= 5) call abort
+ if (i /= 5) STOP 1
end
program p
use m
- if (f(1) /= 1) call abort
- if (e(1) /= 1.0) call abort
+ if (f(1) /= 1) STOP 1
+ if (e(1) /= 1.0) STOP 2
end
integer, parameter :: a(2) = [1, 2]
integer :: x(2)
x = a
- if (x(1) /= 1) call abort
+ if (x(1) /= 1) STOP 1
end block
end
integer, parameter :: n(3) = [1,2,3]
integer, parameter :: x(1) = 7
integer, parameter :: z(n(2):*) = x
- if (lbound(z,1) /= 2) call abort
+ if (lbound(z,1) /= 2) STOP 1
end
n = [2,1]
s1 = '1 5 2 6 3 0 4 0'
write(s2,'(8(I0,1x))') reshape ([1,2,3,4,5,6], [2,4], [0,0], [2,1])
- if (trim(s1) /= trim(s2)) call abort
+ if (trim(s1) /= trim(s2)) STOP 1
write(s2,'(8(I0,1x))') reshape ([1,2,3,4,5,6], [2,4], [0,0], n)
- if (trim(s1) /= trim(s2)) call abort
+ if (trim(s1) /= trim(s2)) STOP 2
write(s2,'(8(I0,1x))') reshape ([1,2,3,4,5,6], [2,4], [0,0], [n])
- if (trim(s1) /= trim(s2)) call abort
+ if (trim(s1) /= trim(s2)) STOP 3
end
! { dg-do run }
program foo
real, parameter :: x(3) = 2.0 * [real :: 1, 2, 3 ]
- if (any(x /= [2., 4., 6.])) call abort
+ if (any(x /= [2., 4., 6.])) STOP 1
end program foo
complex, parameter :: mci(3) = (4.5, 5.5) * [ integer :: 2, 2.5, (3.5, 4.0) ]
complex, parameter :: mcc(3) = (4.5, 5.5) * [ complex :: 2, 2.5, (3.5, 4.0) ]
- if (any(arr /= [2.00, 2.50, 1.50])) call abort
- if (any(ari /= [2.00, 2.00, 1.00])) call abort
- if (any(arc /= [2.00, 2.50, 1.50])) call abort
+ if (any(arr /= [2.00, 2.50, 1.50])) STOP 1
+ if (any(ari /= [2.00, 2.00, 1.00])) STOP 2
+ if (any(arc /= [2.00, 2.50, 1.50])) STOP 3
- if (any(air /= [2, 2, 1])) call abort
- if (any(aii /= [2, 2, 1])) call abort
- if (any(aic /= [2, 2, 1])) call abort
+ if (any(air /= [2, 2, 1])) STOP 4
+ if (any(aii /= [2, 2, 1])) STOP 5
+ if (any(aic /= [2, 2, 1])) STOP 6
- if (any(acr /= [(2.00, 0.00), (2.50, 0.00), (1.50, 0.00)])) call abort
- if (any(aci /= [(2.00, 0.00), (2.00, 0.00), (1.00, 0.00)])) call abort
- if (any(acc /= [(2.00, 0.00), (2.50, 0.00), (1.50, 2.50)])) call abort
+ if (any(acr /= [(2.00, 0.00), (2.50, 0.00), (1.50, 0.00)])) STOP 7
+ if (any(aci /= [(2.00, 0.00), (2.00, 0.00), (1.00, 0.00)])) STOP 8
+ if (any(acc /= [(2.00, 0.00), (2.50, 0.00), (1.50, 2.50)])) STOP 9
- if (any(mrr /= [9.00, 11.25, 15.75])) call abort
- if (any(mri /= [9.00, 9.00, 13.50])) call abort
- if (any(mrc /= [9.00, 11.25, 15.75])) call abort
+ if (any(mrr /= [9.00, 11.25, 15.75])) STOP 10
+ if (any(mri /= [9.00, 9.00, 13.50])) STOP 11
+ if (any(mrc /= [9.00, 11.25, 15.75])) STOP 12
- if (any(mir /= [8, 10, 14])) call abort
- if (any(mii /= [8, 8, 12])) call abort
- if (any(mic /= [8, 10, 14])) call abort
+ if (any(mir /= [8, 10, 14])) STOP 13
+ if (any(mii /= [8, 8, 12])) STOP 14
+ if (any(mic /= [8, 10, 14])) STOP 15
- if (any(mcr /= [(9.00, 11.00), (11.25, 13.75), (15.75, 19.25)])) call abort
- if (any(mci /= [(9.00, 11.00), ( 9.00, 11.00), (13.50, 16.50)])) call abort
- if (any(mcc /= [(9.00, 11.00), (11.25, 13.75), (-6.25, 37.25)])) call abort
+ if (any(mcr /= [(9.00, 11.00), (11.25, 13.75), (15.75, 19.25)])) STOP 16
+ if (any(mci /= [(9.00, 11.00), ( 9.00, 11.00), (13.50, 16.50)])) STOP 17
+ if (any(mcc /= [(9.00, 11.00), (11.25, 13.75), (-6.25, 37.25)])) STOP 18
end program p
use test
type(sometype) :: a(2, 2, 2)
- if (any(int (dosomething(a)) .ne. [1,2,3,4,5,6])) call abort
+ if (any(int (dosomething(a)) .ne. [1,2,3,4,5,6])) STOP 1
end
a = a ! This used to ICE.
a = inp
a = a ! This used to ICE too
- if ((len (a) .ne. 5) .or. (a .ne. "hello")) call abort
+ if ((len (a) .ne. 5) .or. (a .ne. "hello")) STOP 1
a = a(2:3) ! Make sure that temporary creation is not broken.
- if ((len (a) .ne. 2) .or. (a .ne. "el")) call abort
+ if ((len (a) .ne. 2) .or. (a .ne. "el")) STOP 2
deallocate (a)
a = a ! This would ICE too.
end subroutine s
val = set(1, 5)
if (val .ne. 12345) then
- call abort()
+ STOP 1
endif
val = set(1, 10)
if (val .ne. 5) then
- call abort()
+ STOP 2
endif
val = set(1, 100)
if (val .ne. 10) then
- call abort()
+ STOP 3
endif
end
nullptr = c_null_ptr
c = nullptr
rls = c_associated(c)
- if (rls) call abort
- if (c_associated(c)) call abort
+ if (rls) STOP 1
+ if (c_associated(c)) STOP 2
c = c_loc(rls)
- if (.not. c_associated(c)) call abort
+ if (.not. c_associated(c)) STOP 3
c = nullptr
- if (c_associated(c)) call abort
+ if (c_associated(c)) STOP 4
c = c_loc(t)
k => t
call association_test(k, c)
if(c_associated(b, c_loc(a))) then
return
else
- call abort
+ STOP 5
end if
end subroutine association_test
end
ivar1 = 6
call poly_sizeof(ivar1, ivar2)
- if (ivar2 /= 4) call abort
+ if (ivar2 /= 4) STOP 1
contains
ifloor_result = nint(real(ai-floor(real(ai)/real(bi))*bi))
do i=1,n
if (modulo_result(i) /= floor_result(i)) then
- call abort()
+ STOP 1
end if
if (imodulo_result(i) /= ifloor_result(i)) then
- call abort ()
+ STOP 2
end if
end do
end program pr82973
character :: c(3) = transfer('abc','z',3)
end type t
type(t) :: x
- if (any (x%c /= ["a", "b", "c"])) call abort ()
+ if (any (x%c /= ["a", "b", "c"])) STOP 1
end
character(len=1), parameter :: names1(*) = z% name
character(len=*), parameter :: names2(2) = z% name
character(len=*), parameter :: names3(*) = z% name
- if (.not. (names1(1) == "a" .and. names1(2) == "b")) call abort ()
- if (.not. (names2(1) == "a" .and. names2(2) == "b")) call abort ()
- if (.not. (names3(1) == "a" .and. names3(2) == "b")) call abort ()
+ if (.not. (names1(1) == "a" .and. names1(2) == "b")) STOP 1
+ if (.not. (names2(1) == "a" .and. names2(2) == "b")) STOP 2
+ if (.not. (names3(1) == "a" .and. names3(2) == "b")) STOP 3
end program charinit
subroutine foo (a)
type (*), dimension (..), contiguous :: a
integer(kind = 4) :: i
- if(sizeof (a) .ne. sizeof (i)) call abort
+ if(sizeof (a) .ne. sizeof (i)) STOP 1
end subroutine foo
end program
rewind (unit)
read (unit) check
close (unit)
- if (ival .ne. check) call abort
+ if (ival .ne. check) STOP 1
end subroutine proc
subroutine particle_write_raw (array, u)
contains
subroutine one(a)
integer a(1:3)
- if (any(a /= [1,2,3])) call abort()
+ if (any(a /= [1,2,3])) STOP 1
end subroutine one
end module m
integer a(:)
print *, lbound(a), ubound(a), size(a)
if ((lbound(a,dim=1) /= 1) .or. (ubound(a,dim=1) /= 3)) &
- call abort()
+ STOP 1
print *, a
- if (any(a /= [1,2,3])) call abort()
+ if (any(a /= [1,2,3])) STOP 2
end subroutine one
end module m
end function
end interface
procedure(ai) :: f
- if(any(f() /= [9,8,7])) call abort()
- if(size(f()) /= 3) call abort()
+ if(any(f() /= [9,8,7])) STOP 1
+ if(size(f()) /= 3) STOP 2
end
m=iachar('a')
do k=1,size(a)
do l=1,size(my_message)
- if (c(k)(l:l) /= achar(m)) call abort()
+ if (c(k)(l:l) /= achar(m)) STOP 1
m = m + 1
end do
end do
j = p(i,mysize)
do k=1,mysize(i)
- if (j(k) /= 2*i(k)) call abort()
+ if (j(k) /= 2*i(k)) STOP 1
end do
end
procedure(integer) :: p7
i=p1()
- if (i /= 5) call abort()
+ if (i /= 5) STOP 1
i=p2(3.1)
- if (i /= 3) call abort()
+ if (i /= 3) STOP 2
r=4.2
call p3(r)
- if (abs(r-5.2)>1e-6) call abort()
+ if (abs(r-5.2)>1e-6) STOP 3
call p4(r)
- if (abs(r-3.7)>1e-6) call abort()
+ if (abs(r-3.7)>1e-6) STOP 4
call p5()
call p6(r)
- if (abs(r-7.4)>1e-6) call abort()
+ if (abs(r-7.4)>1e-6) STOP 5
i=p7(4)
- if (i /= -8) call abort()
+ if (i /= -8) STOP 6
r=dummytest(p3)
- if (abs(r-2.1)>1e-6) call abort()
+ if (abs(r-2.1)>1e-6) STOP 7
contains
program test
use modproc
implicit none
- if(x() /= -5) call abort()
+ if(x() /= -5) STOP 1
end program test
implicit none
intrinsic sin
procedure(sin) :: t
- if (t(1.0) /= 1.0) call abort
+ if (t(1.0) /= 1.0) STOP 1
end program
EXTERNAL :: foo1,foo2
real :: foo2
- if(ASSOCIATED(ptr3)) call abort()
+ if(ASSOCIATED(ptr3)) STOP 1
NULLIFY(ptr1)
- if (ASSOCIATED(ptr1)) call abort()
+ if (ASSOCIATED(ptr1)) STOP 2
ptr1 => proc1
- if (.not. ASSOCIATED(ptr1)) call abort()
+ if (.not. ASSOCIATED(ptr1)) STOP 3
call ptr1 (str)
- if (str .ne. "proc1") call abort ()
+ if (str .ne. "proc1") STOP 4
ptr2 => NULL()
- if (ASSOCIATED(ptr2)) call abort()
+ if (ASSOCIATED(ptr2)) STOP 5
ptr2 => proc2
- if (.not. ASSOCIATED(ptr2,proc2)) call abort()
- if (10*ptr2 (10) .ne. 1000) call abort ()
+ if (.not. ASSOCIATED(ptr2,proc2)) STOP 6
+ if (10*ptr2 (10) .ne. 1000) STOP 7
ptr3 => NULL (ptr3)
- if (ASSOCIATED(ptr3)) call abort()
+ if (ASSOCIATED(ptr3)) STOP 8
ptr3 => proc3
- if (ptr3 (1.0, 2.0) .ne. (1.0, 2.0)) call abort ()
+ if (ptr3 (1.0, 2.0) .ne. (1.0, 2.0)) STOP 9
ptr4 => cos
- if (ptr4(0.0)/=1.0) call abort()
+ if (ptr4(0.0)/=1.0) STOP 10
ptr5 => foo1
call ptr5()
ptr6 => foo2
- if (ptr6()/=6.3) call abort()
+ if (ptr6()/=6.3) STOP 11
end program
subroutine proc4( arg1 )
procedure(real), pointer :: arg1
- if (arg1(0)/=7) call abort()
+ if (arg1(0)/=7) STOP 1
end subroutine proc4
end module myMod
procedure(integer),pointer :: p
p => foo()
-if (p(-1)/=1) call abort
+if (p(-1)/=1) STOP 1
contains
function foo() result(bar)
procedure(integer),pointer :: bar
PROCEDURE(triple), POINTER :: f
f => triple
- if (sum(f(2.,4.)-triple(2.,4.))>1E-3) call abort()
+ if (sum(f(2.,4.)-triple(2.,4.))>1E-3) STOP 1
CONTAINS
CALL set_ptr(forig,fset)
- if (forig(1,2) /= fset(1,2)) call abort()
+ if (forig(1,2) /= fset(1,2)) STOP 1
CONTAINS
call pptr2 (i)\r
pptr2 => sub2
call pptr2 (i)
- if (i .ne. 22) call abort\r
+ if (i .ne. 22) STOP 1
end subroutine test\r
subroutine sub2(arg)
integer arg
implicit none
procedure(returnMat), pointer :: pp
pp => returnMat
- if (sum(pp(2,2))/=4) call abort()
+ if (sum(pp(2,2))/=4) STOP 1
pp2 => returnMat
- if (sum(pp2(3,2))/=6) call abort()
+ if (sum(pp2(3,2))/=6) STOP 2
end program bugTest
pp => abc
print *,pp()
str = pp()
-if (str/='abcde') call abort()
+if (str/='abcde') STOP 1
contains
function abc()
character(len=5) :: abc
! Passing the function works
g=greater(4.,add(1.,2.))
- if (.not. g) call abort()
+ if (.not. g) STOP 1
! Passing the procedure pointer fails
f => add
g=greater(4.,f(1.,2.))
- if (.not. g) call abort()
+ if (.not. g) STOP 2
CONTAINS
procedure(intf), pointer :: p_fun2 => null()
if (associated(p_fun) .or. associated(p_fun2)) &
- call abort ()
+ STOP 1
end program main
fp => e1
-if (abs(fp(2.5)-7.5)>0.01) call abort()
+if (abs(fp(2.5)-7.5)>0.01) STOP 1
sp => e2
call sp(c,3.4)
-if (abs(c-4.6)>0.01) call abort()
+if (abs(c-4.6)>0.01) STOP 2
end
procedure(sub) :: sub2, pp
pointer :: pp
pp => sub2
-if (.not. associated(pp)) call abort ()
-if (.not. associated(pp,sub2)) call abort ()
+if (.not. associated(pp)) STOP 1
+if (.not. associated(pp,sub2)) STOP 2
call s(pp, .true.)
pp => null()
-if (associated(pp)) call abort ()
-if (associated(pp,sub2)) call abort ()
+if (associated(pp)) STOP 3
+if (associated(pp,sub2)) STOP 4
call s(pp, .false.)
end
logical :: isassoc
procedure(sub), pointer, intent(in) :: ss
procedure(sub) :: sub2
- if (isassoc .neqv. associated(ss)) call abort ()
- if (isassoc .neqv. associated(ss,sub2)) call abort ()
+ if (isassoc .neqv. associated(ss)) STOP 5
+ if (isassoc .neqv. associated(ss,sub2)) STOP 6
end subroutine s
subroutine sub2
res = my_AA%funct ()
- if (res%i .ne. 3) call abort
- if (.not.associated (res%funct)) call abort
- if (my_AA%i .ne. 4) call abort
- if (associated (my_AA%funct)) call abort
+ if (res%i .ne. 3) STOP 1
+ if (.not.associated (res%funct)) STOP 2
+ if (my_AA%i .ne. 4) STOP 3
+ if (associated (my_AA%funct)) STOP 4
contains
function foo(A)
actual%boog => boogImplementation
res = actual%boog () ! Failed on bug in expr.c:3933
- if (res%scalar .ne. onenineeight) call abort
+ if (res%scalar .ne. onenineeight) STOP 1
! Make sure that the procedure pointer is assigned correctly
- if (actual%scalar .ne. ninetynine) call abort
+ if (actual%scalar .ne. ninetynine) STOP 2
actual = res%boog ()
- if (actual%scalar .ne. onenineeight) call abort
+ if (actual%scalar .ne. onenineeight) STOP 3
! Deallocate so that we can use valgrind to check for memory leaks
deallocate (res%scalar, actual%scalar)
C = A
C%scalar = onenineeight
class default
- call abort
+ STOP 4
end select
end function
end
procedure(integer), pointer :: x => null()
if(first) then
- if(associated(x)) call abort()
+ if(associated(x)) STOP 1
x => hello
else
- if(.not. associated(x)) call abort()
+ if(.not. associated(x)) STOP 2
i = x()
- if(i /= 42) call abort()
+ if(i /= 42) STOP 3
end if
end subroutine test
ptr1 => foo
call s_in(ptr1,k)
-if (k /= 6) call abort()
+if (k /= 6) STOP 1
call s_out(ptr2)
-if (ptr2(-3.0) /= 3.0) call abort()
+if (ptr2(-3.0) /= 3.0) STOP 2
contains
procedure(Integer(c_int)), pointer :: ptr
call assignF(ptr)
- if(ptr() /= 42) call abort()
+ if(ptr() /= 42) STOP 1
ptr => f55
- if(ptr() /= 55) call abort()
+ if(ptr() /= 55) STOP 2
call foo(ptr)
- if(ptr() /= 65) call abort()
+ if(ptr() /= 65) STOP 3
contains
subroutine foo(a)
procedure(integer(c_int)), pointer :: a
- if(a() /= 55) call abort()
+ if(a() /= 55) STOP 4
a => f65
- if(a() /= 65) call abort()
+ if(a() /= 65) STOP 5
end subroutine foo
integer(c_int) function f55()
CALL init()
CALL C_F_PROCPOINTER(funpointer,ptype)
-if (ptype(3) /= 9) call abort()
+if (ptype(3) /= 9) STOP 1
! the stuff below was added with PR 42072
call setpointer(ptype2)
-if (ptype2(4) /= 12) call abort()
+if (ptype2(4) /= 12) STOP 2
contains
procedure(real), pointer :: p1,p2
integer :: a,b
common /com/ p1,p2,a,b
- if (a/=5 .or. b/=-9 .or. p1(0.0)/=1.0 .or. p2(0.0)/=0.0) call abort()
+ if (a/=5 .or. b/=-9 .or. p1(0.0)/=1.0 .or. p2(0.0)/=0.0) STOP 1
end subroutine one
program main
pp => x%ppc
call sub(1)
- if (sum/=1) call abort
+ if (sum/=1) STOP 1
call pp(2)
- if (sum/=3) call abort
+ if (sum/=3) STOP 2
call x%ppc(3)
- if (sum/=6) call abort
+ if (sum/=6) STOP 3
! calling object as argument
x%proc => sub2
call x%proc(x)
- if (x%i/=7) call abort
+ if (x%i/=7) STOP 4
! type extension
x%proc => sub
call x%proc(4)
- if (sum/=10) call abort
+ if (sum/=10) STOP 5
x2%proc => sub
call x2%proc(5)
- if (sum/=15) call abort
+ if (sum/=15) STOP 6
x2%proc2 => sub
call x2%proc2(6)
- if (sum/=21) call abort
+ if (sum/=21) STOP 7
contains
SUBROUTINE sub(i,arg2,arg3)
INTEGER, INTENT(in) :: i
INTEGER, INTENT(in), OPTIONAL :: arg2, arg3
- if (present(arg2)) call abort()
- if (.not. present(arg3)) call abort()
- if (2*i/=arg3) call abort()
+ if (present(arg2)) STOP 1
+ if (.not. present(arg3)) STOP 2
+ if (2*i/=arg3) STOP 3
END SUBROUTINE sub
END PROGRAM prog
testObj%test => returnMat
testCatch = testObj%test(2,2)
print *,testCatch
- if (sum(testCatch)/=4) call abort()
+ if (sum(testCatch)/=4) STOP 1
print *,testObj%test(3,3)
- if (sum(testObj%test(3,3))/=9) call abort()
+ if (sum(testObj%test(3,3))/=9) STOP 2
end program bugTest
o2 = o%ppc(o)
-if (o%data /= 1) call abort()
-if (o2%data /= 5) call abort()
-if (.not. associated(o%ppc)) call abort()
-if (associated(o2%ppc)) call abort()
+if (o%data /= 1) STOP 1
+if (o2%data /= 5) STOP 2
+if (.not. associated(o%ppc)) STOP 3
+if (associated(o2%ppc)) STOP 4
contains
obj1%proc => proc
call transfer_proc_ptr (obj2, obj1)
- if (obj2%proc()/=7) call abort()
+ if (obj2%proc()/=7) STOP 1
contains
x%ptr => abc
print *,x%ptr()
str = x%ptr()
- if (str/='abcde') call abort()
+ if (str/='abcde') STOP 1
end
character(len=4) :: str
x%ptr => abc
print *,x%ptr(4)
- if (x%ptr(4)/='abcd') call abort
+ if (x%ptr(4)/='abcd') STOP 1
str = x%ptr(3)
- if (str/='abc') call abort()
+ if (str/='abc') STOP 1
end
x%ptr => abc
print *,x%ptr(str)
strptr => x%ptr(str)
- if (strptr/='abcde') call abort()
+ if (strptr/='abcde') STOP 1
str = 'fghij'
- if (strptr/='fghij') call abort()
+ if (strptr/='fghij') STOP 2
end
o%f => add
g=greater(4.,o%f(1.,2.))
- if (.not. g) call abort()
+ if (.not. g) STOP 1
CONTAINS
o%f => three
g=greater(4.,o%f())
- if (.not. g) call abort()
+ if (.not. g) STOP 1
CONTAINS
! Check with interface from contained function\r
obj%ppc => fcn\r
base=obj%ppc(2)
- if (base/=4) call abort\r
+ if (base/=4) STOP 1
call foo (obj%ppc,3)\r
\r
! Check with abstract interface\r
obj%ppc1 => obj%ppc\r
base=obj%ppc1(4)
- if (base/=8) call abort\r
+ if (base/=8) STOP 1
call foo (obj%ppc1,5)\r
\r
! Check compatibility components with non-components \r
f => obj%ppc\r
base=f(6)
- if (base/=12) call abort\r
+ if (base/=12) STOP 1
call foo (f,7)
contains\r
subroutine foo (arg, i)
procedure (fcn), pointer :: arg
integer :: i
- if (arg(i)/=2*i) call abort
+ if (arg(i)/=2*i) STOP 1
end subroutine
\r
end\r
real, dimension(2) :: r
x%p => fun
r = evaluate (x%p)
- if (r(1) /= 5 .and. r(2) /= 6) call abort()
+ if (r(1) /= 5 .and. r(2) /= 6) STOP 1
contains
function fun ()
real, dimension(2) :: fun
allocate (template)
allocate (template%rng)
template%obs1_int => cos
- if (abs (template%obs1_int (arg) - cos (arg)) .gt. 1e-4) call abort
+ if (abs (template%obs1_int (arg) - cos (arg)) .gt. 1e-4) STOP 1
allocate (object, source = template)
- if (abs (object%obs1_int (arg) - cos (arg)) .gt. 1e-4) call abort
+ if (abs (object%obs1_int (arg) - cos (arg)) .gt. 1e-4) STOP 2
end
TYPE( sm_type ), DIMENSION( : ), ALLOCATABLE :: matrices_a, matrices_b
n_push_tot =2
ALLOCATE( matrices_a( n_push_tot + 1 ), matrices_b( n_push_tot + 1), STAT=istat )
- if (istat /= 0) call abort()
- if (.not. allocated(matrices_a)) call abort()
- if (.not. allocated(matrices_b)) call abort()
- if (associated(matrices_a(1)%dist%map_blk_to_proc)) call abort()
+ if (istat /= 0) STOP 1
+ if (.not. allocated(matrices_a)) STOP 2
+ if (.not. allocated(matrices_b)) STOP 3
+ if (associated(matrices_a(1)%dist%map_blk_to_proc)) STOP 4
END SUBROUTINE sm_multiply_a
END PROGRAM comp_proc_ptr_test
x%c%s => is
call x%c%s
-if (j/=5) call abort
+if (j/=5) STOP 1
x%c%f => if
j=x%c%f()
-if (j/=42) call abort
+if (j/=42) STOP 2
contains
x%proc => print_my_square
call x%proc(x, output_unit)
- if (calls/=2) call abort
+ if (calls/=2) STOP 1
end program main
f_array(3)%f => f_array(1)%f
r = f(1.,2.)
- if (abs(r-3.)>1E-3) call abort()
+ if (abs(r-3.)>1E-3) STOP 1
r = f_array(1)%f(4.,2.)
- if (abs(r-6.)>1E-3) call abort()
+ if (abs(r-6.)>1E-3) STOP 2
r = f_array(2)%f(5.,3.)
- if (abs(r-2.)>1E-3) call abort()
- if (abs(f_array(1)%f(1.,3.)-f_array(3)%f(2.,2.))>1E-3) call abort()
+ if (abs(r-2.)>1E-3) STOP 3
+ if (abs(f_array(1)%f(1.,3.)-f_array(3)%f(2.,2.))>1E-3) STOP 4
CONTAINS
ppt%f => triple
f => ppt%f
tres = f(2,[2.,4.])
- if (abs(tres(1)-6.)>1E-3) call abort()
- if (abs(tres(2)-12.)>1E-3) call abort()
+ if (abs(tres(1)-6.)>1E-3) STOP 1
+ if (abs(tres(2)-12.)>1E-3) STOP 2
tres = ppt%f(2,[3.,5.])
- if (abs(tres(1)-9.)>1E-3) call abort()
- if (abs(tres(2)-15.)>1E-3) call abort()
+ if (abs(tres(1)-9.)>1E-3) STOP 3
+ if (abs(tres(2)-15.)>1E-3) STOP 4
CONTAINS
call m%seti(6)
- if (m%i/=6) call abort()
+ if (m%i/=6) STOP 1
end program Test_03
subroutine print_me (arg, lun)
class(t), intent(in) :: arg
integer, intent(in) :: lun
- if (abs(arg%a-2.718)>1E-6) call abort()
+ if (abs(arg%a-2.718)>1E-6) STOP 1
write (lun,*) arg%a
end subroutine print_me
subroutine print_my_square (arg, lun)
class(t), intent(in) :: arg
integer, intent(in) :: lun
- if (abs(arg%a-2.718)>1E-6) call abort()
+ if (abs(arg%a-2.718)>1E-6) STOP 2
write (lun,*) arg%a**2
end subroutine print_my_square
subroutine my_obp_sub(w,x)
integer :: w
class(t) :: x
- if (x%name/="doodoo") call abort()
- if (w/=32) call abort()
+ if (x%name/="doodoo") STOP 1
+ if (w/=32) STOP 2
end subroutine
end
type(t) :: y
if(present(x)) then
print *, 'foo', x%i, y%i
- if (mod(x%i+y%i,3)/=2) call abort()
+ if (mod(x%i+y%i,3)/=2) STOP 1
else
print *, 'foo', y%i
- if (mod(y%i,3)/=1) call abort()
+ if (mod(y%i,3)/=1) STOP 2
end if
end subroutine foo
end module m
procedure(sub),pointer :: ps
p => a()
-if (p(-1)/=1) call abort()
+if (p(-1)/=1) STOP 1
p => b()
-if (p(-2)/=2) call abort()
+if (p(-2)/=2) STOP 2
p => c()
-if (p(-3)/=3) call abort()
+if (p(-3)/=3) STOP 3
ps => d()
x = 4
call ps(x)
-if (x/=16) call abort()
+if (x/=16) STOP 4
p => dd()
-if (p(-4)/=4) call abort()
+if (p(-4)/=4) STOP 5
ps => e(sub)
x = 5
call ps(x)
-if (x/=25) call abort()
+if (x/=25) STOP 6
p => ee()
-if (p(-5)/=5) call abort()
+if (p(-5)/=5) STOP 7
p => f()
-if (p(-6)/=6) call abort()
+if (p(-6)/=6) STOP 8
p => g()
-if (p(-7)/=7) call abort()
+if (p(-7)/=7) STOP 9
ps => h(sub)
x = 2
call ps(x)
-if (x/=4) call abort()
+if (x/=4) STOP 10
p => i()
-if (p(-8)/=8) call abort()
+if (p(-8)/=8) STOP 11
p => j()
-if (p(-9)/=9) call abort()
+if (p(-9)/=9) STOP 12
p => k(p2)
-if (p(-10)/=p2(-10)) call abort()
+if (p(-10)/=p2(-10)) STOP 13
p => l()
-if (p(-11)/=11) call abort()
+if (p(-11)/=11) STOP 14
contains
procedure(interf_iabs),pointer :: l
integer :: i
l => iabs
- if (l(-11)/=11) call abort()
+ if (l(-11)/=11) STOP 15
end function
end
integer :: k = 1
call my_sub(k)
- if (k/=3) call abort
+ if (k/=3) STOP 1
qsub => get_sub()
call qsub(k)
- if (k/=9) call abort
+ if (k/=9) STOP 2
end program test
recursive subroutine my_sub(j)
procedure(sub) :: s
integer :: b
call s(b)
- if (b /= 42) call abort()
+ if (b /= 42) STOP 1
end subroutine
subroutine caller2(f)
procedure(integer) :: f
- if (f() /= 42) call abort()
+ if (f() /= 42) STOP 2
end subroutine
subroutine caller3(f)
procedure(func),pointer :: f
- if (f() /= 42) call abort()
+ if (f() /= 42) STOP 3
end subroutine
function getPtr1()
procedure(sub), pointer :: getPtr1
pp => x%p()
-if (pp(-3) /= 3) call abort
+if (pp(-3) /= 3) STOP 1
contains
procedure(foo), pointer :: pp1
x%p => a ! ok
-if (x%p(0) .ne. loc(foo)) call abort
-if (x%p(1) .ne. loc(iabs)) call abort
+if (x%p(0) .ne. loc(foo)) STOP 1
+if (x%p(1) .ne. loc(iabs)) STOP 2
x%p => a(1) ! { dg-error "PROCEDURE POINTER mismatch in function result" }
pp => a(1) ! ok
-if (pp(-99) .ne. iabs(-99)) call abort
+if (pp(-99) .ne. iabs(-99)) STOP 3
pp1 => a(2) ! ok
-if (pp1(-99) .ne. -iabs(-99)) call abort
+if (pp1(-99) .ne. -iabs(-99)) STOP 4
pp => a ! { dg-error "PROCEDURE POINTER mismatch in function result" }
PRODUCT( rmatrix_prod_d1 ) == rmatrix_prod])
LOGICAL, PARAMETER :: r_empty_prod = PRODUCT(rmatrix, mask=.FALSE.) == 1.0
- IF (.NOT. ALL ([i_equal_prod, i_empty_prod])) CALL abort()
- IF (.NOT. ALL ([r_equal_prod, r_empty_prod])) CALL abort()
+ IF (.NOT. ALL ([i_equal_prod, i_empty_prod])) STOP 1
+ IF (.NOT. ALL ([r_equal_prod, r_empty_prod])) STOP 2
CALL ilib (imatrix, imatrix_prod)
CALL ilib_with_dim (imatrix, 1, imatrix_prod_d1)
SUBROUTINE ilib (array, result)
INTEGER, DIMENSION(:,:), INTENT(in) :: array
INTEGER, INTENT(in) :: result
- IF (PRODUCT(array) /= result) CALL abort()
+ IF (PRODUCT(array) /= result) STOP 3
END SUBROUTINE
SUBROUTINE ilib_with_dim (array, dim, result)
INTEGER, DIMENSION(:,:), INTENT(in) :: array
INTEGER, INTENT(iN) :: dim
INTEGER, DIMENSION(:), INTENT(in) :: result
- IF (ANY (PRODUCT (array, dim=dim) /= result)) CALL abort()
+ IF (ANY (PRODUCT (array, dim=dim) /= result)) STOP 4
END SUBROUTINE
SUBROUTINE rlib (array, result)
REAL, DIMENSION(:,:), INTENT(in) :: array
REAL, INTENT(in) :: result
- IF (ABS(PRODUCT(array) - result) > 2e-6) CALL abort()
+ IF (ABS(PRODUCT(array) - result) > 2e-6) STOP 5
END SUBROUTINE
SUBROUTINE rlib_with_dim (array, dim, result)
REAL, DIMENSION(:,:), INTENT(in) :: array
INTEGER, INTENT(iN) :: dim
REAL, DIMENSION(:), INTENT(in) :: result
- IF (ANY (ABS(PRODUCT (array, dim=dim) - result) > 2e-6)) CALL abort()
+ IF (ANY (ABS(PRODUCT (array, dim=dim) - result) > 2e-6)) STOP 6
END SUBROUTINE
END
integer i
real x
double precision d
- if (kind(l) /= 8) call abort
- if (kind(i) /= 8) call abort
- if (kind(x) /= 8) call abort
- if (kind(d) /= 8) call abort
+ if (kind(l) /= 8) STOP 1
+ if (kind(i) /= 8) STOP 2
+ if (kind(x) /= 8) STOP 3
+ if (kind(d) /= 8) STOP 4
end program a
real(kind=4) :: r4
real(kind=8) :: r8
double precision :: d
-if (kind(r4) /= 4) call abort
-if (kind(r8) /= 8) call abort
-if (kind(r) /= 16) call abort
-if (kind(d) /= 16) call abort
+if (kind(r4) /= 4) STOP 1
+if (kind(r8) /= 8) STOP 2
+if (kind(r) /= 16) STOP 3
+if (kind(d) /= 16) STOP 4
end
real(kind=4) :: r4
real(kind=8) :: r8
double precision :: d
-if (kind(r4) /= 4) call abort
-if (kind(r8) /= 8) call abort
-if (kind(r) /= 10) call abort
-if (kind(d) < 10) call abort
+if (kind(r4) /= 4) STOP 1
+if (kind(r8) /= 8) STOP 2
+if (kind(r) /= 10) STOP 3
+if (kind(d) < 10) STOP 4
end
! { dg-do run }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003 " }
! PR fortran/23994
!
! Test PROTECTED attribute. Within the module everything is allowed.
allocate(ap)
ap = 73
call increment(a,ap,at)
- if(a /= 44 .or. ap /= 74 .or. at /= 4) call abort()
+ if(a /= 44 .or. ap /= 74 .or. at /= 4) STOP 1
end subroutine setValue
subroutine increment(a1,a2,a3)
integer, intent(inout) :: a1, a2, a3
bp = 4
bt = 7
call setValue()
- if(a /= 44 .or. ap /= 74 .or. at /= 4) call abort()
+ if(a /= 44 .or. ap /= 74 .or. at /= 4) STOP 2
call plus5(ap)
- if(a /= 44 .or. ap /= 79 .or. at /= 4) call abort()
+ if(a /= 44 .or. ap /= 79 .or. at /= 4) STOP 3
call checkVal(a,ap,at)
contains
subroutine plus5(j)
end subroutine plus5
subroutine checkVal(x,y,z)
integer, intent(in) :: x, y, z
- if(a /= 44 .or. ap /= 79 .or. at /= 4) call abort()
+ if(a /= 44 .or. ap /= 79 .or. at /= 4) STOP 4
end subroutine
end program main
! { dg-do run }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003 " }
! PR fortran/23994
!
! Test PROTECTED attribute. Within the module everything is allowed.
allocate(ap)
ap = 73
call increment(a,ap,at)
- if(a /= 44 .or. ap /= 74 .or. at /= 4) call abort()
+ if(a /= 44 .or. ap /= 74 .or. at /= 4) STOP 1
end subroutine setValue
subroutine increment(a1,a2,a3)
integer, intent(inout) :: a1, a2, a3
use protmod
implicit none
call setValue()
- if(a /= 44 .or. ap /= 74 .or. at /= 4) call abort()
+ if(a /= 44 .or. ap /= 74 .or. at /= 4) STOP 2
call plus5(ap)
- if(a /= 44 .or. ap /= 79 .or. at /= 4) call abort()
+ if(a /= 44 .or. ap /= 79 .or. at /= 4) STOP 3
call checkVal(a,ap,at)
contains
subroutine plus5(j)
end subroutine plus5
subroutine checkVal(x,y,z)
integer, intent(in) :: x, y, z
- if(a /= 44 .or. ap /= 79 .or. at /= 4) call abort()
+ if(a /= 44 .or. ap /= 79 .or. at /= 4) STOP 4
end subroutine
end program main
! { dg-do compile }
-! { dg-options "-std=f2008 -fall-intrinsics" }
+! { dg-options "-std=f2008 " }
!
! PR fortran/46100
!
!
integer, target :: tgt
call one (two ())
-if (tgt /= 774) call abort ()
+if (tgt /= 774) STOP 1
contains
subroutine one (x)
integer, intent(inout) :: x
- if (x /= 34) call abort ()
+ if (x /= 34) STOP 2
x = 774
end subroutine one
function two ()
! { dg-do compile }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003 " }
!
! PR fortran/46100
!
!
integer, target :: tgt
call one (two ()) ! { dg-error "Fortran 2008: Pointer functions" }
-if (tgt /= 774) call abort ()
+if (tgt /= 774) STOP 1
contains
subroutine one (x)
integer, intent(inout) :: x
- if (x /= 34) call abort ()
+ if (x /= 34) STOP 2
x = 774
end subroutine one
function two ()
integer :: foobar, z, i, ifill(4) = [2, 7, 19, 61], ifill2(2) = [1,2]
type(mydt) :: dt
foobar (z) = z**2 ! { dg-warning "Obsolescent feature: Statement function" }
- if (any (a .ne. [1,2,3])) call abort
+ if (any (a .ne. [1,2,3])) STOP 1
! Assignment to pointer result is after procedure call.
foo (a) = 77
! Assignment within procedure applies.
b => foo (a)
- if (b .ne. 99) call abort
+ if (b .ne. 99) STOP 2
! Use of index for assignment.
bar (a, 2) = 99
- if (any (a .ne. [99,99,3])) call abort
+ if (any (a .ne. [99,99,3])) STOP 3
! Make sure that statement function still works!
- if (foobar (10) .ne. 100) call abort
+ if (foobar (10) .ne. 100) STOP 4
bar (a, 3) = foobar (9)
- if (any (a .ne. [99,99,81])) call abort
+ if (any (a .ne. [99,99,81])) STOP 5
! Try typebound procedure
call dt%create (6)
dt%elem_fill (3) = 42
- if (dt%i(3) .ne. 42) call abort
+ if (dt%i(3) .ne. 42) STOP 6
dt%elem_fill (3) = 42 + dt%elem_fill (3) ! PR63921 style assignment
- if (dt%i(3) .ne. 84) call abort
+ if (dt%i(3) .ne. 84) STOP 7
dt%elem_fill (3) = dt%elem_fill (3) - dt%elem_fill (3)
- if (dt%i(3) .ne. 0) call abort
+ if (dt%i(3) .ne. 0) STOP 8
! Array is now reset
dt%fill (3) = ifill ! Check with array variable rhs
dt%fill (1) = [2,1] ! Check with array constructor rhs
- if (any (dt%i .ne. [2,1,ifill])) call abort
+ if (any (dt%i .ne. [2,1,ifill])) STOP 9
dt%fill (1) = footoo (size (dt%i, 1)) ! Check with array function rhs
- if (any (dt%i .ne. [6,5,4,3,2,1])) call abort
+ if (any (dt%i .ne. [6,5,4,3,2,1])) STOP 10
dt%fill (3) = ifill + dt%fill (3) ! Array version of PR63921 assignment
- if (any (dt%i .ne. [6,5,6,10,21,62])) call abort
+ if (any (dt%i .ne. [6,5,6,10,21,62])) STOP 11
call dt%delete
contains
integer :: foobar, z, i, ifill(4) = [2, 7, 19, 61], ifill2(2) = [1,2]
type(mydt) :: dt
foobar (z) = z**2 ! { dg-warning "Obsolescent feature: Statement function" }
- if (any (a .ne. [1,2,3])) call abort
+ if (any (a .ne. [1,2,3])) STOP 1
! Assignment to pointer result is after procedure call.
foo (a) = 77 ! { dg-error "Pointer procedure assignment" }
! Assignment within procedure applies.
b => foo (a)
- if (b .ne. 99) call abort
+ if (b .ne. 99) STOP 2
! Use of index for assignment.
bar (a, 2) = 99 ! { dg-error "Pointer procedure assignment" }
- if (any (a .ne. [99,99,3])) call abort
+ if (any (a .ne. [99,99,3])) STOP 3
! Make sure that statement function still works!
- if (foobar (10) .ne. 100) call abort
+ if (foobar (10) .ne. 100) STOP 4
bar (a, 3) = foobar (9)! { dg-error "Pointer procedure assignment" }
- if (any (a .ne. [99,99,81])) call abort
+ if (any (a .ne. [99,99,81])) STOP 5
! Try typebound procedure
call dt%create (6)
dt%elem_fill (3) = 42 ! { dg-error "Pointer procedure assignment" }
- if (dt%i(3) .ne. 42) call abort
+ if (dt%i(3) .ne. 42) STOP 6
dt%elem_fill (3) = 42 + dt%elem_fill (3)! { dg-error "Pointer procedure assignment" }
- if (dt%i(3) .ne. 84) call abort
+ if (dt%i(3) .ne. 84) STOP 7
dt%elem_fill (3) = dt%elem_fill (3) - dt%elem_fill (3)! { dg-error "Pointer procedure assignment" }
- if (dt%i(3) .ne. 0) call abort
+ if (dt%i(3) .ne. 0) STOP 8
! Array is now reset
dt%fill (3) = ifill ! { dg-error "Pointer procedure assignment" }
dt%fill (1) = [2,1] ! { dg-error "Pointer procedure assignment" }
- if (any (dt%i .ne. [2,1,ifill])) call abort
+ if (any (dt%i .ne. [2,1,ifill])) STOP 9
dt%fill (1) = footoo (size (dt%i, 1)) ! { dg-error "Pointer procedure assignment" }
- if (any (dt%i .ne. [6,5,4,3,2,1])) call abort
+ if (any (dt%i .ne. [6,5,4,3,2,1])) STOP 10
dt%fill (3) = ifill + dt%fill (3) ! { dg-error "Pointer procedure assignment" }
- if (any (dt%i .ne. [6,5,6,10,21,62])) call abort
+ if (any (dt%i .ne. [6,5,6,10,21,62])) STOP 11
call dt%delete
contains
type(dt) :: sdt = dt(1)
func (arg=b) = 1 ! This was rejected as an unclassifiable statement
- if (a /= 1) call abort
+ if (a /= 1) STOP 1
func (b + b - 3) = -1
- if (a /= -1) call abort
+ if (a /= -1) STOP 2
dtfunc () = sdt ! Check that defined assignment is resolved
- if (tdt%data /= 2) call abort
+ if (tdt%data /= 2) STOP 3
contains
function func(arg) result(r)
integer, pointer :: r
character(2), dimension(2) :: a, b
a = 'ok'
b = fun(a)
- if (.not.all(b == 'ok')) call abort()
+ if (.not.all(b == 'ok')) STOP 1
contains
elemental function fun(a)
character(*), intent(in) :: a
implicit none
integer, dimension(2) :: b
b = fun(size(b))
- if (b(1) /= 1 .or. b(2) /= 2) call abort()
+ if (b(1) /= 1 .or. b(2) /= 2) STOP 1
contains
pure function fun(n)
integer, intent(in) :: n
integer :: a(3)
a = huj()
- if (.not. all(a == (/1, 2, 3/))) call abort()
+ if (.not. all(a == (/1, 2, 3/))) STOP 1
a = hoj()
- if (.not. all(a == (/1, 2, 3/))) call abort()
+ if (.not. all(a == (/1, 2, 3/))) STOP 2
end program pure_byref_3
! print '(3a)', '>',trim(str4),'<'
read (str1, *) fp3
- if (fp1 /= fp3) call abort()
+ if (fp1 /= fp3) STOP 1
read (str2, *) fp3
- if (fp1 /= fp3) call abort()
+ if (fp1 /= fp3) STOP 2
read (str3, *) fp4
- if (abs (fp2 - fp4)/fp2 > epsilon(fp2)) call abort()
+ if (abs (fp2 - fp4)/fp2 > epsilon(fp2)) STOP 3
read (str4, *) fp4
- if (abs (fp2 - fp4)/fp2 > epsilon(fp2)) call abort()
+ if (abs (fp2 - fp4)/fp2 > epsilon(fp2)) STOP 4
select case (qp)
case (8)
- if (str1 /= " 1.0000000000000000") call abort()
- if (str2 /= "1.0000000000000000") call abort()
- if (str3 /= " 1.4142135623730951") call abort()
- if (str4 /= "1.4142135623730951") call abort()
+ if (str1 /= " 1.0000000000000000") STOP 5
+ if (str2 /= "1.0000000000000000") STOP 6
+ if (str3 /= " 1.4142135623730951") STOP 7
+ if (str4 /= "1.4142135623730951") STOP 8
case (10)
- if (str1 /= " 1.00000000000000000000") call abort()
- if (str2 /= "1.00000000000000000000") call abort()
- if (str3 /= " 1.41421356237309504876") call abort()
- if (str4 /= "1.41421356237309504876") call abort()
+ if (str1 /= " 1.00000000000000000000") STOP 9
+ if (str2 /= "1.00000000000000000000") STOP 10
+ if (str3 /= " 1.41421356237309504876") STOP 11
+ if (str4 /= "1.41421356237309504876") STOP 12
case (16)
if (digits(1.0_qp) == 113) then
! IEEE 754 binary 128 format
! e.g. libquadmath/__float128 on i686/x86_64/ia64
- if (str1 /= " 1.00000000000000000000000000000000000") call abort()
- if (str2 /= "1.00000000000000000000000000000000000") call abort()
- if (str3 /= " 1.41421356237309504880168872420969798") call abort()
- if (str4 /= "1.41421356237309504880168872420969798") call abort()
+ if (str1 /= " 1.00000000000000000000000000000000000") STOP 13
+ if (str2 /= "1.00000000000000000000000000000000000") STOP 14
+ if (str3 /= " 1.41421356237309504880168872420969798") STOP 15
+ if (str4 /= "1.41421356237309504880168872420969798") STOP 16
else if (digits(1.0_qp) == 106) then
! IBM binary 128 format
- if (str1 /= " 1.0000000000000000000000000000000") call abort()
- if (str2 /= "1.0000000000000000000000000000000") call abort()
- if (str3(1:37) /= " 1.4142135623730950488016887242097") call abort()
- if (str4(1:34) /= "1.4142135623730950488016887242097") call abort()
+ if (str1 /= " 1.0000000000000000000000000000000") STOP 17
+ if (str2 /= "1.0000000000000000000000000000000") STOP 18
+ if (str3(1:37) /= " 1.4142135623730950488016887242097") STOP 19
+ if (str4(1:34) /= "1.4142135623730950488016887242097") STOP 20
end if
! Do a libm run-time test
real(qp), volatile :: fp2a
fp2a = 2.0_qp
fp2a = sqrt (fp2a)
- if (abs (fp2a - fp2) > sqrt(2.0_qp)-nearest(sqrt(2.0_qp),-1.0_qp)) call abort()
+ if (abs (fp2a - fp2) > sqrt(2.0_qp)-nearest(sqrt(2.0_qp),-1.0_qp)) STOP 21
end block
case default
- call abort()
+ STOP 22
end select
end program test_qp
! print *, 'same value read again: ', a, c
! print *, 'difference: looks OK now ', a-b(1)
if (abs (a-b(1))/a > epsilon(0.0_qp) &
- .or. abs (c-b(1))/c > epsilon (0.0_qp)) call abort()
+ .or. abs (c-b(1))/c > epsilon (0.0_qp)) STOP 1
end if
end program test_qp
call random_number(r10)
call random_number (r10(10))
- if (any ((r8 - r10) .gt. delta)) call abort
+ if (any ((r8 - r10) .gt. delta)) STOP 1
end if
end program random_3
call test_random_seed(get=check)
! With xorshift1024* the last seed value is special
seed(size) = check(size)
- if (any (seed /= check)) call abort
+ if (any (seed /= check)) STOP 1
contains
subroutine test_random_seed(size, put, get)
integer, optional :: size
! In the current xorshift1024* implementation the last seed value is
! special
seed(size) = check(size)
- if (any (seed /= check)) call abort
+ if (any (seed /= check)) STOP 1
contains
subroutine test_random_seed(size, put, get)
integer, optional :: size
complex :: x
character(len=80) :: t="(1.0E-7,4.0E-3)"
read(t,*) x
-if (real(x) /= 1.0e-7 .or. aimag(x)/=4.0e-3) call abort()
+if (real(x) /= 1.0e-7 .or. aimag(x)/=4.0e-3) STOP 1
END
write(str,fmt='(a)') i
i = 0
read ( unit=str(1:4), fmt='(a)' ) i4
- if (i4.ne.256) call abort
+ if (i4.ne.256) STOP 1
end program gfortran_710_io_bug
x = 0
y = 0
read(io, test)
- if (x.ne.10 .or. y.ne.10) call abort
+ if (x.ne.10 .or. y.ne.10) STOP 1
!
read(io, *) line
- if (line.ne.'done') call abort
+ if (line.ne.'done') STOP 2
!
read(io, *, iostat=ios) line
- if (ios/=iostat_end) call abort
+ if (ios/=iostat_end) STOP 3
rewind(io)
x = 0
y = 0
read(io, test)
- if (x.ne.10 .or. y.ne.10) call abort
+ if (x.ne.10 .or. y.ne.10) STOP 4
read(io, *, iostat=ios) line
- if (line.ne.'done') call abort
+ if (line.ne.'done') STOP 5
end
write(value,'(i3,a5)') j," 5 69"
read(value,*,end=20) intvalues
20 write(result,*) (intvalues(i),i=2,4)
- if (result.ne.(' 5 69 33')) call abort
+ if (result.ne.(' 5 69 33')) STOP 1
call cpu_time(finish)
- if ((finish-start).gt. 0.5) call abort
+ if ((finish-start).gt. 0.5) STOP 2
enddo
end program internalread
close(10)
stop
99 close(10)
- call abort()
+ STOP 1
end program test
write(15,*) " 'abcdefgh!' ' !klmnopq!'"
rewind(15)
read(15,*,iostat=ios) i, j
- if (ios.ne.5010) call abort
+ if (ios.ne.5010) STOP 1
read(15,*,iostat=ios) r, s
- if (ios.ne.5010) call abort
+ if (ios.ne.5010) STOP 2
read(15,*,iostat=ios) c, d
- if (ios.ne.5010) call abort
+ if (ios.ne.5010) STOP 3
read(15,*,iostat=ios) str1, str2
- if (ios.ne.0) call abort
+ if (ios.ne.0) STOP 4
if (str1.ne."abcdefgh!") print *, str1
if (str2.ne." !klmnopq!") print *, str2
close(15)
str1 = 4_"candy"
str2 = 4_"peppermint"
read(15,*,iostat=ios) i, j
- if (ios.ne.5010) call abort
+ if (ios.ne.5010) STOP 1
read(15,*,iostat=ios) r, s
- if (ios.ne.5010) call abort
+ if (ios.ne.5010) STOP 2
read(15,*,iostat=ios) c, d
- if (ios.ne.5010) call abort
+ if (ios.ne.5010) STOP 3
read(15,*,iostat=ios) str1, str2
- if (ios.ne.0) call abort
- if (str1.ne.4_"abcdefgh!") call abort
- if (str2.ne.str3) call abort
+ if (ios.ne.0) STOP 4
+ if (str1.ne.4_"abcdefgh!") STOP 5
+ if (str2.ne.str3) STOP 6
close(15)
end program
write(10,'(a)') "1, 235"
rewind(10)
read(10,'(3i2)') i1,i2,i3
- if(i1.ne.1) call abort()
- if(i2.ne.2) call abort()
- if(i3.ne.35) call abort()
+ if(i1.ne.1) STOP 1
+ if(i2.ne.2) STOP 2
+ if(i3.ne.35) STOP 3
rewind(10)
! Make sure commas are read in character strings.
write(10,'(a)') "1234,6789,"
rewind(10)
read(10,'(a10)') a1
- if(a1.ne."1234,6789,") call abort()
+ if(a1.ne."1234,6789,") STOP 4
end
open(unit=10, file='junko.dir',iostat=ios,action='read',access='stream')
if (ios.ne.0) then
call system('rmdir junko.dir')
- call abort
+ STOP 1
end if
read(10, iostat=ios) c
if (ios.ne.21.and.ios.ne.0) then
close(10, status='delete')
- call abort
+ STOP 2
end if
close(10, status='delete')
end program bug
! PR43320 Missing EOF on read from empty file.
open(8,status='scratch',form='formatted') ! Create empty file
read(8,'(a80)', end=123) ! Reading from an empty file should be an EOF
- call abort
+ STOP 1
123 continue
end
open(unit=11,status='scratch',form='unformatted')
write(11)data
read(11,end= 1000 )data
- call abort()
+ STOP 1
1000 continue
backspace 11
backspace 11
read(11,end= 1001 )data
1001 continue
read(11,end= 1002 )data
- call abort
+ STOP 1
1002 continue
- if (.not. all(data == -3)) call abort()
+ if (.not. all(data == -3)) STOP 2
close(11)
end
open(unit=11,status='scratch', form='unformatted')
write(11)data
read(11,end= 1000 )data
- call abort()
+ STOP 1
1000 continue
backspace 11
backspace 11
data = 0
read(11)data
- if (.not. all(data == -1)) call abort()
+ if (.not. all(data == -1)) STOP 2
read(11,end= 1002 )data
- call abort()
+ STOP 3
1002 continue
close(11)
end
write(11)data
write(11)data
read(11,end= 1000 )data
- call abort()
+ STOP 1
1000 continue
backspace 11
rewind 11
write(11)data
read(11,end= 1001 )data
- call abort()
+ STOP 2
1001 continue
data = 0
backspace 11
rewind 11
read(11,end= 1002 )data
- if (.not. all(data == -256)) call abort()
+ if (.not. all(data == -256)) STOP 3
1002 continue
read(11,end= 1003 )data
- call abort()
+ STOP 4
1003 continue
close(11)
end
open(unit=11,form='unformatted')
read(11, ERR=100) i1, i2, i3
- call abort()
+ STOP 1
100 continue
- if (i1 /= 1 .or. i2 /= 2) call abort
+ if (i1 /= 1 .or. i2 /= 2) STOP 1
read(11, ERR=110) i1, i2, i3
- call abort()
+ STOP 2
110 continue
- if (i1 /= 3 .or. i2 /= 4) call abort
+ if (i1 /= 3 .or. i2 /= 4) STOP 2
read(11, end=120) i3
- call abort()
+ STOP 3
120 close(11,status='delete')
end
a = "x"
line = 'ab'
read (line,'(A)',END=99) a
- call abort
+ STOP 1
99 continue
- if (any(a /= ['a','x','x'])) call abort
+ if (any(a /= ['a','x','x'])) STOP 2
end program main
! PR43320 Missing EOF on read from empty file.
open(8,status='scratch',form='formatted') ! Create empty file
read(8,'(a80)', end=123) ! Reading from an empty file should be an EOF
- call abort
+ STOP 1
123 continue
end
i = 54321
idum = 6789
read (10,'(2i5,4x)') i, idum ! Trailing 4x was setting EOF condition
- if (i /= 99999 .and. idum /= 9) call abort
+ if (i /= 99999 .and. idum /= 9) STOP 1
j = 12345
read (10,name) ! EOF condition tripped here.
- if (j /= 73) call abort
+ if (j /= 73) STOP 2
end program main
read(25,'(a)',end=100,err=101) line
k = k+1
enddo
- call abort
-100 if (k /= 5) call abort
+ STOP 1
+100 if (k /= 5) STOP 2
close(25, status="delete")
stop
-101 call abort
+101 STOP 3
end program test
open(99,file='test.dat')
read(99, '(T7,i2)') i
close(99, status="delete")
- if (i /= 0) call abort
+ if (i /= 0) STOP 1
read(str(1:0), '(T7,i1)') i
- if (i /= 0) call abort
+ if (i /= 0) STOP 2
read(str,'(i2,/,i2)',end=111) a, b
- call abort !stop 'ERROR: Expected EOF error (1)'
+ STOP 3!stop 'ERROR: Expected EOF error (1)'
111 continue
read(str2,'(i2,/,i2)',end=112) a, b
read(str2,'(i2,/,i2,/,i2)',end=113) a, b, c
- call abort !stop 'ERROR: Expected EOF error (2)'
+ STOP 4!stop 'ERROR: Expected EOF error (2)'
- 112 call abort !stop 'ERROR: Unexpected EOF (3)'
+ 112 STOP 5!stop 'ERROR: Unexpected EOF (3)'
113 continue
read(str,'(i2,/,i2)',end=121,pad='no') a, b
- call abort !stop 'ERROR: Expected EOF error (1)'
+ STOP 6!stop 'ERROR: Expected EOF error (1)'
121 continue
read(str2(:),'(i2,/,i2)', end=122, pad='no') a, b
goto 125
- 122 call abort !stop 'ERROR: Expected no EOF error (2)'
+ 122 STOP 7!stop 'ERROR: Expected no EOF error (2)'
125 continue
read(str2(:),'(i2,/,i2,/,i2)',end=123,pad='no') a, b, c
- call abort !stop 'ERROR: Expected EOF error (3)'
+ STOP 8!stop 'ERROR: Expected EOF error (3)'
123 continue
read(str(2:1),'(i2,/,i2)',end=131, pad='no') a, b
- call abort !stop 'ERROR: Expected EOF error (1)'
+ STOP 9!stop 'ERROR: Expected EOF error (1)'
131 continue
read(str2(:)(2:1),'(i2,/,i2)',end=132, pad='no') a, b
- call abort !stop 'ERROR: Expected EOF error (2)'
+ STOP 10!stop 'ERROR: Expected EOF error (2)'
132 continue
read(str2(:)(2:1),'(i2,/,i2,/,i2)',end=133,pad='no') a, b, c
- call abort !stop 'ERROR: Expected EOF error (3)'
+ STOP 11!stop 'ERROR: Expected EOF error (3)'
133 continue
read(str(2:1),'(i2,/,i2)',iostat=ios, pad='no') a, b
- if (ios /= IOSTAT_END) call abort !stop 'ERROR: expected iostat /= 0 (1)'
+ if (ios /= IOSTAT_END) STOP 12!stop 'ERROR: expected iostat /= 0 (1)'
read(str2(:)(2:1),'(i2,/,i2)',iostat=ios, pad='no') a, b
- if (ios /= IOSTAT_END) call abort !stop 'ERROR: expected iostat /= 0 (2)'
+ if (ios /= IOSTAT_END) STOP 13!stop 'ERROR: expected iostat /= 0 (2)'
read(str2(:)(2:1),'(i2,/,i2,/,i2)',iostat=ios,pad='no') a, b, c
- if (ios /= IOSTAT_END) call abort !stop 'ERROR: expected iostat /= 0 (2)'
+ if (ios /= IOSTAT_END) STOP 14!stop 'ERROR: expected iostat /= 0 (2)'
! print *, "success"
end
character*8 :: a
equivalence (buf,abuf)
read(buf, '(a8)') a
- if (a.ne.'0123') call abort()
+ if (a.ne.'0123') STOP 1
end program pr24489
real(kind=8) d
s = "-.18774312893273 "
read(unit=s, fmt='(g20.14)') d
- if (d + 0.18774312893273d0 .gt. 1d-13) call abort
+ if (d + 0.18774312893273d0 .gt. 1d-13) STOP 1
end program
print *, y
if (abs (x - should_be) > eps .or. abs (y - should_be) > eps) then
- call abort ()
+ STOP 1
end if
end
print *, output
if (output /= should_be) then
print *, should_be
- call abort ()
+ STOP 1
end if
end
r = 0
str = '1.0q0'
read(str, *, iostat=i) r
- if (r /= 1.0 .or. i /= 0) call abort()
+ if (r /= 1.0 .or. i /= 0) STOP 1
!print *, r
end
rewind(10)
read(10,'(7f10.3)') x8
write (output, '("x4 =",7G6.0)') x4
-if (output.ne."x4 = Inf NaN Inf NaN -Inf NaN Inf") call abort
+if (output.ne."x4 = Inf NaN Inf NaN -Inf NaN Inf") STOP 1
write (output, '("x8 =",7G6.0)') x8
-if (output.ne."x8 = Inf NaN Inf NaN -Inf NaN Inf") call abort
+if (output.ne."x8 = Inf NaN Inf NaN -Inf NaN Inf") STOP 2
!print '("x4 =",7G6.0)', x4
!print '("x8 =",7G6.0)', x8
end program pr43298
read (20, fmt=*) s
close (20, status='delete')
if (trim(s) /= "a") then
- call abort ()
+ STOP 1
end if
call genfil ('1')
read (20, fmt=*) ii
close (20, status='delete')
if (ii /= 1) then
- call abort ()
+ STOP 2
end if
call genfil ('1.5')
read (20, fmt=*) rr
close (20, status='delete')
if (rr /= 1.5) then
- call abort ()
+ STOP 3
end if
call genfil ('T')
read (20, fmt=*) ll
close (20, status='delete')
if (.not. ll) then
- call abort ()
+ STOP 4
end if
contains
l = .true.
strg = "false"
read (strg,*) l
- if (l) call abort()
+ if (l) STOP 1
strg = "true"
read (strg,*) l
- if (.not.l) call abort()
+ if (.not.l) STOP 2
end
rewind 2
read(2) a
read(2) b
- if (a(1).ne.1) call abort()
- if (a(2).ne.3) call abort()
- if (b(1).ne.2) call abort()
- if (b(2).ne.5) call abort()
- if (a(3000).ne.1234) call abort()
- if (b(2048).ne.5678) call abort()
+ if (a(1).ne.1) STOP 1
+ if (a(2).ne.3) STOP 2
+ if (b(1).ne.2) STOP 3
+ if (b(2).ne.5) STOP 4
+ if (a(3000).ne.1234) STOP 5
+ if (b(2048).ne.5678) STOP 6
close(2, status='delete')
end
buffer = 'abcdefg'
read (unit,"(a)",advance="no",iostat=ios1, pad="yes") buffer
- if (ios1 /= iostat_eor .and. buffer /= "Line-1") call abort
+ if (ios1 /= iostat_eor .and. buffer /= "Line-1") STOP 1
buffer = '<'
read (unit,"(a)",advance="no",iostat=ios2,pad="yes") buffer
- if (ios2 /= iostat_eor .and. buffer /= "Line-2") call abort
+ if (ios2 /= iostat_eor .and. buffer /= "Line-2") STOP 2
buffer = '5678'
read (unit,"(a)",advance="no",iostat=ios3, iomsg=themessage) buffer
- if (ios3 /= iostat_end .and. buffer /= "5678") call abort
+ if (ios3 /= iostat_end .and. buffer /= "5678") STOP 3
rewind(10)
buffer = "abcdefg"
read (unit,"(a)",advance="no",iostat=ios1, pad="no") buffer
- if (ios1 /= iostat_eor .and. buffer /= "abcdefg") call abort
+ if (ios1 /= iostat_eor .and. buffer /= "abcdefg") STOP 4
buffer = '<'
read (unit,"(a)",advance="no",iostat=ios2,pad="no") buffer
- if (ios2 /= iostat_eor .and. buffer /= "<") call abort
+ if (ios2 /= iostat_eor .and. buffer /= "<") STOP 5
buffer = '1234'
read (unit,"(a)",advance="no",iostat=ios3, iomsg=themessage) buffer
- if (ios3 <= 0 .and. buffer /= "1234") call abort
+ if (ios3 <= 0 .and. buffer /= "1234") STOP 6
close(unit, status="delete")
end program eieio_stat
do
i = i + 1
10 read(unit = 11, fmt = '(a)', advance = 'no', end = 99, eor = 11) chr
- if (chr.ne.correct(i:i)) call abort()
+ if (chr.ne.correct(i:i)) STOP 1
cycle
11 continue
end do
read(10,*) (iarr(i), i=1,7)
read(10,*) ia, ib
- if (any(iarr(1:2).ne.1)) call abort
- if (any(iarr(3:5).ne.2)) call abort
- if (any(iarr(6:7).ne.0)) call abort
- if (ia .ne. 12 .or. ib .ne. 13) call abort
+ if (any(iarr(1:2).ne.1)) STOP 1
+ if (any(iarr(3:5).ne.2)) STOP 2
+ if (any(iarr(6:7).ne.0)) STOP 3
+ if (ia .ne. 12 .or. ib .ne. 13) STOP 4
close(10)
end program rread
rewind (99)
read (99,*) a(:)
close (99)
- if (any (a /= cmplx (1.0,2.0))) call abort()
+ if (any (a /= cmplx (1.0,2.0))) STOP 1
end program test
write (10, '(a)') trim(line)
rewind (10)
read (10, '(a)', advance = 'no', size = nchars, eor = 998) buffer
- call abort()
-998 if (nchars.ne.44) call abort()
+ STOP 1
+998 if (nchars.ne.44) STOP 2
rewind (10)
buffer = "how about some random text here just to be sure on this one."
nchars = 80
read (10, '(a)', advance = 'no', size = nchars, eor = 999) buffer(:nchars)
-999 if (nchars.ne.44) call abort()
- if (buffer.ne.line) call abort()
+999 if (nchars.ne.44) STOP 3
+ if (buffer.ne.line) STOP 4
close (10)
end
do i=1,10
read(23,'(1x)',end=12)
enddo
-12 if (i.ne.4) call abort
+12 if (i.ne.4) STOP 1
end
a = ""
read(10,20)(a(i),i=1,4)
- if (a(4).ne."jkl") call abort()
+ if (a(4).ne."jkl") STOP 1
rewind(10)
a = ""
read(10,30)(a(i),i=1,4)
- if (a(4).ne."jkl") call abort()
+ if (a(4).ne."jkl") STOP 2
20 format(1x,a3,1x,a3,1x,a3,1x,a3,10x)
30 format(1x,a3,1x,a3,1x,a3,1x,a3)
integer i,j
open (10, form="unformatted", access="direct", recl=4)
write (10, rec=1, err=10) 1,2
- call abort()
+ STOP 1
10 continue
read (10, rec=1, err=20) i, j
- call abort()
+ STOP 2
20 continue
close (10, status="delete")
end
data rp /+ 1.0, + 1d0, + 1.d0, + 10.d-1/
real, parameter :: del = 1.e-5
- if (abs(c0 - cmplx(-0.5,-0.5)) > del) call abort
- if (abs(c1 - cmplx(-0.5,+0.5)) > del) call abort
- if (abs(c2 - cmplx(-0.5E2,+0.5)) > del) call abort
- if (abs(c3 - cmplx(-0.5,+0.5E-2)) > del) call abort
- if (abs(c4 - cmplx(-1.0,+1.0)) > del) call abort
- if (any (abs (rp - 1.0) > del)) call abort
- if (any (abs (rn + 1.0) > del)) call abort
+ if (abs(c0 - cmplx(-0.5,-0.5)) > del) STOP 1
+ if (abs(c1 - cmplx(-0.5,+0.5)) > del) STOP 2
+ if (abs(c2 - cmplx(-0.5E2,+0.5)) > del) STOP 3
+ if (abs(c3 - cmplx(-0.5,+0.5E-2)) > del) STOP 4
+ if (abs(c4 - cmplx(-1.0,+1.0)) > del) STOP 5
+ if (any (abs (rp - 1.0) > del)) STOP 6
+ if (any (abs (rn + 1.0) > del)) STOP 7
end program
data rp /+ 1.0, + 1d0, + 1.d0, + 10.d-1/
real, parameter :: del = 1.e-5
- if (abs(c0 - cmplx(-0.5,-0.5)) > del) call abort
- if (abs(c1 - cmplx(-0.5,+0.5)) > del) call abort
- if (abs(c2 - cmplx(-0.5E2,+0.5)) > del) call abort
- if (abs(c3 - cmplx(-0.5,+0.5E-2)) > del) call abort
- if (abs(c4 - cmplx(-1.0,+1.0)) > del) call abort
- if (any (abs (rp - 1.0) > del)) call abort
- if (any (abs (rn + 1.0) > del)) call abort
+ if (abs(c0 - cmplx(-0.5,-0.5)) > del) STOP 1
+ if (abs(c1 - cmplx(-0.5,+0.5)) > del) STOP 2
+ if (abs(c2 - cmplx(-0.5E2,+0.5)) > del) STOP 3
+ if (abs(c3 - cmplx(-0.5,+0.5E-2)) > del) STOP 4
+ if (abs(c4 - cmplx(-1.0,+1.0)) > del) STOP 5
+ if (any (abs (rp - 1.0) > del)) STOP 6
+ if (any (abs (rn + 1.0) > del)) STOP 7
end program
b = 1/exp(1000.0)
write(str,*) a
- if (trim(adjustl(str)) .ne. 'Infinity') call abort
+ if (trim(adjustl(str)) .ne. 'Infinity') STOP 1
- if (b .ne. 0.) call abort
+ if (b .ne. 0.) STOP 2
write(str,*) -1.0/b
- if (trim(adjustl(str)) .ne. '-Infinity') call abort
+ if (trim(adjustl(str)) .ne. '-Infinity') STOP 3
write(str,*) b/0.0
- if (trim(adjustl(str)) .ne. 'NaN') call abort
+ if (trim(adjustl(str)) .ne. 'NaN') STOP 4
write(str,*) 0.0/0.0
- if (trim(adjustl(str)) .ne. 'NaN') call abort
+ if (trim(adjustl(str)) .ne. 'NaN') STOP 5
write(str,*) 1.0/(-0.)
- if (trim(adjustl(str)) .ne. '-Infinity') call abort
+ if (trim(adjustl(str)) .ne. '-Infinity') STOP 6
write(str,*) -2.0/0.
- if (trim(adjustl(str)) .ne. '-Infinity') call abort
+ if (trim(adjustl(str)) .ne. '-Infinity') STOP 7
write(str,*) 3.0/0.
- if (trim(adjustl(str)) .ne. 'Infinity') call abort
+ if (trim(adjustl(str)) .ne. 'Infinity') STOP 8
write(str,*) nan
- if (trim(adjustl(str)) .ne. 'NaN') call abort
+ if (trim(adjustl(str)) .ne. 'NaN') STOP 9
write(str,*) z
- if (trim(adjustl(str)) .ne. '(NaN,NaN)') call abort
+ if (trim(adjustl(str)) .ne. '(NaN,NaN)') STOP 10
write(str,*) z2
- if (trim(adjustl(str)) .ne. '(NaN,NaN)') call abort
+ if (trim(adjustl(str)) .ne. '(NaN,NaN)') STOP 11
write(str,*) z3
- if (trim(adjustl(str)) .ne. '(Inf,-Inf)') call abort
+ if (trim(adjustl(str)) .ne. '(Inf,-Inf)') STOP 12
write(str,*) z4
- if (trim(adjustl(str)) .ne. '(0.00000000,-0.00000000)') call abort
+ if (trim(adjustl(str)) .ne. '(0.00000000,-0.00000000)') STOP 13
end program main
y = y + 0.1
n = n + 1
end do
- if (n .ne. 11) call abort()
+ if (n .ne. 11) STOP 1
contains
subroutine check (a, b)
real, intent(in) :: a, b
- if (abs (a - b) .gt. 0.00001) call abort()
+ if (abs (a - b) .gt. 0.00001) STOP 2
end subroutine
end program
integer I, A(10)
A = 2
I=A(1.0) ! { dg-warning "Extension" }
- if (i/=2) call abort ()
+ if (i/=2) STOP 1
end
mat = reshape (src, [2,2])
a = [4,3,2,1]
- if (size(a, 1) .ne. 4) call abort
- if (any (a .ne. [4,3,2,1])) call abort
+ if (size(a, 1) .ne. 4) STOP 1
+ if (any (a .ne. [4,3,2,1])) STOP 2
a = [((42 - i), i = 1, 10)]
- if (size(a, 1) .ne. 10) call abort
- if (any (a .ne. [((42 - i), i = 1, 10)])) call abort
+ if (size(a, 1) .ne. 10) STOP 3
+ if (any (a .ne. [((42 - i), i = 1, 10)])) STOP 4
b = a
- if (size(b, 1) .ne. 10) call abort
- if (any (b .ne. a)) call abort
+ if (size(b, 1) .ne. 10) STOP 5
+ if (any (b .ne. a)) STOP 6
a = [4,3,2,1]
- if (size(a, 1) .ne. 4) call abort
- if (any (a .ne. [4,3,2,1])) call abort
+ if (size(a, 1) .ne. 4) STOP 7
+ if (any (a .ne. [4,3,2,1])) STOP 8
a = b
- if (size(a, 1) .ne. 10) call abort
- if (any (a .ne. [((42 - i), i = 1, 10)])) call abort
+ if (size(a, 1) .ne. 10) STOP 9
+ if (any (a .ne. [((42 - i), i = 1, 10)])) STOP 10
j = 20
a = [(i, i = 1, j)]
- if (size(a, 1) .ne. j) call abort
- if (any (a .ne. [(i, i = 1, j)])) call abort
+ if (size(a, 1) .ne. j) STOP 11
+ if (any (a .ne. [(i, i = 1, j)])) STOP 12
a = foo (15)
- if (size(a, 1) .ne. 15) call abort
- if (any (a .ne. [((i + 15), i = 1, 15)])) call abort
+ if (size(a, 1) .ne. 15) STOP 13
+ if (any (a .ne. [((i + 15), i = 1, 15)])) STOP 14
a = src
- if (lbound(a, 1) .ne. lbound(src, 1)) call abort
- if (ubound(a, 1) .ne. ubound(src, 1)) call abort
- if (any (a .ne. [11,12,13,14])) call abort
+ if (lbound(a, 1) .ne. lbound(src, 1)) STOP 15
+ if (ubound(a, 1) .ne. ubound(src, 1)) STOP 16
+ if (any (a .ne. [11,12,13,14])) STOP 17
k = 7
a = b(k:8)
- if (lbound(a, 1) .ne. lbound (b(k:8), 1)) call abort
- if (ubound(a, 1) .ne. ubound (b(k:8), 1)) call abort
- if (any (a .ne. [35,34])) call abort
+ if (lbound(a, 1) .ne. lbound (b(k:8), 1)) STOP 18
+ if (ubound(a, 1) .ne. ubound (b(k:8), 1)) STOP 19
+ if (any (a .ne. [35,34])) STOP 20
c = mat
- if (any (lbound (c) .ne. lbound (mat))) call abort
- if (any (ubound (c) .ne. ubound (mat))) call abort
- if (any (c .ne. mat)) call abort
+ if (any (lbound (c) .ne. lbound (mat))) STOP 21
+ if (any (ubound (c) .ne. ubound (mat))) STOP 22
+ if (any (c .ne. mat)) STOP 23
deallocate (c)
c = mat(2:,:)
- if (any (lbound (c) .ne. lbound (mat(2:,:)))) call abort
+ if (any (lbound (c) .ne. lbound (mat(2:,:)))) STOP 24
chr1 = chr2(2:1:-1)
- if (lbound(chr1, 1) .ne. 1) call abort
- if (any (chr1 .ne. chr2(2:1:-1))) call abort
+ if (lbound(chr1, 1) .ne. 1) STOP 25
+ if (any (chr1 .ne. chr2(2:1:-1))) STOP 26
b = c(1, :) + c(2, :)
- if (lbound(b, 1) .ne. lbound (c(1, :) + c(2, :), 1)) call abort
- if (any (b .ne. c(1, :) + c(2, :))) call abort
+ if (lbound(b, 1) .ne. lbound (c(1, :) + c(2, :), 1)) STOP 27
+ if (any (b .ne. c(1, :) + c(2, :))) STOP 28
contains
function foo (n) result(res)
integer(4), allocatable, dimension(:) :: res
b(1,2,3) = one
allocate (a(size (b, 3), size (b, 2), size (b, 1)))
a = reshape (b, shape (a), order = [3, 2, 1])
- if (any (a(:, 2, 1) .ne. [zero, zero, one, zero, zero])) call abort
- if (a(3, 2, 1) /= one) call abort()
- if (sum (abs (a)) /= one) call abort()
+ if (any (a(:, 2, 1) .ne. [zero, zero, one, zero, zero])) STOP 1
+ if (a(3, 2, 1) /= one) STOP 1
+ if (sum (abs (a)) /= one) STOP 2
end program
! Shape conforms so bounds follow allocation.
allocate (a(7:9))
a = reshape( b, shape=[size(b)])
- if (any ([lbound(a), ubound(a), size(a), shape (a)] .ne. [7,9,3,3])) call abort
+ if (any ([lbound(a), ubound(a), size(a), shape (a)] .ne. [7,9,3,3])) STOP 1
deallocate (a)
! 'a' not allocated so lbound defaults to 1.
a = reshape( b, shape=[size(b)])
- if (any ([lbound(a), ubound(a), size(a), shape (a)] .ne. [1,3,3,3])) call abort
+ if (any ([lbound(a), ubound(a), size(a), shape (a)] .ne. [1,3,3,3])) STOP 2
deallocate (a)
! Shape conforms so bounds follow allocation.
allocate (a(0:0))
a(0) = 1
- if (any ([lbound(a), ubound(a), size(a), shape (a)] .ne. [0,0,1,1])) call abort
+ if (any ([lbound(a), ubound(a), size(a), shape (a)] .ne. [0,0,1,1])) STOP 3
! 'a' not allocated so lbound defaults to 1.
e = matmul (c(2:5,:), d(:, 3:4))
- if (any ([lbound(e), ubound(e), size(e), shape (e)] .ne. [1,1,4,2,8,4,2])) call abort
+ if (any ([lbound(e), ubound(e), size(e), shape (e)] .ne. [1,1,4,2,8,4,2])) STOP 4
deallocate (e)
! Shape conforms so bounds follow allocation.
allocate (e(4:7, 11:12))
e = matmul (c(2:5,:), d(:, 3:4))
- if (any ([lbound(e), ubound(e), size(e), shape (e)] .ne. [4,11,7,12,8,4,2])) call abort
+ if (any ([lbound(e), ubound(e), size(e), shape (e)] .ne. [4,11,7,12,8,4,2])) STOP 5
end
B = RESHAPE(A, [n1,n2,n3])
- if (any (shape (B) /= [n1,n2,n3])) call abort ()
- if (any (ubound (B) /= [n1,n2,n3])) call abort ()
- if (any (lbound (B) /= [1,1,1])) call abort ()
+ if (any (shape (B) /= [n1,n2,n3])) STOP 1
+ if (any (ubound (B) /= [n1,n2,n3])) STOP 2
+ if (any (lbound (B) /= [1,1,1])) STOP 3
lc = 0
DO m3=1,n3
lc = lc+1
DO m1=1,n1
! PRINT *,'A(',m1,',',lc,') = ',A(m1,lc),' B = ',B(m1,m2,m3)
- if (A(m1,lc) /= B(m1,m2,m3)) call abort ()
+ if (A(m1,lc) /= B(m1,m2,m3)) STOP 4
END DO
END DO
END DO
B = RESHAPE(A, [n1,n2,n3])
- if (any (shape (B) /= [n1,n2,n3])) call abort ()
- if (any (ubound (B) /= [n1,n2,n3])) call abort ()
- if (any (lbound (B) /= [1,1,1])) call abort ()
+ if (any (shape (B) /= [n1,n2,n3])) STOP 5
+ if (any (ubound (B) /= [n1,n2,n3])) STOP 6
+ if (any (lbound (B) /= [1,1,1])) STOP 7
lc = 0
DO m3=1,n3
lc = lc+1
DO m1=1,n1
! PRINT *,'A(',m1,',',lc,') = ',A(m1,lc),' B = ',B(m1,m2,m3)
- if (A(m1,lc) /= B(m1,m2,m3)) call abort ()
+ if (A(m1,lc) /= B(m1,m2,m3)) STOP 8
END DO
END DO
END DO
conc = [ xx, yy ]
- if (any (int (10.0*conc(1)%a) .ne. [10,20])) call abort
- if (any (int (10.0*conc(2)%a) .ne. [40,49])) call abort
+ if (any (int (10.0*conc(1)%a) .ne. [10,20])) STOP 1
+ if (any (int (10.0*conc(2)%a) .ne. [40,49])) STOP 2
!CALL MPI_FINALIZE(i)
x = x2
s = s+x(2)%headers(2)%parts(2)
end do
- if (s .ne. 40000) call abort
+ if (s .ne. 40000) STOP 1
contains
!
! TODO - these assignments lose 1872 bytes on x86_64/FC17
x = t()
y = [ t :: ]
-if (.not. allocated (x)) call abort ()
-if (.not. allocated (y)) call abort ()
+if (.not. allocated (x)) STOP 1
+if (.not. allocated (y)) STOP 2
end
! { dg-final { scan-tree-dump "x = \\(struct t .\\) __builtin_malloc \\(1\\);" "original" } }
real :: a(10) = 1, b(51:60) = 2
real, allocatable :: c(:), d(:)
c=a
- if (lbound (c, 1) .ne. lbound(a, 1)) call abort
- if (ubound (c, 1) .ne. ubound(a, 1)) call abort
+ if (lbound (c, 1) .ne. lbound(a, 1)) STOP 1
+ if (ubound (c, 1) .ne. ubound(a, 1)) STOP 2
c=b
! 7.4.1.3 "If variable is an allocated allocatable variable, it is
! deallocated if expr is an array of different shape or any of the
! differ." Here the shape is the same so the deallocation does not
! occur and the bounds are not recalculated. This was corrected
! for the fix of PR47051.
- if (lbound (c, 1) .ne. lbound(a, 1)) call abort
- if (ubound (c, 1) .ne. ubound(a, 1)) call abort
+ if (lbound (c, 1) .ne. lbound(a, 1)) STOP 3
+ if (ubound (c, 1) .ne. ubound(a, 1)) STOP 4
d=b
- if (lbound (d, 1) .ne. lbound(b, 1)) call abort
- if (ubound (d, 1) .ne. ubound(b, 1)) call abort
+ if (lbound (d, 1) .ne. lbound(b, 1)) STOP 5
+ if (ubound (d, 1) .ne. ubound(b, 1)) STOP 6
d=a
! The other PR47051 correction.
- if (lbound (d, 1) .ne. lbound(b, 1)) call abort
- if (ubound (d, 1) .ne. ubound(b, 1)) call abort
+ if (lbound (d, 1) .ne. lbound(b, 1)) STOP 7
+ if (ubound (d, 1) .ne. ubound(b, 1)) STOP 8
end subroutine
subroutine test2
!
integer(4), allocatable :: a(:)
integer(8) :: b(5:6)
a = b
- if (lbound (a, 1) .ne. lbound(b, 1)) call abort
- if (ubound (a, 1) .ne. ubound(b, 1)) call abort
+ if (lbound (a, 1) .ne. lbound(b, 1)) STOP 9
+ if (ubound (a, 1) .ne. ubound(b, 1)) STOP 10
end subroutine
subroutine test3
!
integer(8), allocatable :: b(:)
allocate (b(7:11))
a = b
- if (lbound (a, 1) .ne. lbound(b, 1)) call abort
- if (ubound (a, 1) .ne. ubound(b, 1)) call abort
+ if (lbound (a, 1) .ne. lbound(b, 1)) STOP 11
+ if (ubound (a, 1) .ne. ubound(b, 1)) STOP 12
end subroutine
subroutine test4
!
integer, allocatable :: a(:)
integer, allocatable :: c(:)
a = f()
- if (any (a .ne. [1, 2, 3, 4])) call abort
+ if (any (a .ne. [1, 2, 3, 4])) STOP 13
c = a + 8
a = f (c)
- if (any ((a - 8) .ne. [1, 2, 3, 4])) call abort
+ if (any ((a - 8) .ne. [1, 2, 3, 4])) STOP 14
deallocate (c)
a = f (c)
- if (any ((a - 4) .ne. [1, 2, 3, 4])) call abort
+ if (any ((a - 4) .ne. [1, 2, 3, 4])) STOP 15
end subroutine
function f(b)
integer, allocatable, optional :: b(:)
allocate (utrsft(ncls, ncls), dtrsft(ncls, ncls))
nglobal = 0
xwrkt = trs2a2 (ival, ipic, ncls)
- if (any (shape (xwrkt) .ne. [ncls, ncls])) call abort
+ if (any (shape (xwrkt) .ne. [ncls, ncls])) STOP 16
xwrkt = invima (xwrkt, ival, ipic, ncls)
- if (nglobal .ne. 1) call abort
- if (sum(xwrkt) .ne. xwrkt(ival, ival)) call abort
+ if (nglobal .ne. 1) STOP 17
+ if (sum(xwrkt) .ne. xwrkt(ival, ival)) STOP 18
end subroutine
function trs2a2 (j, k, m)
real, dimension (1:m,1:m) :: trs2a2
subroutine test6
character(kind=1, len=100), allocatable, dimension(:) :: str
str = [ "abc" ]
- if (TRIM(str(1)) .ne. "abc") call abort
- if (len(str) .ne. 100) call abort
+ if (TRIM(str(1)) .ne. "abc") STOP 19
+ if (len(str) .ne. 100) STOP 20
end subroutine
subroutine test7
character(kind=4, len=100), allocatable, dimension(:) :: str
character(kind=4, len=3) :: test = "abc"
str = [ "abc" ]
- if (TRIM(str(1)) .ne. test) call abort
- if (len(str) .ne. 100) call abort
+ if (TRIM(str(1)) .ne. test) STOP 21
+ if (len(str) .ne. 100) STOP 22
end subroutine
subroutine test8
type t
end type t
type(t) :: x
x%a= [1,2,3]
- if (any (x%a .ne. [1,2,3])) call abort
+ if (any (x%a .ne. [1,2,3])) STOP 23
x%a = [4]
- if (any (x%a .ne. [4])) call abort
+ if (any (x%a .ne. [4])) STOP 24
end subroutine
end
end if
end do
- if (sum ([(a(i)%i, i=1,size(a))]) .ne. chksum) call abort
+ if (sum ([(a(i)%i, i=1,size(a))]) .ne. chksum) STOP 1
contains
subroutine foo
a = [a, e]
character(:), allocatable :: a
integer :: m, n
a = 'a'
- if (a .ne. 'a') call abort
+ if (a .ne. 'a') STOP 1
a = a // 'x'
- if (a .ne. 'ax') call abort
- if (len (a) .ne. 2) call abort
+ if (a .ne. 'ax') STOP 2
+ if (len (a) .ne. 2) STOP 3
n = 2
m = 2
a = a(m:n)
- if (a .ne. 'x') call abort
- if (len (a) .ne. 1) call abort
+ if (a .ne. 'x') STOP 4
+ if (len (a) .ne. 1) STOP 5
end program main
name="./a.out"
if (index(name,"/") /= 0) THEN
name=name(3:)
- if (name .ne. "a.out") call abort
+ if (name .ne. "a.out") STOP 1
endif
end program
type(r) :: y = r (3, 42)
x = y
- if (x%i /= 3) call abort()
+ if (x%i /= 3) STOP 1
select type(x)
class is (r)
- if (x%r /= 42.0) call abort()
+ if (x%r /= 42.0) STOP 2
class default
- call abort()
+ STOP 3
end select
end
end if
end do
- if (sum ([(a(i)%i, i=1,size(a))]) .ne. chksum) call abort
- if (any([(a(i)%i, i=1,size(a))] /= [(i, i=1,size(a))])) call abort
- if (size(a) /= size(b)) call abort
- if (any([(b(i)%i, i=1,size(b))] /= [(i, i=1,size(b))])) call abort
+ if (sum ([(a(i)%i, i=1,size(a))]) .ne. chksum) STOP 1
+ if (any([(a(i)%i, i=1,size(a))] /= [(i, i=1,size(a))])) STOP 2
+ if (size(a) /= size(b)) STOP 3
+ if (any([(b(i)%i, i=1,size(b))] /= [(i, i=1,size(b))])) STOP 4
contains
subroutine foo
b = first_arg([b, e], [a, e])
!
string = '1234567890'
string = string(1:5) // string(7:)
- if (string /= '123457890') call abort
+ if (string /= '123457890') STOP 1
end program test10
real, allocatable :: x
real :: y = 42
x = 42.0
- if (x .ne. y) call abort
+ if (x .ne. y) STOP 1
deallocate (x)
x = y
- if (x .ne. y) call abort
+ if (x .ne. y) STOP 2
end subroutine
subroutine test_derived
type :: mytype
end type
type (mytype), allocatable :: t
t = mytype (99.0, "abcd")
- if (t%c .ne. "abcd") call abort
+ if (t%c .ne. "abcd") STOP 3
end subroutine
subroutine test_char1
character(len = 8), allocatable :: c1
character(len = 8) :: c2 = "abcd1234"
c1 = "abcd1234"
- if (c1 .ne. c2) call abort
+ if (c1 .ne. c2) STOP 4
deallocate (c1)
c1 = c2
- if (c1 .ne. c2) call abort
+ if (c1 .ne. c2) STOP 5
end subroutine
subroutine test_char4
character(len = 8, kind = 4), allocatable :: c1
character(len = 8, kind = 4) :: c2 = 4_"abcd1234"
c1 = 4_"abcd1234"
- if (c1 .ne. c2) call abort
+ if (c1 .ne. c2) STOP 6
deallocate (c1)
c1 = c2
- if (c1 .ne. c2) call abort
+ if (c1 .ne. c2) STOP 7
end subroutine
subroutine test_deferred_char1
character(:), allocatable :: c
c = "Hello"
- if (c .ne. "Hello") call abort
- if (len(c) .ne. 5) call abort
+ if (c .ne. "Hello") STOP 8
+ if (len(c) .ne. 5) STOP 9
c = "Goodbye"
- if (c .ne. "Goodbye") call abort
- if (len(c) .ne. 7) call abort
+ if (c .ne. "Goodbye") STOP 10
+ if (len(c) .ne. 7) STOP 11
! Check that the hidden LEN dummy is passed by reference
call test_pass_c1 (c)
if (c .ne. "Made in test!") print *, c
- if (len(c) .ne. 13) call abort
+ if (len(c) .ne. 13) STOP 12
end subroutine
subroutine test_pass_c1 (carg)
character(:), allocatable :: carg
- if (carg .ne. "Goodbye") call abort
- if (len(carg) .ne. 7) call abort
+ if (carg .ne. "Goodbye") STOP 13
+ if (len(carg) .ne. 7) STOP 14
carg = "Made in test!"
end subroutine
subroutine test_deferred_char4
character(:, kind = 4), allocatable :: c
c = 4_"Hello"
- if (c .ne. 4_"Hello") call abort
- if (len(c) .ne. 5) call abort
+ if (c .ne. 4_"Hello") STOP 15
+ if (len(c) .ne. 5) STOP 16
c = 4_"Goodbye"
- if (c .ne. 4_"Goodbye") call abort
- if (len(c) .ne. 7) call abort
+ if (c .ne. 4_"Goodbye") STOP 17
+ if (len(c) .ne. 7) STOP 18
! Check that the hidden LEN dummy is passed by reference
call test_pass_c4 (c)
if (c .ne. 4_"Made in test!") print *, c
- if (len(c) .ne. 13) call abort
+ if (len(c) .ne. 13) STOP 19
end subroutine
subroutine test_pass_c4 (carg)
character(:, kind = 4), allocatable :: carg
- if (carg .ne. 4_"Goodbye") call abort
- if (len(carg) .ne. 7) call abort
+ if (carg .ne. 4_"Goodbye") STOP 20
+ if (len(carg) .ne. 7) STOP 21
carg = 4_"Made in test!"
end subroutine
end
use m
character (:), allocatable :: lhs
lhs = foo ("foo calling ")
- if (lhs .ne. "foo") call abort
- if (len (lhs) .ne. 3) call abort
+ if (lhs .ne. "foo") STOP 1
+ if (len (lhs) .ne. 3) STOP 2
deallocate (lhs)
lhs = bar ("bar calling - baaaa!")
- if (lhs .ne. "bar calling") call abort
- if (len (lhs) .ne. 12) call abort
+ if (lhs .ne. "bar calling") STOP 3
+ if (len (lhs) .ne. 12) STOP 4
deallocate (lhs)
lhs = mfoo ("mfoo calling ")
- if (lhs .ne. "foo") call abort
- if (len (lhs) .ne. 3) call abort
+ if (lhs .ne. "foo") STOP 5
+ if (len (lhs) .ne. 3) STOP 6
deallocate (lhs)
lhs = mbar ("mbar calling - baaaa!")
- if (lhs .ne. "bar calling") call abort
- if (len (lhs) .ne. 12) call abort
+ if (lhs .ne. "bar calling") STOP 7
+ if (len (lhs) .ne. 12) STOP 8
contains
function foo (carg) result(res)
character (:), allocatable :: res
implicit none
character(:), allocatable :: a, b
a = 'a'
- if (a .ne. 'a') call abort
+ if (a .ne. 'a') STOP 1
a = a // 'x'
- if (a .ne. 'ax') call abort
- if (len (a) .ne. 2) call abort
+ if (a .ne. 'ax') STOP 2
+ if (len (a) .ne. 2) STOP 3
a = (a(2:2))
- if (a .ne. 'x') call abort
- if (len (a) .ne. 1) call abort
+ if (a .ne. 'x') STOP 4
+ if (len (a) .ne. 1) STOP 5
end program main
aptr => a
call foo
- if (.not. associated (aptr, a)) call abort () ! reallocated to same size - remains associated
+ if (.not. associated (aptr, a)) STOP 1 ! reallocated to same size - remains associated
call bar
- if (.not. associated (aptr, a)) call abort () ! reallocated to smaller size - remains associated
+ if (.not. associated (aptr, a)) STOP 2 ! reallocated to smaller size - remains associated
call foobar
- if (associated (aptr, a)) call abort () ! reallocated to larger size - disassociates
+ if (associated (aptr, a)) STOP 3 ! reallocated to larger size - disassociates
call pr48746
contains
a = matmul( matmul( a, b ), b )
delta = (a - reshape ([1d0, 2d0, 3d0, 4d0, 5d0, 6d0, 7d0, 8d0, 9d0], [3,3]))**2
- if (any (delta > 1d-12)) call abort
- if (any (lbound (a) .ne. [1, 1])) call abort
+ if (any (delta > 1d-12)) STOP 1
+ if (any (lbound (a) .ne. [1, 1])) STOP 2
end subroutine
!
! Check that all is well when the shape of 'a' changes.
a = matmul( a, matmul( a, b ) )
delta = (a - reshape ([198d0, 243d0, 288d0], [3,1]))**2
- if (any (delta > 1d-12)) call abort
- if (any (lbound (a) .ne. [1, 1])) call abort
+ if (any (delta > 1d-12)) STOP 3
+ if (any (lbound (a) .ne. [1, 1])) STOP 4
end subroutine
subroutine foobar
integer :: i
call random_number(a)
call random_number(b)
tmp = matmul(a,b)
- if (any (lbound (tmp) .ne. [1,1])) call abort
- if (any (ubound (tmp) .ne. [10,12])) call abort
+ if (any (lbound (tmp) .ne. [1,1])) STOP 5
+ if (any (ubound (tmp) .ne. [10,12])) STOP 6
end subroutine
end program main
read (15,rec=2) i2
read (15,rec=3) i3
close (15, status="DELETE")
- if (i1 /= 4_4) call abort
- if (i2 /= 1_4) call abort
- if (i3 /= 4_4) call abort
+ if (i1 /= 4_4) STOP 1
+ if (i2 /= 1_4) STOP 2
+ if (i3 /= 4_4) STOP 3
open(15,form="UNFORMATTED",convert="SWAP")
write (15) 1_4
read (15,rec=2) i2
read (15,rec=3) i3
close(15,status="DELETE")
- if (i1 /= 4_4) call abort
- if (i2 /= 1_4) call abort
- if (i3 /= 4_4) call abort
+ if (i1 /= 4_4) STOP 4
+ if (i2 /= 1_4) STOP 5
+ if (i3 /= 4_4) STOP 6
end program main
write (20,*) 3
rewind (20)
read (20,*) i
- if (i .ne. 1) call abort
+ if (i .ne. 1) STOP 1
backspace (20)
read (20,*) i
- if (i .ne. 1) call abort
+ if (i .ne. 1) STOP 2
close (20)
! PR libfortran/20125
write (20,*) 7
backspace (20)
read (20,*) i
- if (i .ne. 7) call abort
+ if (i .ne. 7) STOP 3
close (20)
open (20, status='scratch', form='unformatted')
write (20) 8
backspace (20)
read (20) i
- if (i .ne. 8) call abort
+ if (i .ne. 8) STOP 4
close (20)
! PR libfortran/20471
read (3) (y(n),n=1,10)
do n = 1, 10
- if (abs(x(n)-y(n)) > 0.00001) call abort
+ if (abs(x(n)-y(n)) > 0.00001) STOP 5
end do
close (3)
nr = nr + 1
goto 20
30 continue
- if (nr .ne. 5) call abort
+ if (nr .ne. 5) STOP 6
do i = 1, nr+1
backspace (3)
do i = 1, nr
read(3,end=70,err=90) n, (x(n),n=1,10)
- if (abs(x(1) - i) .gt. 0.001) call abort
+ if (abs(x(1) - i) .gt. 0.001) STOP 7
end do
close (3)
stop
70 continue
- call abort
+ STOP 8
90 continue
- call abort
+ STOP 9
end
read (15,rec=2) i2
read (15,rec=3) i3
close (15, status="DELETE")
- if (i1 /= 8) call abort
- if (i2 /= 1) call abort
- if (i3 /= 8) call abort
+ if (i1 /= 8) STOP 1
+ if (i2 /= 1) STOP 2
+ if (i3 /= 8) STOP 3
open(15,form="UNFORMATTED",convert="SWAP")
write (15) 1_8
read (15,rec=2) i2
read (15,rec=3) i3
close(15,status="DELETE")
- if (i1 /= 8) call abort
- if (i2 /= 1) call abort
- if (i3 /= 8) call abort
+ if (i1 /= 8) STOP 4
+ if (i2 /= 1) STOP 5
+ if (i3 /= 8) STOP 6
end program main
d%ia = 3
call move_alloc (d, a%c%c)
- if (a%ia .ne. 1) call abort
- if (a%c%ia .ne. 2) call abort
- if (a%c%c%ia .ne. 3) call abort
+ if (a%ia .ne. 1) STOP 1
+ if (a%c%ia .ne. 2) STOP 2
+ if (a%c%c%ia .ne. 3) STOP 3
! Check that we can point anywhere in the chain
b => a%c%c
- if (b%ia .ne. 3) call abort
+ if (b%ia .ne. 3) STOP 4
b => a%c
- if (b%ia .ne. 2) call abort
+ if (b%ia .ne. 2) STOP 5
! Check that the pointer can be used as if it were an element in the chain.
- if (.not.allocated (b%c)) call abort
+ if (.not.allocated (b%c)) STOP 6
b => a%c%c
if (.not.allocated (b%c)) allocate (b%c)
b%c%ia = 4
- if (a%c%c%c%ia .ne. 4) call abort
+ if (a%c%c%c%ia .ne. 4) STOP 7
! A rudimentary iterator.
b => a
total = total + b%ia
b => b%c
end do
- if (total .ne. 10) call abort
+ if (total .ne. 10) STOP 8
! Take one element out of the chain.
call move_alloc (a%c%c, d)
call move_alloc (d%c, a%c%c)
- if (d%ia .ne. 3) call abort
+ if (d%ia .ne. 3) STOP 9
deallocate (d)
! Checkcount of remaining chain.
total = total + b%ia
b => b%c
end do
- if (total .ne. 7) call abort
+ if (total .ne. 7) STOP 10
! Deallocate to check that there are no memory leaks.
deallocate (a%c%c)
a%right%ia = 5
! Checksum OK?
- if (foo(a) .ne. 15) call abort
+ if (foo(a) .ne. 15) STOP 1
! Return pointer to tree item that is present.
b => bar (a, 3)
- if (.not.associated (b) .or. (b%ia .ne. 3)) call abort
+ if (.not.associated (b) .or. (b%ia .ne. 3)) STOP 2
! Return NULL to tree item that is not present.
b => bar (a, 6)
- if (associated (b)) call abort
+ if (associated (b)) STOP 3
! Deallocate to check that there are no memory leaks.
deallocate (a)
call poke (1)
call poke (2)
call poke (3)
- if (top%index .ne. 3) call abort
+ if (top%index .ne. 3) STOP 1
call output (top)
call pop
- if (top%index .ne. 2) call abort
+ if (top%index .ne. 2) STOP 2
call output (top)
deallocate (top)
contains
b1%ia = 5
call move_alloc (d, a%c(2)%c)
- if (a%ia .ne. 1) call abort
- if (a%c(1)%ia .ne. 2) call abort
- if (a%c(2)%c(1)%ia .ne. 3) call abort
- if (a%c(2)%c(2)%ia .ne. 4) call abort
- if (a%c(2)%c(2)%c(1)%ia .ne. 5) call abort
+ if (a%ia .ne. 1) STOP 1
+ if (a%c(1)%ia .ne. 2) STOP 2
+ if (a%c(2)%c(1)%ia .ne. 3) STOP 3
+ if (a%c(2)%c(2)%ia .ne. 4) STOP 4
+ if (a%c(2)%c(2)%c(1)%ia .ne. 5) STOP 5
if (allocated (a)) deallocate (a)
if (allocated (d)) deallocate (d)
logical :: x
if(x) call sndInvalid()
print *, 'BUG'
- call abort()
+ STOP 1
end subroutine invalid
subroutine sndInvalid()
! Based on PR testcase by Nicolas Bock <nicolasbock@gmail.com>
!
program test
- if (original_stuff(1) .ne. 5) call abort ()
- if (scalar_stuff(-4) .ne. 10) call abort ()
- if (any (array_stuff((/-19,-30/)) .ne. (/25,25/))) call abort ()
+ if (original_stuff(1) .ne. 5) STOP 1
+ if (scalar_stuff(-4) .ne. 10) STOP 2
+ if (any (array_stuff((/-19,-30/)) .ne. (/25,25/))) STOP 3
contains
recursive function original_stuff(n)
integer :: original_stuff
USE M1
integer :: ans(5)
-IF (ANY(TEST(3).NE.(/5,5,5,5,5/))) CALL ABORT()
-IF (ANY(TEST(6).NE.(/0,0,0,0,0/))) CALL ABORT()
+IF (ANY(TEST(3).NE.(/5,5,5,5,5/))) STOP 1
+IF (ANY(TEST(6).NE.(/0,0,0,0,0/))) STOP 2
END
if (recurse) then
iarray(49,49) = 17
call bar
- if (iarray(49,49) .ne. 17) call abort
+ if (iarray(49,49) .ne. 17) STOP 1
else
iarray(49,49) = 21
end if
val(35) = sum((/ 1, 2, 3 /), dim=1, mask=equal)
val(36) = sum((/ 1, 2, 3 /), mask=equal, dim=1)
- if (any (val /= res)) call abort
+ if (any (val /= res)) STOP 1
! Tests for complex arguments. These were broken by the original fix.
cval(17) = sum(cin, dim=1, mask=equal)
cval(18) = sum(cin, mask=equal, dim=1)
- if (any (cval /= cmplx(res(19:36)))) call abort
+ if (any (cval /= cmplx(res(19:36)))) STOP 2
end program reduction_mask
type(c_ptr) cp1, cp2
x = 42
- if (.not. c_associated(c_loc(x(3)),point(x(::2)))) call abort
+ if (.not. c_associated(c_loc(x(3)),point(x(::2)))) STOP 1
contains
function point(x)
use iso_c_binding
integer :: i
i = -1
write(str,"(a)") repeat ("a", f())
- if (trim(str) /= "aaaa") call abort
+ if (trim(str) /= "aaaa") STOP 1
write(str,"(a)") repeat ("a", i)
contains
character(len=i), intent(in) :: s
character(len=i*j), intent(in) :: t
- if (repeat(s,j) /= t) call abort
+ if (repeat(s,j) /= t) STOP 1
call bar(j,s,t)
end subroutine foo
character(len=*), intent(in) :: s
character(len=len(s)*j), intent(in) :: t
- if (repeat(s,j) /= t) call abort
+ if (repeat(s,j) /= t) STOP 2
end subroutine bar
program test
t1 = "a"
t2 = "ab"
- if (repeat(t0, 0) /= "") call abort
- if (repeat(t1, 0) /= "") call abort
- if (repeat(t2, 0) /= "") call abort
- if (repeat(t0, 1) /= "") call abort
- if (repeat(t1, 1) /= "a") call abort
- if (repeat(t2, 1) /= "ab") call abort
- if (repeat(t0, 2) /= "") call abort
- if (repeat(t1, 2) /= "aa") call abort
- if (repeat(t2, 2) /= "abab") call abort
+ if (repeat(t0, 0) /= "") STOP 3
+ if (repeat(t1, 0) /= "") STOP 4
+ if (repeat(t2, 0) /= "") STOP 5
+ if (repeat(t0, 1) /= "") STOP 6
+ if (repeat(t1, 1) /= "a") STOP 7
+ if (repeat(t2, 1) /= "ab") STOP 8
+ if (repeat(t0, 2) /= "") STOP 9
+ if (repeat(t1, 2) /= "aa") STOP 10
+ if (repeat(t2, 2) /= "abab") STOP 11
- if (repeat(s0, 0) /= "") call abort
- if (repeat(s1, 0) /= "") call abort
- if (repeat(s2, 0) /= "") call abort
- if (repeat(s0, 1) /= "") call abort
- if (repeat(s1, 1) /= "a") call abort
- if (repeat(s2, 1) /= "ab") call abort
- if (repeat(s0, 2) /= "") call abort
- if (repeat(s1, 2) /= "aa") call abort
- if (repeat(s2, 2) /= "abab") call abort
+ if (repeat(s0, 0) /= "") STOP 12
+ if (repeat(s1, 0) /= "") STOP 13
+ if (repeat(s2, 0) /= "") STOP 14
+ if (repeat(s0, 1) /= "") STOP 15
+ if (repeat(s1, 1) /= "a") STOP 16
+ if (repeat(s2, 1) /= "ab") STOP 17
+ if (repeat(s0, 2) /= "") STOP 18
+ if (repeat(s1, 2) /= "aa") STOP 19
+ if (repeat(s2, 2) /= "abab") STOP 20
i = 0
- if (repeat(t0, i) /= "") call abort
- if (repeat(t1, i) /= "") call abort
- if (repeat(t2, i) /= "") call abort
+ if (repeat(t0, i) /= "") STOP 21
+ if (repeat(t1, i) /= "") STOP 22
+ if (repeat(t2, i) /= "") STOP 23
i = 1
- if (repeat(t0, i) /= "") call abort
- if (repeat(t1, i) /= "a") call abort
- if (repeat(t2, i) /= "ab") call abort
+ if (repeat(t0, i) /= "") STOP 24
+ if (repeat(t1, i) /= "a") STOP 25
+ if (repeat(t2, i) /= "ab") STOP 26
i = 2
- if (repeat(t0, i) /= "") call abort
- if (repeat(t1, i) /= "aa") call abort
- if (repeat(t2, i) /= "abab") call abort
+ if (repeat(t0, i) /= "") STOP 27
+ if (repeat(t1, i) /= "aa") STOP 28
+ if (repeat(t2, i) /= "abab") STOP 29
i = 0
- if (repeat(s0, i) /= "") call abort
- if (repeat(s1, i) /= "") call abort
- if (repeat(s2, i) /= "") call abort
+ if (repeat(s0, i) /= "") STOP 30
+ if (repeat(s1, i) /= "") STOP 31
+ if (repeat(s2, i) /= "") STOP 32
i = 1
- if (repeat(s0, i) /= "") call abort
- if (repeat(s1, i) /= "a") call abort
- if (repeat(s2, i) /= "ab") call abort
+ if (repeat(s0, i) /= "") STOP 33
+ if (repeat(s1, i) /= "a") STOP 34
+ if (repeat(s2, i) /= "ab") STOP 35
i = 2
- if (repeat(s0, i) /= "") call abort
- if (repeat(s1, i) /= "aa") call abort
- if (repeat(s2, i) /= "abab") call abort
+ if (repeat(s0, i) /= "") STOP 36
+ if (repeat(s1, i) /= "aa") STOP 37
+ if (repeat(s2, i) /= "abab") STOP 38
call foo(0,0,"","")
call foo(0,1,"","")
r = nearest(r,r)
s2 = repeat(s1,i1)
- if (s2 /= s1) call abort
+ if (s2 /= s1) STOP 1
s2 = repeat(s1,i2)
- if (s2 /= s1) call abort
+ if (s2 /= s1) STOP 2
s2 = repeat(s1,i4)
- if (s2 /= s1) call abort
+ if (s2 /= s1) STOP 3
s2 = repeat(s1,i8)
- if (s2 /= s1) call abort
+ if (s2 /= s1) STOP 4
end program test
// repeat ("xxx", 0) &
// repeat ("string", 2)
- if (string /= "astringstring") CALL abort()
+ if (string /= "astringstring") STOP 1
end
vect2=1
resh2 = reshape(vect2,s)
- if (resh2(1,1) /= 1.0) call abort
+ if (resh2(1,1) /= 1.0) STOP 1
resh1 = reshape(vect1,s)
- if (resh1(1,1) /= 1.0) call abort
+ if (resh1(1,1) /= 1.0) STOP 2
resh = reshape(vect,s)
- if (resh(1,1) /= 1.0) call abort
+ if (resh(1,1) /= 1.0) STOP 3
end program tryreshape
b = (/(i,i=1,8)/)
a = reshape(b(1:8:2),shape(a))
if (a(1,1) /= (1.0, 0.0) .or. a(2,1) /= (3.0, 0.0) .or. &
- a(1,2) /= (5.0, 0.0) .or. a(2,2) /= (7.0, 0.0)) call abort
+ a(1,2) /= (5.0, 0.0) .or. a(2,2) /= (7.0, 0.0)) STOP 1
c = (/( 3.14, -3.14), (2.71, -2.71)/)
d = reshape(c, shape (d))
- if (any (c .ne. d)) call abort
+ if (any (c .ne. d)) STOP 2
end
b = (/(i,i=1,12)/)
a = reshape(b(1:12:2),shape(a),order=(/2,1/))
c = reshape(b(1:12:2),shape(a),order=(/2,1/))
- if (any (a /= c)) call abort
+ if (any (a /= c)) STOP 1
! Test generic reshape
br%r = b
ar = reshape(br(1:12:2),shape(a),order=(/2,1/))
- if (any (ar%r /= a)) call abort
+ if (any (ar%r /= a)) STOP 2
! Test callee-allocated memory with a write statement
write (line1,'(6F8.3)') reshape(b(1:12:2),shape(a),order=(/2,1/))
write (line2,'(6F8.3)') a
- if (line1 /= line2 ) call abort
+ if (line1 /= line2 ) STOP 3
write (line3,'(6F8.3)') reshape(br(1:12:2),shape(ar),order=(/2,1/))
- if (line1 /= line3 ) call abort
+ if (line1 /= line3 ) STOP 4
end
program test
use splitprms
- if (nxttab(1, 1) .ne. 6) call abort
- if (nxttab(1, nplam) .ne. 1) call abort
- if (nxttab(linem, 1) .ne. 6) call abort
- if (nxttab(linem, nplam) .ne. 132) call abort
+ if (nxttab(1, 1) .ne. 6) STOP 1
+ if (nxttab(1, nplam) .ne. 1) STOP 2
+ if (nxttab(linem, 1) .ne. 6) STOP 3
+ if (nxttab(linem, nplam) .ne. 132) STOP 4
end program test
integer, parameter :: sh(2) = [2, 3]
integer, parameter :: &
& a(2,2) = reshape([1, 2, 3, 4], sh) ! { dg-error "Different shape" }
- if (a(1,1) /= 0) call abort
+ if (a(1,1) /= 0) STOP 1
end subroutine p0
integer, parameter :: sh(2) = [2, 1]
integer, parameter :: &
& a(2,2) = reshape([1, 2, 3, 4], sh) ! { dg-error "Different shape" }
- if (a(1,1) /= 0) call abort
+ if (a(1,1) /= 0) STOP 2
end subroutine p1
integer :: B(N,N) = reshape([1,2,2,2,1,2,2,2,1],[3,3])
integer :: i
i = 5
-if (any(A /= B)) call abort
-if (K /= i) call abort
+if (any(A /= B)) STOP 1
+if (K /= i) STOP 2
end
! { dg-final { scan-tree-dump-times "\\\{1, 2, 2, 2, 1, 2, 2, 2, 1\\\}" 2 "original" } }
A1(1:N,1:N)=reshape(A1(1:0,1),(/N,N/),b1)
write(unit=line,fmt='(100i1)') A1
- if (line .ne. "122212221") call abort
+ if (line .ne. "122212221") STOP 1
b4 = (/ 3, 4, 4, 4 /)
a4 = reshape(a4(:0,1),(/n,n/),b4)
write(unit=line,fmt='(100i1)') a4
- if (line .ne. "344434443") call abort
+ if (line .ne. "344434443") STOP 2
end program main
if (b(i1,i2,i3,i4,i5,i6,i7) /= &
2*((i1-1)+(i2-1)*2+(i3-1)*4+(i4-1)*8+&
(i5-1)*16+(i6-1)*32+(i7-1)*64)+1) &
- call abort
+ STOP 1
end do
end do
end do
data(2,2)%i = 4
write (unit=line1, fmt="(4I4)") reshape(transpose(data),shape(data))
write (unit=line2, fmt="(4I4)") (/ 1, 3, 2, 4 /)
- if (line1 /= line2) call abort
+ if (line1 /= line2) STOP 1
END program main
INTEGER, DIMENSION(:), INTENT(IN), &
OPTIONAL :: DATA
character(20) :: line
- IF (.not. PRESENT(data)) call abort
+ IF (.not. PRESENT(data)) STOP 1
write (unit=line,fmt='(I5)') size(data)
- if (line /= ' 0 ') call abort
+ if (line /= ' 0 ') STOP 2
END SUBROUTINE S1
subroutine s_type(data)
type(foo), dimension(:), intent(in), optional :: data
character(20) :: line
- IF (.not. PRESENT(data)) call abort
+ IF (.not. PRESENT(data)) STOP 3
write (unit=line,fmt='(I5)') size(data)
- if (line /= ' 0 ') call abort
+ if (line /= ' 0 ') STOP 4
end subroutine s_type
SUBROUTINE S2(N)
integer:: i=3
end type A
type(A):: x,y
- if (associated(x%p) .or. x%i /= 3) call abort ()
+ if (associated(x%p) .or. x%i /= 3) STOP 1
x=f()
- if (associated(x%p) .or. x%i /= 3) call abort ()
+ if (associated(x%p) .or. x%i /= 3) STOP 2
x=g()
- if (associated(x%p) .or. x%i /= 3) call abort ()
+ if (associated(x%p) .or. x%i /= 3) STOP 3
contains
function f() result (fr)
type(A):: fr
- if (associated(fr%p) .or. fr%i /= 3) call abort ()
+ if (associated(fr%p) .or. fr%i /= 3) STOP 4
end function f
function g()
type(A):: g
- if (associated(g%p) .or. g%i /= 3) call abort ()
+ if (associated(g%p) .or. g%i /= 3) STOP 5
end function g
end
use test1
implicit none
! Original problem
- if (len(test2(10)) .ne. 21) call abort ()
+ if (len(test2(10)) .ne. 21) STOP 1
! Check non-intrinsic calls are OK and check that fix does
! not confuse result variables.
- if (any (myfunc (test2(1)) .ne. "ABC")) call abort ()
+ if (any (myfunc (test2(1)) .ne. "ABC")) STOP 2
contains
function myfunc (ch) result (chr)
character (*) :: ch(:)
character(len(ch)) :: chr(4)
- if (len (ch) .ne. 3) call abort ()
- if (any (ch .ne. "ABC")) call abort ()
+ if (len (ch) .ne. 3) STOP 3
+ if (any (ch .ne. "ABC")) STOP 4
chr = test2 (1)
- if (len(test2(len(chr))) .ne. 7) call abort ()
+ if (len(test2(len(chr))) .ne. 7) STOP 5
end function myfunc
end program test
program test
use test1
implicit none
- if(len (test2()) /= 3) call abort ()
- if(test2() /= '123') call abort ()
+ if(len (test2()) /= 3) STOP 1
+ if(test2() /= '123') STOP 2
end program test
! Using the return value as an actual argument
b = 0;
b = sum (transpose (a), 1);
- if (any (b .ne. (/9, 12/))) call abort ()
+ if (any (b .ne. (/9, 12/))) STOP 1
! Using the return value in an expression
b = 0;
b = sum (transpose (a) + 1, 1);
- if (any (b .ne. (/12, 15/))) call abort ()
+ if (any (b .ne. (/12, 15/))) STOP 2
! Same again testing a user function
! TODO: enable these once this is implemented
! b = 0;
! b = sum (my_transpose (a), 1);
-! if (any (b .ne. (/9, 12/))) call abort ()
+! if (any (b .ne. (/9, 12/))) STOP 3
!
! ! Using the return value in an expression
! b = 0;
! b = sum (my_transpose (a) + 1, 1);
-! if (any (b .ne. (/12, 15/))) call abort ()
+! if (any (b .ne. (/12, 15/))) STOP 4
contains
subroutine test(x, n)
integer, dimension (:, :) :: x
integer n
- if (any (shape (x) .ne. (/3, 2/))) call abort
- if (any (x .ne. (n + reshape((/1, 4, 2, 5, 3, 6/), (/3, 2/))))) call abort
+ if (any (shape (x) .ne. (/3, 2/))) STOP 1
+ if (any (x .ne. (n + reshape((/1, 4, 2, 5, 3, 6/), (/3, 2/))))) STOP 2
end subroutine
function my_transpose (x) result (r)
a => NULL()
a => foo()
p => b
- if (.not. associated (a, p)) call abort
+ if (.not. associated (a, p)) STOP 1
contains
subroutine bar(p)
integer, pointer, dimension(:) :: p
print *, x(3) ! { dg-output " *1 *2 *3" }
- if (ssum(x(3)) /= 6) call abort()
+ if (ssum(x(3)) /= 6) STOP 1
s = 0
s = x(3)
- if (any(s /= (/1, 2, 3/))) call abort()
+ if (any(s /= (/1, 2, 3/))) STOP 2
contains
s = ""
read(11, '(a11)') s
close(11)
- if (s .ne. "Hello World") call abort
+ if (s .ne. "Hello World") STOP 1
end program
!print fmt(i), 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
end do
write(line, fmt(1)) 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
-if (line.ne." 1.3 1.3 1.3 1.3 1.3 1.2") call abort
+if (line.ne." 1.3 1.3 1.3 1.3 1.3 1.2") STOP 1
write(line, fmt(2)) 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
-if (line.ne." 1.2 1.2 1.2 1.2 1.2 1.1") call abort
+if (line.ne." 1.2 1.2 1.2 1.2 1.2 1.1") STOP 2
write(line, fmt(3)) 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
-if (line.ne." 1.2 1.2 1.2 1.2 1.2 1.1") call abort
+if (line.ne." 1.2 1.2 1.2 1.2 1.2 1.1") STOP 3
write(line, fmt(4)) 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
-if (line.ne." 1.20 1.22 1.25 1.27 1.30 1.12") call abort
+if (line.ne." 1.20 1.22 1.25 1.27 1.30 1.12") STOP 4
write(line, fmt(5)) 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
-if (line.ne." 1.20 1.22 1.25 1.27 1.30 1.13") call abort
+if (line.ne." 1.20 1.22 1.25 1.27 1.30 1.13") STOP 5
write(line, fmt(6)) 1.20, 1.22, 1.250001, 1.27, 1.30, 1.125
-if (line.ne." 1.2 1.2 1.3 1.3 1.3 1.1") call abort
+if (line.ne." 1.2 1.2 1.3 1.3 1.3 1.1") STOP 6
write(line, fmt(7)) 1.20, 1.22, 1.250001, 1.27, 1.30, 1.125
-if (line.ne." +1.2 +1.2 +1.3 +1.3 +1.3 +1.1") call abort
+if (line.ne." +1.2 +1.2 +1.3 +1.3 +1.3 +1.1") STOP 7
end
integer,parameter :: k = max(4, selected_real_kind (precision (0.0_8) + 1))
character(64) :: line
write(line, '(RN, 4F10.3)') 0.0625_j, 0.1875_j
- if (line.ne." 0.062 0.188") call abort
+ if (line.ne." 0.062 0.188") STOP 1
write(line, '(RN, 4F10.2)') 0.125_j, 0.375_j, 1.125_j, 1.375_j
- if (line.ne." 0.12 0.38 1.12 1.38") call abort
+ if (line.ne." 0.12 0.38 1.12 1.38") STOP 2
write(line, '(RN, 4F10.1)') 0.25_j, 0.75_j, 1.25_j, 1.75_j
- if (line.ne." 0.2 0.8 1.2 1.8") call abort
+ if (line.ne." 0.2 0.8 1.2 1.8") STOP 3
write(line, '(RN, 4F10.0)') 0.5_j, 1.5_j, 2.5_j, 3.5_j
- if (line.ne." 0. 2. 2. 4.") call abort
+ if (line.ne." 0. 2. 2. 4.") STOP 4
write(line, '(RN, 4F10.3)') 0.0625_k, 0.1875_k
- if (line.ne." 0.062 0.188") call abort
+ if (line.ne." 0.062 0.188") STOP 5
write(line, '(RN, 4F10.2)') 0.125_k, 0.375_k, 1.125_k, 1.375_k
- if (line.ne." 0.12 0.38 1.12 1.38") call abort
+ if (line.ne." 0.12 0.38 1.12 1.38") STOP 6
write(line, '(RN, 4F10.1)') 0.25_k, 0.75_k, 1.25_k, 1.75_k
- if (line.ne." 0.2 0.8 1.2 1.8") call abort
+ if (line.ne." 0.2 0.8 1.2 1.8") STOP 7
write(line, '(RN, 4F10.0)') 0.5_k, 1.5_k, 2.5_k, 3.5_k
- if (line.ne." 0. 2. 2. 4.") call abort
+ if (line.ne." 0. 2. 2. 4.") STOP 8
end
character(len=20) :: s
write(s, fmt) x
- if (s /= cmp) call abort
+ if (s /= cmp) STOP 1
!if (s /= cmp) print "(a,1x,a,' expected: ',1x)", fmt, s, cmp
end subroutine
end program
round = 'up'
call t()
- if (rnd4 .and. (r4p /= ref4u .or. r4m /= -ref4d)) call abort()
- if (rnd8 .and. (r8p /= ref8u .or. r8m /= -ref8d)) call abort()
- if (rnd10 .and. (r10p /= ref10u .or. r10m /= -ref10d)) call abort()
- if (rnd16 .and. (r16p /= ref16u .or. r16m /= -ref16d)) call abort()
+ if (rnd4 .and. (r4p /= ref4u .or. r4m /= -ref4d)) STOP 1
+ if (rnd8 .and. (r8p /= ref8u .or. r8m /= -ref8d)) STOP 2
+ if (rnd10 .and. (r10p /= ref10u .or. r10m /= -ref10d)) STOP 3
+ if (rnd16 .and. (r16p /= ref16u .or. r16m /= -ref16d)) STOP 4
round = 'down'
call t()
- if (rnd4 .and. (r4p /= ref4d .or. r4m /= -ref4u)) call abort()
- if (rnd8 .and. (r8p /= ref8d .or. r8m /= -ref8u)) call abort()
- if (rnd10 .and. (r10p /= ref10d .or. r10m /= -ref10u)) call abort()
- if (rnd16 .and. (r16p /= ref16d .or. r16m /= -ref16u)) call abort()
+ if (rnd4 .and. (r4p /= ref4d .or. r4m /= -ref4u)) STOP 5
+ if (rnd8 .and. (r8p /= ref8d .or. r8m /= -ref8u)) STOP 6
+ if (rnd10 .and. (r10p /= ref10d .or. r10m /= -ref10u)) STOP 7
+ if (rnd16 .and. (r16p /= ref16d .or. r16m /= -ref16u)) STOP 8
round = 'zero'
call t()
- if (rnd4 .and. (r4p /= ref4d .or. r4m /= -ref4d)) call abort()
- if (rnd8 .and. (r8p /= ref8d .or. r8m /= -ref8d)) call abort()
- if (rnd10 .and. (r10p /= ref10d .or. r10m /= -ref10d)) call abort()
- if (rnd16 .and. (r16p /= ref16d .or. r16m /= -ref16d)) call abort()
+ if (rnd4 .and. (r4p /= ref4d .or. r4m /= -ref4d)) STOP 9
+ if (rnd8 .and. (r8p /= ref8d .or. r8m /= -ref8d)) STOP 10
+ if (rnd10 .and. (r10p /= ref10d .or. r10m /= -ref10d)) STOP 11
+ if (rnd16 .and. (r16p /= ref16d .or. r16m /= -ref16d)) STOP 12
round = 'nearest'
call t()
- if (rnd4 .and. (r4p /= ref4u .or. r4m /= -ref4u)) call abort()
- if (rnd8 .and. (r8p /= ref8u .or. r8m /= -ref8u)) call abort()
- if (rnd10 .and. (r10p /= ref10u .or. r10m /= -ref10u)) call abort()
- if (rnd16 .and. (r16p /= ref16u .or. r16m /= -ref16u)) call abort()
+ if (rnd4 .and. (r4p /= ref4u .or. r4m /= -ref4u)) STOP 13
+ if (rnd8 .and. (r8p /= ref8u .or. r8m /= -ref8u)) STOP 14
+ if (rnd10 .and. (r10p /= ref10u .or. r10m /= -ref10u)) STOP 15
+ if (rnd16 .and. (r16p /= ref16u .or. r16m /= -ref16u)) STOP 16
! Same as nearest (but rounding towards zero if there is a tie
! [does not apply here])
round = 'compatible'
call t()
- if (rnd4 .and. (r4p /= ref4u .or. r4m /= -ref4u)) call abort()
- if (rnd8 .and. (r8p /= ref8u .or. r8m /= -ref8u)) call abort()
- if (rnd10 .and. (r10p /= ref10u .or. r10m /= -ref10u)) call abort()
- if (rnd16 .and. (r16p /= ref16u .or. r16m /= -ref16u)) call abort()
+ if (rnd4 .and. (r4p /= ref4u .or. r4m /= -ref4u)) STOP 17
+ if (rnd8 .and. (r8p /= ref8u .or. r8m /= -ref8u)) STOP 18
+ if (rnd10 .and. (r10p /= ref10u .or. r10m /= -ref10u)) STOP 19
+ if (rnd16 .and. (r16p /= ref16u .or. r16m /= -ref16u)) STOP 20
contains
subroutine t()
! print *, round
real x,y
real, parameter :: a = -3.0
i = int(rrspacing(a))
- if (i /= 12582912) call abort
+ if (i /= 12582912) STOP 1
end program m
rewind (42)
read (42,'(A)') c
close (42)
- if (c /= 'abcde') call abort ()
+ if (c /= 'abcde') STOP 1
end
l = SAME_TYPE_AS (x1,x1)
print *,l
- if (.not.l) call abort()
+ if (.not.l) STOP 1
l = SAME_TYPE_AS (x1,x2)
print *,l
- if (l) call abort()
+ if (l) STOP 2
c1 => x1
l = SAME_TYPE_AS (c1,x1)
print *,l
- if (.not.l) call abort()
+ if (.not.l) STOP 3
l = SAME_TYPE_AS (c1,x2)
print *,l
- if (l) call abort()
+ if (l) STOP 4
c1 => x2
c2 => x2
l = SAME_TYPE_AS (c1,c2)
print *,l
- if (.not.l) call abort()
+ if (.not.l) STOP 5
c1 => x1
c2 => x2
l = SAME_TYPE_AS (c1,c2)
print *,l
- if (l) call abort()
+ if (l) STOP 6
end
j = 131
s = 'This is a test string'
else
- if (i .ne. 26 .or. j .ne. 131) call abort
- if (s .ne. 'This is a test string') call abort
+ if (i .ne. 26 .or. j .ne. 131) STOP 1
+ if (s .ne. 'This is a test string') STOP 2
end if
end subroutine foo
subroutine bar (s)
character*42 s
- if (s .ne. '0123456789012345678901234567890123456') call abort
+ if (s .ne. '0123456789012345678901234567890123456') STOP 3
call foo (.false.)
end subroutine bar
subroutine baz
integer :: i
integer, allocatable :: j
if (i == 1) j = 42
- if (.not. allocated (j)) call abort ()
- if (j /= 42) call abort ()
+ if (.not. allocated (j)) STOP 1
+ if (j /= 42) STOP 2
end
! Deferred-length string scalar
character(len=:), allocatable :: str
if (first) then
first = .false.
- if (allocated (str)) call abort ()
+ if (allocated (str)) STOP 3
str = "ABCDEF"
end if
- if (.not. allocated (str)) call abort ()
- if (len (str) /= 6) call abort ()
- if (str(1:6) /= "ABCDEF") call abort ()
+ if (.not. allocated (str)) STOP 4
+ if (len (str) /= 6) STOP 5
+ if (str(1:6) /= "ABCDEF") STOP 6
end subroutine bar
! Deferred-length string array
character(len=:), allocatable :: str
if (first) then
first = .false.
- if (allocated (str)) call abort ()
+ if (allocated (str)) STOP 7
str = "ABCDEF"
end if
- if (.not. allocated (str)) call abort ()
- if (len (str) /= 6) call abort ()
- if (str(1:6) /= "ABCDEF") call abort ()
+ if (.not. allocated (str)) STOP 8
+ if (len (str) /= 6) STOP 9
+ if (str(1:6) /= "ABCDEF") STOP 10
end subroutine bar_array
call foo(1)
integer :: i
integer, allocatable :: j
if (i == 1) j = 42
- if (.not. allocated (j)) call abort ()
- if (j /= 42) call abort ()
+ if (.not. allocated (j)) STOP 1
+ if (j /= 42) STOP 2
end
! Deferred-length string scalar
character(len=:), allocatable :: str
if (first) then
first = .false.
- if (allocated (str)) call abort ()
+ if (allocated (str)) STOP 3
str = "ABCDEF"
end if
- if (.not. allocated (str)) call abort ()
- if (len (str) /= 6) call abort ()
- if (str(1:6) /= "ABCDEF") call abort ()
+ if (.not. allocated (str)) STOP 4
+ if (len (str) /= 6) STOP 5
+ if (str(1:6) /= "ABCDEF") STOP 6
end subroutine bar
! Deferred-length string array
character(len=:), allocatable :: str
if (first) then
first = .false.
- if (allocated (str)) call abort ()
+ if (allocated (str)) STOP 7
str = "ABCDEF"
end if
- if (.not. allocated (str)) call abort ()
- if (len (str) /= 6) call abort ()
- if (str(1:6) /= "ABCDEF") call abort ()
+ if (.not. allocated (str)) STOP 8
+ if (len (str) /= 6) STOP 9
+ if (str(1:6) /= "ABCDEF") STOP 10
end subroutine bar_array
call foo(1)
real, dimension(2) :: a
a(1) = 2.0
a(2) = 3.0
- if (product (a, .false.) /= 1.0) call abort
- if (product (a, .true.) /= 6.0) call abort
- if (sum (a, .false.) /= 0.0) call abort
- if (sum (a, .true.) /= 5.0) call abort
- if (maxval (a, .true.) /= 3.0) call abort
- if (maxval (a, .false.) > -1e38) call abort
- if (maxloc (a, 1, .true.) /= 2) call abort
- if (maxloc (a, 1, .false.) /= 0) call abort ! Change to F2003 requirement.
+ if (product (a, .false.) /= 1.0) STOP 1
+ if (product (a, .true.) /= 6.0) STOP 2
+ if (sum (a, .false.) /= 0.0) STOP 3
+ if (sum (a, .true.) /= 5.0) STOP 4
+ if (maxval (a, .true.) /= 3.0) STOP 5
+ if (maxval (a, .false.) > -1e38) STOP 6
+ if (maxloc (a, 1, .true.) /= 2) STOP 7
+ if (maxloc (a, 1, .false.) /= 0) STOP 8! Change to F2003 requirement.
end program main
a(1,2) = -1.
a(2,1) = 13.
a(2,2) = -31.
- if (any (minloc (a, lo) /= 0)) call abort
- if (any (minloc (a, .true.) /= (/ 2, 2 /))) call abort
- if (any (minloc(a, 1, .true.) /= (/ 1, 2/))) call abort
- if (any (minloc(a, 1, lo ) /= (/ 0, 0/))) call abort
+ if (any (minloc (a, lo) /= 0)) STOP 1
+ if (any (minloc (a, .true.) /= (/ 2, 2 /))) STOP 2
+ if (any (minloc(a, 1, .true.) /= (/ 1, 2/))) STOP 3
+ if (any (minloc(a, 1, lo ) /= (/ 0, 0/))) STOP 4
- if (any (maxloc (a, lo) /= 0)) call abort
- if (any (maxloc (a, .true.) /= (/ 2,1 /))) call abort
- if (any (maxloc(a, 1, .true.) /= (/ 2, 1/))) call abort
- if (any (maxloc(a, 1, lo) /= (/ 0, 0/))) call abort
+ if (any (maxloc (a, lo) /= 0)) STOP 5
+ if (any (maxloc (a, .true.) /= (/ 2,1 /))) STOP 6
+ if (any (maxloc(a, 1, .true.) /= (/ 2, 1/))) STOP 7
+ if (any (maxloc(a, 1, lo) /= (/ 0, 0/))) STOP 8
- if (any (maxval(a, 1, lo) /= -HUGE(a))) call abort
- if (any (maxval(a, 1, .true.) /= (/13., -1./))) call abort
- if (any (minval(a, 1, lo) /= HUGE(a))) call abort
- if (any (minval(a, 1, .true.) /= (/1., -31./))) call abort
+ if (any (maxval(a, 1, lo) /= -HUGE(a))) STOP 9
+ if (any (maxval(a, 1, .true.) /= (/13., -1./))) STOP 10
+ if (any (minval(a, 1, lo) /= HUGE(a))) STOP 11
+ if (any (minval(a, 1, .true.) /= (/1., -31./))) STOP 12
- if (any (product(a, 1, .true.) /= (/13., 31./))) call abort
- if (any (product(a, 1, lo ) /= (/1., 1./))) call abort
+ if (any (product(a, 1, .true.) /= (/13., 31./))) STOP 13
+ if (any (product(a, 1, lo ) /= (/1., 1./))) STOP 14
- if (any (sum(a, 1, .true.) /= (/14., -32./))) call abort
- if (any (sum(a, 1, lo) /= (/0., 0./))) call abort
+ if (any (sum(a, 1, .true.) /= (/14., -32./))) STOP 15
+ if (any (sum(a, 1, lo) /= (/0., 0./))) STOP 16
end program main
real,dimension(2,2)::m, n
m=f()+c
- if (any (m .ne. reshape((/2,3,4,5/),(/2,2/)))) call abort ()
+ if (any (m .ne. reshape((/2,3,4,5/),(/2,2/)))) STOP 1
m=c+f()
- if (any (m .ne. reshape((/2,3,4,5/),(/2,2/)))) call abort ()
+ if (any (m .ne. reshape((/2,3,4,5/),(/2,2/)))) STOP 2
call sub(m+f())
- if (any (n .ne. reshape((/3,4,5,6/),(/2,2/)))) call abort ()
+ if (any (n .ne. reshape((/3,4,5,6/),(/2,2/)))) STOP 3
call sub(c+m)
- if (any (n .ne. reshape((/3,5,7,9/),(/2,2/)))) call abort ()
+ if (any (n .ne. reshape((/3,5,7,9/),(/2,2/)))) STOP 4
call sub(f()+c)
- if (any (n .ne. reshape((/2,3,4,5/),(/2,2/)))) call abort ()
+ if (any (n .ne. reshape((/2,3,4,5/),(/2,2/)))) STOP 5
call sub(c+f())
- if (any (n .ne. reshape((/2,3,4,5/),(/2,2/)))) call abort ()
+ if (any (n .ne. reshape((/2,3,4,5/),(/2,2/)))) STOP 6
contains
X = SCALE (X, I1)
X = SCALE (X, I2)
-IF (X.NE.1.) CALL ABORT()
+IF (X.NE.1.) STOP 1
X = SCALE (X, I4)
X = SCALE (X, I8)
-IF (X.NE.1.) CALL ABORT()
+IF (X.NE.1.) STOP 2
Y = SCALE (Y, I1)
Y = SCALE (Y, I2)
-IF (Y.NE.1._DP) CALL ABORT()
+IF (Y.NE.1._DP) STOP 3
Y = SCALE (Y, I4)
Y = SCALE (Y, I8)
-IF (Y.NE.1._DP) CALL ABORT()
+IF (Y.NE.1._DP) STOP 4
END
s = 'xi'
w = scan(s, 'iI')
- if (w /= 2) call abort
+ if (w /= 2) STOP 1
w = scan(s, 'xX', .true.)
- if (w /= 1) call abort
+ if (w /= 1) STOP 2
w = scan(s, 'ab')
- if (w /= 0) call abort
+ if (w /= 0) STOP 3
w = scan(s, 'ab', .true.)
- if (w /= 0) call abort
+ if (w /= 0) STOP 4
s = 'xi'
t = 'iI'
w = scan(s, t)
- if (w /= 2) call abort
+ if (w /= 2) STOP 5
t = 'xX'
w = scan(s, t, .true.)
- if (w /= 1) call abort
+ if (w /= 1) STOP 6
t = 'ab'
w = scan(s, t)
- if (w /= 0) call abort
+ if (w /= 0) STOP 7
w = scan(s, t, .true.)
- if (w /= 0) call abort
+ if (w /= 0) STOP 8
end program b
iscan = scan('AA','A',back=A)
iverify = verify('xx','A',back=A)
- if (iscan /= 2 .or. iverify /= 2) call abort ()
+ if (iscan /= 2 .or. iverify /= 2) STOP 1
print *, iverify, iscan
! write(*,'(a)') 'SCAN test: A = '//trim(tf(iscan)) ! should print true
! write(*,'(a)') 'VERIFY test: A = '//trim(tf(iverify)) ! should print true
if ((t1a - t1) < -12.0*3600.0 ) t1 = t1 - 24.0*3600.0
if ((t1a - dat1) < -12.0*3600.0 ) dat1 = dat1 - 24.0*3600.0
if ((dat1 < nearest(t1, -1.)) .or. (dat1 > nearest(t1a, 1.)))
- & call abort ()
+ & STOP 1
t2a = secnds (t1a)
call date_and_time (dum1, dum2, dum3, values)
t2 = secnds (t1)
! handle midnight shift
if ((dat2 - dat1) < -12.0*3600.0 ) dat1 = dat1 - 24.0*3600.0
if (((dat2 - dat1) < t2a - 0.008) .or.
- & ((dat2 - dat1) > t2 + 0.008)) call abort ()
+ & ((dat2 - dat1) > t2 + 0.008)) STOP 2
end
if ((t1a - t1) < -12.0*3600.0 ) t1 = t1 - 24.0*3600.0
if ((t1a - dat1) < -12.0*3600.0 ) dat1 = dat1 - 24.0*3600.0
if ((dat1 < nearest(t1, -1.)) .or. (dat1 > nearest(t1a, 1.)))
- & call abort ()
+ & STOP 1
do j=1,10000
do i=1,10000
end do
! handle midnight shift
if ((dat2 - dat1) < -12.0*3600.0 ) dat1 = dat1 - 24.0*3600.0
if (((dat2 - dat1) < t2a - 0.008) .or.
- & ((dat2 - dat1) > t2 + 0.008)) call abort ()
+ & ((dat2 - dat1) > t2 + 0.008)) STOP 2
end
do i = 1, 5
select case(i)
case (1)
- if (i /= 1) call abort
+ if (i /= 1) STOP 1
case (2:3)
- if (i /= 2 .and. i /= 3) call abort
+ if (i /= 2 .and. i /= 3) STOP 2
case (4)
- if (i /= 4) call abort
+ if (i /= 4) STOP 3
case default
- if (i /= 5) call abort
+ if (i /= 5) STOP 4
end select
end do
end program select_2
do i = 1, 4
select case(i)
case (1)
- if (i /= 1) call abort
+ if (i /= 1) STOP 1
case (3:2)
- call abort
+ STOP 2
case (4)
- if (i /= 4) call abort
+ if (i /= 4) STOP 3
case default
- if (i /= 2 .and. i /= 3) call abort
+ if (i /= 2 .and. i /= 3) STOP 4
end select
end do
end program select_3
do i = 1, 34, 4
select case(i)
case (:5)
- if (i /= 1 .and. i /= 5) call abort
+ if (i /= 1 .and. i /= 5) STOP 1
case (13:21)
- if (i /= 13 .and. i /= 17 .and. i /= 21) call abort
+ if (i /= 13 .and. i /= 17 .and. i /= 21) STOP 2
case (29:)
- if (i /= 29 .and. i /= 33) call abort
+ if (i /= 29 .and. i /= 33) STOP 3
case default
- if (i /= 9 .and. i /= 25) call abort
+ if (i /= 9 .and. i /= 25) STOP 4
end select
end do
end program select_4
! kind = 4, reachable
case (1_4)
- if (i /= 1_4) call abort
+ if (i /= 1_4) STOP 1
! kind = 8, reachable
case (2_8)
- if (i /= 2_8) call abort
+ if (i /= 2_8) STOP 2
! kind = 4, unreachable because of range of i
case (200) ! { dg-warning "not in the range" }
- call abort
+ STOP 3
case default
- if (i /= 3) call abort
+ if (i /= 3) STOP 4
end select
end do
end program select_5
end function char_select2
end interface
- if (char_select("foo") /= 1) call abort
- if (char_select("foo ") /= 1) call abort
- if (char_select("foo2 ") /= -1) call abort
- if (char_select("bar") /= 2) call abort
- if (char_select("gee") /= 2) call abort
- if (char_select("000") /= -1) call abort
- if (char_select("101") /= -1) call abort
- if (char_select("109") /= -1) call abort
- if (char_select("111") /= 3) call abort
- if (char_select("254") /= -1) call abort
- if (char_select("999") /= 3) call abort
- if (char_select("9989") /= -1) call abort
- if (char_select("1882") /= -1) call abort
+ if (char_select("foo") /= 1) STOP 1
+ if (char_select("foo ") /= 1) STOP 2
+ if (char_select("foo2 ") /= -1) STOP 3
+ if (char_select("bar") /= 2) STOP 4
+ if (char_select("gee") /= 2) STOP 5
+ if (char_select("000") /= -1) STOP 6
+ if (char_select("101") /= -1) STOP 7
+ if (char_select("109") /= -1) STOP 8
+ if (char_select("111") /= 3) STOP 9
+ if (char_select("254") /= -1) STOP 10
+ if (char_select("999") /= 3) STOP 11
+ if (char_select("9989") /= -1) STOP 12
+ if (char_select("1882") /= -1) STOP 13
- if (char_select2("foo") /= 1) call abort
- if (char_select2("foo ") /= 1) call abort
- if (char_select2("foo2 ") /= -1) call abort
- if (char_select2("bar") /= 2) call abort
- if (char_select2("gee") /= 2) call abort
- if (char_select2("000") /= -1) call abort
- if (char_select2("101") /= -1) call abort
- if (char_select2("109") /= -1) call abort
- if (char_select2("111") /= 3) call abort
- if (char_select2("254") /= -1) call abort
- if (char_select2("999") /= 3) call abort
- if (char_select2("9989") /= -1) call abort
- if (char_select2("1882") /= -1) call abort
+ if (char_select2("foo") /= 1) STOP 14
+ if (char_select2("foo ") /= 1) STOP 15
+ if (char_select2("foo2 ") /= -1) STOP 16
+ if (char_select2("bar") /= 2) STOP 17
+ if (char_select2("gee") /= 2) STOP 18
+ if (char_select2("000") /= -1) STOP 19
+ if (char_select2("101") /= -1) STOP 20
+ if (char_select2("109") /= -1) STOP 21
+ if (char_select2("111") /= 3) STOP 22
+ if (char_select2("254") /= -1) STOP 23
+ if (char_select2("999") /= 3) STOP 24
+ if (char_select2("9989") /= -1) STOP 25
+ if (char_select2("1882") /= -1) STOP 26
end program test
! { dg-do run }
! { dg-options "-O -fdump-tree-original" }
- if (foo ('E') .ne. 1) call abort
- if (foo ('e') .ne. 1) call abort
- if (foo ('f') .ne. 2) call abort
- if (foo ('g') .ne. 2) call abort
- if (foo ('h') .ne. 2) call abort
- if (foo ('Q') .ne. 3) call abort
- if (foo (' ') .ne. 4) call abort
- if (bar ('e') .ne. 1) call abort
- if (bar ('f') .ne. 3) call abort
+ if (foo ('E') .ne. 1) STOP 1
+ if (foo ('e') .ne. 1) STOP 2
+ if (foo ('f') .ne. 2) STOP 3
+ if (foo ('g') .ne. 2) STOP 4
+ if (foo ('h') .ne. 2) STOP 5
+ if (foo ('Q') .ne. 3) STOP 6
+ if (foo (' ') .ne. 4) STOP 7
+ if (bar ('e') .ne. 1) STOP 8
+ if (bar ('f') .ne. 3) STOP 9
contains
function foo (c)
character :: c
select type(aa => a)
type is (d_base_sparse_mat)
write(0,*) 'NV = ',size(aa%v)
- if (size(aa%v) /= 10) call abort ()
+ if (size(aa%v) /= 10) STOP 1
class default
write(0,*) 'Not implemented yet '
end select
select type(bar => m%foo)
type is(t0)
print *, bar
- if (bar%j /= 42) call abort ()
+ if (bar%j /= 42) STOP 1
end select
end
class(d_base_sparse_mat), allocatable :: a
allocate(x_base_sparse_mat :: a)
- if (a%get_fmt()/="XBASE") call abort()
+ if (a%get_fmt()/="XBASE") STOP 1
select type(a)
type is (d_base_sparse_mat)
- call abort()
+ STOP 2
class default
- if (a%get_fmt()/="XBASE") call abort()
+ if (a%get_fmt()/="XBASE") STOP 3
end select
end program bug20
select type (aa=>a)
type is (t1)
- if (allocated(aa%ja)) call abort()
+ if (allocated(aa%ja)) STOP 1
end select
end
i = 3
end select
- if (i /= 1) call abort()
+ if (i /= 1) STOP 1
cp => b
i = 0
i = 3
end select
- if (i /= 2) call abort()
+ if (i /= 2) STOP 2
cp => c
i = 0
i = 3
end select
- if (i /= 3) call abort()
+ if (i /= 3) STOP 3
end
allocate(m%foo(3), source = [(t0(n), n = 1,3)])
select type(bar => m%foo)
type is(t0)
- if (any (bar%j .ne. [1,2,3])) call abort
+ if (any (bar%j .ne. [1,2,3])) STOP 1
type is(t1)
- call abort
+ STOP 2
end select
deallocate(m%foo)
! Then with m%foo of another dynamic type.
select type(bar => m%foo)
type is(t0)
- call abort
+ STOP 3
type is(t1)
- if (any (bar%k .ne. [40,50,60])) call abort
+ if (any (bar%k .ne. [40,50,60])) STOP 4
end select
! Try it with a selector array section.
select type(bar => m%foo(2:3))
type is(t0)
- call abort
+ STOP 5
type is(t1)
- if (any (bar%k .ne. [50,60])) call abort
+ if (any (bar%k .ne. [50,60])) STOP 6
end select
! Try it with a selector array element.
select type(bar => m%foo(2))
type is(t0)
- call abort
+ STOP 7
type is(t1)
- if (bar%k .ne. 50) call abort
+ if (bar%k .ne. 50) STOP 8
end select
! Now try class is and a selector which is an array section of an associate name.
select type(bar => m%foo)
type is(t0)
- call abort
+ STOP 9
class is (t1)
- if (any (bar%j .ne. [4,5,6])) call abort
+ if (any (bar%j .ne. [4,5,6])) STOP 10
select type (foobar => bar(3:2:-1))
type is (t1)
- if (any (foobar%k .ne. [60,50])) call abort
+ if (any (foobar%k .ne. [60,50])) STOP 11
end select
end select
! Now try class is and a selector which is an array element of an associate name.
select type(bar => m%foo)
type is(t0)
- call abort
+ STOP 12
class is (t1)
- if (any (bar%j .ne. [4,5,6])) call abort
+ if (any (bar%j .ne. [4,5,6])) STOP 13
select type (foobar => bar(2))
type is (t1)
- if (foobar%k .ne. 50) call abort
+ if (foobar%k .ne. 50) STOP 14
end select
end select
end do
select type(bar => m1(3)%foo)
type is(t0)
- if (bar%j .ne. 297) call abort
+ if (bar%j .ne. 297) STOP 15
type is(t1)
- call abort
+ STOP 16
end select
select type(bar => m1(1)%foo)
type is(t0)
- call abort
+ STOP 17
type is(t1)
- if (bar%k .ne. 999) call abort
+ if (bar%k .ne. 999) STOP 18
end select
end
allocate(m%foo(3), source = [(t0(n), n = 1,3)])
select type(bar => m%foo)
type is(t0)
- if (any (bar%j .ne. [1,2,3])) call abort
+ if (any (bar%j .ne. [1,2,3])) STOP 1
type is(t1)
- call abort
+ STOP 2
end select
deallocate(m%foo)
! Then with m%foo of another dynamic type.
select type(bar => m%foo)
type is(t0)
- call abort
+ STOP 3
type is(t1)
- if (any (bar%k .ne. [40,50,60])) call abort
+ if (any (bar%k .ne. [40,50,60])) STOP 4
end select
! Try it with a selector array section.
select type(bar => m%foo(2:3))
type is(t0)
- call abort
+ STOP 5
type is(t1)
- if (any (bar%k .ne. [50,60])) call abort
+ if (any (bar%k .ne. [50,60])) STOP 6
end select
! Try it with a selector array element.
select type(bar => m%foo(2))
type is(t0)
- call abort
+ STOP 7
type is(t1)
- if (bar%k .ne. 50) call abort
+ if (bar%k .ne. 50) STOP 8
end select
! Now try class is and a selector which is an array section of an associate name.
select type(bar => m%foo)
type is(t0)
- call abort
+ STOP 9
class is (t1)
- if (any (bar%j .ne. [4,5,6])) call abort
+ if (any (bar%j .ne. [4,5,6])) STOP 10
select type (foobar => bar(3:2:-1))
type is (t1)
- if (any (foobar%k .ne. [60,50])) call abort
+ if (any (foobar%k .ne. [60,50])) STOP 11
end select
end select
! Now try class is and a selector which is an array element of an associate name.
select type(bar => m%foo)
type is(t0)
- call abort
+ STOP 12
class is (t1)
- if (any (bar%j .ne. [4,5,6])) call abort
+ if (any (bar%j .ne. [4,5,6])) STOP 13
select type (foobar => bar(2))
type is (t1)
- if (foobar%k .ne. 50) call abort
+ if (foobar%k .ne. 50) STOP 14
end select
end select
end do
select type(bar => m1(3)%foo)
type is(t0)
- if (bar%j .ne. 297) call abort
+ if (bar%j .ne. 297) STOP 15
type is(t1)
- call abort
+ STOP 16
end select
select type(bar => m1(1)%foo)
type is(t0)
- call abort
+ STOP 17
type is(t1)
- if (bar%k .ne. 999) call abort
+ if (bar%k .ne. 999) STOP 18
end select
end
select type(bar => m%foo) ! { dg-error "part reference with nonzero rank" }
type is(t0)
- if (any (bar%j .ne. [99, 198, 297, 396])) call abort
+ if (any (bar%j .ne. [99, 198, 297, 396])) STOP 1
type is(t1)
- call abort
+ STOP 2
end select
end
end select
print *,b%i,b%j
- if (b%i /= -1) call abort()
- if (b%j /= 2) call abort()
+ if (b%i /= -1) STOP 1
+ if (b%j /= 2) STOP 2
select type (cp)
type is (t1)
end select
print *,b%i,b%j
- if (b%i /= 6) call abort()
- if (b%j /= 2) call abort()
+ if (b%i /= 6) STOP 3
+ if (b%j /= 2) STOP 4
end
select type(me)
type is(t_Foo)
- if (len(me%string) /= 9) call abort()
+ if (len(me%string) /= 9) STOP 1
end select
alias => me
select type(alias)
type is(t_Foo)
- if (len(alias%string) /= 9) call abort()
+ if (len(alias%string) /= 9) STOP 2
end select
end subroutine bar
end program foo
integer :: switch
select type(x)
type is(CS5SS)
- if (switch .ne. 1) call abort
+ if (switch .ne. 1) STOP 1
type is(SQS3C)
- if (switch .ne. 2) call abort
+ if (switch .ne. 2) STOP 2
class default
- call abort
+ STOP 3
end select
end subroutine sub
end module types
real :: cst3(2) = [5.0, 6.0]
write (buffer1, *) cst1
- if (.not.associated(return_pointer1(cst1))) call abort
- if (trim (buffer1) .ne. trim (buffer2)) call abort
+ if (.not.associated(return_pointer1(cst1))) STOP 1
+ if (trim (buffer1) .ne. trim (buffer2)) STOP 2
select type (ptr)
type is (real)
- if (any (ptr .ne. cst2)) call abort
+ if (any (ptr .ne. cst2)) STOP 3
end select
deallocate (ptr)
write (buffer1, *) cst2
- if (.not.associated(return_pointer(cst2))) call abort
- if (trim (buffer1) .ne. trim (buffer2)) call abort
+ if (.not.associated(return_pointer(cst2))) STOP 4
+ if (trim (buffer1) .ne. trim (buffer2)) STOP 5
select type (ptr)
type is (real)
- if (any (ptr .ne. cst3)) call abort
+ if (any (ptr .ne. cst3)) STOP 6
end select
deallocate (ptr)
write (buffer1, *) cst1
- if (.not.associated(return_pointer2(cst1))) call abort
- if (trim (buffer1) .ne. trim (buffer2)) call abort
+ if (.not.associated(return_pointer2(cst1))) STOP 7
+ if (trim (buffer1) .ne. trim (buffer2)) STOP 8
select type (ptr)
type is (real)
- if (any (ptr .ne. cst2)) call abort
+ if (any (ptr .ne. cst2)) STOP 9
end select
deallocate (ptr)
call get_value (val)
select type (val)
type is (character(*))
- if (size (val) .ne. 2) call abort
- if (len(val) .ne. 3) call abort
- if (any (val .ne. ['foo','bar'])) call abort
+ if (size (val) .ne. 2) STOP 1
+ if (len(val) .ne. 3) STOP 2
+ if (any (val .ne. ['foo','bar'])) STOP 3
end select
contains
subroutine get_value (value)
write (*,*) node%x
if (.not.( (cnt == 1 .and. node%x == 1.23) &
.or. (cnt == 5 .and. node%x == 4.56))) then
- call abort()
+ STOP 1
end if
type is (integer_node_type)
write (*,*) node%i
- if (cnt /= 2 .or. node%i /= 42) call abort()
+ if (cnt /= 2 .or. node%i /= 42) STOP 2
type is (node_type)
write (*,*) "Node with no data."
- if (cnt /= 3) call abort()
+ if (cnt /= 3) STOP 3
class default
Write (*,*) "Some other node type."
- if (cnt /= 4) call abort()
+ if (cnt /= 4) STOP 4
end select
node => next_node(node)
end do
- if (cnt /= 5) call abort()
+ if (cnt /= 5) STOP 5
call destroy_list(list)
stop
end program main
end select
print *,b%i,b%j
- if (b%i /= -1) call abort()
- if (b%j /= 2) call abort()
+ if (b%i /= -1) STOP 1
+ if (b%j /= 2) STOP 2
select type (aa => b%c)
type is (t1)
end select
print *,b%i,b%j
- if (b%i /= 6) call abort()
- if (b%j /= 2) call abort()
+ if (b%i /= 6) STOP 3
+ if (b%j /= 2) STOP 4
print *,aa
- if (aa/=5) call abort()
+ if (aa/=5) STOP 5
end
type is(t3)
mt3%j = 2*mt2%i
print *,mt3%j
- if (mt3%j /= 10) call abort()
+ if (mt3%j /= 10) STOP 1
class default
- call abort()
+ STOP 2
end select
class default
- call abort()
+ STOP 3
end select
end
cp%b = 76
call s(cp)
print *,cp%a,cp%b
- if (cp%a /= cp%b) call abort()
+ if (cp%a /= cp%b) STOP 1
class default
- call abort()
+ STOP 2
end select
contains
i = 4
end select
print *,i
- if (i /= 3) call abort()
+ if (i /= 3) STOP 1
cp => a
select type (cp)
i = 3
end select
print *,i
- if (i /= 1) call abort()
+ if (i /= 1) STOP 2
cp => b
select type (cp)
i = 5
end select
print *,i
- if (i /= 4) call abort()
+ if (i /= 4) STOP 3
cp => b
select type (cp)
i = 3
end select
print *,i
- if (i /= 4) call abort()
+ if (i /= 4) STOP 4
cp => a
select type (cp)
i = 5
end select
print *,i
- if (i /= 3) call abort()
+ if (i /= 3) STOP 5
end
character(kind=selected_char_kind ("ascii")) :: s3
character(kind=selected_char_kind ("default")) :: s4
- if (kind (s1) /= selected_char_kind ("ascii")) call abort
- if (kind (s2) /= selected_char_kind ("default")) call abort
- if (kind (s3) /= ascii) call abort
- if (kind (s4) /= default) call abort
+ if (kind (s1) /= selected_char_kind ("ascii")) STOP 1
+ if (kind (s2) /= selected_char_kind ("default")) STOP 2
+ if (kind (s3) /= ascii) STOP 3
+ if (kind (s4) /= default) STOP 4
- if (selected_char_kind("ascii") /= 1) call abort
- if (selected_char_kind("default") /= 1) call abort
- if (selected_char_kind("defauLt") /= 1) call abort
- if (selected_char_kind("foo") /= -1) call abort
- if (selected_char_kind("asciiiii") /= -1) call abort
- if (selected_char_kind("default ") /= 1) call abort
+ if (selected_char_kind("ascii") /= 1) STOP 5
+ if (selected_char_kind("default") /= 1) STOP 6
+ if (selected_char_kind("defauLt") /= 1) STOP 7
+ if (selected_char_kind("foo") /= -1) STOP 8
+ if (selected_char_kind("asciiiii") /= -1) STOP 9
+ if (selected_char_kind("default ") /= 1) STOP 10
call test("ascii", 1)
call test("default", 1)
call test(default_"default ", 1)
call test(default_"default x", -1)
- if (kind (selected_char_kind ("")) /= kind(0)) call abort
+ if (kind (selected_char_kind ("")) /= kind(0)) STOP 11
end
subroutine test(s,i)
integer i
call test2(s,i)
- if (selected_char_kind (s) /= i) call abort
+ if (selected_char_kind (s) /= i) STOP 12
end subroutine test
subroutine test2(s,i)
character(len=*,kind=selected_char_kind("default")) s
integer i
- if (selected_char_kind (s) /= i) call abort
+ if (selected_char_kind (s) /= i) STOP 13
end subroutine test2
character(len=20) :: s
s = "ascii"
- if (selected_char_kind(s) /= selected_char_kind("ascii")) call abort
+ if (selected_char_kind(s) /= selected_char_kind("ascii")) STOP 1
s = "default"
- if (selected_char_kind(s) /= selected_char_kind("default")) call abort
+ if (selected_char_kind(s) /= selected_char_kind("default")) STOP 2
s = "iso_10646"
- if (selected_char_kind(s) /= selected_char_kind("iso_10646")) call abort
+ if (selected_char_kind(s) /= selected_char_kind("iso_10646")) STOP 3
s = ""
- if (selected_char_kind(s) /= selected_char_kind("")) call abort
+ if (selected_char_kind(s) /= selected_char_kind("")) STOP 4
s = "invalid"
- if (selected_char_kind(s) /= selected_char_kind("invalid")) call abort
+ if (selected_char_kind(s) /= selected_char_kind("invalid")) STOP 5
end
! PR fortran/32968
program selected
- if (selected_int_kind (1) /= 1) call abort
- if (selected_int_kind (3) /= 2) call abort
- if (selected_int_kind (5) /= 4) call abort
- if (selected_int_kind (10) /= 8) call abort
- if (selected_real_kind (1) /= 4) call abort
- if (selected_real_kind (2) /= 4) call abort
- if (selected_real_kind (9) /= 8) call abort
- if (selected_real_kind (10) /= 8) call abort
+ if (selected_int_kind (1) /= 1) STOP 1
+ if (selected_int_kind (3) /= 2) STOP 2
+ if (selected_int_kind (5) /= 4) STOP 3
+ if (selected_int_kind (10) /= 8) STOP 4
+ if (selected_real_kind (1) /= 4) STOP 5
+ if (selected_real_kind (2) /= 4) STOP 6
+ if (selected_real_kind (9) /= 8) STOP 7
+ if (selected_real_kind (10) /= 8) STOP 8
end program selected
! { dg-do run }
-! { dg-options "-std=f2008 -fall-intrinsics" }
+! { dg-options "-std=f2008 " }
!
integer :: p, r, rdx
! Run-time version
rdx = 2
-if (selected_real_kind(radix=rdx) /= 4) call abort()
+if (selected_real_kind(radix=rdx) /= 4) STOP 1
rdx = 4
-if (selected_real_kind(radix=rdx) /= -5) call abort()
+if (selected_real_kind(radix=rdx) /= -5) STOP 2
rdx = radix(0.0)
p = precision(0.0)
r = range(0.0)
-if (selected_real_kind(p,r,rdx) /= kind(0.0)) call abort()
+if (selected_real_kind(p,r,rdx) /= kind(0.0)) STOP 3
rdx = radix(0.0d0)
p = precision(0.0d0)
r = range(0.0d0)
-if (selected_real_kind(p,r,rdx) /= kind(0.0d0)) call abort()
+if (selected_real_kind(p,r,rdx) /= kind(0.0d0)) STOP 4
end
integer, dimension (11:, -8:), target :: b
integer, dimension (:, :), pointer :: ptr
- if (lbound (b, 1) .ne. 11) call abort
- if (ubound (b, 1) .ne. 50) call abort
- if (lbound (b, 2) .ne. -8) call abort
- if (ubound (b, 2) .ne. 71) call abort
+ if (lbound (b, 1) .ne. 11) STOP 1
+ if (ubound (b, 1) .ne. 50) STOP 2
+ if (lbound (b, 2) .ne. -8) STOP 3
+ if (ubound (b, 2) .ne. 71) STOP 4
- if (lbound (b (:, :), 1) .ne. 1) call abort
- if (ubound (b (:, :), 1) .ne. 40) call abort
- if (lbound (b (:, :), 2) .ne. 1) call abort
- if (ubound (b (:, :), 2) .ne. 80) call abort
+ if (lbound (b (:, :), 1) .ne. 1) STOP 5
+ if (ubound (b (:, :), 1) .ne. 40) STOP 6
+ if (lbound (b (:, :), 2) .ne. 1) STOP 7
+ if (ubound (b (:, :), 2) .ne. 80) STOP 8
- if (lbound (b (20:30:3, 40), 1) .ne. 1) call abort
- if (ubound (b (20:30:3, 40), 1) .ne. 4) call abort
+ if (lbound (b (20:30:3, 40), 1) .ne. 1) STOP 9
+ if (ubound (b (20:30:3, 40), 1) .ne. 4) STOP 10
ptr => b
- if (lbound (ptr, 1) .ne. 11) call abort
- if (ubound (ptr, 1) .ne. 50) call abort
- if (lbound (ptr, 2) .ne. -8) call abort
- if (ubound (ptr, 2) .ne. 71) call abort
+ if (lbound (ptr, 1) .ne. 11) STOP 11
+ if (ubound (ptr, 1) .ne. 50) STOP 12
+ if (lbound (ptr, 2) .ne. -8) STOP 13
+ if (ubound (ptr, 2) .ne. 71) STOP 14
end subroutine test
end program main
j = 1
i = 10
res = shape(a(1:1,i:j:1))
- if (res(1) /=1 .or. res(2) /= 0) call abort
+ if (res(1) /=1 .or. res(2) /= 0) STOP 1
res = shape(a(1:1,j:i:-1))
- if (res(1) /=1 .or. res(2) /= 0) call abort
+ if (res(1) /=1 .or. res(2) /= 0) STOP 2
end program main
integer, dimension(:), pointer :: int1d_retrieved
allocate(int1d_retrieved(10))
- if (any(shape(int1d_retrieved) /= shape(INT1D))) call abort()
+ if (any(shape(int1d_retrieved) /= shape(INT1D))) STOP 1
end
Integer:: X(2,2)
Integer:: X2(7:11,8:9)
- if (size((X)) /= 4) call abort ()
- if (any (Shape((X)) /= [2,2])) call abort ()
- if (any (lbound((X)) /= [1,1])) call abort ()
- if (any (ubound((X)) /= [2,2])) call abort ()
+ if (size((X)) /= 4) STOP 1
+ if (any (Shape((X)) /= [2,2])) STOP 2
+ if (any (lbound((X)) /= [1,1])) STOP 3
+ if (any (ubound((X)) /= [2,2])) STOP 4
- if (size(X2) /= 10) call abort ()
- if (any (Shape(X2) /= [5,2])) call abort ()
- if (any (lbound(X2) /= [7,8])) call abort ()
- if (any (ubound(X2) /= [11,9])) call abort ()
+ if (size(X2) /= 10) STOP 5
+ if (any (Shape(X2) /= [5,2])) STOP 6
+ if (any (lbound(X2) /= [7,8])) STOP 7
+ if (any (ubound(X2) /= [11,9])) STOP 8
- if (size((X2)) /= 10) call abort ()
- if (any (Shape((X2)) /= [5,2])) call abort ()
- if (any (lbound((X2)) /= [1,1])) call abort ()
- if (any (ubound((X2)) /= [5,2])) call abort ()
+ if (size((X2)) /= 10) STOP 9
+ if (any (Shape((X2)) /= [5,2])) STOP 10
+ if (any (lbound((X2)) /= [1,1])) STOP 11
+ if (any (ubound((X2)) /= [5,2])) STOP 12
End Program Main
! { dg-final { scan-tree-dump-times "abort" 0 "original" } }
real, allocatable :: x(:,:)
allocate(x(2,5))
- if (any(shape(x) /= [ 2, 5 ])) call abort
- if (any(shape(x,kind=1) /= [ 2, 5 ])) call abort
- if (any(shape(x,kind=2) /= [ 2, 5 ])) call abort
- if (any(shape(x,kind=4) /= [ 2, 5 ])) call abort
- if (any(shape(x,kind=8) /= [ 2, 5 ])) call abort
+ if (any(shape(x) /= [ 2, 5 ])) STOP 1
+ if (any(shape(x,kind=1) /= [ 2, 5 ])) STOP 2
+ if (any(shape(x,kind=2) /= [ 2, 5 ])) STOP 3
+ if (any(shape(x,kind=4) /= [ 2, 5 ])) STOP 4
+ if (any(shape(x,kind=8) /= [ 2, 5 ])) STOP 5
end
real, allocatable :: x(:,:)
allocate(x(2,5))
- if (any(shape(x) /= [ 2, 5 ])) call abort
- if (any(shape(x,kind=1) /= [ 2, 5 ])) call abort
- if (any(shape(x,kind=2) /= [ 2, 5 ])) call abort
- if (any(shape(x,kind=4) /= [ 2, 5 ])) call abort
- if (any(shape(x,kind=8) /= [ 2, 5 ])) call abort
+ if (any(shape(x) /= [ 2, 5 ])) STOP 1
+ if (any(shape(x,kind=1) /= [ 2, 5 ])) STOP 2
+ if (any(shape(x,kind=2) /= [ 2, 5 ])) STOP 3
+ if (any(shape(x,kind=4) /= [ 2, 5 ])) STOP 4
+ if (any(shape(x,kind=8) /= [ 2, 5 ])) STOP 5
end program test
d2 = 1
d4 = 1
d8 = 1
- if (any(eoshift(r,shift=s1,dim=d1) /= r1)) call abort
- if (any(eoshift(r,shift=s2,dim=d2) /= r1)) call abort
- if (any(eoshift(r,shift=s4,dim=d4) /= r1)) call abort
- if (any(eoshift(r,shift=s8,dim=d8) /= r1)) call abort
- if (any(cshift(r,shift=s1,dim=d1) /= r2)) call abort
- if (any(cshift(r,shift=s2,dim=d2) /= r2)) call abort
- if (any(cshift(r,shift=s4,dim=d4) /= r2)) call abort
- if (any(cshift(r,shift=s8,dim=d8) /= r2)) call abort
+ if (any(eoshift(r,shift=s1,dim=d1) /= r1)) STOP 1
+ if (any(eoshift(r,shift=s2,dim=d2) /= r1)) STOP 2
+ if (any(eoshift(r,shift=s4,dim=d4) /= r1)) STOP 3
+ if (any(eoshift(r,shift=s8,dim=d8) /= r1)) STOP 4
+ if (any(cshift(r,shift=s1,dim=d1) /= r2)) STOP 5
+ if (any(cshift(r,shift=s2,dim=d2) /= r2)) STOP 6
+ if (any(cshift(r,shift=s4,dim=d4) /= r2)) STOP 7
+ if (any(cshift(r,shift=s8,dim=d8) /= r2)) STOP 8
end program main
end interface
#define CHECK(I,SHIFT,RESA,RESL,RESR) \
- if (shifta(I,SHIFT) /= RESA) call abort ; \
- if (shiftr(I,SHIFT) /= RESR) call abort ; \
- if (shiftl(I,SHIFT) /= RESL) call abort ; \
- if (run_shifta(I,SHIFT) /= RESA) call abort ; \
- if (run_shiftr(I,SHIFT) /= RESR) call abort ; \
- if (run_shiftl(I,SHIFT) /= RESL) call abort ; \
- if (ishft(I,SHIFT) /= RESL) call abort ; \
- if (ishft(I,-SHIFT) /= RESR) call abort ; \
- if (run_ishft(I,SHIFT) /= RESL) call abort ; \
- if (run_ishft(I,-SHIFT) /= RESR) call abort
+ if (shifta(I,SHIFT) /= RESA) STOP 1; \
+ if (shiftr(I,SHIFT) /= RESR) STOP 2; \
+ if (shiftl(I,SHIFT) /= RESL) STOP 3; \
+ if (run_shifta(I,SHIFT) /= RESA) STOP 4; \
+ if (run_shiftr(I,SHIFT) /= RESR) STOP 5; \
+ if (run_shiftl(I,SHIFT) /= RESL) STOP 6; \
+ if (ishft(I,SHIFT) /= RESL) STOP 7; \
+ if (ishft(I,-SHIFT) /= RESR) STOP 8; \
+ if (run_ishft(I,SHIFT) /= RESL) STOP 9; \
+ if (run_ishft(I,-SHIFT) /= RESR) STOP 10
CHECK(0_1,0,0_1,0_1,0_1)
CHECK(11_1,0,11_1,11_1,11_1)
implicit none
#define CHECK(I,SHIFT,RESA,RESL,RESR) \
- if (shifta(I,SHIFT) /= RESA) call abort ; \
- if (shiftr(I,SHIFT) /= RESR) call abort ; \
- if (shiftl(I,SHIFT) /= RESL) call abort ; \
- if (run_shifta(I,SHIFT) /= RESA) call abort ; \
- if (run_shiftr(I,SHIFT) /= RESR) call abort ; \
- if (run_shiftl(I,SHIFT) /= RESL) call abort ; \
- if (ishft(I,SHIFT) /= RESL) call abort ; \
- if (ishft(I,-SHIFT) /= RESR) call abort ; \
- if (run_ishft(I,SHIFT) /= RESL) call abort ; \
- if (run_ishft(I,-SHIFT) /= RESR) call abort
+ if (shifta(I,SHIFT) /= RESA) STOP 1; \
+ if (shiftr(I,SHIFT) /= RESR) STOP 2; \
+ if (shiftl(I,SHIFT) /= RESL) STOP 3; \
+ if (run_shifta(I,SHIFT) /= RESA) STOP 4; \
+ if (run_shiftr(I,SHIFT) /= RESR) STOP 5; \
+ if (run_shiftl(I,SHIFT) /= RESL) STOP 6; \
+ if (ishft(I,SHIFT) /= RESL) STOP 7; \
+ if (ishft(I,-SHIFT) /= RESR) STOP 8; \
+ if (run_ishft(I,SHIFT) /= RESL) STOP 9; \
+ if (run_ishft(I,-SHIFT) /= RESR) STOP 10
CHECK(0_16,0,0_16,0_16,0_16)
CHECK(11_16,0,11_16,11_16,11_16)
logical,dimension(4,4) :: index
if (.true.) forall (i = 1:4, j = 1:4) ia(i,j) = 1
-if (any (ia.ne.1)) CALL abort()
+if (any (ia.ne.1)) STOP 1
index(:,:)=.false.
index(2,3) = .true.
if (.true.) where (index) ia = 2
-if (ia(2,3).ne.2) call abort()
+if (ia(2,3).ne.2) STOP 2
end
integer, dimension(N) :: Y = B
! Check the simplifed expressions against the library
- if (any (ISHFTC(3, Y, 5) /= C)) call abort ()
- if (any (ISHFTC(X, 3, 5) /= D)) call abort ()
- if (any (ISHFTC(X, Y, 5) /= E)) call abort ()
+ if (any (ISHFTC(3, Y, 5) /= C)) STOP 1
+ if (any (ISHFTC(X, 3, 5) /= D)) STOP 2
+ if (any (ISHFTC(X, Y, 5) /= E)) STOP 3
end
b = cshift(a, -2)
v = cshift(c, -2)
- if (any(b /= v)) call abort
+ if (any(b /= v)) STOP 1
b = cshift(a, 2)
v = cshift(c, 2)
- if (any(b /= v)) call abort
+ if (any(b /= v)) STOP 2
! Special cases shift = 0, size(a), -size(a)
b = cshift([1, 2, 3, 4, 5], 0)
- if (any(b /= a)) call abort
+ if (any(b /= a)) STOP 3
b = cshift([1, 2, 3, 4, 5], size(a))
- if (any(b /= a)) call abort
+ if (any(b /= a)) STOP 4
b = cshift([1, 2, 3, 4, 5], -size(a))
- if (any(b /= a)) call abort
+ if (any(b /= a)) STOP 5
! simplification of array arg.
b = cshift(2 * a, 0)
- if (any(b /= 2 * a)) call abort
+ if (any(b /= 2 * a)) STOP 6
! An array of derived types works too.
e = [t(1), t(2), t(3), t(4), t(5)]
e = cshift(e, 3)
q = cshift(d, 3)
do i = 1, 5
- if (e(i)%i /= q(i)%i) call abort
+ if (e(i)%i /= q(i)%i) STOP 7
end do
end program foo
integer, parameter, dimension(3,4,5) :: c3 = cshift(c,shift=sh3,dim=3)
b = a
- if (any(cshift(a,1) /= cshift(b,1))) call abort
- if (any(cshift(a,2) /= cshift(b,2))) call abort
- if (any(cshift(a,1,dim=2) /= cshift(b,1,dim=2))) call abort
+ if (any(cshift(a,1) /= cshift(b,1))) STOP 1
+ if (any(cshift(a,2) /= cshift(b,2))) STOP 2
+ if (any(cshift(a,1,dim=2) /= cshift(b,1,dim=2))) STOP 3
d = c
- if (any(cshift(c,1) /= cshift(d,1))) call abort
- if (any(cshift(c,2) /= cshift(d,2))) call abort
- if (any(cshift(c,3) /= cshift(d,3))) call abort
+ if (any(cshift(c,1) /= cshift(d,1))) STOP 4
+ if (any(cshift(c,2) /= cshift(d,2))) STOP 5
+ if (any(cshift(c,3) /= cshift(d,3))) STOP 6
- if (any(cshift(c,1,dim=2) /= cshift(d,1,dim=2))) call abort
- if (any(cshift(c,2,dim=2) /= cshift(d,2,dim=2))) call abort
- if (any(cshift(c,3,dim=3) /= cshift(d,3,dim=3))) call abort
+ if (any(cshift(c,1,dim=2) /= cshift(d,1,dim=2))) STOP 7
+ if (any(cshift(c,2,dim=2) /= cshift(d,2,dim=2))) STOP 8
+ if (any(cshift(c,3,dim=3) /= cshift(d,3,dim=3))) STOP 9
- if (any(cshift(d,shift=sh1,dim=1) /= c1)) call abort
- if (any(cshift(d,shift=sh2,dim=2) /= c2)) call abort
- if (any(cshift(d,shift=sh3,dim=3) /= c3)) call abort
+ if (any(cshift(d,shift=sh1,dim=1) /= c1)) STOP 10
+ if (any(cshift(d,shift=sh2,dim=2) /= c2)) STOP 11
+ if (any(cshift(d,shift=sh3,dim=3) /= c3)) STOP 12
end program main
n2 = 2
n3 = 3
- if (any(b1 /= a)) call abort
- if (any(b2 /= [2, 3, 0])) call abort
- if (any(b3 /= [0, 0, 1])) call abort
- if (any(b4 /= 42)) call abort
- if (any(eoshift(c,shift=1,dim=n1,boundary=33) /= b5)) call abort
- if (any(eoshift(c,shift=2,dim=1) /= b6)) call abort
- if (any(eoshift(c,shift=-1,dim=2) /= b7)) call abort
- if (any(eoshift(c,shift=-1,dim=n2,boundary=[-1,-2,-3]) /= b8)) call abort
- if (any(eoshift(c,shift=-1) /= b9)) call abort
- if (any(eoshift(r,shift=1,dim=n3) /= q1)) call abort
- if (any(b10 /= reshape([ 0, 1, 2, 4, 5, 6, 8, 9, 0],shape(b10)))) call abort
- if (any(b11 /= reshape([42, 42, 6, 42, 2, 9, 1, 5, 42],shape(b11)))) call abort
- if (any(b12 /= reshape([ -3, 1, 2, -7, -7, 4, 7, 8, 9],shape(b11)))) call abort
+ if (any(b1 /= a)) STOP 1
+ if (any(b2 /= [2, 3, 0])) STOP 2
+ if (any(b3 /= [0, 0, 1])) STOP 3
+ if (any(b4 /= 42)) STOP 4
+ if (any(eoshift(c,shift=1,dim=n1,boundary=33) /= b5)) STOP 5
+ if (any(eoshift(c,shift=2,dim=1) /= b6)) STOP 6
+ if (any(eoshift(c,shift=-1,dim=2) /= b7)) STOP 7
+ if (any(eoshift(c,shift=-1,dim=n2,boundary=[-1,-2,-3]) /= b8)) STOP 8
+ if (any(eoshift(c,shift=-1) /= b9)) STOP 9
+ if (any(eoshift(r,shift=1,dim=n3) /= q1)) STOP 10
+ if (any(b10 /= reshape([ 0, 1, 2, 4, 5, 6, 8, 9, 0],shape(b10)))) STOP 11
+ if (any(b11 /= reshape([42, 42, 6, 42, 2, 9, 1, 5, 42],shape(b11)))) STOP 12
+ if (any(b12 /= reshape([ -3, 1, 2, -7, -7, 4, 7, 8, 9],shape(b11)))) STOP 13
if (any(q1 /= reshape([169.,196.,225.,256.,289.,324.,361.,400.,441.,484.,529.,576.,625.,&
676.,729.,784.,841.,900.,961.,1024.,1089.,1156.,1225.,1296.,1369.,1444.,1521.,&
1600.,1681.,1764.,1849.,1936.,2025.,2116.,2209.,2304.,2401.,2500.,2601.,2704.,&
2809.,2916.,3025.,3136.,3249.,3364.,3481.,3600.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.],&
- shape(q1)))) call abort
+ shape(q1)))) STOP 14
if (any(q2 /= reshape([0.,0.,9.,1600.,841.,0.,0.,0.,2025.,484.,0.,0.,1.,0.,225.,2704.,&
1681.,0.,0.,0.,3249.,1156.,121.,0.,169.,4.,729.,0.,2809.,0.,0.,0.,0.,2116.,&
529.,0.,625.,196.,1521.,0.,0.,0.,0.,0.,0.,3364.,1225.,0.,1369.,676.,2601.,&
- 0.,0.,0.,0.,0.,0.,0.,2209.,0.],shape(q2)))) call abort
+ 0.,0.,0.,0.,0.,0.,0.,2209.,0.],shape(q2)))) STOP 15
if (any(q3 /= reshape([-1.,-2.,9.,1600.,841.,-6.,-7.,-8.,2025.,484.,-11.,-12.,1.,&
-2.,225.,2704.,1681.,-6.,-7.,-8.,3249.,1156.,121.,-12.,169.,4.,729.,-4.,&
2809.,-6.,-7.,-8.,-9.,2116.,529.,-12.,625.,196.,1521.,-4.,-5.,-6.,-7.,-8.,&
-9.,3364.,1225.,-12.,1369.,676.,2601.,-4.,-5.,-6.,-7.,-8.,-9.,-10.,2209.,-12.],&
- shape(q3)))) call abort
+ shape(q3)))) STOP 16
if (any(f1 /= reshape(["bbb"," ","ddd"," ","fff"," ","hhh"," ","jjj"," ","lll"," ",&
"nnn"," ","ppp"," ","rrr"," ","ttt"," ","vvv"," ","xxx"," "], &
- shape(f1)))) call abort
+ shape(f1)))) STOP 17
if (any(f2 /= reshape(["AAA","BBB","aaa","bbb","ccc","ddd","CCC","DDD","ggg","hhh","iii","jjj",&
- "EEE","FFF","mmm","nnn","ooo","ppp","GGG","HHH","sss","ttt","uuu","vvv"],shape(f2)))) call abort
+ "EEE","FFF","mmm","nnn","ooo","ppp","GGG","HHH","sss","ttt","uuu","vvv"],shape(f2)))) STOP 18
e2 = e
- if (any (f2 /= eoshift(e2,dim=2,shift=-1,boundary=bnd2))) call abort
+ if (any (f2 /= eoshift(e2,dim=2,shift=-1,boundary=bnd2))) STOP 19
if (any (f3 /= reshape (["ggg"," ","ccc","jjj","qqq"," ","mmm"," ","iii","ppp",&
"www","fff","sss","bbb","ooo","vvv"," ","lll"," ","hhh","uuu",&
- " "," ","rrr"], shape(f3)))) call abort
- if (size(empty) /=0) call abort
- if (any(t /= (0.0_8, 0.0_8))) call abort
+ " "," ","rrr"], shape(f3)))) STOP 20
+ if (size(empty) /=0) STOP 21
+ if (any(t /= (0.0_8, 0.0_8))) STOP 22
end program main
! { dg-do run }
-if (modulo (-8., -5.) .ne. -3.) call abort ()
+if (modulo (-8., -5.) .ne. -3.) STOP 1
end
b = 'a'
a = b
-if (a .ne. 'a') call abort()
-if (a .ne. b) call abort()
+if (a .ne. 'a') STOP 1
+if (a .ne. b) STOP 2
c (3:3) = 'a'
-if (c (3:3) .ne. b) call abort ()
-if (c (3:3) .ne. 'a') call abort ()
-if (LGT (a, c (3:3))) call abort ()
-if (LGT (a, 'a')) call abort ()
+if (c (3:3) .ne. b) STOP 3
+if (c (3:3) .ne. 'a') STOP 4
+if (LGT (a, c (3:3))) STOP 5
+if (LGT (a, 'a')) STOP 6
i = 3
c (i:i) = 'a'
-if (c (i:i) .ne. b) call abort ()
-if (c (i:i) .ne. 'a') call abort ()
-if (LGT (a, c (i:i))) call abort ()
+if (c (i:i) .ne. b) STOP 7
+if (c (i:i) .ne. 'a') STOP 8
+if (LGT (a, c (i:i))) STOP 9
-if (a .gt. char (255)) call abort ()
+if (a .gt. char (255)) STOP 10
end
! There should not be _gfortran_compare_string and _gfortran_copy_string in
contains
subroutine S1(a)
integer :: a(*)
- if(size(a(1:10),1) /= 10) call abort()
+ if(size(a(1:10),1) /= 10) STOP 1
end subroutine S1
end program main
integer :: ires
call checkv (ires, a)
- if (ires /= 6) call abort
+ if (ires /= 6) STOP 1
call checkv (ires, a, 1)
- if (ires /= 2) call abort
+ if (ires /= 2) STOP 2
contains
subroutine checkv(ires,a1,opt1)
integer, intent(out) :: ires
logical :: l(6)
integer(8) :: jb(5,4)
- if (sizeof (jb) /= 2*sizeof (ib)) call abort
+ if (sizeof (jb) /= 2*sizeof (ib)) STOP 1
if (sizeof(j) == 4) then
- if (sizeof (j) /= sizeof (i)) call abort
+ if (sizeof (j) /= sizeof (i)) STOP 2
else
- if (sizeof (j) /= 2 * sizeof (i)) call abort
+ if (sizeof (j) /= 2 * sizeof (i)) STOP 3
end if
ipa=>ib(2:3,1)
l = (/ sizeof(i) == 4, sizeof(ia) == 20, sizeof(ib) == 80, &
sizeof(ip) == 4, sizeof(ipa) == 8, sizeof(ib(1:5:2,3)) == 12 /)
- if (any(.not.l)) call abort
+ if (any(.not.l)) STOP 4
- if (sizeof(l) /= 6*sizeof(l(1))) call abort
+ if (sizeof(l) /= 6*sizeof(l(1))) STOP 5
end subroutine check_int
subroutine check_real (x, y)
double precision :: d(5,5)
complex(kind=4) :: c(5)
- if (sizeof (y) /= 5*sizeof (x)) call abort
+ if (sizeof (y) /= 5*sizeof (x)) STOP 6
- if (sizeof (r) /= 8000*4) call abort
+ if (sizeof (r) /= 8000*4) STOP 7
rp => r(5,2:10,1:5)
- if (sizeof (rp) /= 45*4) call abort
+ if (sizeof (rp) /= 45*4) STOP 8
rp => r(1:5,1:5,1)
- if (sizeof (d) /= 2*sizeof (rp)) call abort
- if (sizeof (c(1)) /= 2*sizeof(r(1,1,1))) call abort
+ if (sizeof (d) /= 2*sizeof (rp)) STOP 9
+ if (sizeof (c(1)) /= 2*sizeof(r(1,1,1))) STOP 10
end subroutine check_real
subroutine check_derived ()
real :: r(200), s(500)
type(all) :: v
- if (sizeof(a) /= sizeof(i)) call abort
- if (sizeof(oof) /= sizeof(rab)) call abort
+ if (sizeof(a) /= sizeof(i)) STOP 11
+ if (sizeof(oof) /= sizeof(rab)) STOP 12
allocate (v%r(500))
sizev500 = sizeof (v)
size_500 = sizeof (v%r)
size_200 = sizeof (v%r)
deallocate (v%r)
if (size_500 - size_200 /= sizeof(s) - sizeof(r) .or. sizev500 /= sizev200) &
- call abort
+ STOP 13
end subroutine check_derived
call check_int (1)
subroutine dim0(x, expected_size)
integer :: x
integer, value :: expected_size
- if (sizeof(x) /= expected_size) call abort()
- if (storage_size(x)/8 /= expected_size) call abort()
+ if (sizeof(x) /= expected_size) STOP 1
+ if (storage_size(x)/8 /= expected_size) STOP 2
end
subroutine dim1(x, expected_size)
integer, dimension(:) :: x
integer, value :: expected_size
- if (sizeof(x) /= expected_size) call abort()
- if (storage_size(x)/8*size(x) /= expected_size) call abort()
+ if (sizeof(x) /= expected_size) STOP 3
+ if (storage_size(x)/8*size(x) /= expected_size) STOP 4
end
subroutine dimd(x, expected_size)
integer, dimension(..) :: x
integer, value :: expected_size
- if (sizeof(x) /= expected_size) call abort()
- if (storage_size(x)/8*size(x) /= expected_size) call abort()
+ if (sizeof(x) /= expected_size) STOP 5
+ if (storage_size(x)/8*size(x) /= expected_size) STOP 6
end
subroutine cdim0(x, expected_size)
class(*) :: x
integer, value :: expected_size
- if (sizeof(x) /= expected_size) call abort()
- if (storage_size(x)/8 /= expected_size) call abort()
+ if (sizeof(x) /= expected_size) STOP 7
+ if (storage_size(x)/8 /= expected_size) STOP 8
end
subroutine cdim1(x, expected_size)
class(*), dimension(:) :: x
integer, value :: expected_size
- if (sizeof(x) /= expected_size) call abort()
- if (storage_size(x)/8*size(x) /= expected_size) call abort()
+ if (sizeof(x) /= expected_size) STOP 9
+ if (storage_size(x)/8*size(x) /= expected_size) STOP 10
end
subroutine cdimd(x, expected_size)
class(*), dimension(..) :: x
integer, value :: expected_size
- if (sizeof(x) /= expected_size) call abort()
- if (storage_size(x)/8*size(x) /= expected_size) call abort()
+ if (sizeof(x) /= expected_size) STOP 11
+ if (storage_size(x)/8*size(x) /= expected_size) STOP 12
end
subroutine tdim1(x, expected_size)
type(*), dimension(:) :: x
integer, value :: expected_size
- if (sizeof(x) /= expected_size) call abort()
+ if (sizeof(x) /= expected_size) STOP 13
end
subroutine tdimd(x, expected_size)
type(*), dimension(..) :: x
integer, value :: expected_size
- if (sizeof(x) /= expected_size) call abort()
+ if (sizeof(x) /= expected_size) STOP 14
end
end
write (10,'(A,2/,A)') '12', '17'
rewind (10)
read (10,'(I2)') i
- if (i /= 12) call abort
+ if (i /= 12) STOP 1
read (10,'(I2)') i
- if (i /= 0) call abort
+ if (i /= 0) STOP 2
read (10,'(I2)') i
- if (i /= 17) call abort
+ if (i /= 17) STOP 3
end
j = 1
do i = l, u, step
- if (a (j) .ne. i) call abort
+ if (a (j) .ne. i) STOP 1
j = j + 1
end do
- if (size (a, 1) .ne. j - 1) call abort
+ if (size (a, 1) .ne. j - 1) STOP 2
end subroutine test
end program main
a(i, i, i, i) = -5
end forall
- if (sum (a) .ne. 2541.0) call abort ()
+ if (sum (a) .ne. 2541.0) STOP 1
end
program testspecexpr
use recur
implicit none
- if (usef(1) /= '*') call abort()
- if (usef(2) /= '**') call abort()
- if (usef(3) /= '******') call abort()
+ if (usef(1) /= '*') STOP 1
+ if (usef(2) /= '**') STOP 2
+ if (usef(3) /= '******') STOP 3
end
complex fn
complex val, res
- if (diff(fn(val),res)) call abort
+ if (diff(fn(val),res)) STOP 1
contains
function diff(a,b)
complex a,b
double complex fn
double complex val, res
- if (diff(fn(val),res)) call abort
+ if (diff(fn(val),res)) STOP 2
contains
function diff(a,b)
double complex a,b
real fn, res
complex val
- if (diff(fn(val),res)) call abort
+ if (diff(fn(val),res)) STOP 3
contains
function diff(a,b)
real a,b
double precision fn, res
double complex val
- if (diff(fn(val),res)) call abort
+ if (diff(fn(val),res)) STOP 4
contains
function diff(a,b)
double precision a,b
real fn
real val, res
- if (diff(fn(val), res)) call abort
+ if (diff(fn(val), res)) STOP 5
contains
function diff(a, b)
real a, b
double precision fn
double precision val, res
- if (diff(fn(val), res)) call abort
+ if (diff(fn(val), res)) STOP 6
contains
function diff(a, b)
double precision a, b
real fn
real val1, val2, res
- if (diff(fn(val1, val2), res)) call abort
+ if (diff(fn(val1, val2), res)) STOP 7
contains
function diff(a, b)
real a, b
double precision fn
double precision val1, val2, res
- if (diff(fn(val1, val2), res)) call abort
+ if (diff(fn(val1, val2), res)) STOP 8
contains
function diff(a, b)
double precision a, b
subroutine test_dprod(fn)
double precision fn
- if (abs (fn (2.0, 3.0) - 6d0) .gt. 0.00001) call abort
+ if (abs (fn (2.0, 3.0) - 6d0) .gt. 0.00001) STOP 9
end subroutine
subroutine test_nint(fn,val,res)
integer fn, res
real val
- if (res .ne. fn(val)) call abort
+ if (res .ne. fn(val)) STOP 10
end subroutine
subroutine test_idnint(fn,val,res)
integer fn, res
double precision val
- if (res .ne. fn(val)) call abort
+ if (res .ne. fn(val)) STOP 11
end subroutine
subroutine test_idim(fn,val1,val2,res)
integer fn, res, val1, val2
- if (res .ne. fn(val1,val2)) call abort
+ if (res .ne. fn(val1,val2)) STOP 12
end subroutine
subroutine test_iabs(fn,val,res)
integer fn, res, val
- if (res .ne. fn(val)) call abort
+ if (res .ne. fn(val)) STOP 13
end subroutine
subroutine test_len(fn,val,res)
integer fn, res
character(len=*) val
- if (res .ne. fn(val)) call abort
+ if (res .ne. fn(val)) STOP 14
end subroutine
subroutine test_index(fn,val1,val2,res)
integer fn, res
character(len=*) val1, val2
- if (fn(val1,val2) .ne. res) call abort
+ if (fn(val1,val2) .ne. res) STOP 15
end subroutine
program specifics
j = something_goof(j) ! { dg-error "no IMPLICIT type; did you mean .something_good.\\?" }
j = myaddd(i, j) ! { dg-error "no IMPLICIT type; did you mean .myadd.\\?" }
- if (j /= 42) call abort
+ if (j /= 42) STOP 1
j = add_fourtytow(i, j) ! { dg-error "no IMPLICIT type; did you mean .add_fourtytwo.\\?" }
myval = myadd(i, j) ! { dg-error "no IMPLICIT type; did you mean .myvar.\\?" }
- if (j /= 42 * 2) call abort
+ if (j /= 42 * 2) STOP 2
end program spellchekc
integer :: i
i = 0
- if (i /= 1) call abort
+ if (i /= 1) STOP 1
call bark_unless_0(i) ! { dg-error "not explicitly declared; did you mean .bark_unless_zero.\\?" }
! call complain_about_0(i) ! { -dg-error "not explicitly declared; did you mean .complain_about_zero.\\?" }
! We cannot reliably see this ATM, would need an unambiguous bit somewhere
subroutine complain_about_zero(iarg)
integer, intent(in) :: iarg
- if (iarg /= 0) call abort
+ if (iarg /= 0) STOP 2
end subroutine complain_about_zero
end program spellchekc
subroutine bark_unless_zero(iarg)
implicit none
integer, intent(in) :: iarg
- if (iarg /= 0) call abort
+ if (iarg /= 0) STOP 3
end subroutine bark_unless_zero
INTEGER, PARAMETER :: a2(n, 3) = SPREAD([1,2,3], DIM=1, NCOPIES=n)
INTEGER, PARAMETER :: a3(3, n) = SPREAD([1,2,3], DIM=2, NCOPIES=n)
- IF (ANY(a1 /= [ 1, 1, 1, 1, 1 ])) CALL abort()
+ IF (ANY(a1 /= [ 1, 1, 1, 1, 1 ])) STOP 1
- IF (ANY(a2(:, 1) /= 1)) CALL abort()
- IF (ANY(a2(:, 2) /= 2)) CALL abort()
- IF (ANY(a2(:, 3) /= 3)) CALL abort()
+ IF (ANY(a2(:, 1) /= 1)) STOP 2
+ IF (ANY(a2(:, 2) /= 2)) STOP 3
+ IF (ANY(a2(:, 3) /= 3)) STOP 4
- IF (ANY(a3(1, :) /= 1)) CALL abort()
- IF (ANY(a3(2, :) /= 2)) CALL abort()
- IF (ANY(a3(3, :) /= 3)) CALL abort()
+ IF (ANY(a3(1, :) /= 1)) STOP 5
+ IF (ANY(a3(2, :) /= 2)) STOP 6
+ IF (ANY(a3(3, :) /= 3)) STOP 7
END
! Test constant sources.
j = spread ("z", 1 , 10)
- if (any (j /= "z")) call abort ()
+ if (any (j /= "z")) STOP 1
jj = spread (19, 1 , 10)
- if (any (jj /= 19)) call abort ()
+ if (any (jj /= 19)) STOP 2
! Test variable sources.
j = spread (i, 1 , 10)
- if (any (j /= "w")) call abort ()
+ if (any (j /= "w")) STOP 3
jj = spread (ii, 1 , 10)
- if (any (jj /= 42)) call abort ()
+ if (any (jj /= 42)) STOP 4
jjj = spread (iii, 1 , 10)
- if (any (jjj%x /= 41.9999_8)) call abort ()
- if (any (jjj%i /= 77)) call abort ()
- if (any (jjj%ch /= "test_of_spread_")) call abort ()
+ if (any (jjj%x /= 41.9999_8)) STOP 5
+ if (any (jjj%i /= 77)) STOP 6
+ if (any (jjj%ch /= "test_of_spread_")) STOP 7
! Check that spread != 1 is OK.
jj(2:10:2) = spread (1, 1, 5)
- if (any (jj(1:9:2) /= 42) .or. any (jj(2:10:2) /= 1)) call abort ()
+ if (any (jj(1:9:2) /= 42) .or. any (jj(2:10:2) /= 1)) STOP 8
! Finally, check that temporaries and trans-io.c work correctly.
write (buffer, '(4a1)') spread (i, 1 , 4)
- if (trim(buffer) /= "wwww") call abort ()
+ if (trim(buffer) /= "wwww") STOP 9
write (buffer, '(4a1)') spread ("r", 1 , 4)
- if (trim(buffer) /= "rrrr") call abort ()
+ if (trim(buffer) /= "rrrr") STOP 10
write (buffer, '(4i2)') spread (ii, 1 , 4)
- if (trim(buffer) /= "42424242") call abort ()
+ if (trim(buffer) /= "42424242") STOP 11
write (buffer, '(4i2)') spread (31, 1 , 4)
- if (trim(buffer) /= "31313131") call abort ()
+ if (trim(buffer) /= "31313131") STOP 12
end
! Original PR
ptr(:, :) = u + spread ((/1.0, 2.0/), 2, size(u, 2))
if (any (ptr .ne. &
- reshape ((/1.25, 2.50, 1.75, 3.00/), (/2, 2/)))) call abort ()
+ reshape ((/1.25, 2.50, 1.75, 3.00/), (/2, 2/)))) STOP 1
! Check that the fix works correctly with the source shape after ncopies
ptr(:, :) = u + spread ((/2.0, 3.0/), 1, size (u, 1))
if (any (ptr .ne. &
- reshape ((/2.25, 2.50, 3.75, 4.00/), (/2,2/)))) call abort ()
+ reshape ((/2.25, 2.50, 3.75, 4.00/), (/2,2/)))) STOP 2
end
call fstat (10, s3, r3)
call stat (".", d, rd)
- if (r1 /= 0 .or. r2 /= 0 .or. r3 /= 0 .or. rd /= 0) call abort
- if (any (s1 /= s2) .or. any (s1 /= s3)) call abort
- if (s1(5) /= getuid()) call abort
+ if (r1 /= 0 .or. r2 /= 0 .or. r3 /= 0 .or. rd /= 0) STOP 1
+ if (any (s1 /= s2) .or. any (s1 /= s3)) STOP 2
+ if (s1(5) /= getuid()) STOP 3
! If the test is run in a directory with the sgid bit set or on a filesystem
! mounted with the grpid option, new files are created with the directory's
! gid instead of the user's primary gid, so allow for that.
- if (s1(6) /= getgid() .and. s1(6) /= d(6) .and. getgid() /= 0) call abort
- if (s1(8) < 3 .or. s1(8) > 5) call abort
+ if (s1(6) /= getgid() .and. s1(6) /= d(6) .and. getgid() /= 0) STOP 4
+ if (s1(8) < 3 .or. s1(8) > 5) STOP 5
close (10,status="delete")
end
r3 = fstat (10, s3)
rd = stat (".", d)
- if (r1 /= 0 .or. r2 /= 0 .or. r3 /= 0 .or. rd /= 0) call abort
- if (any (s1 /= s2) .or. any (s1 /= s3)) call abort
- if (s1(5) /= getuid()) call abort
+ if (r1 /= 0 .or. r2 /= 0 .or. r3 /= 0 .or. rd /= 0) STOP 1
+ if (any (s1 /= s2) .or. any (s1 /= s3)) STOP 2
+ if (s1(5) /= getuid()) STOP 3
! If the test is run in a directory with the sgid bit set or on a filesystem
! mounted with the grpid option, new files are created with the directory's
! gid instead of the user's primary gid, so allow for that.
- if (s1(6) /= getgid() .and. s1(6) /= d(6) .and. getgid() /= 0) call abort
- if (s1(8) < 3 .or. s1(8) > 5) call abort
+ if (s1(6) /= getgid() .and. s1(6) /= d(6) .and. getgid() /= 0) STOP 4
+ if (s1(8) < 3 .or. s1(8) > 5) STOP 5
close (10,status="delete")
end
a(b) = .true.
b = .false.
if (a(.false.)) b = .true.
- if (.not.b) call abort
+ if (.not.b) STOP 1
end
st1 (i) = i * i * i
FORALL(i=1:4) a(i) = st1 (i)
FORALL(i=1:4) a(i) = u (a(i)) - a(i)** 2
- if (any (a .ne. 0)) call abort ()
- if (i .ne. 99) call abort ()
+ if (any (a .ne. 0)) STOP 1
+ if (i .ne. 99) STOP 2
contains
pure integer function u (x)
integer,intent(in) :: x
st3 (i) = i * v(i)
FORALL(i=1:4) a(i) = st1 (i)
FORALL(i=1:4) a(i) = u (a(i)) - a(i)** 2
- if (any (a .ne. 0)) call abort ()
- if (i .ne. 99) call abort ()
+ if (any (a .ne. 0)) STOP 1
+ if (i .ne. 99) STOP 2
FORALL (i=1:4) a(i) = st3 (i) ! { dg-error "impure function" "impure reference in FORALL" { xfail *-*-*} }
FORALL (i=1:4) a(i) = v(i) ! { dg-error "impure function" }
contains
allocate(t2::cp)
-if (sizeof(a) /= 8) call abort()
-if (storage_size(a) /= 64) call abort()
+if (sizeof(a) /= 8) STOP 1
+if (storage_size(a) /= 64) STOP 2
-if (sizeof(b) /= 24) call abort()
-if (storage_size(b) /= 64) call abort()
+if (sizeof(b) /= 24) STOP 3
+if (storage_size(b) /= 64) STOP 4
-if (sizeof(cp) /= 12) call abort()
-if (storage_size(cp) /= 96) call abort()
+if (sizeof(cp) /= 12) STOP 5
+if (storage_size(cp) /= 96) STOP 6
end
class(t), pointer :: x => null()
class(t), allocatable :: y
-if (storage_size(x)/=32) call abort()
-if (storage_size(y)/=32) call abort()
+if (storage_size(x)/=32) STOP 1
+if (storage_size(y)/=32) STOP 2
allocate(y)
-if (storage_size(y)/=32) call abort()
+if (storage_size(y)/=32) STOP 3
deallocate(y)
-if (storage_size(y)/=32) call abort()
+if (storage_size(y)/=32) STOP 4
end
implicit none
integer, parameter :: ESize = storage_size('a')
integer, parameter :: ESize2 = storage_size('aa')
- if ( ESize/CHARACTER_STORAGE_SIZE /= 1) call abort()
- if ( ESize2/CHARACTER_STORAGE_SIZE /= 2) call abort()
+ if ( ESize/CHARACTER_STORAGE_SIZE /= 1) STOP 1
+ if ( ESize2/CHARACTER_STORAGE_SIZE /= 2) STOP 2
end
subroutine S ( A )
WRITE(11) 1234567
write(11) 3.14159_8
read(11, pos=12)i
- if (i.ne.1234567) call abort()
+ if (i.ne.1234567) STOP 1
read(11) r
- if (r-3.14159 .gt. 0.00001) call abort()
+ if (r-3.14159 .gt. 0.00001) STOP 2
CLOSE(UNIT=11, status="delete")
END PROGRAM stream_io_1
\ No newline at end of file
open(10, file="teststream_streamio_10", access="stream")
write(10) a
inquire(10, pos=thepos)
- if (thepos.ne.17) call abort()
+ if (thepos.ne.17) STOP 1
read(10, pos=1)
inquire(10, pos=thepos)
- if (thepos.ne.1) call abort()
+ if (thepos.ne.1) STOP 2
write(10, pos=15)
inquire(10, pos=thepos)
- if (thepos.ne.15) call abort()
+ if (thepos.ne.15) STOP 3
read(10, pos=3)
inquire(10, pos=thepos)
- if (thepos.ne.3) call abort()
+ if (thepos.ne.3) STOP 4
write(10, pos=1)
inquire(10, pos=thepos)
- if (thepos.ne.1) call abort()
+ if (thepos.ne.1) STOP 5
a = 0
read(10) a
- if (any(a /= b)) call abort()
+ if (any(a /= b)) STOP 6
close(10, status="delete")
end program stream_io_10
rewind(10)
read(10,*) str1
read(10,*) str2
- if(str1 /= rec1 .or. str2 /= rec2) call abort()
+ if(str1 /= rec1 .or. str2 /= rec2) STOP 1
rewind(10)
read(10,'(a)') str1
read(10,'(a)') str2
- if(str1 /= rec1 .or. str2 /= rec2) call abort()
+ if(str1 /= rec1 .or. str2 /= rec2) STOP 2
close(10)
open(10,form='formatted',access='stream',&
read(10,*) i,str1
read(10,*) r
if(i /= 123 .or. str1 /= rec1 .or. r /= 12345.6789) &
- call abort()
+ STOP 3
close(10)
open(unit=10,form='unformatted',access='stream', &
len = len_trim(rec1//new_line('a')//rec2)
rewind(10)
read(10) str1(1:len)
- if(str1 /= rec1//new_line('a')//rec2) call abort()
+ if(str1 /= rec1//new_line('a')//rec2) STOP 4
end program stream_test
anarray = 0.0
read(10) anarray
anarray = abs(anarray - 3.14159)
- if (any(anarray.gt.0.00001)) call abort()
+ if (any(anarray.gt.0.00001)) STOP 1
close(10,status="delete")
end program streamtest
\ No newline at end of file
msg = ' '
backspace (2003,iostat=ios,iomsg=msg)
if (ios == 0 .or. msg /="Cannot BACKSPACE an unformatted stream file") &
- call abort
+ STOP 1
end program main
write (10) '1234567890abcde'
c = ''
read (10,pos=1) c
- if (c /= '1234567890') call abort
+ if (c /= '1234567890') STOP 1
c = ''
read (10,pos=6) c
- if (c /= '67890abcde') call abort
+ if (c /= '67890abcde') STOP 2
write (10,pos=3) 'AB'
c = ''
read (10,pos=1) c
- if (c /= '12AB567890') call abort
+ if (c /= '12AB567890') STOP 3
c = ''
read (10,pos=6) c
- if (c /= '67890abcde') call abort
+ if (c /= '67890abcde') STOP 4
close (10,status="delete")
end program main
write(20,"()")
inquire(20,pos=newline_length)
newline_length = newline_length - 1
- if (newline_length < 1 .or. newline_length > 2) call abort
+ if (newline_length < 1 .or. newline_length > 2) STOP 1
close(20)
open(20,file="foo_streamio_15.txt",form="formatted",access="stream")
rewind 20
! Skip over the first line
read(20,'(A)') c
- if (c.ne.'123456') call abort
+ if (c.ne.'123456') STOP 2
! Save the position
inquire(20,pos=i)
- if (i.ne.7+newline_length) call abort
+ if (i.ne.7+newline_length) STOP 3
! Read in the complete line...
read(20,'(A)') c
- if (c.ne.'abcdef') call abort
+ if (c.ne.'abcdef') STOP 4
! Write out the first four characters
write(20,'(A)',pos=i,advance="no") 'ASDF'
! Fill up the rest of the line. Here, we know the length. If we
rewind 20
c = ""
read(20,'(A)') c
- if (c.ne.'123456') call abort
+ if (c.ne.'123456') STOP 5
read(20,'(A)') c
- if (c.ne.'ASDFef') call abort
+ if (c.ne.'ASDFef') STOP 6
read(20,'(A)', iostat=i) c
- if (i /= -1) call abort
+ if (i /= -1) STOP 7
close (20, status="delete")
end program main
do i=1,17
read( 50, *,pos=i)
inquire(50, access=sAccess, pos=mypos)
- if (sAccess.ne."STREAM") call abort
- if ((mypos.ne.18).and.(mypos.ne.19)) call abort
+ if (sAccess.ne."STREAM") STOP 1
+ if ((mypos.ne.18).and.(mypos.ne.19)) STOP 2
end do
read (50,*, end=10)
-call abort
+STOP 3
10 continue
close(50,status="delete")
end
character(128) :: message
open(10, status='scratch', access='stream')
write (10, rec=1, iostat=ios, iomsg=message) "This is a test" !
-if (ios.ne.5001) call abort
+if (ios.ne.5001) STOP 1
if (message.ne. &
&"Record number not allowed for stream access data transfer") &
- call abort
+ STOP 2
end program
WRITE(11) 7
READ(11, POS=3) string
READ(11, POS=12) n
- if (string.ne."rst") call abort()
- if (n.ne.7) call abort()
+ if (string.ne."rst") STOP 1
+ if (n.ne.7) STOP 2
close(unit=11, status="delete")
END PROGRAM readUstream
i = 0
rewind(10)
read(10,'(3(2x,i4/)/3(3x,i6/))') i
- if (any(i.ne.(/(j,j=1,6)/))) call abort()
+ if (any(i.ne.(/(j,j=1,6)/))) STOP 1
inquire(unit=10, access=myaccess)
- if (myaccess.ne."STREAM") call abort()
+ if (myaccess.ne."STREAM") STOP 2
close(10,status="delete")
end program streamio_3
do i=1,lines
do j=0,9
read(10,"(i5)") k
- if (k.ne.j) call abort()
+ if (k.ne.j) STOP 1
end do
end do
do i=1,1229
do j=0,9
read(10) k
- if (k.ne.j) call abort()
+ if (k.ne.j) STOP 1
end do
read(10) tchar
- if (tchar.ne.lf) call abort()
+ if (tchar.ne.lf) STOP 2
end do
close(10,status="delete")
end program streamtest5
\ No newline at end of file
do j=1,100
read(unit=15, pos=a(j), iostat=ier) c
if (ier.ne.0) then
- call abort
+ STOP 1
else
- if (achar(a(j)) /= c) call abort
+ if (achar(a(j)) /= c) STOP 2
endif
enddo
close(unit=15, status="delete")
anarray = 0.0
read(10, pos=1) anarray
anarray = abs(anarray - 3.14159)
- if (any(anarray.gt.0.00001)) call abort()
+ if (any(anarray.gt.0.00001)) STOP 1
close(10,status="delete")
end program streamtest
\ No newline at end of file
r = 12.25d0
OPEN(UNIT=11, ACCESS="stream")
inquire(unit=11, pos=mypos)
- if (mypos.ne.1) call abort()
+ if (mypos.ne.1) STOP 1
WRITE(11) "first"
inquire(unit=11, pos=mypos)
- if (mypos.ne.6) call abort()
+ if (mypos.ne.6) STOP 2
WRITE(11) "second"
inquire(unit=11, pos=mypos)
- if (mypos.ne.12) call abort()
+ if (mypos.ne.12) STOP 3
WRITE(11) 1234567_4
inquire(unit=11, pos=mypos)
- if (mypos.ne.16) call abort()
+ if (mypos.ne.16) STOP 4
write(11) r
r = 0.0
inquire (11, pos=mypos)
read(11,pos=16)r
- if (abs(r-12.25d0)>1e-10) call abort()
+ if (abs(r-12.25d0)>1e-10) STOP 5
inquire(unit=11, pos=mypos)
inquire(unit=11, access=mystring)
- if (mypos.ne.24) call abort()
- if (mystring.ne."STREAM") call abort()
+ if (mypos.ne.24) STOP 6
+ if (mystring.ne."STREAM") STOP 7
CLOSE(UNIT=11, status="delete")
END PROGRAM stream_io_8
do i = 1, 10
t = i * dt
read(12) a
- if (any(a.ne.b)) call abort()
+ if (any(a.ne.b)) STOP 1
read(11) u
- if (u.ne.t) call abort()
+ if (u.ne.t) STOP 2
end do
close(11, status="delete")
close(12, status="delete")
! PR 30452 - this used to cause syntax errors due to the presence,
! as characters, of bytes 0xfe and 0xff.
program main
- if (char (254) /= "þ") call abort
- if (char (255) /= "ÿ") call abort
+ if (char (254) /= "þ") STOP 1
+ if (char (255) /= "ÿ") STOP 2
end program main
character*32 ddname,stmtfnt1
stmtfnt1(x)= 'h810 e=0.01 '
ddname=stmtfnt1(0.d0)
- if (ddname /= "h810 e=0.01") call abort()
+ if (ddname /= "h810 e=0.01") STOP 1
END
SUBROUTINE TEST2()
real :: x
stmtfnt2(x)= 'x'
ddname=stmtfnt2(0.0)
- if(ddname /= 'x') call abort()
+ if(ddname /= 'x') STOP 2
END
SUBROUTINE TEST3()
character*2 :: c
dname(c) = 'h810 e=0.01 '
ddname=dname("w ")
- if (ddname /= "h810 e=0.01") call abort()
+ if (ddname /= "h810 e=0.01") STOP 3
END
SUBROUTINE TEST4()
dname(c) = 'h810 e=0.01 '
c = 'aa'
ddname=dname("w ")
- if (ddname /= "h810 e=0.01") call abort()
- if (c /= "aa") call abort()
+ if (ddname /= "h810 e=0.01") STOP 4
+ if (c /= "aa") STOP 5
END
call test1()
!print *, ca(1)
cb = (/Uppercase(c)/) ! This gets an ICE
if (ca(1) .ne. cb(1)) then
- call abort()
+ STOP 1
end if
!print *, ca(1)
end subroutine
program main
character (len=:), allocatable :: a
a = 'a'
- if (len(a) /= 1) call abort
+ if (len(a) /= 1) STOP 1
a = ' '
- if (len(a) /= 2) call abort
+ if (len(a) /= 2) STOP 2
end program main
PRINT '(L1)', tmp2
IF (.NOT. tmp(1) .OR. .NOT. tmp2(1)) THEN
- CALL abort ()
+ STOP 1
END IF
END PROGRAM main
print '(55L1)', tmp(:,i)
if (any ((exprs(:)(1:1)=='a') .neqv. tmp(:,i))) then
- call abort ()
+ STOP 1
end if
end do
end
tmp = c1lst(:)(1:1) == char(96+i)
print *, tmp
print *, c1lst(:)(1:1) == 'e'
-if (any(tmp .neqv. (c0lst(:)(1:1) == char(96+i)))) call abort()
+if (any(tmp .neqv. (c0lst(:)(1:1) == char(96+i)))) STOP 1
end
! A variable array constructor.
s = (/t, u/)
! An array constructor as part of an expression.
- if (any (s .ne. (/"Hell", "Worl"/))) call abort
+ if (any (s .ne. (/"Hell", "Worl"/))) STOP 1
end subroutine
subroutine test2
! A constant array constructor
s = (/"Hello", "World"/)
- if ((s(1) .ne. "Hello") .or. (s(2) .ne. "World")) call abort
+ if ((s(1) .ne. "Hello") .or. (s(2) .ne. "World")) STOP 2
end subroutine
subroutine test3
do i=1, 26
t(i:i) = s(i)
end do
- if (t .ne. "zyxwvutsrqponmlkjihgfedcba") call abort
+ if (t .ne. "zyxwvutsrqponmlkjihgfedcba") STOP 3
end subroutine
program string_ctor_1
subroutine foo(i)
integer :: i
character(len=i) :: s(2)
- if (len(s) < 0) call abort
- if (len(s) /= max(i,0)) call abort
+ if (len(s) < 0) STOP 1
+ if (len(s) /= max(i,0)) STOP 2
end
function gee(i)
subroutine s1(i,j)
character(len=i-j) :: a
- if (len(a) < 0) call abort()
+ if (len(a) < 0) STOP 1
end subroutine
program test
call s1(-1,-8)
call s1(-8,-1)
- if (len(gee(2)) /= 2) call abort
- if (len(gee(-5)) /= 0) call abort
- if (len(gee(intfunc(3))) /= max(intfunc(3),0)) call abort
- if (len(gee(intfunc(2))) /= max(intfunc(2),0)) call abort
+ if (len(gee(2)) /= 2) STOP 3
+ if (len(gee(-5)) /= 0) STOP 4
+ if (len(gee(intfunc(3))) /= max(intfunc(3),0)) STOP 5
+ if (len(gee(intfunc(2))) /= max(intfunc(2),0)) STOP 6
- if (len(bar(2)) /= 2) call abort
- if (len(bar(-5)) /= 0) call abort
- if (len(bar(intfunc(3))) /= max(intfunc(3),0)) call abort
- if (len(bar(intfunc(2))) /= max(intfunc(2),0)) call abort
+ if (len(bar(2)) /= 2) STOP 7
+ if (len(bar(-5)) /= 0) STOP 8
+ if (len(bar(intfunc(3))) /= max(intfunc(3),0)) STOP 9
+ if (len(bar(intfunc(2))) /= max(intfunc(2),0)) STOP 10
- if (cow(bar(2)) /= 2) call abort
- if (cow(bar(-5)) /= 0) call abort
- if (cow(bar(intfunc(3))) /= max(intfunc(3),0)) call abort
- if (cow(bar(intfunc(2))) /= max(intfunc(2),0)) call abort
+ if (cow(bar(2)) /= 2) STOP 11
+ if (cow(bar(-5)) /= 0) STOP 12
+ if (cow(bar(intfunc(3))) /= max(intfunc(3),0)) STOP 13
+ if (cow(bar(intfunc(2))) /= max(intfunc(2),0)) STOP 14
contains
read (unit=unit,fmt='(I5)') i ! Hide from optimizers
j = 7
c = '123456789'
- if (len(c( 3 : 5 )) /= 3) call abort ! Case 1
- if (len(c( i*(i+1) : (i+1)*i + 2 )) /= 3) call abort ! Case 2
- if (len(c( i*(i+1) : 2 + (i+1)*i )) /= 3) call abort ! Case 3
- if (len(c( i*(i+1) + 2 : (i+1)*i + 3 )) /= 2) call abort ! Case 4
- if (len(c( 2 + i*(i+1) : (i+1)*i + 3 )) /= 2) call abort ! Case 5
- if (len(c( i*(i+1) + 2 : 3 + (i+1)*i )) /= 2) call abort ! Case 6
- if (len(c( 2 + i*(i+1) : 3 + (i+1)*i )) /= 2) call abort ! Case 7
- if (len(c( i*(i+1) - 1 : (i+1)*i + 1 )) /= 3) call abort ! Case 8
- if (len(c( i*(i+1) - 1 : 1 + (i+1)*i )) /= 3) call abort ! Case 9
- if (len(c( i*(i+1) : (i+1)*i -(-1))) /= 2) call abort ! Case 10
- if (len(c( i*(i+1) +(-2): (i+1)*i - 1 )) /= 2) call abort ! Case 11
- if (len(c( i*(i+1) + 2 : (i+1)*i -(-4))) /= 3) call abort ! Case 12
- if (len(c( i*(i+1) - 3 : (i+1)*i - 1 )) /= 3) call abort ! Case 13
- if (len(c(13 - i*(i+1) :15 - (i+1)*i )) /= 3) call abort ! Case 14
- if (len(c( i*(i+1) +(-1): (i+1)*i )) /= 2) call abort ! Case 15
- if (len(c(-1 + i*(i+1) : (i+1)*i )) /= 2) call abort ! Case 16
- if (len(c( i*(i+1) - 2 : (i+1)*i )) /= 3) call abort ! Case 17
- if (len(c( (i-2)*(i-3) : (i-3)*(i-2) )) /= 1) call abort ! Case 18
+ if (len(c( 3 : 5 )) /= 3) STOP 1! Case 1
+ if (len(c( i*(i+1) : (i+1)*i + 2 )) /= 3) STOP 2! Case 2
+ if (len(c( i*(i+1) : 2 + (i+1)*i )) /= 3) STOP 3! Case 3
+ if (len(c( i*(i+1) + 2 : (i+1)*i + 3 )) /= 2) STOP 4! Case 4
+ if (len(c( 2 + i*(i+1) : (i+1)*i + 3 )) /= 2) STOP 5! Case 5
+ if (len(c( i*(i+1) + 2 : 3 + (i+1)*i )) /= 2) STOP 6! Case 6
+ if (len(c( 2 + i*(i+1) : 3 + (i+1)*i )) /= 2) STOP 7! Case 7
+ if (len(c( i*(i+1) - 1 : (i+1)*i + 1 )) /= 3) STOP 8! Case 8
+ if (len(c( i*(i+1) - 1 : 1 + (i+1)*i )) /= 3) STOP 9! Case 9
+ if (len(c( i*(i+1) : (i+1)*i -(-1))) /= 2) STOP 10! Case 10
+ if (len(c( i*(i+1) +(-2): (i+1)*i - 1 )) /= 2) STOP 11! Case 11
+ if (len(c( i*(i+1) + 2 : (i+1)*i -(-4))) /= 3) STOP 12! Case 12
+ if (len(c( i*(i+1) - 3 : (i+1)*i - 1 )) /= 3) STOP 13! Case 13
+ if (len(c(13 - i*(i+1) :15 - (i+1)*i )) /= 3) STOP 14! Case 14
+ if (len(c( i*(i+1) +(-1): (i+1)*i )) /= 2) STOP 15! Case 15
+ if (len(c(-1 + i*(i+1) : (i+1)*i )) /= 2) STOP 16! Case 16
+ if (len(c( i*(i+1) - 2 : (i+1)*i )) /= 3) STOP 17! Case 17
+ if (len(c( (i-2)*(i-3) : (i-3)*(i-2) )) /= 1) STOP 18! Case 18
end program main
! { dg-final { scan-tree-dump-times "_abort" 0 "original" } }
implicit none
integer :: n
n = mylen('c') + mylen('c ')
- if (n /= 5) call abort
+ if (n /= 5) STOP 1
CONTAINS
FUNCTION mylen(c)
! { dg-options "-flto" }
! PR 78867, test case adapted from gfortran.dg/string_length_1.f90
program pr78867
- if (len(bar(2_8)) /= 2) call abort
+ if (len(bar(2_8)) /= 2) STOP 1
contains
function bar(i)
program main
character*3 str1, str2
call setval(str1, str2)
- if (str1 == str2) call abort
+ if (str1 == str2) STOP 1
end
subroutine setval(str1, str2)
character(len = 11) line
write (line, '(6A)') a, 'world'
-if (line .ne. 'hello world') call abort
+if (line .ne. 'hello world') STOP 1
write (line, '(6A)') b, 'world'
-if (line .ne. 'hello world') call abort
+if (line .ne. 'hello world') STOP 2
write (line, '(6A)') c, 'world'
-if (line .ne. 'hello world') call abort
+if (line .ne. 'hello world') STOP 3
write (line, '(6A)') c(1), 'world'
-if (line .ne. 'hello world') call abort
+if (line .ne. 'hello world') STOP 4
end
basics = basics_t (42, -1.5, (.5, .5), .FALSE.)
IF (basics%i /= 42 .OR. basics%r /= -1.5 &
.OR. basics%c /= (.5, .5) .OR. basics%l) THEN
- CALL abort()
+ STOP 1
END IF
strings = strings_t ("hello", "abc", "this one is long")
IF (strings%str1 /= "hello" .OR. strings%str2 /= "abc" &
.OR. strings%long /= "this one i") THEN
- CALL abort()
+ STOP 2
END IF
arrays = array_t ( (/ 1, 2, 3, 4 /), RESHAPE((/ 5, 6, 7, 8 /), (/ 2, 2 /)) )
.OR. arrays%ints(4) /= 3 .OR. arrays%ints(5) /= 4 &
.OR. arrays%matrix(1, 1) /= 5. .OR. arrays%matrix(2, 1) /= 6. &
.OR. arrays%matrix(1, 2) /= 7. .OR. arrays%matrix(2, 2) /= 8.) THEN
- CALL abort()
+ STOP 3
END IF
nestedStruct = nestedStruct_t (basics_t (42, -1.5, (.5, .5), .FALSE.), arrays)
.OR. nestedStruct%basics%c /= (.5, .5) .OR. nestedStruct%basics%l &
.OR. ANY(nestedStruct%arrays%ints /= arrays%ints) &
.OR. ANY(nestedStruct%arrays%matrix /= arrays%matrix)) THEN
- CALL abort()
+ STOP 4
END IF
END PROGRAM test
call bar%a%init()
! They should be called once
- if (count1 /= 23 .or. count2 /= 42) call abort ()
+ if (count1 /= 23 .or. count2 /= 42) STOP 1
contains
class is (t)
list = [w(o)] ! This caused an ICE
class default
- call abort()
+ STOP 1
end select
end subroutine
end program
basics = basics_t (42, -1.5, c=(.5, .5), l=.FALSE.)
IF (basics%i /= 42 .OR. basics%r /= -1.5 &
.OR. basics%c /= (.5, .5) .OR. basics%l) THEN
- CALL abort()
+ STOP 1
END IF
basics = basics_t (r=-1.5, i=42, l=.FALSE., c=(.5, .5))
IF (basics%i /= 42 .OR. basics%r /= -1.5 &
.OR. basics%c /= (.5, .5) .OR. basics%l) THEN
- CALL abort()
+ STOP 2
END IF
END PROGRAM test
empty = quasiempty_t ()
IF (empty%greeting /= "hello") THEN
- CALL abort()
+ STOP 1
END IF
basics = basics_t (r = 1.5)
IF (basics%i /= 42 .OR. basics%r /= 1.5 .OR. basics%c /= (0., 1.)) THEN
- CALL abort()
+ STOP 2
END IF
basics%c = (0., 0.) ! So we see it's surely gotten re-initialized
basics = basics_t (1, 5.1)
IF (basics%i /= 1 .OR. basics%r /= 5.1 .OR. basics%c /= (0., 1.)) THEN
- CALL abort()
+ STOP 3
END IF
END PROGRAM test
message = that%greeting
! Check that descendant module procedure is correctly processed
- if (intf (77) .ne. factor*77) call abort
+ if (intf (77) .ne. factor*77) STOP 1
end subroutine
module function realf (arg) result (res)
call clear_messages
call bar%greet ! typebound call
- if (trim (message) .ne. "Hello, world!") call abort
+ if (trim (message) .ne. "Hello, world!") STOP 2
call clear_messages
bar%greeting = "G'day, world!"
call say_hello(bar) ! Checks use association of 'say_hello'
- if (trim (message) .ne. "G'day, world!") call abort
+ if (trim (message) .ne. "G'day, world!") STOP 3
call clear_messages
bar%greeting = "Hi, world!"
call bye(bar) ! Checks use association in another submodule
- if (trim (message) .ne. "Hi, world!") call abort
- if (trim (message2) .ne. "adieu, world!") call abort
+ if (trim (message) .ne. "Hi, world!") STOP 4
+ if (trim (message2) .ne. "adieu, world!") STOP 5
call clear_messages
call smurf ! Checks host association of 'say_hello'
- if (trim (message) .ne. "Hello, world!") call abort
+ if (trim (message) .ne. "Hello, world!") STOP 6
call clear_messages
bar%greeting = "farewell "
call bar%farewell
- if (trim (message) .ne. "farewell") call abort
- if (trim (message2) .ne. "adieu, world!") call abort
+ if (trim (message) .ne. "farewell") STOP 7
+ if (trim (message2) .ne. "adieu, world!") STOP 8
- if (realf(2.0) .ne. 4.0) call abort ! Check module procedure with explicit result
- if (intf(2) .ne. 10) call abort ! ditto
- if (realg(3.0) .ne. 9.0) call abort ! Check module procedure with function declaration result
- if (intg(3) .ne. 9) call abort ! ditto
+ if (realf(2.0) .ne. 4.0) STOP 9! Check module procedure with explicit result
+ if (intf(2) .ne. 10) STOP 10! ditto
+ if (realg(3.0) .ne. 9.0) STOP 11! Check module procedure with function declaration result
+ if (intg(3) .ne. 9) STOP 12! ditto
contains
subroutine clear_messages
message = ""
use n
contains
module subroutine show_i
- if (i .ne. 2) call abort
- if (times_two (i) .ne. 4) call abort
+ if (i .ne. 2) STOP 1
+ if (times_two (i) .ne. 4) STOP 2
end subroutine show_i
end submodule sm
program p
use m
call show_i
- if (i .ne. -1) call abort
- if (times_two (i) .ne. 2) call abort
+ if (i .ne. -1) STOP 3
+ if (times_two (i) .ne. 2) STOP 4
end program
use test
integer :: x = 5
call sub1(x)
- if (x .ne. 10) call abort
+ if (x .ne. 10) STOP 1
x = 10
- if (fcn1 (x) .ne. 0) call abort
+ if (fcn1 (x) .ne. 0) STOP 2
end
use A
integer :: i = 1
incr = 1
- if (a3(i) .ne. 11) call abort
+ if (a3(i) .ne. 11) STOP 1
end
end submodule
use hello_interface
- if (get() .ne. string) call abort
+ if (get() .ne. string) STOP 1
end
use foo_interface
type(foo) :: a = foo (42)
type(foo) :: b = foo (99)
- if (a + b .ne. 141) call abort
- if (a * b .ne. 4158) call abort
+ if (a + b .ne. 141) STOP 1
+ if (a * b .ne. 4158) STOP 2
end
use foo_interface
type(foo) :: a = foo (42)
type(foo) :: b = foo (99)
- if (a + b .ne. 141) call abort
- if (a * b .ne. 4158) call abort
+ if (a + b .ne. 141) STOP 1
+ if (a * b .ne. 4158) STOP 2
end
type (foo), dimension(:), allocatable :: arg
arg = array1(bar) ! typebound call
- if (any (arg%greeting .ne. ["adieu, world! ", "adieu, world! "])) call abort
+ if (any (arg%greeting .ne. ["adieu, world! ", "adieu, world! "])) STOP 1
deallocate (arg)
- if (trim (array2 (bar, arg)) .ne. "adieu, people!") call abort
+ if (trim (array2 (bar, arg)) .ne. "adieu, people!") STOP 2
deallocate (arg)
call array3 (bar, arg) ! typebound call
- if (any (arg%greeting .ne. ["adieu, world! ", "adieu, world! "])) call abort
+ if (any (arg%greeting .ne. ["adieu, world! ", "adieu, world! "])) STOP 3
deallocate (arg)
call array4 (bar, arg) ! typebound call
- if (any (arg%greeting .ne. ["adieu, people!", "adieu, people!"])) call abort
+ if (any (arg%greeting .ne. ["adieu, people!", "adieu, people!"])) STOP 4
contains
end program
external hello
greeting = "goodbye"
call cgca_clvgp (hello)
- if (trim (greeting) .ne. "hello") call abort
+ if (trim (greeting) .ne. "hello") STOP 1
end
use my_mod
implicit none
call routine1(2)
- if (answer .ne. 4) call abort
+ if (answer .ne. 4) STOP 1
end program
i = 42
call write_i
read (buffer, *) j
- if (i .ne. 42) call abort
- if (j .ne. 137) call abort
+ if (i .ne. 42) STOP 1
+ if (j .ne. 137) STOP 2
call write_i_2
read (buffer, *) j
- if (i .ne. 42) call abort
- if (j .ne. 1037) call abort
+ if (i .ne. 42) STOP 3
+ if (j .ne. 1037) STOP 4
end program
write(*,*) 'OK'
else
write(*,*) 'FAIL'
- call abort
+ STOP 1
end if
end program p_18_pos
type is (t_b)
this%b = q
class default
- call abort
+ STOP 1
end select
class default
- call abort
+ STOP 2
end select
end procedure p_a
module procedure print
select type (this)
type is (t_imp)
- if (any (this%b%i .ne. [3,4,5])) call abort
+ if (any (this%b%i .ne. [3,4,5])) STOP 3
class default
- call abort
+ STOP 4
end select
end procedure
end submodule imp_p_a
type(palette) :: MyPalette
call inquire_palette ( p, MyPalette )
! Added to example so that it does something.
- if (abs (p%x - real (p%color) * 1.0) .gt. 1.0e-6) call abort
- if (abs (p%y - real (p%color) * 2.0) .gt. 1.0e-6) call abort
+ if (abs (p%x - real (p%color) * 1.0) .gt. 1.0e-6) STOP 1
+ if (abs (p%y - real (p%color) * 2.0) .gt. 1.0e-6) STOP 2
end subroutine color_point_draw
! Invisible body for interface declared in the parent submodule
module procedure inquire_palette
!... implementation of inquire_palette
end procedure inquire_palette
module procedure verify_cleanup
- if (allocated (p1) .or. allocated (p2)) call abort
- if (instance_count .ne. 0) call abort
+ if (allocated (p1) .or. allocated (p2)) STOP 3
+ if (instance_count .ne. 0) STOP 4
end procedure
subroutine private_stuff ! not accessible from color_points_a
!...
! in color_points, generic interface here.
!...
rc = color_point_dist (c_1, c_2) ! body in color_points_a, interface in color_points
- if (abs (rc - 2.23606801) .gt. 1.0e-6) call abort
+ if (abs (rc - 2.23606801) .gt. 1.0e-6) STOP 5
!...
call color_point_del (c_1)
call color_point_del (c_2)
contains
module procedure p
if (i .ne. -2) then
- call abort
+ STOP 1
end if
end procedure
end submodule
if (i==2) then
call p()
else
- call abort
+ STOP 2
end if
end program
real x
x = 1.
if (tiny(x)/2. /= tiny(x)/2. - (nearest(tiny(x),1.) - tiny(x))/2.) then
- call abort
+ STOP 1
end if
end program chop
b=(/"bbbb","bbbb","bbbb"/)
a=>b(:)(2:3)
a="aa"
- IF (ANY(b.NE.(/"baab","baab","baab"/))) CALL ABORT()
+ IF (ANY(b.NE.(/"baab","baab","baab"/))) STOP 1
END subroutine
subroutine pr29606
ALLOCATE( array_holder%array(3) )
array_holder%array = (/ foo(1), foo(2), foo(3) /)
array_ptr => array_holder%array%value
- if (any (array_ptr .ne. (/1,2,3/))) call abort ()
+ if (any (array_ptr .ne. (/1,2,3/))) STOP 2
END subroutine
subroutine pr30625
type(a), target :: dt(2)
integer, pointer :: ip(:)
ip => dt%i
- if (any (ip .ne. 42)) call abort ()
+ if (any (ip .ne. 42)) STOP 3
end subroutine
subroutine pr30871
CHARACTER(LEN=1), DIMENSION(:), POINTER :: ptr
Z(:)%A="123"
ptr=>Z(:)%A(2:2)
- if (any (ptr .ne. "2")) call abort ()
+ if (any (ptr .ne. "2")) STOP 4
END subroutine
end
ptr => tar1%i
ptr = ptr + 1 ! check the scalarizer is OK
- if (any (ptr .ne. (/3, 5/))) call abort ()
- if (any ((/ptr(1), ptr(2)/) .ne. (/3, 5/))) call abort ()
- if (any (tar1%i .ne. (/3, 5/))) call abort ()
+ if (any (ptr .ne. (/3, 5/))) STOP 1
+ if (any ((/ptr(1), ptr(2)/) .ne. (/3, 5/))) STOP 2
+ if (any (tar1%i .ne. (/3, 5/))) STOP 3
! Make sure that the other components are not touched.
- if (any (tar1%r .ne. (/1.0, 3.0/))) call abort ()
- if (any (tar1%chr .ne. (/"abc", "efg"/))) call abort ()
+ if (any (tar1%r .ne. (/1.0, 3.0/))) STOP 4
+ if (any (tar1%chr .ne. (/"abc", "efg"/))) STOP 5
! Check that the pointer is passed correctly as an actual argument.
call foo (ptr)
- if (any (tar1%i .ne. (/2, 4/))) call abort ()
+ if (any (tar1%i .ne. (/2, 4/))) STOP 6
! And that dummy pointers are OK too.
call bar (ptr)
- if (any (tar1%i .ne. (/101, 103/))) call abort ()
+ if (any (tar1%i .ne. (/101, 103/))) STOP 7
!_______________substring subreference___________
ptr2 => tar2(:)(2:3)
ptr2 = ptr2(:)(2:2)//"z" ! again, check the scalarizer
- if (any (ptr2 .ne. (/"cz", "gz"/))) call abort ()
- if (any ((/ptr2(1), ptr2(2)/) .ne. (/"cz", "gz"/))) call abort ()
- if (any (tar2 .ne. (/"aczd", "egzh"/))) call abort ()
+ if (any (ptr2 .ne. (/"cz", "gz"/))) STOP 8
+ if (any ((/ptr2(1), ptr2(2)/) .ne. (/"cz", "gz"/))) STOP 9
+ if (any (tar2 .ne. (/"aczd", "egzh"/))) STOP 10
!_______________substring component subreference___________
ptr2 => tar1(:)%chr(1:2)
ptr2 = ptr2(:)(2:2)//"q" ! yet again, check the scalarizer
- if (any (ptr2 .ne. (/"bq","fq"/))) call abort ()
- if (any (tar1%chr .ne. (/"bqc","fqg"/))) call abort ()
+ if (any (ptr2 .ne. (/"bq","fq"/))) STOP 11
+ if (any (tar1%chr .ne. (/"bqc","fqg"/))) STOP 12
!_______________trailing array element subreference___________
ptr3 => tar5%r(1,2)
ptr3 = (/99.0, 999.0/)
- if (any (tar5(1)%r .ne. reshape ((/1.0,2.0,99.0,4.0/), sh))) call abort ()
- if (any (tar5(2)%r .ne. reshape ((/5.0,6.0,999.0,8.0/), sh))) call abort ()
+ if (any (tar5(1)%r .ne. reshape ((/1.0,2.0,99.0,4.0/), sh))) STOP 13
+ if (any (tar5(2)%r .ne. reshape ((/5.0,6.0,999.0,8.0/), sh))) STOP 14
!_______________forall assignment___________
ptr2 => tar2(:)(1:2)
forall (i = 1:2) ptr2(i)(1:1) = "z"
- if (any (tar2 .ne. (/"zczd", "zgzh"/))) call abort ()
+ if (any (tar2 .ne. (/"zczd", "zgzh"/))) STOP 15
!_______________something more complicated___________
tar3%t => tar1
ptr3 => tar3%t%r
ptr3 = cos (ptr3)
- if (any (abs(ptr3 - (/cos(1.0_4), cos(3.0_4)/)) >= epsilon(1.0_4))) call abort ()
+ if (any (abs(ptr3 - (/cos(1.0_4), cos(3.0_4)/)) >= epsilon(1.0_4))) STOP 16
ptr2 => tar3%t(:)%chr(2:3)
ptr2 = " x"
- if (any (tar1%chr .ne. (/"b x", "f x"/))) call abort ()
+ if (any (tar1%chr .ne. (/"b x", "f x"/))) STOP 17
!_______________check non-subref works still___________
ptr2 => tar4
- if (any (ptr2 .ne. (/"ab","cd"/))) call abort ()
+ if (any (ptr2 .ne. (/"ab","cd"/))) STOP 18
contains
subroutine foo (arg)
T1%X = SOURCE
P => T1%I
CALL Z(P)
- IF (ANY (T1%I .NE. [999, 2, 999, 4])) CALL ABORT
- IF (ANY (T1%X .NE. SOURCE)) CALL ABORT
+ IF (ANY (T1%I .NE. [999, 2, 999, 4])) STOP 1
+ IF (ANY (T1%X .NE. SOURCE)) STOP 2
CONTAINS
SUBROUTINE Z(Q)
INTEGER, POINTER :: Q(:)
s = "abcdefghij"
t(:10) = s(1:)
s(6:5) = "foo"
- if (s /= t) call abort
+ if (s /= t) STOP 1
i = 2
j = -1
s(i:i+j) = "foo"
- if (s /= t) call abort
+ if (s /= t) STOP 2
i = 20
s(i+1:i) = "foo"
- if (s /= t) call abort
+ if (s /= t) STOP 3
s(6:5) = s(7:5)
- if (s /= t) call abort
+ if (s /= t) STOP 4
s = t(7:6)
- if (len(trim(s)) /= 0) call abort
- if (len(t(8:4)) /= 0) call abort
- if (len(trim(t(8:4))) /= 0) call abort
+ if (len(trim(s)) /= 0) STOP 5
+ if (len(t(8:4)) /= 0) STOP 6
+ if (len(trim(t(8:4))) /= 0) STOP 7
end
t(:10) = s(1:)
s(16:15) = "foo"
s(0:-1) = "foo"
- if (s /= t) call abort
+ if (s /= t) STOP 1
end
zsymel(3)(lenstr(zsymel(3))+1:)='X'
write (buf,10) (trim(zsymelr(isym)),isym=1,znsymelr)
10 format(3(a,:,','))
- if (trim(buf) /= 'X,Y') call abort
+ if (trim(buf) /= 'X,Y') STOP 1
end subroutine check_zsymel
function lenstr(s)
character(len=*),intent(in) :: s
integer :: lenstr
- if (len_trim(s) /= 0) call abort
+ if (len_trim(s) /= 0) STOP 2
lenstr = len_trim(s)
end function lenstr
zsymel(3)(:lenstr(zsymel(3))+1)='X'
write (buf,20) (trim(zsymelr(isym)),isym=1,znsymelr)
20 format(3(a,:,','))
- if (trim(buf) /= 'X,Y') call abort
+ if (trim(buf) /= 'X,Y') STOP 3
end subroutine check_zsymel
function lenstr(s)
character(len=*),intent(in) :: s
integer :: lenstr
- if (len_trim(s) /= 0) call abort
+ if (len_trim(s) /= 0) STOP 4
lenstr = len_trim(s)
end function lenstr
character(*), parameter :: expr = '-+.0123456789eEdD'
integer :: i
- if (index(chrs(:), expr) /= 1) call abort
- if (index(chrs(14:), expr) /= 0) call abort
- if (index(chrs(:12), expr) /= 0) call abort
- if (index(chrs, expr(:)) /= 1) call abort
- if (index(chrs, expr(1:)) /= 1) call abort
- if (index(chrs, expr(:1)) /= 1) call abort
-
- if (foo(expr) /= 1) call abort
- if (foo(expr) /= 1) call abort
- if (foo(expr) /= 1) call abort
- if (foo(expr(:)) /= 1) call abort
- if (foo(expr(1:)) /= 1) call abort
- if (foo(expr(:1)) /= 1) call abort
+ if (index(chrs(:), expr) /= 1) STOP 1
+ if (index(chrs(14:), expr) /= 0) STOP 2
+ if (index(chrs(:12), expr) /= 0) STOP 3
+ if (index(chrs, expr(:)) /= 1) STOP 4
+ if (index(chrs, expr(1:)) /= 1) STOP 5
+ if (index(chrs, expr(:1)) /= 1) STOP 6
+
+ if (foo(expr) /= 1) STOP 7
+ if (foo(expr) /= 1) STOP 8
+ if (foo(expr) /= 1) STOP 9
+ if (foo(expr(:)) /= 1) STOP 10
+ if (foo(expr(1:)) /= 1) STOP 11
+ if (foo(expr(:1)) /= 1) STOP 12
call bar(expr)
character(*), parameter :: chrs = '-+.0123456789eEdD'
integer :: foo
- if (index(chrs(:), expr) /= 1) call abort
- if (index(chrs(14:), expr) /= 0) call abort
- if (index(chrs(:12), expr) /= 0) call abort
- if (index(chrs, expr(:)) /= 1) call abort
- if (index(chrs, expr(1:)) /= 1) call abort
- if (index(chrs, expr(:1)) /= 1) call abort
+ if (index(chrs(:), expr) /= 1) STOP 13
+ if (index(chrs(14:), expr) /= 0) STOP 14
+ if (index(chrs(:12), expr) /= 0) STOP 15
+ if (index(chrs, expr(:)) /= 1) STOP 16
+ if (index(chrs, expr(1:)) /= 1) STOP 17
+ if (index(chrs, expr(:1)) /= 1) STOP 18
end subroutine bar
integer function foo(expr)
CHARACTER(1), parameter :: c1(5) = (/ "1", "2", "3", ACHAR(0), "5" /)
c = c0(1)(-5:-8)
-if (c(1) /= " ") call abort()
+if (c(1) /= " ") STOP 1
c = (/ c0(1)(1:5) /)
do i=1,5
- if (c(1)(i:i) /= c1(i)) call abort()
+ if (c(1)(i:i) /= c1(i)) STOP 2
! Make NULs visible (and avoid corrupting text output).
if (c(1)(i:i) == ACHAR(0)) then
x1%s = c
do i = 1, 36
- if (x1%s(i:) .ne. c(i:)) call abort
+ if (x1%s(i:) .ne. c(i:)) STOP 1
end do
end program
SUM( rmatrix_sum_d1 ) == rmatrix_sum])
LOGICAL, PARAMETER :: r_empty_sum = SUM(rmatrix, mask=.FALSE.) == 0.0
- IF (.NOT. ALL ([i_equal_sum, i_empty_sum])) CALL abort()
- IF (.NOT. ALL ([r_equal_sum, r_empty_sum])) CALL abort()
+ IF (.NOT. ALL ([i_equal_sum, i_empty_sum])) STOP 1
+ IF (.NOT. ALL ([r_equal_sum, r_empty_sum])) STOP 2
CALL ilib (imatrix, imatrix_sum)
CALL ilib_with_dim (imatrix, 1, imatrix_sum_d1)
SUBROUTINE ilib (array, result)
INTEGER, DIMENSION(:,:), INTENT(in) :: array
INTEGER, INTENT(in) :: result
- IF (SUM(array) /= result) CALL abort()
+ IF (SUM(array) /= result) STOP 3
END SUBROUTINE
SUBROUTINE ilib_with_dim (array, dim, result)
INTEGER, DIMENSION(:,:), INTENT(in) :: array
INTEGER, INTENT(iN) :: dim
INTEGER, DIMENSION(:), INTENT(in) :: result
- IF (ANY (SUM (array, dim=dim) /= result)) CALL abort()
+ IF (ANY (SUM (array, dim=dim) /= result)) STOP 4
END SUBROUTINE
SUBROUTINE rlib (array, result)
REAL, DIMENSION(:,:), INTENT(in) :: array
REAL, INTENT(in) :: result
- IF (ABS(SUM(array) - result) > 4e-6) CALL abort()
+ IF (ABS(SUM(array) - result) > 4e-6) STOP 5
END SUBROUTINE
SUBROUTINE rlib_with_dim (array, dim, result)
REAL, DIMENSION(:,:), INTENT(in) :: array
INTEGER, INTENT(iN) :: dim
REAL, DIMENSION(:), INTENT(in) :: result
- IF (ANY (ABS(SUM (array, dim=dim) - result) > 4e-6)) CALL abort()
+ IF (ANY (ABS(SUM (array, dim=dim) - result) > 4e-6)) STOP 6
END SUBROUTINE
END
character (len=80) line
ll = .true.
write (unit=line, fmt="(I6)") sum(ii,dim=1)
- if (line /= " ") call abort
+ if (line /= " ") STOP 1
write (unit=line, fmt="(I6)") sum(ii,dim=1,mask=ll)
- if (line /= " ") call abort
+ if (line /= " ") STOP 2
end program xzero
real(4) :: rrate4
call system_clock(count=count1, count_rate=irate4, count_max=mymax4)
- if (count1.ne.-127.or.irate4.ne.0.or.mymax4.ne.0) call abort
+ if (count1.ne.-127.or.irate4.ne.0.or.mymax4.ne.0) STOP 1
call system_clock(count=count1, count_rate=rrate4, count_max=mymax1)
- if (count1.ne.-127.or.rrate4.ne.0.0.or.mymax4.ne.0) call abort
+ if (count1.ne.-127.or.rrate4.ne.0.0.or.mymax4.ne.0) STOP 2
call system_clock(count=count2, count_rate=irate2, count_max=mymax2)
- if (count2.ne.-32767.or.irate2.ne.0.or.mymax2.ne.0) call abort
+ if (count2.ne.-32767.or.irate2.ne.0.or.mymax2.ne.0) STOP 3
call system_clock(count=count2, count_rate=rrate4, count_max=mymax2)
- if (count2.ne.-32767.or.rrate4.ne.0.0.or.mymax2.ne.0) call abort
+ if (count2.ne.-32767.or.rrate4.ne.0.0.or.mymax2.ne.0) STOP 4
call system_clock(count=count4, count_rate=irate4, count_max=mymax4)
- if (irate4.ne.1000.or.mymax4.ne.huge(0_4)) call abort
+ if (irate4.ne.1000.or.mymax4.ne.huge(0_4)) STOP 5
call system_clock(count=count4, count_rate=rrate4, count_max=mymax4)
- if (rrate4.ne.1000.0.or.mymax4.ne.huge(0_4)) call abort
+ if (rrate4.ne.1000.0.or.mymax4.ne.huge(0_4)) STOP 6
end program countem
program main
character(len=10) line
write (line,'(1X,A,T1,A)') 'A','B'
- if (line.ne.'BA') call abort()
+ if (line.ne.'BA') STOP 1
end
form team (new_team,team)
change team (team)
- if (team_number()/=new_team) call abort
+ if (team_number()/=new_team) STOP 1
end team
end
end team
end associate
- if (team_number()/=standard_initial_value) call abort
+ if (team_number()/=standard_initial_value) STOP 1
end
integer, parameter :: standard_initial_value=-1
integer new_team
- if (team_number()/=standard_initial_value) call abort
+ if (team_number()/=standard_initial_value) STOP 1
new_team = mod(this_image(),2)+1
form team (new_team,team)
change team (team)
- if (team_number()/=new_team) call abort
+ if (team_number()/=new_team) STOP 2
end team
- if (team_number()/=standard_initial_value) call abort
+ if (team_number()/=standard_initial_value) STOP 3
end
z = matmul (x, transpose (test ()))
do i = 1, size (x, 1)
do j = 1, size (x, 2)
- if (x (i, j) .ne. z (i, j)) call abort ()
+ if (x (i, j) .ne. z (i, j)) STOP 1
end do
end do
! r and s are reals (default size) in com block, set to
! 1.0 and 2.0, respectively, in hello()
if(r .ne. 1.0) then
- call abort()
+ STOP 1
endif
if(s .ne. 2.0) then
- call abort()
+ STOP 2
endif
end program testComBlock
! f90IntPtr coming in has value of -11; this will make it -12
f90IntPtr = f90IntPtr - 1
if(f90IntPtr .ne. -12) then
- call abort()
+ STOP 1
endif
end subroutine testOnly
end module testOnlyClause
program tiny1
real(4) x4
real(8) x8
- if (minexponent(x4) /= exponent(tiny(x4))) call abort
- if (minexponent(x8) /= exponent(tiny(x8))) call abort
+ if (minexponent(x4) /= exponent(tiny(x4))) STOP 1
+ if (minexponent(x8) /= exponent(tiny(x8))) STOP 2
end program tiny1
real(8) x8
x4 = tiny(x4)
x8 = tiny(x8)
- if (minexponent(x4) /= exponent(x4)) call abort
- if (minexponent(x8) /= exponent(x8)) call abort
+ if (minexponent(x4) /= exponent(x4)) STOP 1
+ if (minexponent(x8) /= exponent(x8)) STOP 2
end program tiny2
! Character unit test
write (line, '(a10,tl6,2x,a2)') aline, bline
- if (line.ne.cline) call abort ()
+ if (line.ne.cline) STOP 1
! Character array unit test
many = "0123456789"
write(many(1:5:2), '(a10,tl6,2x,a2)') aline, bline, aline, bline, aline,&
&bline
- if (many(1).ne.cline) call abort ()
- if (many(3).ne.cline) call abort ()
- if (many(5).ne.cline) call abort ()
+ if (many(1).ne.cline) STOP 2
+ if (many(3).ne.cline) STOP 3
+ if (many(5).ne.cline) STOP 4
! File unit test
write (10, '(a10,tl6,2x,a2)') aline, bline
rewind(10)
read(10, '(a)') s
- if (s.ne.cline) call abort
+ if (s.ne.cline) STOP 1
close(10, status='delete')
end program tl_editting
! The PR testcase.
cmp = transfer (z, cmp) * 2.0
- if (any (cmp .ne. (/2.0, 4.0/))) call abort ()
+ if (any (cmp .ne. (/2.0, 4.0/))) STOP 1
end subroutine test1
a = reshape ((/(rand (), i = 1, 16)/), (/4,4/))
jt = transfer (a, it)
it = reshape (jt, (/4, 2, 4/))
- if (any (reshape (transfer (it, a), (/4,4/)) .ne. a)) call abort ()
+ if (any (reshape (transfer (it, a), (/4,4/)) .ne. a)) STOP 1
end subroutine test1
ch = "wxyz"
ch(1:2) = transfer (y(2:4:2), ch)
- if (any (ch(1:2) .ne. (/"EFGH","MNOP"/))) call abort ()
+ if (any (ch(1:2) .ne. (/"EFGH","MNOP"/))) STOP 2
ch = "wxyz"
ch(1:2) = transfer (y(4:2:-2), ch)
- if (any (ch(1:2) .ne. (/"MNOP","EFGH"/))) call abort ()
+ if (any (ch(1:2) .ne. (/"MNOP","EFGH"/))) STOP 3
! Check that a complete array transfers with size absent.
ch = transfer (y, ch)
- if (any (ch .ne. (/"ABCD","EFGH","IJKL","MNOP"/))) call abort ()
+ if (any (ch .ne. (/"ABCD","EFGH","IJKL","MNOP"/))) STOP 4
! Check that a character array section is OK
z = transfer (ch(2:3), y)
- if (any (z .ne. y(2:3))) call abort ()
+ if (any (z .ne. y(2:3))) STOP 5
! Check dest array sections in both directions.
ch = "wxyz"
ch(3:4) = transfer (y, ch, 2)
- if (any (ch(3:4) .ne. (/"ABCD","EFGH"/))) call abort ()
+ if (any (ch(3:4) .ne. (/"ABCD","EFGH"/))) STOP 6
ch = "wxyz"
ch(3:2:-1) = transfer (y, ch, 2)
- if (any (ch(2:3) .ne. (/"EFGH","ABCD"/))) call abort ()
+ if (any (ch(2:3) .ne. (/"EFGH","ABCD"/))) STOP 7
! Make sure that character to numeric is OK.
ch = "wxyz"
ch(1:2) = transfer (y, ch, 2)
- if (any (ch(1:2) .ne. (/"ABCD","EFGH"/))) call abort ()
+ if (any (ch(1:2) .ne. (/"ABCD","EFGH"/))) STOP 8
z = transfer (ch, y, 2)
- if (any (y(1:2) .ne. z)) call abort ()
+ if (any (y(1:2) .ne. z)) STOP 9
end subroutine test2
! Check assumed shape.
- if (any (ic .ne. transfer (ch1, ic))) call abort ()
+ if (any (ic .ne. transfer (ch1, ic))) STOP 10
! Check assumed character length.
- if (any (ic .ne. transfer (ch2, ic))) call abort ()
+ if (any (ic .ne. transfer (ch2, ic))) STOP 11
! Check automatic character length.
- if (any (ic .ne. transfer (ch3, ic))) call abort ()
+ if (any (ic .ne. transfer (ch3, ic))) STOP 12
end subroutine test3
return\r
end\r
\r
- if (NumOccurances("abacadae", "a", 1) .ne. 4) call abort ()\r
- if (NumOccurances("abacadae", "a", 2) .ne. 4) call abort ()\r
- if (NumOccurances("abacadae", "a", 3) .ne. 4) call abort ()\r
- if (NumOccurances("abacadae", "a", 4) .ne. 4) call abort ()\r
- if (NumOccurances("abacadae", "a", 5) .ne. 4) call abort ()\r
+ if (NumOccurances("abacadae", "a", 1) .ne. 4) STOP 1\r
+ if (NumOccurances("abacadae", "a", 2) .ne. 4) STOP 2\r
+ if (NumOccurances("abacadae", "a", 3) .ne. 4) STOP 3\r
+ if (NumOccurances("abacadae", "a", 4) .ne. 4) STOP 4\r
+ if (NumOccurances("abacadae", "a", 5) .ne. 4) STOP 5\r
end\r
ia = TRANSFER (s1, (/ 0_4 /))
s2 = TRANSFER(ba + 32_1, s2)
- if (s2 .ne. 'abcdefghijk') call abort ()
+ if (s2 .ne. 'abcdefghijk') STOP 1
s1 = 'AB'
ba = TRANSFER (trim (s1)//' JK' , (/ 0_1 /))
s2 = TRANSFER(ia, s2)
- if (trim (s1)//' JK' .ne. s2) call abort ()
+ if (trim (s1)//' JK' .ne. s2) STOP 2
end program trf_test
use TransferBug
character(len=100) :: str
call BytesToString( StringToBytes('Hi'), str )
- if (trim(str) .ne. "Hi") call abort ()
+ if (trim(str) .ne. "Hi") STOP 1
end program
! (1) check CLASS-to-TYPE transfer
c%i=3
t = transfer(c, t)
- if (t%i /= 3) call abort()
+ if (t%i /= 3) STOP 1
! (2) check TYPE-to-CLASS transfer
t%i=4
c = transfer(t, c)
- if (c%i /= 4) call abort()
+ if (c%i /= 4) STOP 2
end
character(len = 1) :: string = "z"
character(len = 20) :: tmp = ""
tmp = Upper ("abcdefgh")
- if (trim(tmp) .ne. "ab") call abort ()
+ if (trim(tmp) .ne. "ab") STOP 1
contains
Character (len = 20) Function Upper (string)
Character(len = *) string
integer :: ij
i = size (transfer (string,"xy",len (string)))
- if (i /= len (string)) call abort ()
+ if (i /= len (string)) STOP 2
Upper = ""
Upper(1:2) = &
transfer (merge (transfer (string,"xy",len (string)), &
character(len=*), intent(in) :: uri, localname
integer, intent(in) :: n
if ((n .lt. 2) .and. (len (uri) .ne. 0)) then
- call abort
+ STOP 1
else IF ((n .ge. 2) .and. (len (uri) .ne. n - 1)) then
- call abort
+ STOP 2
end if
end subroutine
end module m
c = transfer (b, c)
if (c /= s) then
print *, "c=", c, " ", merge (" ok","BUG!", c == s)
- call abort ()
+ STOP 1
end if
end subroutine cmp
end program gfcbug
!
program test_elemental
-if (any (transfer_size((/0.,0./),(/'a','b'/)) .ne. [4 ,4])) call abort
+if (any (transfer_size((/0.,0./),(/'a','b'/)) .ne. [4 ,4])) STOP 1
contains
type (t), parameter :: u = t (42)
integer, parameter :: idx_list(1) = (/ 1 /)
integer :: j(1) = transfer (u, idx_list)
- if (j(1) .ne. 42) call abort ()
+ if (j(1) .ne. 42) STOP 1
end subroutine pr18769
subroutine pr30881 ()
SELECT CASE(I)
CASE(TRANSFER(.TRUE.,K))
CASE(TRANSFER(.FALSE.,K))
- CALL ABORT()
+ STOP 2
CASE DEFAULT
- CALL ABORT()
+ STOP 3
END SELECT
I=TRANSFER(.FALSE.,K)
SELECT CASE(I)
CASE(TRANSFER(.TRUE.,K))
- CALL ABORT()
+ STOP 4
CASE(TRANSFER(.FALSE.,K))
CASE DEFAULT
- CALL ABORT()
+ STOP 5
END SELECT
END subroutine pr30881
!
real(kind(0d0)) :: NaN = transfer(ishft(int(z'FFF80000',8),32),0d0)
write (buffer,'(e12.5)') NaN
- if (buffer(10:12) .ne. "NaN") call abort ()
+ if (buffer(10:12) .ne. "NaN") STOP 6
end subroutine pr31194
subroutine pr31216 ()
SELECT CASE(I)
CASE (TRANSFER(1.0/3.0,1))
CASE DEFAULT
- CALL ABORT()
+ STOP 7
END SELECT
END subroutine pr31216
!
INTEGER(KIND=1) :: i(1)
i = (/ TRANSFER("a", 0_1) /)
- if (i(1) .ne. ichar ("a")) call abort ()
+ if (i(1) .ne. ichar ("a")) STOP 8
END subroutine pr31427
end program simplify_transfer
.or. int(z'6E74656C') /= result%ecx &
.or. int(z'61626364') /= result%bbb)) then
write(*,'(5(z8.8:1x))') result
- call abort()
+ STOP 1
end if
end program test5
integer, parameter :: N = 2
character(len=1) :: chr(N)
chr = transfer(repeat("x",ncopies=N),[character(len=1) ::], N)
- if (chr(1) /= 'x' .and. chr(2) /= 'x') call abort
+ if (chr(1) /= 'x' .and. chr(2) /= 'x') STOP 1
end
real(4) :: r2
r2 = transfer (i2, r2);
- if (r1 .ne. r2) call abort ()
+ if (r1 .ne. r2) STOP 1
end subroutine integer4_to_real4
subroutine real4_to_integer8
integer(8) :: i2
i2 = transfer (r2, 1_8);
- if (i1 .ne. i2) call abort ()
+ if (i1 .ne. i2) STOP 2
end subroutine real4_to_integer8
subroutine integer4_to_integer8
integer(8) :: i4
i4 = transfer (i2, 1_8);
- if (i3 .ne. i4) call abort ()
+ if (i3 .ne. i4) STOP 3
end subroutine integer4_to_integer8
subroutine logical4_to_real8
real(8) :: r2
r2 = transfer (l2, 1_8);
- if (r1 .ne. r2) call abort ()
+ if (r1 .ne. r2) STOP 4
end subroutine logical4_to_real8
subroutine real8_to_integer4
integer(4) :: i2(2)
i2 = transfer (r2, i2, 2);
- if (any (i1 .ne. i2)) call abort ()
+ if (any (i1 .ne. i2)) STOP 5
end subroutine real8_to_integer4
subroutine integer8_to_real4
real(4) :: r2(4)
r2 = transfer (i2, r2);
- if (any (r1 .ne. r2)) call abort ()
+ if (any (r1 .ne. r2)) STOP 6
end subroutine integer8_to_real4
subroutine integer8_to_complex4
complex(4) :: z2(2)
z2 = transfer (i2, z2);
- if (any (z1 .ne. z2)) call abort ()
+ if (any (z1 .ne. z2)) STOP 7
end subroutine integer8_to_complex4
subroutine character16_to_complex8
complex(8) :: z2(2)
z2 = transfer (c2, z2, 2);
- if (any (z1 .ne. z2)) call abort ()
+ if (any (z1 .ne. z2)) STOP 8
end subroutine character16_to_complex8
subroutine character16_to_real8
real(8) :: r2(2)
r2 = transfer (c2, r2, 2);
- if (any (r1 .ne. r2)) call abort ()
+ if (any (r1 .ne. r2)) STOP 9
end subroutine character16_to_real8
subroutine real8_to_character2
character(2) :: c2(4)
c2 = transfer (r2, "ab", 4);
- if (any (c1 .ne. c2)) call abort ()
+ if (any (c1 .ne. c2)) STOP 10
end subroutine real8_to_character2
subroutine dt_to_integer1
integer(1) :: i3(32)
i3 = transfer (dt2, 1_1, 32);
- if (any (i2 .ne. i3)) call abort ()
+ if (any (i2 .ne. i3)) STOP 11
end subroutine dt_to_integer1
subroutine character16_to_dt
type (mytype) :: dt2(2)
dt2 = transfer (c2, dt2);
- if (any (dt1(1)%x .ne. dt2(1)%x)) call abort ()
- if (any (dt1(2)%x .ne. dt2(2)%x)) call abort ()
+ if (any (dt1(1)%x .ne. dt2(1)%x)) STOP 12
+ if (any (dt1(2)%x .ne. dt2(2)%x)) STOP 13
end subroutine character16_to_dt
end
! not portable, replaced by:
bit_pattern_NegInf_i8_hex = ibset(bit_pattern_PosInf_i8_hex,63)
- if (bit_pattern_NegInf_i8_hex /= bit_pattern_NegInf_i8) call abort()
- if (bit_pattern_PosInf_i8_hex /= bit_pattern_PosInf_i8) call abort()
+ if (bit_pattern_NegInf_i8_hex /= bit_pattern_NegInf_i8) STOP 1
+ if (bit_pattern_PosInf_i8_hex /= bit_pattern_PosInf_i8) STOP 2
r = transfer(bit_pattern_PosInf_i8,r)
- if (r /= 1.0_r8_/0.0_r8_) call abort()
+ if (r /= 1.0_r8_/0.0_r8_) STOP 3
i = transfer(r,i)
- if (bit_pattern_PosInf_i8 /= i) call abort()
+ if (bit_pattern_PosInf_i8 /= i) STOP 4
r = transfer(bit_pattern_NegInf_i8,r)
- if (r /= -1.0_r8_/0.0_r8_) call abort()
+ if (r /= -1.0_r8_/0.0_r8_) STOP 5
i = transfer(r,i)
- if (bit_pattern_NegInf_i8 /= i) call abort()
+ if (bit_pattern_NegInf_i8 /= i) STOP 6
r = transfer(bit_pattern_PosInf_i8_p,r)
- if (r /= 1.0_r8_/0.0_r8_) call abort()
+ if (r /= 1.0_r8_/0.0_r8_) STOP 7
i = transfer(r,i)
- if (bit_pattern_PosInf_i8_p /= i) call abort()
+ if (bit_pattern_PosInf_i8_p /= i) STOP 8
r = transfer(bit_pattern_NegInf_i8_p,r)
- if (r /= -1.0_r8_/0.0_r8_) call abort()
+ if (r /= -1.0_r8_/0.0_r8_) STOP 9
i = transfer(r,i)
- if (bit_pattern_NegInf_i8_p /= i) call abort()
+ if (bit_pattern_NegInf_i8_p /= i) STOP 10
END PROGRAM TestInfinite
integer :: i, ai(4)
logical :: b
- if (ip2 .ne. ip1) call abort ()
+ if (ip2 .ne. ip1) STOP 1
i = transfer(transfer(ip1, .true.), 0)
- if (i .ne. ip1) call abort ()
+ if (i .ne. ip1) STOP 2
i = 42
i = transfer(transfer(i, .true.), 0)
- if (i .ne. ip1) call abort ()
+ if (i .ne. ip1) STOP 3
b = transfer(transfer(.true., 3.1415), .true.)
- if (.not.b) call abort ()
+ if (.not.b) STOP 4
b = transfer(transfer(.false., 3.1415), .true.)
- if (b) call abort ()
+ if (b) STOP 5
i = 0
b = transfer(i, .true.)
ai = (/ 42, 42, 42, 42 /)
ai = transfer (transfer (ai, .false., 4), ai)
- if (any(ai .ne. 42)) call abort
+ if (any(ai .ne. 42)) STOP 1
ai = transfer (transfer ((/ 42, 42, 42, 42 /), &
& (/ .false., .false., .false., .false. /)), ai)
- if (any(ai .ne. 42)) call abort
+ if (any(ai .ne. 42)) STOP 2
end
character(8) :: a
allocate(ptr(9))
ptr = transfer('Sample#0'//achar(0),ptr) ! Causes ICE
- if (any (ptr .ne. ['S','a','m','p','l','e','#','0',achar(0)])) call abort
+ if (any (ptr .ne. ['S','a','m','p','l','e','#','0',achar(0)])) STOP 1
call test(a)
- if (a .ne. 'Sample#2') call abort
+ if (a .ne. 'Sample#2') STOP 2
contains
subroutine test(a)
character(len=*) :: a
character(len=4), parameter :: t = "xyzt"
integer, parameter :: w = transfer(t,0)
integer :: i = 1
- if (transfer(t,0) /= w) call abort
- if (transfer(t(:),0) /= w) call abort
- if (transfer(t(1:4),0) /= w) call abort
- if (transfer(t(i:i+3),0) /= w) call abort
+ if (transfer(t,0) /= w) STOP 1
+ if (transfer(t(:),0) /= w) STOP 2
+ if (transfer(t(1:4),0) /= w) STOP 3
+ if (transfer(t(i:i+3),0) /= w) STOP 4
- if (transfer(t(1:1), 0_1) /= transfer("x", 0_1)) call abort
- if (transfer(t(2:2), 0_1) /= transfer("y", 0_1)) call abort
- if (transfer(t(i:i), 0_1) /= transfer("x", 0_1)) call abort
- if (transfer(t(i+1:i+1), 0_1) /= transfer("y", 0_1)) call abort
- if (transfer(t(1:2), 0_2) /= transfer("xy", 0_2)) call abort
- if (transfer(t(3:4), 0_2) /= transfer("zt", 0_2)) call abort
+ if (transfer(t(1:1), 0_1) /= transfer("x", 0_1)) STOP 5
+ if (transfer(t(2:2), 0_1) /= transfer("y", 0_1)) STOP 6
+ if (transfer(t(i:i), 0_1) /= transfer("x", 0_1)) STOP 7
+ if (transfer(t(i+1:i+1), 0_1) /= transfer("y", 0_1)) STOP 8
+ if (transfer(t(1:2), 0_2) /= transfer("xy", 0_2)) STOP 9
+ if (transfer(t(3:4), 0_2) /= transfer("zt", 0_2)) STOP 10
- if (transfer(transfer(-1, t), 0) /= -1) call abort
- if (transfer(transfer(-1, t(:)), 0) /= -1) call abort
- if (any (transfer(transfer(-1, (/t(1:1)/)), (/0_1/)) /= -1)) call abort
- if (transfer(transfer(-1, t(1:1)), 0_1) /= -1) call abort
+ if (transfer(transfer(-1, t), 0) /= -1) STOP 11
+ if (transfer(transfer(-1, t(:)), 0) /= -1) STOP 12
+ if (any (transfer(transfer(-1, (/t(1:1)/)), (/0_1/)) /= -1)) STOP 13
+ if (transfer(transfer(-1, t(1:1)), 0_1) /= -1) STOP 14
end
a(2,2) = 11
call foo
call bar
- if (any (c .ne. b)) call abort
+ if (any (c .ne. b)) STOP 1
contains
subroutine foo
b = cos(transpose(a))
INTEGER, PARAMETER :: b(1,n) = TRANSPOSE(a)
INTEGER, PARAMETER :: c(n,1) = TRANSPOSE(b)
- IF (ANY(c /= a)) CALL abort()
+ IF (ANY(c /= a)) STOP 1
END
! print *,'Normal: ',maxval(abs(B1-B2))
! print *,B1
! print *,B2
- if (any(B1 /= R)) call abort
- if (any(B2 /= R)) call abort
+ if (any(B1 /= R)) STOP 1
+ if (any(B2 /= R)) STOP 2
! Transposed argument
B1 = 0
! print *,'Transposed:',maxval(abs(B1-B2))
! print *,B1
! print *,B2
- if (any(B1 /= RT)) call abort
- if (any(B2 /= RT)) call abort
+ if (any(B1 /= RT)) STOP 3
+ if (any(B2 /= RT)) STOP 4
contains
b = conjg(transpose(b))
d = a
d = transpose(conjg(d))
- if (any (b /= d)) call abort ()
+ if (any (b /= d)) STOP 1
!
d = matmul (b, a )
- if (any (d /= matmul (transpose(conjg(a)), a))) call abort ()
- if (any (d /= matmul (conjg(transpose(a)), a))) call abort ()
+ if (any (d /= matmul (transpose(conjg(a)), a))) STOP 2
+ if (any (d /= matmul (conjg(transpose(a)), a))) STOP 3
!
c = (0.0,1.0)
b = conjg(transpose(a + c))
d = transpose(conjg(a + c))
- if (any (b /= d)) call abort ()
+ if (any (b /= d)) STOP 4
!
d = matmul (b, a + c)
- if (any (d /= matmul (transpose(conjg(a + c)), a + c))) call abort ()
- if (any (d /= matmul (conjg(transpose(a + c)), a + c))) call abort ()
+ if (any (d /= matmul (transpose(conjg(a + c)), a + c))) STOP 5
+ if (any (d /= matmul (conjg(transpose(a + c)), a + c))) STOP 6
END program main
allocate(a(2*nno))
call two()
coor = transpose ( reshape ( a, (/2,nno/) ) )
- if (any(coor /= 12)) call abort
+ if (any(coor /= 12)) STOP 1
contains
subroutine two()
allocate(coor(3,2))
integer :: x(:,:)
b(1,:) = 99
b(2,:) = x(:,1)
- if (any (b(:,1) /= [99, 1]).or.any (b(:,2) /= [99, 3])) call abort()
+ if (any (b(:,1) /= [99, 1]).or.any (b(:,2) /= [99, 3])) STOP 1
end subroutine msub
subroutine pure_msub(x, y)
integer, intent(in) :: x(:,:)
subroutine purity
integer :: c(2,3)
call pure_sub(transpose(a), c)
- if (any (c .ne. a)) call abort
+ if (any (c .ne. a)) STOP 1
call pure_msub(transpose(b), c)
- if (any (c .ne. b)) call abort
+ if (any (c .ne. b)) STOP 2
end subroutine purity
!
! sub and msub both need temporaries to avoid aliasing.
integer :: x(:,:)
a(1,:) = 88
a(2,:) = x(:,1)
- if (any (a(:,1) /= [88, 1]).or.any (a(:,2) /= [88, 3])) call abort()
+ if (any (a(:,1) /= [88, 1]).or.any (a(:,2) /= [88, 3])) STOP 2
end subroutine sub
subroutine pure_sub(x, y)
integer, intent(in) :: x(:,:)
.OR. TRIM (string) /= string (1:trimmed_len)) THEN
PRINT *, full_len, trimmed_len
PRINT *, LEN (string), LEN_TRIM (string)
- CALL abort ()
+ STOP 1
END IF
END SUBROUTINE check_trim
b = 'abcd'
a = trim(b)
c = trim(trim(a))
- if (a /= 'abc') call abort
- if (c /= 'abc') call abort
+ if (a /= 'abc') STOP 1
+ if (c /= 'abc') STOP 2
end program main
! { dg-final { scan-tree-dump-times "memmove" 3 "original" } }
b = 'abcd'
a = trim(b)
c = trim(trim(a))
- if (a /= 'abc') call abort
- if (c /= 'abc') call abort
+ if (a /= 'abc') STOP 1
+ if (c /= 'abc') STOP 2
end subroutine bar
end module faz
b = 'abcd'
a = trim(b)
c = trim(trim(a))
- if (a /= 'abc') call abort
- if (c /= 'abc') call abort
+ if (a /= 'abc') STOP 3
+ if (c /= 'abc') STOP 4
end subroutine foo
end program main
character(len=100) :: line
a = 'bcd'
b = trim(a) // 'x'
- if (b /= 'bcdx') call abort
+ if (b /= 'bcdx') STOP 1
a4 = 4_"bcd"
b4 = trim(a4) // 4_'x'
- if (b4 /= 4_'bcdx') call abort
+ if (b4 /= 4_'bcdx') STOP 2
end
! { dg-final { scan-tree-dump-times "string_len_trim" 2 "original" } }
str = '1234567890'
call sub(trim(str), str)
! Should print '12345 '
- if (str /= '12345 ') call abort
+ if (str /= '12345 ') STOP 1
call two(trim(str))
- if (str /= '123 ') call abort
+ if (str /= '123 ') STOP 2
contains
subroutine sub(a,b)
character(len=*), intent(in) :: a
character(len=10) :: line
a%x = 'a'
write(unit=line,fmt='(A,A)') trim(a%x),"X"
- if (line /= 'aX ') call abort
+ if (line /= 'aX ') STOP 1
b = 'ab'
write (unit=line,fmt='(A,A)') trim(b),"Y"
- if (line /= 'abY ') call abort
+ if (line /= 'abY ') STOP 2
end program main
! { dg-final { scan-tree-dump-times "string_len_trim" 2 "original" } }
b(1) = 'a'
b(2) = 'bc'
write(unit=line,fmt='(A,A)') trim(b(f())), "X"
- if (line /= "aX ") call abort
- if (f() .ne. 2) call abort
+ if (line /= "aX ") STOP 1
+ if (f() .ne. 2) STOP 2
end program main
b = 'b '
c = 'c '
d = a // b // a // trim(c) ! This should be optimized away.
- if (d /= 'a b a c ') call abort
+ if (d /= 'a b a c ') STOP 1
d = a // trim(b) // c // a ! This shouldn't.
- if (d /= 'a bc a ') call abort
+ if (d /= 'a bc a ') STOP 2
d = a // b // a // trim(trim(c)) ! This should also be optimized away.
- if (d /= 'a b a c ') call abort
+ if (d /= 'a b a c ') STOP 3
end
! { dg-final { scan-tree-dump-times "string_len_trim" 1 "original" } }
character(8) :: d
a = 'a '
b = 'b '
- if (trim(a // trim(b)) /= 'a b ') call abort
- if (trim (trim(a) // trim(b)) /= 'ab ') call abort
+ if (trim(a // trim(b)) /= 'a b ') STOP 1
+ if (trim (trim(a) // trim(b)) /= 'ab ') STOP 2
end
! { dg-final { scan-tree-dump-times "string_len_trim" 1 "original" } }
integer :: i
allocate(x(10))
-if (size (x) /= 10) call abort ()
+if (size (x) /= 10) STOP 1
x = [(t(a=-i, B=[1*i,2*i,3*i,4*i]), i = 1, 10)]
do i = 1, 10
if (x(i)%a /= -i .or. size (x(i)%b) /= 4 &
.or. any (x(i)%b /= [1*i,2*i,3*i,4*i])) then
- call abort()
+ STOP 2
end if
end do
class(t), intent(in) :: z(:)
select type(z)
type is(t)
- if (size (z) /= 10) call abort ()
+ if (size (z) /= 10) STOP 3
do i = 1, 10
if (z(i)%a /= -i .or. size (z(i)%b) /= 4 &
.or. any (z(i)%b /= [1*i,2*i,3*i,4*i])) then
- call abort()
+ STOP 4
end if
end do
class default
- call abort()
+ STOP 5
end select
end subroutine class
subroutine classExplicit(u, n)
class(t), intent(in) :: u(n)
select type(u)
type is(t)
- if (size (u) /= 10) call abort ()
+ if (size (u) /= 10) STOP 6
do i = 1, 10
if (u(i)%a /= -i .or. size (u(i)%b) /= 4 &
.or. any (u(i)%b /= [1*i,2*i,3*i,4*i])) then
- call abort()
+ STOP 7
end if
end do
class default
- call abort()
+ STOP 8
end select
end subroutine classExplicit
end
select type (y => testList%test) ! Check vptr set
type is (Test)
- if (x%i .ne. y%i) call abort
+ if (x%i .ne. y%i) STOP 1
class default
- call abort
+ STOP 2
end select
end
select type (y => testList%test) ! Check vptr set
type is (Test)
- if (any(x%i .ne. y%i)) call abort
+ if (any(x%i .ne. y%i)) STOP 1
class default
- call abort
+ STOP 2
end select
end
class(t_stv), intent(in) :: y(:)
integer :: k
do k=1,size(y)
- if (int(y(k)%f1) .ne. k) call abort
+ if (int(y(k)%f1) .ne. k) STOP 1
enddo
end subroutine
end module
integer :: iarray(4)
integer :: i
do i=1,size(a)
- if (a(i)%n .ne. iarray(i)) call abort
+ if (a(i)%n .ne. iarray(i)) STOP 1
a(i)%n = a(i)%n+1
enddo
end subroutine
allocate (foobar(2))
foobar = [bar(1), bar(2)]
- if (any(foobar%i /= [1, 2])) call abort
+ if (any(foobar%i /= [1, 2])) STOP 1
end program
! { dg-final { scan-tree-dump-not "_gfortran_internal_pack" "original" } }
ALLOCATE (A(100))
A = (/ (A_TYPE(I), I=1,SIZE(A)) /)
A(1:50) = A(51:100)
- IF (ANY(A%I /= (/ ((50+I, I=1,SIZE(A)/2), J=1,2) /))) CALL ABORT
+ IF (ANY(A%I /= (/ ((50+I, I=1,SIZE(A)/2), J=1,2) /))) STOP 1
A(::2) = A(1:50) ! pack/unpack
- IF (ANY(A( ::2)%I /= (/ (50+I, I=1,SIZE(A)/2) /))) CALL ABORT
- IF (ANY(A(2::2)%I /= (/ ((50+2*I, I=1,SIZE(A)/4), J=1,2) /))) CALL ABORT
+ IF (ANY(A( ::2)%I /= (/ (50+I, I=1,SIZE(A)/2) /))) STOP 2
+ IF (ANY(A(2::2)%I /= (/ ((50+2*I, I=1,SIZE(A)/4), J=1,2) /))) STOP 3
END PROGRAM
! { dg-final { scan-tree-dump-times "_gfortran_internal_pack" 1 "original" } }
select type (item2)
type is (myItem)
- if (item2%name /= 'abc') call abort()
+ if (item2%name /= 'abc') STOP 1
class default
- call abort()
+ STOP 2
end select
end
INTEGER :: x
IF (adder%func (2, 3) /= 5 .OR. muler%func (2, 3) /= 6) THEN
- CALL abort ()
+ STOP 1
END IF
CALL adder%sub (2, 3, x)
IF (x /= 5) THEN
- CALL abort ()
+ STOP 2
END IF
CALL muler%sub (2, 3, x)
IF (x /= 6) THEN
- CALL abort ()
+ STOP 3
END IF
! Check procedures without arguments.
type(myobj) :: myinstance
res = myinstance%myfunc()
- if (res /= 2) call abort()
+ if (res /= 2) STOP 1
end program
class(trivial_vector_type), intent(inout) :: this
class(vector_class), intent(in) :: v
write (*,*) 'Oops in concrete_vector::my_assign'
- call abort ()
+ STOP 1
end subroutine
end module concrete_vector
! (1) ordinary function call
zero = tx(1)
this%x = find_x(this)
- if (this%x%i /= 1) call abort()
+ if (this%x%i /= 1) STOP 1
! (2) procedure pointer
zero = tx(2)
pp => find_x
this%x = pp(this)
- if (this%x%i /= 2) call abort()
+ if (this%x%i /= 2) STOP 2
! (3) PPC
zero = tx(3)
this%ppc => find_x
this%x = this%ppc()
- if (this%x%i /= 3) call abort()
+ if (this%x%i /= 3) STOP 3
! (4) TBP
zero = tx(4)
this%x = this%find_x()
- if (this%x%i /= 4) call abort()
+ if (this%x%i /= 4) STOP 4
end
CLASS(trueOrFalse), INTENT(INOUT) :: me1, me2
IF (.NOT. me1%val .OR. me2%val) THEN
- CALL abort ()
+ STOP 1
END IF
me1%val = .FALSE.
adder%wrong = 0
adder%val = 42
IF (adder%func (8) /= 50) THEN
- CALL abort ()
+ STOP 2
END IF
CALL adder%sub (x, 8)
IF (x /= 50) THEN
- CALL abort ()
+ STOP 3
END IF
t%val = .TRUE.
CALL f%swap (t)
IF (.NOT. t%val .OR. f%val) THEN
- CALL abort ()
+ STOP 4
END IF
END SUBROUTINE test
this%ppc => find_y
! (1) ordinary procedure
y = find_y()
- if (y/=1) call abort()
+ if (y/=1) STOP 1
! (2) procedure pointer component
y = this%ppc()
- if (y/=2) call abort()
+ if (y/=2) STOP 2
! (3) type-bound procedure
y = this%find_y()
- if (y/=3) call abort()
+ if (y/=3) STOP 3
end
CLASS(trueOrFalse), INTENT(INOUT) :: me1, me2
IF (.NOT. me1%val .OR. me2%val) THEN
- CALL abort ()
+ STOP 1
END IF
me1%val = .FALSE.
CALL f%swap (t)
IF (.NOT. t%val .OR. f%val) THEN
- CALL abort ()
+ STOP 2
END IF
END PROGRAM main
IF (ANY (arr2 /= 2 * arr) .OR. &
ANY (arr3 /= 2 * arr) .OR. &
ANY (arr4 /= 2 * arr)) THEN
- CALL abort ()
+ STOP 1
END IF
END PROGRAM main
allocate(foo2 :: afab)
call af2%do()
- if (af2%i .ne. 2) call abort
- if (af2%get() .ne. 3) call abort
+ if (af2%i .ne. 2) STOP 1
+ if (af2%get() .ne. 3) STOP 2
call afab%do()
- if (afab%i .ne. 2) call abort
- if (afab%get() .ne. 3) call abort
+ if (afab%i .ne. 2) STOP 3
+ if (afab%get() .ne. 3) STOP 4
end program testd15
type(foo2) :: af2
call af2%do()
- if (af2%i .ne. 2) call abort
- if (af2%get() .ne. 3) call abort
+ if (af2%i .ne. 2) STOP 1
+ if (af2%get() .ne. 3) STOP 2
end program testd15
fireworks%velocity = [4,5,6]
dt = 5
fireworks = fireworks + fireworks*dt
- if (any (fireworks%position .ne. [6, 12, 18])) call abort
- if (any (fireworks%velocity .ne. [24, 30, 36])) call abort
+ if (any (fireworks%position .ne. [6, 12, 18])) STOP 1
+ if (any (fireworks%velocity .ne. [24, 30, 36])) STOP 2
end program
allocate (fireworks, source = soop_stars ([1,2,3], [4,5,6]))
dt = 5
fireworks = fireworks + fireworks*dt
- if (any (fireworks%position .ne. [6, 12, 18])) call abort
- if (any (fireworks%velocity .ne. [24, 30, 36])) call abort
+ if (any (fireworks%position .ne. [6, 12, 18])) STOP 1
+ if (any (fireworks%velocity .ne. [24, 30, 36])) STOP 2
end program
! write(*,*) .tr. o
! write(*,*) .tr. p
- if (base_cnt /= 0 .or. ext_cnt /= 0) call abort ()
+ if (base_cnt /= 0 .or. ext_cnt /= 0) STOP 1
r = .tr. o
- if (base_cnt /= 1 .or. ext_cnt /= 0) call abort ()
+ if (base_cnt /= 1 .or. ext_cnt /= 0) STOP 2
r = .tr. p
- if (base_cnt /= 2 .or. ext_cnt /= 1) call abort ()
+ if (base_cnt /= 2 .or. ext_cnt /= 1) STOP 3
if (abs(.tr. o - 5.0 ) < 1.0e-6 .and. abs( .tr. p - (5.0,2.5)) < 1.0e-6) &
then
- if (base_cnt /= 4 .or. ext_cnt /= 2) call abort ()
+ if (base_cnt /= 4 .or. ext_cnt /= 2) STOP 4
! write(*,*) 'OK'
else
- call abort()
+ STOP 5
! write(*,*) 'FAIL'
end if
end program test_override
type(child) :: h1, h2
class(parent), pointer :: hres
- if (m1 + m2 /= 0) call abort()
- if (h1 + m2 /= 1) call abort()
- if (h1%sum(h2) /= 1) call abort()
+ if (m1 + m2 /= 0) STOP 1
+ if (h1 + m2 /= 1) STOP 2
+ if (h1%sum(h2) /= 1) STOP 3
end
num = mynum (1.0, 2)
num = num + 7
- IF (num%num_real /= 1.0 .OR. num%num_int /= 9) CALL abort ()
+ IF (num%num_real /= 1.0 .OR. num%num_int /= 9) STOP 1
END SUBROUTINE check_in_module
END MODULE m
num2 = mynum (2.0, 3)
num3 = num1 + num2
- IF (num3%num_real /= 3.0 .OR. num3%num_int /= 5) CALL abort ()
+ IF (num3%num_real /= 3.0 .OR. num3%num_int /= 5) STOP 2
num3 = num1 + 5
- IF (num3%num_real /= 1.0 .OR. num3%num_int /= 7) CALL abort ()
+ IF (num3%num_real /= 1.0 .OR. num3%num_int /= 7) STOP 3
num3 = num1 + (-100.5)
- IF (num3%num_real /= -99.5 .OR. num3%num_int /= 2) CALL abort ()
+ IF (num3%num_real /= -99.5 .OR. num3%num_int /= 2) STOP 4
num3 = 42
num3 = -1.2
- IF (num3%num_real /= -1.2 .OR. num3%num_int /= 42) CALL abort ()
+ IF (num3%num_real /= -1.2 .OR. num3%num_int /= 42) STOP 5
real_var = num3
int_var = num3
- IF (real_var /= -1.2 .OR. int_var /= 42) CALL abort ()
+ IF (real_var /= -1.2 .OR. int_var /= 42) STOP 6
- IF (.GET. num1 /= 3.0) CALL abort ()
+ IF (.GET. num1 /= 3.0) STOP 7
END PROGRAM main
NDB%PT => POINTB
NDB%KEY = 3
- if (.NOT. NDA .LT. NDB) call abort()
+ if (.NOT. NDA .LT. NDB) STOP 1
END
u = i_multiply_real (u, 2.0) * 4.0
select type (u)
- type is (i_field); if (u%i .ne. 152064) call abort
+ type is (i_field); if (u%i .ne. 152064) STOP 1
end select
end program
u = u%multiply_real (2.0)*4.0
u = i_multiply_real (u, 2.0) * 4.0
- if (u%i .ne. 152064) call abort
+ if (u%i .ne. 152064) STOP 1
end program
type is (cartesian_2d_object)
process_cart2d%c = -sign (obj%c, 1.0)*obj%c** 4
class default
- call abort
+ STOP 1
end select
end function process_cart2d
function process_cart2d_p (obj)
process_cart2d_p%c = -sign (obj%c, 1.0)*obj%c** 4
end select
class default
- call abort
+ STOP 2
end select
end function process_cart2d_p
function source_cart2d (obj, time)
source_cart2d%c = 0.0
if (time .lt. 5.0) source_cart2d%c(m/2, n/2) = 0.1
class default
- call abort
+ STOP 3
end select
end function source_cart2d
m = size (obj%c, 1)
n = size (obj%c, 2)
class default
- call abort
+ STOP 4
end select
allocate (source_cart2d_p,source = obj)
select type (source_cart2d_p)
source_cart2d_p%c = 0.0
if (time .lt. 5.0) source_cart2d_p%c(m/2, n/2) = 0.1
class default
- call abort
+ STOP 5
end select
end function source_cart2d_p
obj%dx = sizes(1)/dims(1)
obj%dy = sizes(2)/dims(2)
class default
- call abort
+ STOP 6
end select
end subroutine grid_definition_cart2d
! print_cart2d --
-(2.0 * obj%c(2:m-1,2:n-1) - obj%c(1:m-2,2:n-1) - obj%c(3:m,2:n-1)) / dx**2 &
-(2.0 * obj%c(2:m-1,2:n-1) - obj%c(2:m-1,1:n-2) - obj%c(2:m-1,3:n)) / dy**2
class default
- call abort
+ STOP 7
end select
end function nabla2_cart2d
function real_times_cart2d (factor, obj) result(newobj)
allocate (newobj%c(m,n))
newobj%c = factor * obj%c
class default
- call abort
+ STOP 8
end select
end function real_times_cart2d
function obj_plus_cart2d (obj1, obj2) result( newobj )
type is (cartesian_2d_object)
newobj%c = obj1%c + obj2%c
class default
- call abort
+ STOP 9
end select
class default
- call abort
+ STOP 10
end select
end function obj_plus_cart2d
subroutine obj_assign_cart2d (obj1, obj2)
type is (cartesian_2d_object)
obj1%c = obj2%c
class default
- call abort
+ STOP 11
end select
end subroutine obj_assign_cart2d
end module cartesian_2d_objects
deallocate (solution, deriv)
call simulation2 ! Use typebound procedures for source and process
- if (chksum(1) .ne. chksum(2)) call abort
- if ((chksum(1) - 0.881868720)**2 > 1e-4) call abort
+ if (chksum(1) .ne. chksum(2)) STOP 12
+ if ((chksum(1) - 0.881868720)**2 > 1e-4) STOP 13
contains
subroutine simulation1
!
integer, dimension (a%i()) :: y ! #2
integer, dimension (a_const%i()) :: z ! #3
- if (size (x) /= 13 .or. size(y) /= 13 .or. size(z) /= 13) call abort()
+ if (size (x) /= 13 .or. size(y) /= 13 .or. size(z) /= 13) STOP 1
! print *, size (x), size(y), size(z)
end subroutine test
type(tx), target :: that
that%i = [1,2]
this%x => this%find_x(that, .true.)
- if (associated (this%x)) call abort()
+ if (associated (this%x)) STOP 1
this%x => this%find_x(that, .false.)
- if(any (this%x%i /= [5, 7])) call abort()
- if (.not.associated (this%x,that)) call abort()
+ if(any (this%x%i /= [5, 7])) STOP 2
+ if (.not.associated (this%x,that)) STOP 3
allocate(this%x)
- if (associated (this%x,that)) call abort()
- if (allocated(this%x%i)) call abort()
+ if (associated (this%x,that)) STOP 4
+ if (allocated(this%x%i)) STOP 5
this%x = this%find_x(that, .false.)
that%i = [3,4]
- if(any (this%x%i /= [5, 7])) call abort() ! FAILS
+ if(any (this%x%i /= [5, 7])) STOP 6 ! FAILS
- if (allocated (this%y%i)) call abort()
+ if (allocated (this%y%i)) STOP 7
this%y = this%find_y() ! FAILS
- if (.not.allocated (this%y%i)) call abort()
- if(any (this%y%i /= [6, 8])) call abort()
+ if (.not.allocated (this%y%i)) STOP 8
+ if(any (this%y%i /= [6, 8])) STOP 9
end subroutine calc
function find_x(this, that, l_null)
class(t), intent(in) :: this
use ice
type(ice_type) :: t
-if (it/=0) call abort()
+if (it/=0) STOP 1
call ice_sub(t)
-if (it/=1) call abort()
+if (it/=1) STOP 2
end
this = that ! (1) direct assignment: works (deep copy)
that%i = [2, -5]
!print *,this%i
- if(any (this%i /= [3, 7])) call abort()
+ if(any (this%i /= [3, 7])) STOP 1
this = p ! (2) using a pointer works as well
that%i = [10, 1]
!print *,this%i
- if(any (this%i /= [2, -5])) call abort()
+ if(any (this%i /= [2, -5])) STOP 2
this = find_x(that) ! (3) pointer function: used to fail (deep copy missing)
that%i = [4, 6]
!print *,this%i
- if(any (this%i /= [10, 1])) call abort()
+ if(any (this%i /= [10, 1])) STOP 3
this = tab%tbp(that) ! other case: typebound procedure
that%i = [8, 9]
!print *,this%i
- if(any (this%i /= [4, 6])) call abort()
+ if(any (this%i /= [4, 6])) STOP 4
tab%ppc => find_x
this = tab%ppc(that) ! other case: procedure pointer component
that%i = [-1, 2]
!print *,this%i
- if(any (this%i /= [8, 9])) call abort()
+ if(any (this%i /= [8, 9])) STOP 5
end block
end program prog
type(C2) :: t2
type(C1) :: t3
- if ( t1 % test( 2. ) /= -100.) call abort()
- if ( t2 % test( 2. ) /= 4.) call abort()
- if ( t3 % test( 2. ) /= 4.) call abort()
+ if ( t1 % test( 2. ) /= -100.) STOP 1
+ if ( t2 % test( 2. ) /= 4.) STOP 2
+ if ( t3 % test( 2. ) /= 4.) STOP 3
end program
call data_structure%a()
call data_logger%init(data_structure)
- if (ctr .ne. 1111) call abort
+ if (ctr .ne. 1111) STOP 1
end program
if (debug) then
print '(A,Z8)','m(1) incorrect. m(1) = ',m(1)
else
- call abort
+ STOP 1
endif
endif
if (debug) then
print '(A,Z8)','m(2) incorrect. m(2) = ',m(2)
else
- call abort
+ STOP 2
endif
endif
if (debug) then
print '(A,Z8)','n incorrect. n = ',n
else
- call abort
+ STOP 3
endif
endif
if (debug) then
print*,'element ',i,' was ',r(i),' should be ',i
else
- call abort
+ STOP 4
endif
endif
end do
if (debug) then
print *,'str incorrect, str = ', str
else
- call abort
+ STOP 5
endif
end if
! use hexdump to look at the file "fort.9"
write (10) c
rewind (10)
read (10) a
- if (a(1) /= 3.14 .or. a(2) /= 2.71) call abort
+ if (a(1) /= 3.14 .or. a(2) /= 2.71) STOP 1
close(10,status="delete")
open (10, form="unformatted",convert="big_endian") ! { dg-warning "Extension: CONVERT" }
rewind (10)
read (10) b
if (any(b /= (/ Z'11', Z'22', Z'33', Z'44', Z'55', Z'66', Z'77', Z'00' /))) &
- call abort
+ STOP 2
backspace 10
read (10) j
- if (j /= Z'1122334455667700') call abort
+ if (j /= Z'1122334455667700') STOP 3
close (10, status="delete")
open (10, form="unformatted", convert="little_endian") ! { dg-warning "Extension: CONVERT" }
rewind (10)
read (10) b
if (any(b /= (/ Z'44', Z'33', Z'22', Z'11', Z'00', Z'77', Z'66', Z'55' /))) &
- call abort
+ STOP 4
backspace 10
read (10) j
- if (j /= Z'5566770011223344') call abort
+ if (j /= Z'5566770011223344') STOP 5
close (10, status="delete")
end program main
backspace 10
read (10) b
close(10,status="delete")
- if (a /= b) call abort
+ if (a /= b) STOP 1
write (11) a
backspace 11
open (11,form="unformatted")
read (11) c
- if (a .ne. c) call abort
+ if (a .ne. c) STOP 2
close (11, status="delete")
end program main
character (len=30) ch
open (10,form="unformatted",convert="little_endian")
inquire (10, convert=ch)
- if (ch .ne. "LITTLE_ENDIAN") call abort
+ if (ch .ne. "LITTLE_ENDIAN") STOP 1
close (10, status="delete")
open(11,form="unformatted")
inquire (11, convert=ch)
- if (ch .ne. "BIG_ENDIAN") call abort
+ if (ch .ne. "BIG_ENDIAN") STOP 2
close (11, status="delete")
end program main
i1 = 0
i2 = 0
read (10, iostat=ios, iomsg=msg) i1, i2
- if (ios == 0) call abort
- if (i1 /= 1) call abort
- if (msg /= "Unformatted file structure has been corrupted") call abort
+ if (ios == 0) STOP 1
+ if (i1 /= 1) STOP 2
+ if (msg /= "Unformatted file structure has been corrupted") STOP 3
close (10, status="delete")
end program main
read (3) a,b,c,d
close (3)
- if (d(1).ne.1) call abort
- if (d(2048).ne.2048) call abort
+ if (d(1).ne.1) STOP 1
+ if (d(2048).ne.2048) STOP 2
end
a = 'b'
rewind 10
read (10, err=20, iomsg=msg) a
- call abort
+ STOP 1
20 continue
- if (msg .ne. "I/O past end of record on unformatted file") call abort
- if (a(1) .ne. 'a' .or. a(2) .ne. 'b' .or. a(3) .ne. 'b') call abort
+ if (msg .ne. "I/O past end of record on unformatted file") STOP 2
+ if (a(1) .ne. 'a' .or. a(2) .ne. 'b' .or. a(3) .ne. 'b') STOP 3
close (10, status="delete")
end program main
read(10) a, b
read(10) a, b
read(10) a, b
- if ((a.ne.2).and.( b.ne.1)) call abort()
+ if ((a.ne.2).and.( b.ne.1)) STOP 1
end program test
read (10) m
if (any(m .ne. (/ -16, 1, 4, 9, 16, 16, -16, 25, 36, 49, 64, &
-16, -16, 81, 100, 121, 144, -16, -16, 169, 196, 225, &
- 256, -16, 16, 289, 324, 361, 400, -16 /))) call abort
+ 256, -16, 16, 289, 324, 361, 400, -16 /))) STOP 1
close (10)
open (10, file="f10.dat", form="unformatted", &
access="sequential")
m = 42
read (10) m(1:5)
- if (any(m(1:5) .ne. (/ 1, 4, 9, 16, 25 /))) call abort
- if (any(m(6:30) .ne. 42)) call abort
+ if (any(m(1:5) .ne. (/ 1, 4, 9, 16, 25 /))) STOP 2
+ if (any(m(6:30) .ne. 42)) STOP 3
backspace 10
n = 0
read (10) n(1:5)
- if (any(n(1:5) .ne. (/ 1, 4, 9, 16, 25 /))) call abort
- if (any(n(6:20) .ne. 0)) call abort
+ if (any(n(1:5) .ne. (/ 1, 4, 9, 16, 25 /))) STOP 4
+ if (any(n(6:20) .ne. 0)) STOP 5
! Append to the end of the file
write (10) 3.14_4
! Test multiple backspace statements
backspace 10
backspace 10
read (10) k
- if (k .ne. 1) call abort
+ if (k .ne. 1) STOP 6
read (10) r
- if (abs(r-3.14_4) .gt. 1e-7) call abort
+ if (abs(r-3.14_4) .gt. 1e-7) STOP 7
close (10, status="delete")
end program main
anum = 0
rewind(lun)
read (lun, *) anum
- if (anum.ne.5) call abort
+ if (anum.ne.5) STOP 1
open (looney, status='scratch')
write(looney,*)bin
bin = 0
rewind (looney)
read (looney,*)bin
- if (bin.ne.23) call abort
+ if (bin.ne.23) STOP 2
close (lun)
close (looney)
end
& "abcdefg",iarray, i,"jklmnop"
end do
if (string.ne."iarray =abcdefg,1,2,3,4,5,6,7,8,9,10,10,jklmnop") &
- & call abort
+ & STOP 1
end program unlimited
type is (real(8))\r
write (res, '(a, F4.1)') "real8", w\r
type is (character(*, kind = 4))\r
- call abort\r
+ STOP 1
type is (character(*))\r
write (res, '(a, I2, a, a)') "char(", LEN(w), ")", trim(w)\r
end select\r
\r
! Test pointing to derived types.\r
u1 => obj1\r
- if (SAME_TYPE_AS (obj1, u1) .neqv. .TRUE.) call abort\r
+ if (SAME_TYPE_AS (obj1, u1) .neqv. .TRUE.) STOP 1
u2 => obj2\r
call bar (u1, res)\r
- if (trim (res) .ne. "type(a) 99") call abort\r
+ if (trim (res) .ne. "type(a) 99") STOP 1
\r
call foo (u2, res)\r
- if (trim (res) .ne. "type(a) array 999 999 999") call abort\r
+ if (trim (res) .ne. "type(a) array 999 999 999") STOP 1
\r
- if (SAME_TYPE_AS (obj1, u1) .neqv. .TRUE.) call abort\r
+ if (SAME_TYPE_AS (obj1, u1) .neqv. .TRUE.) STOP 1
\r
! Check allocate with an array SOURCE.\r
allocate (u2(5), source = [(a(i), i = 1,5)])\r
- if (SAME_TYPE_AS (u1, a(2)) .neqv. .TRUE.) call abort\r
+ if (SAME_TYPE_AS (u1, a(2)) .neqv. .TRUE.) STOP 1
call foo (u2, res)\r
- if (trim (res) .ne. "type(a) array 1 2 3 4 5") call abort\r
+ if (trim (res) .ne. "type(a) array 1 2 3 4 5") STOP 1
\r
deallocate (u2)\r
\r
! Point to intrinsic targets.\r
u1 => obj3\r
call bar (u1, res)\r
- if (trim (res) .ne. "integer 999") call abort\r
+ if (trim (res) .ne. "integer 999") STOP 1
\r
u2 => obj4\r
call foo (u2, res)\r
- if (trim (res) .ne. "real array 1.0 2.0 3.0 4.0") call abort\r
+ if (trim (res) .ne. "real array 1.0 2.0 3.0 4.0") STOP 1
\r
u2 => obj5\r
call foo (u2, res)\r
- if (trim (res) .ne. "integer array 99 198 297") call abort\r
+ if (trim (res) .ne. "integer array 99 198 297") STOP 1
\r
! Test allocate with source.\r
allocate (u1, source = sun)\r
call bar (u1, res)\r
- if (trim (res) .ne. "char( 8)sunshine") call abort\r
+ if (trim (res) .ne. "char( 8)sunshine") STOP 1
deallocate (u1)\r
\r
allocate (u2(3), source = [7,8,9])\r
call foo (u2, res)\r
- if (trim (res) .ne. "integer array 7 8 9") call abort\r
+ if (trim (res) .ne. "integer array 7 8 9") STOP 1
\r
deallocate (u2)\r
\r
- if (EXTENDS_TYPE_OF (obj1, u2) .neqv. .TRUE.) call abort\r
- if (EXTENDS_TYPE_OF (u2, obj1) .neqv. .FALSE.) call abort\r
+ if (EXTENDS_TYPE_OF (obj1, u2) .neqv. .TRUE.) STOP 1
+ if (EXTENDS_TYPE_OF (u2, obj1) .neqv. .FALSE.) STOP 1
\r
allocate (u2(3), source = [5.0,6.0,7.0])\r
call foo (u2, res)\r
- if (trim (res) .ne. "real array 5.0 6.0 7.0") call abort\r
+ if (trim (res) .ne. "real array 5.0 6.0 7.0") STOP 1
\r
- if (EXTENDS_TYPE_OF (obj1, u2) .neqv. .FALSE.) call abort\r
- if (EXTENDS_TYPE_OF (u2, obj1) .neqv. .FALSE.) call abort\r
+ if (EXTENDS_TYPE_OF (obj1, u2) .neqv. .FALSE.) STOP 1
+ if (EXTENDS_TYPE_OF (u2, obj1) .neqv. .FALSE.) STOP 1
deallocate (u2)\r
\r
! Check allocate with a MOLD tag.\r
allocate (u2(3), mold = 8.0)\r
call foo (u2, res)\r
- if (res(1:10) .ne. "real array") call abort\r
+ if (res(1:10) .ne. "real array") STOP 1
deallocate (u2)\r
\r
! Test passing an intrinsic type to a CLASS(*) formal.\r
call bar(1, res)\r
- if (trim (res) .ne. "integer 1") call abort\r
+ if (trim (res) .ne. "integer 1") STOP 1
\r
call bar(2.0, res)\r
- if (trim (res) .ne. "real4 2.0") call abort\r
+ if (trim (res) .ne. "real4 2.0") STOP 1
\r
call bar(2d0, res)\r
- if (trim (res) .ne. "real8 2.0") call abort\r
+ if (trim (res) .ne. "real8 2.0") STOP 1
\r
call bar(a(3), res)\r
- if (trim (res) .ne. "type(a) 3") call abort\r
+ if (trim (res) .ne. "type(a) 3") STOP 1
\r
call bar(sun, res)\r
- if (trim (res) .ne. "char( 8)sunshine") call abort\r
+ if (trim (res) .ne. "char( 8)sunshine") STOP 1
\r
call bar (obj3, res)\r
- if (trim (res) .ne. "integer 999") call abort\r
+ if (trim (res) .ne. "integer 999") STOP 1
\r
call foo([4,5], res)\r
- if (trim (res) .ne. "integer array 4 5") call abort\r
+ if (trim (res) .ne. "integer array 4 5") STOP 1
\r
call foo([6.0,7.0], res)\r
- if (trim (res) .ne. "real array 6.0 7.0") call abort\r
+ if (trim (res) .ne. "real array 6.0 7.0") STOP 1
\r
call foo([a(8),a(9)], res)\r
- if (trim (res) .ne. "type(a) array 8 9") call abort\r
+ if (trim (res) .ne. "type(a) array 8 9") STOP 1
\r
call foo([sun, " & rain"], res)\r
- if (trim (res) .ne. "char( 8, 2)sunshine & rain") call abort\r
+ if (trim (res) .ne. "char( 8, 2)sunshine & rain") STOP 1
\r
call foo([sun//" never happens", " & rain always happens"], res)\r
- if (trim (res) .ne. "char(22, 2)sunshine never happens & rain always happens") call abort\r
+ if (trim (res) .ne. "char(22, 2)sunshine never happens & rain always happens") STOP 1
\r
call foo (obj4, res)\r
- if (trim (res) .ne. "real array 1.0 2.0 3.0 4.0") call abort\r
+ if (trim (res) .ne. "real array 1.0 2.0 3.0 4.0") STOP 1
\r
call foo (obj5, res)\r
- if (trim (res) .ne. "integer array 99 198 297") call abort\r
+ if (trim (res) .ne. "integer array 99 198 297") STOP 1
\r
! Allocatable entities\r
- if (EXTENDS_TYPE_OF (obj1, u3) .neqv. .TRUE.) call abort\r
- if (EXTENDS_TYPE_OF (u3, obj1) .neqv. .FALSE.) call abort\r
- if (EXTENDS_TYPE_OF (obj1, u4) .neqv. .TRUE.) call abort\r
- if (EXTENDS_TYPE_OF (u4, obj1) .neqv. .FALSE.) call abort\r
+ if (EXTENDS_TYPE_OF (obj1, u3) .neqv. .TRUE.) STOP 1
+ if (EXTENDS_TYPE_OF (u3, obj1) .neqv. .FALSE.) STOP 1
+ if (EXTENDS_TYPE_OF (obj1, u4) .neqv. .TRUE.) STOP 1
+ if (EXTENDS_TYPE_OF (u4, obj1) .neqv. .FALSE.) STOP 1
\r
allocate (u3, source = 2.4)\r
call bar (u3, res)\r
- if (trim (res) .ne. "real4 2.4") call abort\r
+ if (trim (res) .ne. "real4 2.4") STOP 1
\r
allocate (u4(2), source = [a(88), a(99)])\r
call foo (u4, res)\r
- if (trim (res) .ne. "type(a) array 88 99") call abort\r
+ if (trim (res) .ne. "type(a) array 88 99") STOP 1
\r
- if (EXTENDS_TYPE_OF (obj1, u3) .neqv. .FALSE.) call abort\r
- if (EXTENDS_TYPE_OF (u3, obj1) .neqv. .FALSE.) call abort\r
+ if (EXTENDS_TYPE_OF (obj1, u3) .neqv. .FALSE.) STOP 1
+ if (EXTENDS_TYPE_OF (u3, obj1) .neqv. .FALSE.) STOP 1
\r
deallocate (u3)\r
- if (EXTENDS_TYPE_OF (obj1, u3) .neqv. .TRUE.) call abort\r
- if (EXTENDS_TYPE_OF (u3, obj1) .neqv. .FALSE.) call abort\r
+ if (EXTENDS_TYPE_OF (obj1, u3) .neqv. .TRUE.) STOP 1
+ if (EXTENDS_TYPE_OF (u3, obj1) .neqv. .FALSE.) STOP 1
\r
- if (EXTENDS_TYPE_OF (obj1, u4) .neqv. .TRUE.) call abort\r
- if (EXTENDS_TYPE_OF (u4, obj1) .neqv. .TRUE.) call abort\r
+ if (EXTENDS_TYPE_OF (obj1, u4) .neqv. .TRUE.) STOP 1
+ if (EXTENDS_TYPE_OF (u4, obj1) .neqv. .TRUE.) STOP 1
deallocate (u4)\r
- if (EXTENDS_TYPE_OF (obj1, u4) .neqv. .TRUE.) call abort\r
- if (EXTENDS_TYPE_OF (u4, obj1) .neqv. .FALSE.) call abort\r
+ if (EXTENDS_TYPE_OF (obj1, u4) .neqv. .TRUE.) STOP 1
+ if (EXTENDS_TYPE_OF (u4, obj1) .neqv. .FALSE.) STOP 1
\r
\r
! Check assumed rank calls\r
integer :: ranki\r
integer i\r
i = rank (arg)\r
- if (i .ne. ranki) call abort\r
+ if (i .ne. ranki) STOP 1
end subroutine\r
\r
END\r
case (real_kinds(size(real_kinds)))
sz = storage_size(r4)*2
end select
- if (sz .eq. 0) call abort()
+ if (sz .eq. 0) STOP 1
- if (storage_size(o) /= sz) call abort()
+ if (storage_size(o) /= sz) STOP 2
! Break up the SELECT TYPE to pre-empt collisions in the value of 'cn'
select type (o)
type is (complex(c1))
- if (storage_size(o) /= sz) call abort()
+ if (storage_size(o) /= sz) STOP 3
end select
select type (o)
type is (complex(c2))
- if (storage_size(o) /= sz) call abort()
+ if (storage_size(o) /= sz) STOP 4
end select
select type (o)
type is (complex(c3))
- if (storage_size(o) /= sz) call abort()
+ if (storage_size(o) /= sz) STOP 5
end select
select type (o)
type is (complex(c4))
- if (storage_size(o) /= sz) call abort()
+ if (storage_size(o) /= sz) STOP 6
end select
end subroutine s
end module m
program test
logical l
call up("abc", l)
- if (l) call abort
+ if (l) STOP 1
call up(3habc, l) ! { dg-warning "Legacy Extension" }
- if (.not. l) call abort
+ if (.not. l) STOP 2
contains
subroutine up(x, l)
class(*) :: x
call show_real (array)
call show_generic1 (array)
call show_generic2 (array)
- if (chksum0 .ne. chksum1) call abort
- if (chksum0 .ne. chksum2) call abort
+ if (chksum0 .ne. chksum1) STOP 1
+ if (chksum0 .ne. chksum2) STOP 2
end program test
select type (X)
type is (real)
if ( abs (X - this%expectedScalar) > 0.0001 ) then
- call abort()
+ STOP 1
end if
class default
- call abort ()
+ STOP 2
end select
end subroutine FCheck
call sub4 (S, 4)
call sub4 ("This is a longer string.", 24)
call bar (S, res)
- if (trim (res) .NE. " 4") call abort ()
+ if (trim (res) .NE. " 4") STOP 1
call bar(ucp, res)
- if (trim (res) .NE. " 4") call abort ()
+ if (trim (res) .NE. " 4") STOP 2
contains
select type (ucp)
type is (character(len=*))
- if (len(dcl) .NE. ilen) call abort ()
- if (len(ucp) .NE. ilen) call abort ()
+ if (len(dcl) .NE. ilen) STOP 3
+ if (len(ucp) .NE. ilen) STOP 4
hlp = ucp
- if (len(hlp) .NE. ilen) call abort ()
+ if (len(hlp) .NE. ilen) STOP 5
class default
- call abort()
+ STOP 6
end select
end subroutine
select type (ucp)
type is (character(len=*))
- if (len(ucp) .ne. 3) call abort ()
+ if (len(ucp) .ne. 3) STOP 7
class default
- call abort()
+ STOP 8
end select
end subroutine
select type (ucp)
type is (character(len=*))
- if (len(ucp) .ne. 4) call abort ()
+ if (len(ucp) .ne. 4) STOP 9
hlp = ucp
- if (len(hlp) .ne. 4) call abort ()
+ if (len(hlp) .ne. 4) STOP 10
class default
- call abort()
+ STOP 11
end select
end subroutine
select type (ucp)
type is (character(len=*))
- if (len(ucp) .ne. ilen) call abort ()
+ if (len(ucp) .ne. ilen) STOP 12
hlp = ucp
- if (len(hlp) .ne. ilen) call abort ()
+ if (len(hlp) .ne. ilen) STOP 13
class default
- call abort()
+ STOP 14
end select
end subroutine
end program
call associate_pointer(f,ptr)
select type (ptr)
type is (real)
- if (abs (ptr(1) - 0.99) > 1e-5) call abort
+ if (abs (ptr(1) - 0.99) > 1e-5) STOP 1
end select
ptr => return_pointer(f) ! runtime segmentation fault
- if (associated(return_pointer(f)) .neqv. .true.) call abort
+ if (associated(return_pointer(f)) .neqv. .true.) STOP 2
select type (ptr)
type is (real)
- if (abs (ptr(1) - 0.99) > 1e-5) call abort
+ if (abs (ptr(1) - 0.99) > 1e-5) STOP 3
end select
contains
subroutine associate_pointer(this, item)
select type(P1)
type is (character(*))
P1 ="some test string"
- if (P1 .ne. "some test string") call abort ()
- if (len(P1) .ne. 20) call abort ()
- if (len(P1) .eq. len("some test string")) call abort ()
+ if (P1 .ne. "some test string") STOP 1
+ if (len(P1) .ne. 20) STOP 2
+ if (len(P1) .eq. len("some test string")) STOP 3
class default
- call abort ()
+ STOP 4
end select
allocate(A1, source = P1)
select type(A1)
type is (character(*))
- if (A1 .ne. "some test string") call abort ()
- if (len(A1) .ne. 20) call abort ()
- if (len(A1) .eq. len("some test string")) call abort ()
+ if (A1 .ne. "some test string") STOP 5
+ if (len(A1) .ne. 20) STOP 6
+ if (len(A1) .eq. len("some test string")) STOP 7
class default
- call abort ()
+ STOP 8
end select
allocate(A2, source = convertType(P1))
select type(A2)
type is (character(*))
- if (A2 .ne. "some test string") call abort ()
- if (len(A2) .ne. 20) call abort ()
- if (len(A2) .eq. len("some test string")) call abort ()
+ if (A2 .ne. "some test string") STOP 9
+ if (len(A2) .ne. 20) STOP 10
+ if (len(A2) .eq. len("some test string")) STOP 11
class default
- call abort ()
+ STOP 12
end select
allocate(P2, source = str)
select type(P2)
type is (character(*))
- if (P2 .ne. "string for test") call abort ()
- if (len(P2) .eq. 20) call abort ()
- if (len(P2) .ne. len("string for test")) call abort ()
+ if (P2 .ne. "string for test") STOP 13
+ if (len(P2) .eq. 20) STOP 14
+ if (len(P2) .ne. len("string for test")) STOP 15
class default
- call abort ()
+ STOP 16
end select
allocate(P3, source = "string for test")
select type(P3)
type is (character(*))
- if (P3 .ne. "string for test") call abort ()
- if (len(P3) .eq. 20) call abort ()
- if (len(P3) .ne. len("string for test")) call abort ()
+ if (P3 .ne. "string for test") STOP 17
+ if (len(P3) .eq. 20) STOP 18
+ if (len(P3) .ne. len("string for test")) STOP 19
class default
- call abort ()
+ STOP 20
end select
allocate(character(len=10)::PA1(3))
select type(PA1)
type is (character(*))
PA1(1) = "string 10 "
- if (PA1(1) .ne. "string 10 ") call abort ()
- if (any(len(PA1(:)) .ne. [10,10,10])) call abort ()
+ if (PA1(1) .ne. "string 10 ") STOP 21
+ if (any(len(PA1(:)) .ne. [10,10,10])) STOP 22
class default
- call abort ()
+ STOP 23
end select
deallocate(PA1)
deallocate(P3)
-! if (len(P3) .ne. 0) call abort() ! Can't check, because select
+! if (len(P3) .ne. 0) STOP 24 ! Can't check, because select
! type would be needed, which needs the vptr, which is 0 now.
deallocate(P2)
deallocate(A2)
select type(P1)
type is (character(len=*,kind=4))
P1 ="some test string"
- if (P1 .ne. 4_"some test string") call abort ()
- if (len(P1) .ne. 20) call abort ()
- if (len(P1) .eq. len("some test string")) call abort ()
+ if (P1 .ne. 4_"some test string") STOP 25
+ if (len(P1) .ne. 20) STOP 26
+ if (len(P1) .eq. len("some test string")) STOP 27
type is (character(len=*,kind=1))
- call abort ()
+ STOP 28
class default
- call abort ()
+ STOP 29
end select
allocate(A1, source=P1)
select type(A1)
type is (character(len=*,kind=4))
- if (A1 .ne. 4_"some test string") call abort ()
- if (len(A1) .ne. 20) call abort ()
- if (len(A1) .eq. len("some test string")) call abort ()
+ if (A1 .ne. 4_"some test string") STOP 30
+ if (len(A1) .ne. 20) STOP 31
+ if (len(A1) .eq. len("some test string")) STOP 32
type is (character(len=*,kind=1))
- call abort ()
+ STOP 33
class default
- call abort ()
+ STOP 34
end select
allocate(A2, source = convertType(P1))
select type(A2)
type is (character(len=*, kind=4))
- if (A2 .ne. 4_"some test string") call abort ()
- if (len(A2) .ne. 20) call abort ()
- if (len(A2) .eq. len("some test string")) call abort ()
+ if (A2 .ne. 4_"some test string") STOP 35
+ if (len(A2) .ne. 20) STOP 36
+ if (len(A2) .eq. len("some test string")) STOP 37
class default
- call abort ()
+ STOP 38
end select
allocate(P2, source = str4)
select type(P2)
type is (character(len=*,kind=4))
- if (P2 .ne. 4_"string for test") call abort ()
- if (len(P2) .eq. 20) call abort ()
- if (len(P2) .ne. len("string for test")) call abort ()
+ if (P2 .ne. 4_"string for test") STOP 39
+ if (len(P2) .eq. 20) STOP 40
+ if (len(P2) .ne. len("string for test")) STOP 41
class default
- call abort ()
+ STOP 42
end select
allocate(P3, source = convertType(P2))
select type(P3)
type is (character(len=*, kind=4))
- if (P3 .ne. 4_"string for test") call abort ()
- if (len(P3) .eq. 20) call abort ()
- if (len(P3) .ne. len("string for test")) call abort ()
+ if (P3 .ne. 4_"string for test") STOP 43
+ if (len(P3) .eq. 20) STOP 44
+ if (len(P3) .ne. len("string for test")) STOP 45
class default
- call abort ()
+ STOP 46
end select
allocate(character(kind=4, len=10)::PA1(3))
select type(PA1)
type is (character(len=*, kind=4))
PA1(1) = 4_"string 10 "
- if (PA1(1) .ne. 4_"string 10 ") call abort ()
- if (any(len(PA1(:)) .ne. [10,10,10])) call abort ()
+ if (PA1(1) .ne. 4_"string 10 ") STOP 47
+ if (any(len(PA1(:)) .ne. [10,10,10])) STOP 48
class default
- call abort ()
+ STOP 49
end select
deallocate(PA1)
allocate(o2%content, source=o1%content)
select type (c => o1%content)
type is (character(*))
- if (c /= 'test string') call abort ()
+ if (c /= 'test string') STOP 50
class default
- call abort()
+ STOP 51
end select
select type (d => o2%content)
type is (character(*))
- if (d /= 'test string') call abort ()
+ if (d /= 'test string') STOP 52
class default
end select
allocate(P, source=C)
select type (P)
type is (character(*))
- if (P /= 'test string') call abort()
+ if (P /= 'test string') STOP 53
class default
- call abort()
+ STOP 54
end select
end subroutine
if (.not.associated(e%info)) e%info => i ! used to ICE
select type (z => e%info)
type is (integer)
- if (z .ne.i) call abort
+ if (z .ne.i) STOP 1
end select
END SUBROUTINE
select case (i)
case (1:10)
read (output(i), '(i6)') j
- if (j .ne. i) call abort
+ if (j .ne. i) STOP 1
case (11)
- if (output(i) .ne. " 1.23") call abort
+ if (output(i) .ne. " 1.23") STOP 2
case (12)
- if (output(i) .ne. " A") call abort
+ if (output(i) .ne. " A") STOP 3
case (13)
- if (output(i) .ne. " BC") call abort
+ if (output(i) .ne. " BC") STOP 4
case (14)
- if (output(i) .ne. " DEF") call abort
+ if (output(i) .ne. " DEF") STOP 5
end select
end do
end program main
type(base_type) :: a, b
call dict_put(t, a, b)
- if (.NOT. allocated(t%key)) call abort()
+ if (.NOT. allocated(t%key)) STOP 1
select type (x => t%key)
type is (base_type)
class default
- call abort()
+ STOP 2
end select
deallocate(t%key)
end
type(dict_entry_type) :: t
call dict_put(t, "foo", 42)
- if (.NOT. allocated(t%key)) call abort()
+ if (.NOT. allocated(t%key)) STOP 1
select type (x => t%key)
type is (CHARACTER(*))
- if (x /= "foo") call abort()
+ if (x /= "foo") STOP 2
class default
- call abort()
+ STOP 3
end select
deallocate(t%key)
- if (.NOT. allocated(t%val)) call abort()
+ if (.NOT. allocated(t%val)) STOP 4
select type (x => t%val)
type is (INTEGER)
- if (x /= 42) call abort()
+ if (x /= 42) STOP 5
class default
- call abort()
+ STOP 6
end select
deallocate(t%val)
end
end type t
type(t), pointer :: x
class(*), pointer :: ptr1 => null() ! pointer initialization
- if (same_type_as (ptr1, x) .neqv. .FALSE.) call abort
+ if (same_type_as (ptr1, x) .neqv. .FALSE.) STOP 1
end subroutine bar
end program main
type(s), pointer :: ptr1
type(t), pointer :: ptr2
ptr1 => tgt ! bind(c) => unlimited allowed
- if (ptr1%k .ne. 42) call abort
+ if (ptr1%k .ne. 42) STOP 2
ptr2 => tgt ! sequence type => unlimited allowed
- if (ptr2%k .ne. 42) call abort
+ if (ptr2%k .ne. 42) STOP 3
end subroutine foo
i2 = 2
call move_alloc(i2, i1)
if (size(i1) /= n2 .or. allocated(i2)) then
- call abort
+ STOP 1
! write(*,*) 'FAIL'
else
! write(*,*) 'OK'
select type (i1)
type is (integer)
- if (any (i1 /= 2)) call abort
+ if (any (i1 /= 2)) STOP 2
class default
- call abort()
+ STOP 1
end select
call move_alloc (i1, i3)
if (size(i3) /= n2 .or. allocated(i1)) then
- call abort()
+ STOP 2
end if
select type (i3)
type is (integer)
- if (any (i3 /= 2)) call abort
+ if (any (i3 /= 2)) STOP 3
class default
- call abort()
+ STOP 3
end select
end program
if (mystuff == 4) then
! write(*,*) 'OK'
else
- call abort()
+ STOP 1
! write(*,*) 'FAIL 1'
end if
class default
- call abort()
+ STOP 2
! write(*,*) 'FAIL 2'
end select
end program
INTEGER, PARAMETER :: r1(3,3) = UNPACK (V, MASK=Q, FIELD=M)
INTEGER, PARAMETER :: r2(3,3) = UNPACK (V, MASK=Q, FIELD=0)
- IF (ANY (r1 /= RESHAPE ([1,1,0,2,1,0,0,0,3], [3,3]))) CALL ABORT()
- IF (ANY (r2 /= RESHAPE ([0,1,0,2,0,0,0,0,3], [3,3]))) CALL ABORT()
+ IF (ANY (r1 /= RESHAPE ([1,1,0,2,1,0,0,0,3], [3,3]))) STOP 1
+ IF (ANY (r2 /= RESHAPE ([0,1,0,2,0,0,0,0,3], [3,3]))) STOP 2
END
use a, only: operator(.op.), operator(.op.), &
operator(.my.)=>operator(.op.),operator(.ops.)=>operator(.op.)
implicit none
-if (.my.2 /= -2 .or. .op.3 /= -3 .or. .ops.7 /= -7) call abort()
+if (.my.2 /= -2 .or. .op.3 /= -3 .or. .ops.7 /= -7) STOP 1
end
use m, local2 => a
local1 = 5
local2 = 3
-if (local1 .ne. local2) call abort ()
+if (local1 .ne. local2) STOP 1
end
! All procedures/variables below refer to the ones in module "m"
! and not to the siblings in this module "m2".
use m
- if (fun() /= 42) call abort()
- if (var /= 43) call abort()
+ if (fun() /= 42) STOP 1
+ if (var /= 43) STOP 2
call fun2()
- if (var /= 44) call abort()
+ if (var /= 44) STOP 3
end subroutine test
integer function fun()
- call abort()
+ STOP 4
fun = -3
end function fun
subroutine fun2()
- call abort()
+ STOP 5
end subroutine fun2
end module m2
use mod1
type(t1) :: a
call a%get(j)
- if (j /= 2) call abort
+ if (j /= 2) STOP 1
end subroutine test1
subroutine test2()
use mod2
type(t1) :: a
call a%get(j)
- if (j /= 2) call abort
+ if (j /= 2) STOP 2
end subroutine test2
end
iflag = 0
call bTypeInstance%callback(iflag)
- if (iflag /= 7) call abort
+ if (iflag /= 7) STOP 1
iflag = 1
call solver( bTypeInstance, iflag )
- if (iflag /= 7) call abort
+ if (iflag /= 7) STOP 2
iflag = 2
call aTypeInstance%callback(iflag)
- if (iflag /= 3) call abort
+ if (iflag /= 3) STOP 3
end subroutine test1
subroutine test2
iflag = 0
call bTypeInstance%callback(iflag)
- if (iflag /= 7) call abort
+ if (iflag /= 7) STOP 4
iflag = 1
call solver( bTypeInstance, iflag )
- if (iflag /= 7) call abort
+ if (iflag /= 7) STOP 5
iflag = 2
call aTypeInstance%callback(iflag)
- if (iflag /= 3) call abort
+ if (iflag /= 3) STOP 6
end subroutine test2
end program main
use z
integer :: i
i = 2
- if ((.bar. i) /= 2+25) call abort ()
- if ((.my. i) /= 2+15) call abort ()
- if ((.addfive. i) /= 2+5) call abort ()
+ if ((.bar. i) /= 2+25) STOP 1
+ if ((.my. i) /= 2+15) STOP 2
+ if ((.addfive. i) /= 2+5) STOP 3
end
subroutine init
use foo
- if (.not.allocated(bar)) call abort
+ if (.not.allocated(bar)) STOP 1
end subroutine init
USE ymod, ONLY: yrenamed => y
USE ymod
implicit integer(2) (a-z)
- if (kind(xrenamed) == kind(x)) call abort ()
- if (kind(yrenamed) == kind(y)) call abort ()
+ if (kind(xrenamed) == kind(x)) STOP 1
+ if (kind(yrenamed) == kind(y)) STOP 2
end subroutine
subroutine test2 ! Test the fix applies to generic interfaces
USE ymod, ONLY: yfoobar_renamed => yfoobar
USE ymod
implicit integer(4) (a-z)
- if (xfoobar_renamed (42) == xfoobar ()) call abort ()
- if (yfoobar_renamed (42) == yfoobar ()) call abort ()
+ if (xfoobar_renamed (42) == xfoobar ()) STOP 3
+ if (yfoobar_renamed (42) == yfoobar ()) STOP 4
end subroutine
subroutine test3 ! Check that USE_NAME == LOCAL_NAME is OK
USE xmod, ONLY: x => x, xfoobar => xfoobar
USE ymod, ONLY: y => y, yfoobar => yfoobar
USE ymod
- if (kind (x) /= 4) call abort ()
- if (kind (y) /= 4) call abort ()
- if (xfoobar (77) /= 77_4) call abort ()
- if (yfoobar (77) /= 77_4) call abort ()
+ if (kind (x) /= 4) STOP 5
+ if (kind (y) /= 4) STOP 6
+ if (xfoobar (77) /= 77_4) STOP 7
+ if (yfoobar (77) /= 77_4) STOP 8
end subroutine
END PROGRAM test2uses
end interface
contains
subroutine one1()
- call abort
+ STOP 1
end subroutine one1
end module m1
integer a, b
a = max (1,5)
b = min (1,5)
- if (a .ne. 1) call abort ()
- if (b .ne. 5) call abort ()
+ if (a .ne. 1) STOP 1
+ if (b .ne. 5) STOP 2
end subroutine test2
end
j = 5
IF (i /= j) THEN
- CALL abort ()
+ STOP 1
END IF
END PROGRAM main
type(t1) :: res = t1 (0)
call init ()
call test (res)
- if (res%a.ne.42) call abort
+ if (res%a.ne.42) STOP 1
end
REAL :: buffer_conc(1:anzKomponenten)
buffer_conc = solveCConvert ()
if (any(buffer_conc .ne. (/(real(i), i = 1, anzKomponenten)/))) &
- call abort ()
+ STOP 1
END SUBROUTINE outDiffKoeff
program missing_ref
common /c/ cam
x = -42.0
call foo(x)
- if (any (x .ne. (/42.0, 42.0, -42.0, -42.0/))) call abort ()
- if (cam%i .ne. 99) call abort ()
+ if (any (x .ne. (/42.0, 42.0, -42.0, -42.0/))) STOP 1
+ if (cam%i .ne. 99) STOP 2
end
string3 = "abcdefghijklmnopqrstuvwxyz"
read(10,'(a)') string1
read(10,'(a)') string2
- if (string1 /= k4_"This is Greek: \u039f\u03cd\u03c7\u03af") call abort
- if (len(trim(string1)) /= 20) call abort
+ if (string1 /= k4_"This is Greek: \u039f\u03cd\u03c7\u03af") STOP 1
+ if (len(trim(string1)) /= 20) STOP 2
if (string2 /= k4_" Jerry in Japanese is: \u30b8\u30a8\u30ea\u30fc")&
- & call abort
- if (len(string2) /= 30) call abort
+ & STOP 3
+ if (len(string2) /= 30) STOP 4
rewind(10)
read(10,'(a)') string3
- if (string3 /= "This is Greek: ????") call abort
+ if (string3 /= "This is Greek: ????") STOP 5
end program test1
! The following examples require UTF-8 enabled editor to see correctly.
! ジエリー Sample of Japanese characters.
1 format(i0,a,i0,a,i0,a)
rewind(10)
read(10,'(a)') string
- if (string /= ucs4_"2008\u5e748\u670810\u65e5") call abort
+ if (string /= ucs4_"2008\u5e748\u670810\u65e5") STOP 1
end program test2
! { dg-do run }
-! { dg-options "-std=f2003 -fall-intrinsics" }
+! { dg-options "-std=f2003 " }
! Tests the functionality of the patch for PR29642, which requested the
! implementation of the F2003 VALUE attribute for gfortran.
!
contains
subroutine typhoo (dt)
type(mytype), value :: dt
- if (dtne (dt, mytype (42.0, "lmno"))) call abort ()
+ if (dtne (dt, mytype (42.0, "lmno"))) STOP 1
dt = mytype (21.0, "wxyz")
- if (dtne (dt, mytype (21.0, "wxyz"))) call abort ()
+ if (dtne (dt, mytype (21.0, "wxyz"))) STOP 2
end subroutine typhoo
logical function dtne (a, b)
type(mytype) :: dt = mytype (42.0, "lmno")
call foo (c)
- if (c /= "ab") call abort ()
+ if (c /= "ab") STOP 3
call bar (i)
- if (i /= 42) call abort ()
+ if (i /= 42) STOP 4
call foobar (r)
- if (r /= 42.0) call abort ()
+ if (r /= 42.0) STOP 5
call complex_foo (z)
- if (z /= (-99.0, 199.0)) call abort ()
+ if (z /= (-99.0, 199.0)) STOP 6
call typhoo (dt)
- if (dtne (dt, mytype (42.0, "lmno"))) call abort ()
+ if (dtne (dt, mytype (42.0, "lmno"))) STOP 7
r = 20.0
call foobar (r*2.0 + 2.0)
contains
subroutine foo (c)
character(2), value :: c
- if (c /= "ab") call abort ()
+ if (c /= "ab") STOP 8
c = "cd"
- if (c /= "cd") call abort ()
+ if (c /= "cd") STOP 9
end subroutine foo
subroutine bar (i)
integer(8), value :: i
- if (i /= 42) call abort ()
+ if (i /= 42) STOP 10
i = 99
- if (i /= 99) call abort ()
+ if (i /= 99) STOP 11
end subroutine bar
subroutine foobar (r)
real(8), value :: r
- if (r /= 42.0) call abort ()
+ if (r /= 42.0) STOP 12
r = 99.0
- if (r /= 99.0) call abort ()
+ if (r /= 99.0) STOP 13
end subroutine foobar
subroutine complex_foo (z)
COMPLEX(8), value :: z
- if (z /= (-99.0, 199.0)) call abort ()
+ if (z /= (-99.0, 199.0)) STOP 14
z = (77.0, -42.0)
- if (z /= (77.0, -42.0)) call abort ()
+ if (z /= (77.0, -42.0)) STOP 15
end subroutine complex_foo
end program test_value
integer(8) :: i = 42
call bar (i)
- if (i /= 42) call abort ()
+ if (i /= 42) STOP 1
contains
subroutine bar (i)
integer(8) :: i
value :: i ! { dg-error "Fortran 2003: VALUE" }
- if (i /= 42) call abort ()
+ if (i /= 42) STOP 2
i = 99
- if (i /= 99) call abort ()
+ if (i /= 99) STOP 3
end subroutine bar
end program test_value
b = 0.0
c = a
b = f_to_f (a, c)
- if (delta ((2.0 * a), b)) call abort ()
+ if (delta ((2.0 * a), b)) STOP 1
i = 99
j = 0
k = i
j = i_to_i (i, k)
- if (delta ((3_4 * i), j)) call abort ()
+ if (delta ((3_4 * i), j)) STOP 2
u = (-1.0, 2.0)
v = (1.0, -2.0)
w = u
v = c_to_c (u, w)
- if (delta ((4.0 * u), v)) call abort ()
+ if (delta ((4.0 * u), v)) STOP 3
end program value_4
end subroutine test
subroutine test2(a) bind(c)
character(kind=c_char), value :: a
- if(a /= c_char_'a') call abort ()
+ if(a /= c_char_'a') STOP 1
print *, 'a=',a
end subroutine test2
end module pr32732
character(len=13) :: chr
chr = 'Fortran '
call sub1(chr)
- if(chr /= 'Fortran ') call abort()
+ if(chr /= 'Fortran ') STOP 1
contains
subroutine sub1(a)
character(len=13), VALUE :: a
subroutine sub2(a)
character(len=13), VALUE :: a
print *, a
- if(a /= 'Fortran rules') call abort()
+ if(a /= 'Fortran rules') STOP 2
end subroutine sub2
end program test
call mySub(myInt)
! myInt should be unchanged since pass-by-value
if(myInt .ne. 10) then
- call abort ()
+ STOP 1
endif
end program valueTests
REAL(8) :: f,dist(2)
dist = [1.0_8, 0.5_8]
if( f(1.0_8, dist) /= MINVAL(dist)) then
- call abort ()
+ STOP 1
endif
END PROGRAM test
& i=0,nx-1), j=0,ny-1) /), shape(pz))
integer, dimension(nx,ny,nz) :: a
integer, dimension(nx,ny ) :: az
- if (sum(sum(sum(a,1),2),1) /= sum(a)) call abort
- if (sum(sum(sum(a,3),1),1) /= sum(a)) call abort
+ if (sum(sum(sum(a,1),2),1) /= sum(a)) STOP 1
+ if (sum(sum(sum(a,3),1),1) /= sum(a)) STOP 2
if (any(1+sum(eid(a),1)+ax+sum( &
neid3(a), &
- 1)+1 /= 3*ax+2)) call abort
+ 1)+1 /= 3*ax+2)) STOP 3
if (any(1+eid(sum(a,2))+ay+ &
neid2( &
sum(a,2) &
- )+1 /= 3*ay+2)) call abort
+ )+1 /= 3*ay+2)) STOP 4
if (any(sum(eid(sum(a,3))+az+2* &
neid2(az) &
- ,1)+1 /= 4*sum(az,1)+1)) call abort
+ ,1)+1 /= 4*sum(az,1)+1)) STOP 5
contains
elemental function eid (x)
integer, intent(in) :: x
y(i) = i+1
enddo
call foo(a,x,y,1024)
- if (a.ne.359488000.0) call abort()
+ if (a.ne.359488000.0) STOP 1
end
! If there's no longer a reduction chain detected this doesn't test what
! it was supposed to test, vectorizing a reduction chain w/o SLP.
PRINT *, "c=", c
IF (c(1) .gt. 0.0) THEN
- CALL ABORT
+ STOP 1
END IF
IF (c(2) .gt. 0.0) THEN
- CALL ABORT
+ STOP 2
END IF
end subroutine foo
real *8, intent(in) :: a(4), b(4)
IF (abs(a(1)-b(1)) > 1) THEN
- CALL ABORT
+ STOP 1
END IF
end subroutine check
do I = 1, N
do J = I, M
if (A(J,2) /= B(J)) then
- call abort ()
+ STOP 1
endif
end do
end do
integer :: gap
do i = 1, N - gap
temp = a(i + gap) + x
- if (a(i) /= temp) call abort
+ if (a(i) /= temp) STOP 1
end do
do i = N - gap + 1, N
temp = TEST_VALUE(i)
- if (a(i) /= temp) call abort
+ if (a(i) /= temp) STOP 2
end do
end subroutine
a (foo (5, calls)) = b (foo (5, calls))
call test (foo (5, calls), foo (5, calls))
- if (calls .ne. 8) call abort
+ if (calls .ne. 8) STOP 1
!------------------------------------------------------------------
! Tests for constant vector constructors
calls = 0
a (idx (1:6)) = foo (6, calls)
- if (calls .ne. 1) call abort
+ if (calls .ne. 1) STOP 2
do i = 1, 6
- if (a (idx (i)) .ne. i + 3) call abort
+ if (a (idx (i)) .ne. i + 3) STOP 3
end do
a = 0
calls = 0
a (idx (1:6)) = foo (6, calls) * 100
- if (calls .ne. 1) call abort
+ if (calls .ne. 1) STOP 4
do i = 1, 6
- if (a (idx (i)) .ne. (i + 3) * 100) call abort
+ if (a (idx (i)) .ne. (i + 3) * 100) STOP 5
end do
a = 0
a (idx) = id + 100
do i = 1, n
- if (a (idx (i)) .ne. i + 100) call abort
+ if (a (idx (i)) .ne. i + 100) STOP 6
end do
a = 0
a (idx (1:10:3)) = (/ 20, 10, 9, 11 /)
- if (a (idx (1)) .ne. 20) call abort
- if (a (idx (4)) .ne. 10) call abort
- if (a (idx (7)) .ne. 9) call abort
- if (a (idx (10)) .ne. 11) call abort
+ if (a (idx (1)) .ne. 20) STOP 7
+ if (a (idx (4)) .ne. 10) STOP 8
+ if (a (idx (7)) .ne. 9) STOP 9
+ if (a (idx (10)) .ne. 11) STOP 10
a = 0
contains
integer, dimension (:) :: lhs, rhs
integer :: i
- if (size (lhs, 1) .ne. size (rhs, 1)) call abort
+ if (size (lhs, 1) .ne. size (rhs, 1)) STOP 11
do i = 1, size (lhs, 1)
- if (a (lhs (i)) .ne. b (rhs (i))) call abort
+ if (a (lhs (i)) .ne. b (rhs (i))) STOP 12
end do
a = 0
end subroutine test
a (foo (i1), 1, :) = b (2, :, foo (i1))
do i1 = 1, 5
do i2 = 1, 5
- if (a (idx (i1), 1, i2) .ne. b (2, i1, idx (i2))) call abort
+ if (a (idx (i1), 1, i2) .ne. b (2, i1, idx (i2))) STOP 1
end do
end do
a = 0
a (1, idx (1:4), 2:4) = b (2:5, idx (3:5), 2)
do i1 = 1, 4
do i2 = 1, 3
- if (a (1, idx (i1), 1 + i2) .ne. b (1 + i1, idx (i2 + 2), 2)) call abort
+ if (a (1, idx (i1), 1 + i2) .ne. b (1 + i1, idx (i2 + 2), 2)) STOP 2
end do
end do
a = 0
ACTION = 'READWRITE')
ISTAT = -314
REWIND (47, IOSTAT = ISTAT)
- IF (ISTAT .NE. 0) call abort ()
+ IF (ISTAT .NE. 0) STOP 1
ISTAT = -314
! write qda1
WRITE (47,IOSTAT = ISTAT) QDA1
- IF (ISTAT .NE. 0) call abort ()
+ IF (ISTAT .NE. 0) STOP 2
ISTAT = -314
REWIND (47, IOSTAT = ISTAT)
- IF (ISTAT .NE. 0) call abort ()
+ IF (ISTAT .NE. 0) STOP 3
! Do the vector index read that used to fail
READ (47,IOSTAT = ISTAT) QDA(NFV1)
- IF (ISTAT .NE. 0) call abort ()
+ IF (ISTAT .NE. 0) STOP 4
! Unscramble qda using the vector index
IF (ANY (QDA(nfv1) .ne. QDA1) ) print *, qda, qda1
ISTAT = -314
REWIND (47, IOSTAT = ISTAT)
- IF (ISTAT .NE. 0) call abort ()
+ IF (ISTAT .NE. 0) STOP 5
qda = -200
! Do the subscript read that was OK
READ (47,IOSTAT = ISTAT) QDA(1:10)
- IF (ISTAT .NE. 0) call abort ()
- IF (ANY (QDA .ne. QDA1) ) call abort ()
+ IF (ISTAT .NE. 0) STOP 6
+ IF (ANY (QDA .ne. QDA1) ) STOP 7
END
c = 2
p = 2
call subr (3, 2, a, b, c, d, p)
- if (any (d .ne. reshape ((/(mod (i + 2, 3), i = 1, 6)/), (/3, 2/)))) call abort
+ if (any (d .ne. reshape ((/(mod (i + 2, 3), i = 1, 6)/), (/3, 2/)))) STOP 1
end
character(len=3) s1, s2
s1 = 'abc'
s2 = ''
- if (verify('ab', '') /= 1) call abort
- if (verify(s1, s2) /= 1) call abort
- if (verify('abc', '', .true.) /= 3) call abort
- if (verify(s1, s2, .true.) /= 3) call abort
+ if (verify('ab', '') /= 1) STOP 1
+ if (verify(s1, s2) /= 1) STOP 2
+ if (verify('abc', '', .true.) /= 3) STOP 3
+ if (verify(s1, s2, .true.) /= 3) STOP 4
end program verify_2
subroutine test1(cmp)
logical :: cmp
volatile :: l, lv
- if (l .neqv. cmp) call abort()
- if (lv .neqv. cmp) call abort()
+ if (l .neqv. cmp) STOP 1
+ if (lv .neqv. cmp) STOP 2
l = .false.
lv = .false.
if(l .or. lv) print *, 'one_test1' ! not optimized away
end subroutine test1
subroutine test2(cmp)
logical :: cmp
- if (l .neqv. cmp) call abort()
- if (lv .neqv. cmp) call abort()
+ if (l .neqv. cmp) STOP 3
+ if (lv .neqv. cmp) STOP 4
l = .false.
if(l) print *, 'one_test2_1' ! optimized away
lv = .false.
subroutine test1t(cmp)
logical :: cmp
volatile :: l, lv
- if (l .neqv. cmp) call abort()
- if (lv .neqv. cmp) call abort()
+ if (l .neqv. cmp) STOP 5
+ if (lv .neqv. cmp) STOP 6
l = .false.
if(l) print *, 'two_test1_1' ! not optimized away
lv = .false.
end subroutine test1t
subroutine test2t(cmp)
logical :: cmp
- if (l .neqv. cmp) call abort()
- if (lv .neqv. cmp) call abort()
+ if (l .neqv. cmp) STOP 7
+ if (lv .neqv. cmp) STOP 8
l = .false.
if(l) print *, 'two_test2_1' ! not optimized away
lv = .false.
use :: one
logical :: cmp
volatile :: lm,lmv
- if(lm .neqv. cmp) call abort()
- if(lmv .neqv. cmp) call abort()
+ if(lm .neqv. cmp) STOP 9
+ if(lmv .neqv. cmp) STOP 10
l = .false.
lv = .false.
call test1(.false.)
use :: one
logical :: cmp
volatile :: lv
- if(lm .neqv. cmp) call abort
- if(lmv .neqv. cmp) call abort()
+ if(lm .neqv. cmp) STOP 1
+ if(lmv .neqv. cmp) STOP 11
l = .false.
lv = .false.
call test1(.false.)
elsewhere
la = .true.
end where
- if (any(la .eqv. lb)) call abort()
+ if (any(la .eqv. lb)) STOP 1
CONTAINS
subroutine PR35759
integer UDA1L(6)
ELSEWHERE
UDA1L(2:6) = UDA1R(6:2:-1)
ENDWHERE
- if (any (expected /= uda1l)) call abort
+ if (any (expected /= uda1l)) STOP 1
END subroutine
SUBROUTINE PR35756
ELSEWHERE
ILA = R_MY_MIN_I(ILA)
ENDWHERE
- IF (any (CLA /= ILA)) call abort
+ IF (any (CLA /= ILA)) STOP 2
end subroutine
INTEGER FUNCTION R_MY_MAX_I(A)
END WHERE
END DO
- if (any (ia .ne. (/1,-1,2,-2,0,0,0,0,5,-5,6,-6/))) call abort ()
+ if (any (ia .ne. (/1,-1,2,-2,0,0,0,0,5,-5,6,-6/))) STOP 1
CONTAINS
l1 = (/t, f, f, t/)
call test_where_1
- if (any (y .ne. (/a (2, 1),a (2, 2),a (2, 3),a (2, 4)/))) call abort ()
+ if (any (y .ne. (/a (2, 1),a (2, 2),a (2, 3),a (2, 4)/))) STOP 1
call test_where_2
- if (any (y .ne. (/a (1, 0),a (2, 2),a (2, 3),a (1, 0)/))) call abort ()
- if (any (z .ne. (/a (3, 4),a (1, 0),a (1, 0),a (3, 1)/))) call abort ()
+ if (any (y .ne. (/a (1, 0),a (2, 2),a (2, 3),a (1, 0)/))) STOP 2
+ if (any (z .ne. (/a (3, 4),a (1, 0),a (1, 0),a (3, 1)/))) STOP 3
call test_where_3
- if (any (y .ne. (/a (1, 0),a (1, 2),a (1, 3),a (1, 0)/))) call abort ()
+ if (any (y .ne. (/a (1, 0),a (1, 2),a (1, 3),a (1, 0)/))) STOP 4
y = x
call test_where_forall_1
- if (any (u(4, :) .ne. (/a (1, 4),a (2, 2),a (2, 3),a (1, 4)/))) call abort ()
+ if (any (u(4, :) .ne. (/a (1, 4),a (2, 2),a (2, 3),a (1, 4)/))) STOP 5
l1 = (/t, f, t, f/)
call test_where_4
- if (any (x .ne. (/a (1, 1),a (2, 1),a (1, 3),a (2, 3)/))) call abort ()
+ if (any (x .ne. (/a (1, 1),a (2, 1),a (1, 3),a (2, 3)/))) STOP 6
contains
!******************************************************************************
call test_where_char1
call test_where_char2
if (any(y .ne. &
- (/a(4, "null"), a(8, "non-null"), a(8, "non-null"), a(4, "null")/))) call abort ()
+ (/a(4, "null"), a(8, "non-null"), a(8, "non-null"), a(4, "null")/))) STOP 1
contains
subroutine test_where_char1 ! Test a WHERE blocks
where (l1)
integer :: i
end type myType3
type(myType3) :: x
- if(x%i /= 7) call abort()
+ if(x%i /= 7) STOP 1
x%i = 1
end subroutine test
type(myType3) :: z
z%i = 7
call test(z)
- if(z%i /= 1) call abort
+ if(z%i /= 1) STOP 1
end program foo
subroutine test (a)
character (5) :: a
- if (a .ne. 'hello') call abort
+ if (a .ne. 'hello') STOP 1
end subroutine test
character(kind=1,len=20) :: s1, t1
character(kind=4,len=20) :: s4
t1 = s4
- if (t1 /= s1) call abort
- if (len(s1) /= len(t1)) call abort
- if (len(s1) /= len(s4)) call abort
- if (len_trim(s1) /= len_trim(t1)) call abort
- if (len_trim(s1) /= len_trim(s4)) call abort
+ if (t1 /= s1) STOP 1
+ if (len(s1) /= len(t1)) STOP 2
+ if (len(s1) /= len(s4)) STOP 3
+ if (len_trim(s1) /= len_trim(t1)) STOP 4
+ if (len_trim(s1) /= len_trim(s4)) STOP 5
end subroutine check
subroutine check2(s1,s4)
t1 = s4
t4 = s1
- if (t1 /= s1) call abort
- if (t4 /= s4) call abort
- if (len(s1) /= len(t1)) call abort
- if (len(s1) /= len(s4)) call abort
- if (len(s1) /= len(t4)) call abort
- if (len_trim(s1) /= len_trim(t1)) call abort
- if (len_trim(s1) /= len_trim(s4)) call abort
- if (len_trim(s1) /= len_trim(t4)) call abort
+ if (t1 /= s1) STOP 6
+ if (t4 /= s4) STOP 7
+ if (len(s1) /= len(t1)) STOP 8
+ if (len(s1) /= len(s4)) STOP 9
+ if (len(s1) /= len(t4)) STOP 10
+ if (len_trim(s1) /= len_trim(t1)) STOP 11
+ if (len_trim(s1) /= len_trim(s4)) STOP 12
+ if (len_trim(s1) /= len_trim(t4)) STOP 13
end subroutine check2
end
subroutine test(s4, t4, u4, v4)
character(kind=4,len=*) :: s4, t4, u4, v4
- if (.not. (s4 >= t4)) call abort
- if (.not. (s4 > t4)) call abort
- if (.not. (s4 .ge. t4)) call abort
- if (.not. (s4 .gt. t4)) call abort
- if ( (s4 == t4)) call abort
- if (.not. (s4 /= t4)) call abort
- if ( (s4 .eq. t4)) call abort
- if (.not. (s4 .ne. t4)) call abort
- if ( (s4 <= t4)) call abort
- if ( (s4 < t4)) call abort
- if ( (s4 .le. t4)) call abort
- if ( (s4 .lt. t4)) call abort
-
- if (.not. (s4 >= u4)) call abort
- if ( (s4 > u4)) call abort
- if (.not. (s4 .ge. u4)) call abort
- if ( (s4 .gt. u4)) call abort
- if (.not. (s4 == u4)) call abort
- if ( (s4 /= u4)) call abort
- if (.not. (s4 .eq. u4)) call abort
- if ( (s4 .ne. u4)) call abort
- if (.not. (s4 <= u4)) call abort
- if ( (s4 < u4)) call abort
- if (.not. (s4 .le. u4)) call abort
- if ( (s4 .lt. u4)) call abort
-
- if ( (s4 >= v4)) call abort
- if ( (s4 > v4)) call abort
- if ( (s4 .ge. v4)) call abort
- if ( (s4 .gt. v4)) call abort
- if ( (s4 == v4)) call abort
- if (.not. (s4 /= v4)) call abort
- if ( (s4 .eq. v4)) call abort
- if (.not. (s4 .ne. v4)) call abort
- if (.not. (s4 <= v4)) call abort
- if (.not. (s4 < v4)) call abort
- if (.not. (s4 .le. v4)) call abort
- if (.not. (s4 .lt. v4)) call abort
+ if (.not. (s4 >= t4)) STOP 1
+ if (.not. (s4 > t4)) STOP 2
+ if (.not. (s4 .ge. t4)) STOP 3
+ if (.not. (s4 .gt. t4)) STOP 4
+ if ( (s4 == t4)) STOP 5
+ if (.not. (s4 /= t4)) STOP 6
+ if ( (s4 .eq. t4)) STOP 7
+ if (.not. (s4 .ne. t4)) STOP 8
+ if ( (s4 <= t4)) STOP 9
+ if ( (s4 < t4)) STOP 10
+ if ( (s4 .le. t4)) STOP 11
+ if ( (s4 .lt. t4)) STOP 12
+
+ if (.not. (s4 >= u4)) STOP 13
+ if ( (s4 > u4)) STOP 14
+ if (.not. (s4 .ge. u4)) STOP 15
+ if ( (s4 .gt. u4)) STOP 16
+ if (.not. (s4 == u4)) STOP 17
+ if ( (s4 /= u4)) STOP 18
+ if (.not. (s4 .eq. u4)) STOP 19
+ if ( (s4 .ne. u4)) STOP 20
+ if (.not. (s4 <= u4)) STOP 21
+ if ( (s4 < u4)) STOP 22
+ if (.not. (s4 .le. u4)) STOP 23
+ if ( (s4 .lt. u4)) STOP 24
+
+ if ( (s4 >= v4)) STOP 25
+ if ( (s4 > v4)) STOP 26
+ if ( (s4 .ge. v4)) STOP 27
+ if ( (s4 .gt. v4)) STOP 28
+ if ( (s4 == v4)) STOP 29
+ if (.not. (s4 /= v4)) STOP 30
+ if ( (s4 .eq. v4)) STOP 31
+ if (.not. (s4 .ne. v4)) STOP 32
+ if (.not. (s4 <= v4)) STOP 33
+ if (.not. (s4 < v4)) STOP 34
+ if (.not. (s4 .le. v4)) STOP 35
+ if (.not. (s4 .lt. v4)) STOP 36
end subroutine test
subroutine test2(t4, u4, v4)
character(kind=4,len=*) :: t4, u4, v4
- if (.not. (4_" \xACp " >= t4)) call abort
- if (.not. (4_" \xACp " > t4)) call abort
- if (.not. (4_" \xACp " .ge. t4)) call abort
- if (.not. (4_" \xACp " .gt. t4)) call abort
- if ( (4_" \xACp " == t4)) call abort
- if (.not. (4_" \xACp " /= t4)) call abort
- if ( (4_" \xACp " .eq. t4)) call abort
- if (.not. (4_" \xACp " .ne. t4)) call abort
- if ( (4_" \xACp " <= t4)) call abort
- if ( (4_" \xACp " < t4)) call abort
- if ( (4_" \xACp " .le. t4)) call abort
- if ( (4_" \xACp " .lt. t4)) call abort
-
- if (.not. (4_" \xACp " >= u4)) call abort
- if ( (4_" \xACp " > u4)) call abort
- if (.not. (4_" \xACp " .ge. u4)) call abort
- if ( (4_" \xACp " .gt. u4)) call abort
- if (.not. (4_" \xACp " == u4)) call abort
- if ( (4_" \xACp " /= u4)) call abort
- if (.not. (4_" \xACp " .eq. u4)) call abort
- if ( (4_" \xACp " .ne. u4)) call abort
- if (.not. (4_" \xACp " <= u4)) call abort
- if ( (4_" \xACp " < u4)) call abort
- if (.not. (4_" \xACp " .le. u4)) call abort
- if ( (4_" \xACp " .lt. u4)) call abort
-
- if ( (4_" \xACp " >= v4)) call abort
- if ( (4_" \xACp " > v4)) call abort
- if ( (4_" \xACp " .ge. v4)) call abort
- if ( (4_" \xACp " .gt. v4)) call abort
- if ( (4_" \xACp " == v4)) call abort
- if (.not. (4_" \xACp " /= v4)) call abort
- if ( (4_" \xACp " .eq. v4)) call abort
- if (.not. (4_" \xACp " .ne. v4)) call abort
- if (.not. (4_" \xACp " <= v4)) call abort
- if (.not. (4_" \xACp " < v4)) call abort
- if (.not. (4_" \xACp " .le. v4)) call abort
- if (.not. (4_" \xACp " .lt. v4)) call abort
+ if (.not. (4_" \xACp " >= t4)) STOP 37
+ if (.not. (4_" \xACp " > t4)) STOP 38
+ if (.not. (4_" \xACp " .ge. t4)) STOP 39
+ if (.not. (4_" \xACp " .gt. t4)) STOP 40
+ if ( (4_" \xACp " == t4)) STOP 41
+ if (.not. (4_" \xACp " /= t4)) STOP 42
+ if ( (4_" \xACp " .eq. t4)) STOP 43
+ if (.not. (4_" \xACp " .ne. t4)) STOP 44
+ if ( (4_" \xACp " <= t4)) STOP 45
+ if ( (4_" \xACp " < t4)) STOP 46
+ if ( (4_" \xACp " .le. t4)) STOP 47
+ if ( (4_" \xACp " .lt. t4)) STOP 48
+
+ if (.not. (4_" \xACp " >= u4)) STOP 49
+ if ( (4_" \xACp " > u4)) STOP 50
+ if (.not. (4_" \xACp " .ge. u4)) STOP 51
+ if ( (4_" \xACp " .gt. u4)) STOP 52
+ if (.not. (4_" \xACp " == u4)) STOP 53
+ if ( (4_" \xACp " /= u4)) STOP 54
+ if (.not. (4_" \xACp " .eq. u4)) STOP 55
+ if ( (4_" \xACp " .ne. u4)) STOP 56
+ if (.not. (4_" \xACp " <= u4)) STOP 57
+ if ( (4_" \xACp " < u4)) STOP 58
+ if (.not. (4_" \xACp " .le. u4)) STOP 59
+ if ( (4_" \xACp " .lt. u4)) STOP 60
+
+ if ( (4_" \xACp " >= v4)) STOP 61
+ if ( (4_" \xACp " > v4)) STOP 62
+ if ( (4_" \xACp " .ge. v4)) STOP 63
+ if ( (4_" \xACp " .gt. v4)) STOP 64
+ if ( (4_" \xACp " == v4)) STOP 65
+ if (.not. (4_" \xACp " /= v4)) STOP 66
+ if ( (4_" \xACp " .eq. v4)) STOP 67
+ if (.not. (4_" \xACp " .ne. v4)) STOP 68
+ if (.not. (4_" \xACp " <= v4)) STOP 69
+ if (.not. (4_" \xACp " < v4)) STOP 70
+ if (.not. (4_" \xACp " .le. v4)) STOP 71
+ if (.not. (4_" \xACp " .lt. v4)) STOP 72
end subroutine test2
subroutine test3(t4, u4, v4)
character(kind=4,len=*) :: t4, u4, v4
- if (.not. (4_" \xACp " >= 4_" \x900000 ")) call abort
- if (.not. (4_" \xACp " > 4_" \x900000 ")) call abort
- if (.not. (4_" \xACp " .ge. 4_" \x900000 ")) call abort
- if (.not. (4_" \xACp " .gt. 4_" \x900000 ")) call abort
- if ( (4_" \xACp " == 4_" \x900000 ")) call abort
- if (.not. (4_" \xACp " /= 4_" \x900000 ")) call abort
- if ( (4_" \xACp " .eq. 4_" \x900000 ")) call abort
- if (.not. (4_" \xACp " .ne. 4_" \x900000 ")) call abort
- if ( (4_" \xACp " <= 4_" \x900000 ")) call abort
- if ( (4_" \xACp " < 4_" \x900000 ")) call abort
- if ( (4_" \xACp " .le. 4_" \x900000 ")) call abort
- if ( (4_" \xACp " .lt. 4_" \x900000 ")) call abort
-
- if (.not. (4_" \xACp " >= 4_" \xACp ")) call abort
- if ( (4_" \xACp " > 4_" \xACp ")) call abort
- if (.not. (4_" \xACp " .ge. 4_" \xACp ")) call abort
- if ( (4_" \xACp " .gt. 4_" \xACp ")) call abort
- if (.not. (4_" \xACp " == 4_" \xACp ")) call abort
- if ( (4_" \xACp " /= 4_" \xACp ")) call abort
- if (.not. (4_" \xACp " .eq. 4_" \xACp ")) call abort
- if ( (4_" \xACp " .ne. 4_" \xACp ")) call abort
- if (.not. (4_" \xACp " <= 4_" \xACp ")) call abort
- if ( (4_" \xACp " < 4_" \xACp ")) call abort
- if (.not. (4_" \xACp " .le. 4_" \xACp ")) call abort
- if ( (4_" \xACp " .lt. 4_" \xACp ")) call abort
-
- if ( (4_" \xACp " >= 4_"ddd")) call abort
- if ( (4_" \xACp " > 4_"ddd")) call abort
- if ( (4_" \xACp " .ge. 4_"ddd")) call abort
- if ( (4_" \xACp " .gt. 4_"ddd")) call abort
- if ( (4_" \xACp " == 4_"ddd")) call abort
- if (.not. (4_" \xACp " /= 4_"ddd")) call abort
- if ( (4_" \xACp " .eq. 4_"ddd")) call abort
- if (.not. (4_" \xACp " .ne. 4_"ddd")) call abort
- if (.not. (4_" \xACp " <= 4_"ddd")) call abort
- if (.not. (4_" \xACp " < 4_"ddd")) call abort
- if (.not. (4_" \xACp " .le. 4_"ddd")) call abort
- if (.not. (4_" \xACp " .lt. 4_"ddd")) call abort
+ if (.not. (4_" \xACp " >= 4_" \x900000 ")) STOP 73
+ if (.not. (4_" \xACp " > 4_" \x900000 ")) STOP 74
+ if (.not. (4_" \xACp " .ge. 4_" \x900000 ")) STOP 75
+ if (.not. (4_" \xACp " .gt. 4_" \x900000 ")) STOP 76
+ if ( (4_" \xACp " == 4_" \x900000 ")) STOP 77
+ if (.not. (4_" \xACp " /= 4_" \x900000 ")) STOP 78
+ if ( (4_" \xACp " .eq. 4_" \x900000 ")) STOP 79
+ if (.not. (4_" \xACp " .ne. 4_" \x900000 ")) STOP 80
+ if ( (4_" \xACp " <= 4_" \x900000 ")) STOP 81
+ if ( (4_" \xACp " < 4_" \x900000 ")) STOP 82
+ if ( (4_" \xACp " .le. 4_" \x900000 ")) STOP 83
+ if ( (4_" \xACp " .lt. 4_" \x900000 ")) STOP 84
+
+ if (.not. (4_" \xACp " >= 4_" \xACp ")) STOP 85
+ if ( (4_" \xACp " > 4_" \xACp ")) STOP 86
+ if (.not. (4_" \xACp " .ge. 4_" \xACp ")) STOP 87
+ if ( (4_" \xACp " .gt. 4_" \xACp ")) STOP 88
+ if (.not. (4_" \xACp " == 4_" \xACp ")) STOP 89
+ if ( (4_" \xACp " /= 4_" \xACp ")) STOP 90
+ if (.not. (4_" \xACp " .eq. 4_" \xACp ")) STOP 91
+ if ( (4_" \xACp " .ne. 4_" \xACp ")) STOP 92
+ if (.not. (4_" \xACp " <= 4_" \xACp ")) STOP 93
+ if ( (4_" \xACp " < 4_" \xACp ")) STOP 94
+ if (.not. (4_" \xACp " .le. 4_" \xACp ")) STOP 95
+ if ( (4_" \xACp " .lt. 4_" \xACp ")) STOP 96
+
+ if ( (4_" \xACp " >= 4_"ddd")) STOP 97
+ if ( (4_" \xACp " > 4_"ddd")) STOP 98
+ if ( (4_" \xACp " .ge. 4_"ddd")) STOP 99
+ if ( (4_" \xACp " .gt. 4_"ddd")) STOP 100
+ if ( (4_" \xACp " == 4_"ddd")) STOP 101
+ if (.not. (4_" \xACp " /= 4_"ddd")) STOP 102
+ if ( (4_" \xACp " .eq. 4_"ddd")) STOP 103
+ if (.not. (4_" \xACp " .ne. 4_"ddd")) STOP 104
+ if (.not. (4_" \xACp " <= 4_"ddd")) STOP 105
+ if (.not. (4_" \xACp " < 4_"ddd")) STOP 106
+ if (.not. (4_" \xACp " .le. 4_"ddd")) STOP 107
+ if (.not. (4_" \xACp " .lt. 4_"ddd")) STOP 108
end subroutine test3
use outer, outer1 => my1, outer4 => my4
implicit none
- if (len (inner1) /= len(inner4)) call abort
- if (len (inner1) /= len_trim(inner1)) call abort
- if (len (inner4) /= len_trim(inner4)) call abort
+ if (len (inner1) /= len(inner4)) STOP 1
+ if (len (inner1) /= len_trim(inner1)) STOP 2
+ if (len (inner4) /= len_trim(inner4)) STOP 3
- if (len(middle1) /= len(inner1)) call abort
- if (len(outer1) /= len(inner1)) call abort
- if (len(middle4) /= len(inner4)) call abort
- if (len(outer4) /= len(inner4)) call abort
+ if (len(middle1) /= len(inner1)) STOP 4
+ if (len(outer1) /= len(inner1)) STOP 5
+ if (len(middle4) /= len(inner4)) STOP 6
+ if (len(outer4) /= len(inner4)) STOP 7
if (any (len_trim (middle1) /= reshape([len(middle1), 0, 3, 2], [2,2]))) &
- call abort
+ STOP 8
if (any (len_trim (middle4) /= reshape([len(middle4), 0, 3, 2], [2,2]))) &
- call abort
- if (any (len_trim (outer1) /= [len(outer1), 3])) call abort
- if (any (len_trim (outer4) /= [len(outer4), 3])) call abort
+ STOP 9
+ if (any (len_trim (outer1) /= [len(outer1), 3])) STOP 10
+ if (any (len_trim (outer4) /= [len(outer4), 3])) STOP 11
end program test_modules
program test
use mod
- if (len (cut1("")) /= 0 .or. cut1("") /= "") call abort
- if (len (cut1("1")) /= 0 .or. cut1("") /= "") call abort
- if (len (cut1("12")) /= 0 .or. cut1("") /= "") call abort
- if (len (cut1("123")) /= 0 .or. cut1("") /= "") call abort
- if (len (cut1("1234")) /= 1 .or. cut1("4") /= "") call abort
- if (len (cut1("12345")) /= 2 .or. cut1("45") /= "") call abort
-
- if (len (cut4(4_"")) /= 0 .or. cut4(4_"") /= 4_"") call abort
- if (len (cut4(4_"1")) /= 0 .or. cut4(4_"") /= 4_"") call abort
- if (len (cut4(4_"12")) /= 0 .or. cut4(4_"") /= 4_"") call abort
- if (len (cut4(4_"123")) /= 0 .or. cut4(4_"") /= 4_"") call abort
- if (len (cut4(4_"1234")) /= 1 .or. cut4(4_"4") /= 4_"") call abort
- if (len (cut4(4_"12345")) /= 2 .or. cut4(4_"45") /= 4_"") call abort
-
- if (kind (cut("")) /= kind("")) call abort
- if (kind (cut(4_"")) /= kind(4_"")) call abort
-
- if (len (cut("")) /= 0 .or. cut("") /= "") call abort
- if (len (cut("1")) /= 0 .or. cut("") /= "") call abort
- if (len (cut("12")) /= 0 .or. cut("") /= "") call abort
- if (len (cut("123")) /= 0 .or. cut("") /= "") call abort
- if (len (cut("1234")) /= 1 .or. cut("4") /= "") call abort
- if (len (cut("12345")) /= 2 .or. cut("45") /= "") call abort
-
- if (len (cut(4_"")) /= 0 .or. cut(4_"") /= 4_"") call abort
- if (len (cut(4_"1")) /= 0 .or. cut(4_"") /= 4_"") call abort
- if (len (cut(4_"12")) /= 0 .or. cut(4_"") /= 4_"") call abort
- if (len (cut(4_"123")) /= 0 .or. cut(4_"") /= 4_"") call abort
- if (len (cut(4_"1234")) /= 1 .or. cut(4_"4") /= 4_"") call abort
- if (len (cut(4_"12345")) /= 2 .or. cut(4_"45") /= 4_"") call abort
+ if (len (cut1("")) /= 0 .or. cut1("") /= "") STOP 1
+ if (len (cut1("1")) /= 0 .or. cut1("") /= "") STOP 2
+ if (len (cut1("12")) /= 0 .or. cut1("") /= "") STOP 3
+ if (len (cut1("123")) /= 0 .or. cut1("") /= "") STOP 4
+ if (len (cut1("1234")) /= 1 .or. cut1("4") /= "") STOP 5
+ if (len (cut1("12345")) /= 2 .or. cut1("45") /= "") STOP 6
+
+ if (len (cut4(4_"")) /= 0 .or. cut4(4_"") /= 4_"") STOP 7
+ if (len (cut4(4_"1")) /= 0 .or. cut4(4_"") /= 4_"") STOP 8
+ if (len (cut4(4_"12")) /= 0 .or. cut4(4_"") /= 4_"") STOP 9
+ if (len (cut4(4_"123")) /= 0 .or. cut4(4_"") /= 4_"") STOP 10
+ if (len (cut4(4_"1234")) /= 1 .or. cut4(4_"4") /= 4_"") STOP 11
+ if (len (cut4(4_"12345")) /= 2 .or. cut4(4_"45") /= 4_"") STOP 12
+
+ if (kind (cut("")) /= kind("")) STOP 13
+ if (kind (cut(4_"")) /= kind(4_"")) STOP 14
+
+ if (len (cut("")) /= 0 .or. cut("") /= "") STOP 15
+ if (len (cut("1")) /= 0 .or. cut("") /= "") STOP 16
+ if (len (cut("12")) /= 0 .or. cut("") /= "") STOP 17
+ if (len (cut("123")) /= 0 .or. cut("") /= "") STOP 18
+ if (len (cut("1234")) /= 1 .or. cut("4") /= "") STOP 19
+ if (len (cut("12345")) /= 2 .or. cut("45") /= "") STOP 20
+
+ if (len (cut(4_"")) /= 0 .or. cut(4_"") /= 4_"") STOP 21
+ if (len (cut(4_"1")) /= 0 .or. cut(4_"") /= 4_"") STOP 22
+ if (len (cut(4_"12")) /= 0 .or. cut(4_"") /= 4_"") STOP 23
+ if (len (cut(4_"123")) /= 0 .or. cut(4_"") /= 4_"") STOP 24
+ if (len (cut(4_"1234")) /= 1 .or. cut(4_"4") /= 4_"") STOP 25
+ if (len (cut(4_"12345")) /= 2 .or. cut(4_"45") /= 4_"") STOP 26
end program test
str = transfer(buffer, str)
!print *, str
!print *, 4_'\u039f\u03cd\u03c7\u30b8'
-if (str /= 4_'\u039f\u03cd\u03c7\u30b8') call abort()
+if (str /= 4_'\u039f\u03cd\u03c7\u30b8') STOP 1
str = transfer([int(z'039f'),int(z'03cd'),int(z'03c7'), &
int(z'30b8') ], str)
-if (str /= 4_'\u039f\u03cd\u03c7\u30b8') call abort()
+if (str /= 4_'\u039f\u03cd\u03c7\u30b8') STOP 2
buffer2 = transfer(4_'\u039f\u03cd\u03c7\u30b8', buffer2, 4)
!print *, buffer
!print *, buffer2
buffer2 = transfer(str, buffer2, 4)
-if (any(buffer2 /= buffer)) call abort()
+if (any(buffer2 /= buffer)) STOP 3
end
wide=k4_"Goodbye!"
thin="Hello!"
write(buffer, '(a)') wide
- if (buffer /= "Goodbye!") call abort
+ if (buffer /= "Goodbye!") STOP 1
open(10, form="formatted", access="stream", status="scratch")
write(10, '(a)') thin
rewind(10)
read(10, '(a)') wide
- if (wide /= k4_"Hello!") call abort
+ if (wide /= k4_"Hello!") STOP 2
write(buffer,*) thin, ">",wide,"<"
- if (buffer /= " Hello! >Hello! <") call abort
+ if (buffer /= " Hello! >Hello! <") STOP 3
end program test1
mychar(3) = k4_"ghi9012"
buffer = ""
write(buffer,'(3(a))') mychar(2:3), mychar(1)
- if (buffer /= "def5678ghi9012abc1234") call abort
+ if (buffer /= "def5678ghi9012abc1234") STOP 1
write(buffer,'(3(a))') mychar
- if (buffer /= "abc1234def5678ghi9012") call abort
+ if (buffer /= "abc1234def5678ghi9012") STOP 2
mychar = ""
read(buffer,'(3(a))') mychar
- if (any(mychar.ne.[ k4_"abc1234",k4_"def5678",k4_"ghi9012" ])) call abort
+ if (any(mychar.ne.[ k4_"abc1234",k4_"def5678",k4_"ghi9012" ])) STOP 3
end program chkdata
rewind(10)
wide = "wrong"
read(10) wide
- if (wide /= k4_"abcdefg") call abort
+ if (wide /= k4_"abcdefg") STOP 1
rewind(10)
write(10) widearray(2:4,3:7)
widearray(2:4,3:7)=""
rewind(10)
read(10) widearray(2:4,3:7)
close(10)
- if (any(widearray.ne.k4_"1234abcd")) call abort
+ if (any(widearray.ne.k4_"1234abcd")) STOP 2
end program test1
character(kind=4,len=20) :: str = k4_'X\xF8öABC' ! ISO-8859-1 encoded string
buffer = ""
write(buffer,'(3a)')':',trim(str),':'
-if (buffer.ne.':X\xF8öABC: ') call abort
+if (buffer.ne.':X\xF8öABC: ') STOP 1
str = ""
read(buffer,'(3a)') c1,str(1:6),c2
-if (c1.ne.':') call abort
-if (str.ne.k4_'X\xF8öAB') call abort
-if (c2.ne.'C') call abort
+if (c1.ne.':') STOP 2
+if (str.ne.k4_'X\xF8öAB') STOP 3
+if (c2.ne.'C') STOP 4
end
c2 = 4_' '
c1(1:1) = transfer(257, mold=c1(1:1))
c2(1:1) = transfer(64, mold=c2(1:1))
- if (c1 < c2) call abort
+ if (c1 < c2) STOP 1
end program main
s4 = s1
s4 = [ "abc", "def", "ghi" ]
- if (any (cshift (s1, 0) /= s1)) call abort
- if (any (cshift (s4, 0) /= s4)) call abort
- if (any (cshift (s1, 3) /= s1)) call abort
- if (any (cshift (s4, 3) /= s4)) call abort
- if (any (cshift (s1, 6) /= s1)) call abort
- if (any (cshift (s4, 6) /= s4)) call abort
- if (any (cshift (s1, -3) /= s1)) call abort
- if (any (cshift (s4, -3) /= s4)) call abort
- if (any (cshift (s1, -6) /= s1)) call abort
- if (any (cshift (s4, -6) /= s4)) call abort
+ if (any (cshift (s1, 0) /= s1)) STOP 1
+ if (any (cshift (s4, 0) /= s4)) STOP 2
+ if (any (cshift (s1, 3) /= s1)) STOP 3
+ if (any (cshift (s4, 3) /= s4)) STOP 4
+ if (any (cshift (s1, 6) /= s1)) STOP 5
+ if (any (cshift (s4, 6) /= s4)) STOP 6
+ if (any (cshift (s1, -3) /= s1)) STOP 7
+ if (any (cshift (s4, -3) /= s4)) STOP 8
+ if (any (cshift (s1, -6) /= s1)) STOP 9
+ if (any (cshift (s4, -6) /= s4)) STOP 10
- if (any (cshift (s1, 1) /= [ s1(2:3), s1(1) ])) call abort
- if (any (cshift (s1, -1) /= [ s1(3), s1(1:2) ])) call abort
- if (any (cshift (s1, 4) /= [ s1(2:3), s1(1) ])) call abort
- if (any (cshift (s1, -4) /= [ s1(3), s1(1:2) ])) call abort
+ if (any (cshift (s1, 1) /= [ s1(2:3), s1(1) ])) STOP 11
+ if (any (cshift (s1, -1) /= [ s1(3), s1(1:2) ])) STOP 12
+ if (any (cshift (s1, 4) /= [ s1(2:3), s1(1) ])) STOP 13
+ if (any (cshift (s1, -4) /= [ s1(3), s1(1:2) ])) STOP 14
- if (any (cshift (s4, 1) /= [ s4(2:3), s4(1) ])) call abort
- if (any (cshift (s4, -1) /= [ s4(3), s4(1:2) ])) call abort
- if (any (cshift (s4, 4) /= [ s4(2:3), s4(1) ])) call abort
- if (any (cshift (s4, -4) /= [ s4(3), s4(1:2) ])) call abort
+ if (any (cshift (s4, 1) /= [ s4(2:3), s4(1) ])) STOP 15
+ if (any (cshift (s4, -1) /= [ s4(3), s4(1:2) ])) STOP 16
+ if (any (cshift (s4, 4) /= [ s4(2:3), s4(1) ])) STOP 17
+ if (any (cshift (s4, -4) /= [ s4(3), s4(1:2) ])) STOP 18
- if (any (cshift (s1, 2) /= [ s1(3), s1(1:2) ])) call abort
- if (any (cshift (s1, -2) /= [ s1(2:3), s1(1) ])) call abort
- if (any (cshift (s1, 5) /= [ s1(3), s1(1:2) ])) call abort
- if (any (cshift (s1, -5) /= [ s1(2:3), s1(1) ])) call abort
+ if (any (cshift (s1, 2) /= [ s1(3), s1(1:2) ])) STOP 19
+ if (any (cshift (s1, -2) /= [ s1(2:3), s1(1) ])) STOP 20
+ if (any (cshift (s1, 5) /= [ s1(3), s1(1:2) ])) STOP 21
+ if (any (cshift (s1, -5) /= [ s1(2:3), s1(1) ])) STOP 22
- if (any (cshift (s4, 2) /= [ s4(3), s4(1:2) ])) call abort
- if (any (cshift (s4, -2) /= [ s4(2:3), s4(1) ])) call abort
- if (any (cshift (s4, 5) /= [ s4(3), s4(1:2) ])) call abort
- if (any (cshift (s4, -5) /= [ s4(2:3), s4(1) ])) call abort
+ if (any (cshift (s4, 2) /= [ s4(3), s4(1:2) ])) STOP 23
+ if (any (cshift (s4, -2) /= [ s4(2:3), s4(1) ])) STOP 24
+ if (any (cshift (s4, 5) /= [ s4(3), s4(1:2) ])) STOP 25
+ if (any (cshift (s4, -5) /= [ s4(2:3), s4(1) ])) STOP 26
- if (any (eoshift (s1, 0) /= s1)) call abort
- if (any (eoshift (s4, 0) /= s4)) call abort
- if (any (eoshift (s1, 3) /= "")) call abort
- if (any (eoshift (s4, 3) /= 4_"")) call abort
- if (any (eoshift (s1, 3, " ") /= "")) call abort
- if (any (eoshift (s4, 3, 4_" ") /= 4_"")) call abort
- if (any (eoshift (s1, 3, " x ") /= " x")) call abort
- if (any (eoshift (s4, 3, 4_" x ") /= 4_" x")) call abort
- if (any (eoshift (s1, -3) /= "")) call abort
- if (any (eoshift (s4, -3) /= 4_"")) call abort
- if (any (eoshift (s1, -3, " ") /= "")) call abort
- if (any (eoshift (s4, -3, 4_" ") /= 4_"")) call abort
- if (any (eoshift (s1, -3, " x ") /= " x")) call abort
- if (any (eoshift (s4, -3, 4_" x ") /= 4_" x")) call abort
- if (any (eoshift (s1, 4) /= "")) call abort
- if (any (eoshift (s4, 4) /= 4_"")) call abort
- if (any (eoshift (s1, 4, " ") /= "")) call abort
- if (any (eoshift (s4, 4, 4_" ") /= 4_"")) call abort
- if (any (eoshift (s1, 4, " x ") /= " x")) call abort
- if (any (eoshift (s4, 4, 4_" x ") /= 4_" x")) call abort
- if (any (eoshift (s1, -4) /= "")) call abort
- if (any (eoshift (s4, -4) /= 4_"")) call abort
- if (any (eoshift (s1, -4, " ") /= "")) call abort
- if (any (eoshift (s4, -4, 4_" ") /= 4_"")) call abort
- if (any (eoshift (s1, -4, " x ") /= " x")) call abort
- if (any (eoshift (s4, -4, 4_" x ") /= 4_" x")) call abort
+ if (any (eoshift (s1, 0) /= s1)) STOP 27
+ if (any (eoshift (s4, 0) /= s4)) STOP 28
+ if (any (eoshift (s1, 3) /= "")) STOP 29
+ if (any (eoshift (s4, 3) /= 4_"")) STOP 30
+ if (any (eoshift (s1, 3, " ") /= "")) STOP 31
+ if (any (eoshift (s4, 3, 4_" ") /= 4_"")) STOP 32
+ if (any (eoshift (s1, 3, " x ") /= " x")) STOP 33
+ if (any (eoshift (s4, 3, 4_" x ") /= 4_" x")) STOP 34
+ if (any (eoshift (s1, -3) /= "")) STOP 35
+ if (any (eoshift (s4, -3) /= 4_"")) STOP 36
+ if (any (eoshift (s1, -3, " ") /= "")) STOP 37
+ if (any (eoshift (s4, -3, 4_" ") /= 4_"")) STOP 38
+ if (any (eoshift (s1, -3, " x ") /= " x")) STOP 39
+ if (any (eoshift (s4, -3, 4_" x ") /= 4_" x")) STOP 40
+ if (any (eoshift (s1, 4) /= "")) STOP 41
+ if (any (eoshift (s4, 4) /= 4_"")) STOP 42
+ if (any (eoshift (s1, 4, " ") /= "")) STOP 43
+ if (any (eoshift (s4, 4, 4_" ") /= 4_"")) STOP 44
+ if (any (eoshift (s1, 4, " x ") /= " x")) STOP 45
+ if (any (eoshift (s4, 4, 4_" x ") /= 4_" x")) STOP 46
+ if (any (eoshift (s1, -4) /= "")) STOP 47
+ if (any (eoshift (s4, -4) /= 4_"")) STOP 48
+ if (any (eoshift (s1, -4, " ") /= "")) STOP 49
+ if (any (eoshift (s4, -4, 4_" ") /= 4_"")) STOP 50
+ if (any (eoshift (s1, -4, " x ") /= " x")) STOP 51
+ if (any (eoshift (s4, -4, 4_" x ") /= 4_" x")) STOP 52
- if (any (eoshift (s1, 1) /= [ s1(2:3), " " ])) call abort
- if (any (eoshift (s1, -1) /= [ " ", s1(1:2) ])) call abort
- if (any (eoshift (s1, 1, " x ") /= [ s1(2:3), " x " ])) call abort
- if (any (eoshift (s1, -1, " x ") /= [ " x ", s1(1:2) ])) call abort
- if (any (eoshift (s4, 1) /= [ s4(2:3), 4_" " ])) call abort
- if (any (eoshift (s4, -1) /= [ 4_" ", s4(1:2) ])) call abort
- if (any (eoshift (s4, 1, 4_" x ") /= [ s4(2:3), 4_" x " ])) call abort
- if (any (eoshift (s4, -1, 4_" x ") /= [ 4_" x ", s4(1:2) ])) call abort
+ if (any (eoshift (s1, 1) /= [ s1(2:3), " " ])) STOP 53
+ if (any (eoshift (s1, -1) /= [ " ", s1(1:2) ])) STOP 54
+ if (any (eoshift (s1, 1, " x ") /= [ s1(2:3), " x " ])) STOP 55
+ if (any (eoshift (s1, -1, " x ") /= [ " x ", s1(1:2) ])) STOP 56
+ if (any (eoshift (s4, 1) /= [ s4(2:3), 4_" " ])) STOP 57
+ if (any (eoshift (s4, -1) /= [ 4_" ", s4(1:2) ])) STOP 58
+ if (any (eoshift (s4, 1, 4_" x ") /= [ s4(2:3), 4_" x " ])) STOP 59
+ if (any (eoshift (s4, -1, 4_" x ") /= [ 4_" x ", s4(1:2) ])) STOP 60
- if (any (eoshift (s1, 2) /= [ s1(3), " ", " " ])) call abort
- if (any (eoshift (s1, -2) /= [ " ", " ", s1(1) ])) call abort
- if (any (eoshift (s1, 2, " x ") /= [ s1(3), " x ", " x " ])) call abort
- if (any (eoshift (s1, -2, " x ") /= [ " x ", " x ", s1(1) ])) call abort
- if (any (eoshift (s4, 2) /= [ s4(3), 4_" ", 4_" " ])) call abort
- if (any (eoshift (s4, -2) /= [ 4_" ", 4_" ", s4(1) ])) call abort
- if (any (eoshift (s4, 2, 4_" x ") /= [ s4(3), 4_" x ", 4_" x " ])) call abort
- if (any (eoshift (s4, -2, 4_" x ") /= [ 4_" x ", 4_" x ", s4(1) ])) call abort
+ if (any (eoshift (s1, 2) /= [ s1(3), " ", " " ])) STOP 61
+ if (any (eoshift (s1, -2) /= [ " ", " ", s1(1) ])) STOP 62
+ if (any (eoshift (s1, 2, " x ") /= [ s1(3), " x ", " x " ])) STOP 63
+ if (any (eoshift (s1, -2, " x ") /= [ " x ", " x ", s1(1) ])) STOP 64
+ if (any (eoshift (s4, 2) /= [ s4(3), 4_" ", 4_" " ])) STOP 65
+ if (any (eoshift (s4, -2) /= [ 4_" ", 4_" ", s4(1) ])) STOP 66
+ if (any (eoshift (s4, 2, 4_" x ") /= [ s4(3), 4_" x ", 4_" x " ])) STOP 67
+ if (any (eoshift (s4, -2, 4_" x ") /= [ 4_" x ", 4_" x ", s4(1) ])) STOP 68
end
call test_adjust2 (s1, s4)
s4 = "\0 foo bar \xFF"
- if (adjustl (s4) /= adjustl (4_"\0 foo bar \xFF ")) call abort
- if (adjustr (s4) /= adjustr (4_"\0 foo bar \xFF ")) call abort
+ if (adjustl (s4) /= adjustl (4_"\0 foo bar \xFF ")) STOP 1
+ if (adjustr (s4) /= adjustr (4_"\0 foo bar \xFF ")) STOP 2
s4 = " \0 foo bar \xFF"
- if (adjustl (s4) /= adjustl (4_" \0 foo bar \xFF ")) call abort
- if (adjustr (s4) /= adjustr (4_" \0 foo bar \xFF ")) call abort
+ if (adjustl (s4) /= adjustl (4_" \0 foo bar \xFF ")) STOP 3
+ if (adjustr (s4) /= adjustr (4_" \0 foo bar \xFF ")) STOP 4
s4 = 4_" \U12345678\xeD bar \ufd30"
if (adjustl (s4) /= &
- adjustl (4_" \U12345678\xeD bar \ufd30 ")) call abort
+ adjustl (4_" \U12345678\xeD bar \ufd30 ")) STOP 5
if (adjustr (s4) /= &
- adjustr (4_" \U12345678\xeD bar \ufd30 ")) call abort
+ adjustr (4_" \U12345678\xeD bar \ufd30 ")) STOP 6
contains
character(kind=1,len=len(s4)) :: t1
character(kind=4,len=len(s1)) :: t4
- if (len(s1) /= len(s4)) call abort
- if (len(t1) /= len(t4)) call abort
+ if (len(s1) /= len(s4)) STOP 7
+ if (len(t1) /= len(t4)) STOP 8
- if (len_trim(s1) /= len_trim (s4)) call abort
+ if (len_trim(s1) /= len_trim (s4)) STOP 9
t1 = adjustl (s4)
t4 = adjustl (s1)
- if (t1 /= adjustl (s1)) call abort
- if (t4 /= adjustl (s4)) call abort
- if (len_trim (t1) /= len_trim (t4)) call abort
- if (len_trim (adjustl (s1)) /= len_trim (t4)) call abort
- if (len_trim (adjustl (s4)) /= len_trim (t1)) call abort
+ if (t1 /= adjustl (s1)) STOP 10
+ if (t4 /= adjustl (s4)) STOP 11
+ if (len_trim (t1) /= len_trim (t4)) STOP 12
+ if (len_trim (adjustl (s1)) /= len_trim (t4)) STOP 13
+ if (len_trim (adjustl (s4)) /= len_trim (t1)) STOP 14
- if (len_trim (t1) /= len (trim (t1))) call abort
- if (len_trim (s1) /= len (trim (s1))) call abort
- if (len_trim (t4) /= len (trim (t4))) call abort
- if (len_trim (s4) /= len (trim (s4))) call abort
+ if (len_trim (t1) /= len (trim (t1))) STOP 15
+ if (len_trim (s1) /= len (trim (s1))) STOP 16
+ if (len_trim (t4) /= len (trim (t4))) STOP 17
+ if (len_trim (s4) /= len (trim (s4))) STOP 18
t1 = adjustr (s4)
t4 = adjustr (s1)
- if (t1 /= adjustr (s1)) call abort
- if (t4 /= adjustr (s4)) call abort
- if (len_trim (t1) /= len_trim (t4)) call abort
- if (len_trim (adjustr (s1)) /= len_trim (t4)) call abort
- if (len_trim (adjustr (s4)) /= len_trim (t1)) call abort
- if (len (t1) /= len_trim (t1)) call abort
- if (len (t4) /= len_trim (t4)) call abort
-
- if (len_trim (t1) /= len (trim (t1))) call abort
- if (len_trim (s1) /= len (trim (s1))) call abort
- if (len_trim (t4) /= len (trim (t4))) call abort
- if (len_trim (s4) /= len (trim (s4))) call abort
+ if (t1 /= adjustr (s1)) STOP 19
+ if (t4 /= adjustr (s4)) STOP 20
+ if (len_trim (t1) /= len_trim (t4)) STOP 21
+ if (len_trim (adjustr (s1)) /= len_trim (t4)) STOP 22
+ if (len_trim (adjustr (s4)) /= len_trim (t1)) STOP 23
+ if (len (t1) /= len_trim (t1)) STOP 24
+ if (len (t4) /= len_trim (t4)) STOP 25
+
+ if (len_trim (t1) /= len (trim (t1))) STOP 26
+ if (len_trim (s1) /= len (trim (s1))) STOP 27
+ if (len_trim (t4) /= len (trim (t4))) STOP 28
+ if (len_trim (s4) /= len (trim (s4))) STOP 29
end subroutine test_adjust1
character(kind=1,len=len(s4)) :: t1
character(kind=4,len=len(s1)) :: t4
- if (len(s1) /= len(s4)) call abort
- if (len(t1) /= len(t4)) call abort
+ if (len(s1) /= len(s4)) STOP 30
+ if (len(t1) /= len(t4)) STOP 31
- if (len_trim(s1) /= len_trim (s4)) call abort
+ if (len_trim(s1) /= len_trim (s4)) STOP 32
t1 = adjustl (s4)
t4 = adjustl (s1)
- if (t1 /= adjustl (s1)) call abort
- if (t4 /= adjustl (s4)) call abort
- if (len_trim (t1) /= len_trim (t4)) call abort
- if (len_trim (adjustl (s1)) /= len_trim (t4)) call abort
- if (len_trim (adjustl (s4)) /= len_trim (t1)) call abort
+ if (t1 /= adjustl (s1)) STOP 33
+ if (t4 /= adjustl (s4)) STOP 34
+ if (len_trim (t1) /= len_trim (t4)) STOP 35
+ if (len_trim (adjustl (s1)) /= len_trim (t4)) STOP 36
+ if (len_trim (adjustl (s4)) /= len_trim (t1)) STOP 37
- if (len_trim (t1) /= len (trim (t1))) call abort
- if (len_trim (s1) /= len (trim (s1))) call abort
- if (len_trim (t4) /= len (trim (t4))) call abort
- if (len_trim (s4) /= len (trim (s4))) call abort
+ if (len_trim (t1) /= len (trim (t1))) STOP 38
+ if (len_trim (s1) /= len (trim (s1))) STOP 39
+ if (len_trim (t4) /= len (trim (t4))) STOP 40
+ if (len_trim (s4) /= len (trim (s4))) STOP 41
t1 = adjustr (s4)
t4 = adjustr (s1)
- if (t1 /= adjustr (s1)) call abort
- if (t4 /= adjustr (s4)) call abort
- if (len_trim (t1) /= len_trim (t4)) call abort
- if (len_trim (adjustr (s1)) /= len_trim (t4)) call abort
- if (len_trim (adjustr (s4)) /= len_trim (t1)) call abort
- if (len (t1) /= len_trim (t1)) call abort
- if (len (t4) /= len_trim (t4)) call abort
-
- if (len_trim (t1) /= len (trim (t1))) call abort
- if (len_trim (s1) /= len (trim (s1))) call abort
- if (len_trim (t4) /= len (trim (t4))) call abort
- if (len_trim (s4) /= len (trim (s4))) call abort
+ if (t1 /= adjustr (s1)) STOP 42
+ if (t4 /= adjustr (s4)) STOP 43
+ if (len_trim (t1) /= len_trim (t4)) STOP 44
+ if (len_trim (adjustr (s1)) /= len_trim (t4)) STOP 45
+ if (len_trim (adjustr (s4)) /= len_trim (t1)) STOP 46
+ if (len (t1) /= len_trim (t1)) STOP 47
+ if (len (t4) /= len_trim (t4)) STOP 48
+
+ if (len_trim (t1) /= len (trim (t1))) STOP 49
+ if (len_trim (s1) /= len (trim (s1))) STOP 50
+ if (len_trim (t4) /= len (trim (t4))) STOP 51
+ if (len_trim (s4) /= len (trim (s4))) STOP 52
end subroutine test_adjust2
character(kind=4,len=5), dimension(3,3) :: m1
character(kind=4,len=5), allocatable, dimension(:,:) :: m2
- if (kind (p) /= 4) call abort
- if (kind (m1) /= 4) call abort
- if (kind (m2) /= 4) call abort
+ if (kind (p) /= 4) STOP 1
+ if (kind (m1) /= 4) STOP 2
+ if (kind (m2) /= 4) STOP 3
m1 = reshape (p, [3,3])
allocate (m2(3,3))
m2(:,:) = reshape (m1, [3,3])
- if (any (m1 /= p)) call abort
- if (any (m2 /= p)) call abort
+ if (any (m1 /= p)) STOP 4
+ if (any (m2 /= p)) STOP 5
- if (size (p) /= 9) call abort
- if (size (m1) /= 9) call abort
- if (size (m2) /= 9) call abort
- if (size (p,1) /= 3) call abort
- if (size (m1,1) /= 3) call abort
- if (size (m2,1) /= 3) call abort
- if (size (p,2) /= 3) call abort
- if (size (m1,2) /= 3) call abort
- if (size (m2,2) /= 3) call abort
+ if (size (p) /= 9) STOP 6
+ if (size (m1) /= 9) STOP 7
+ if (size (m2) /= 9) STOP 8
+ if (size (p,1) /= 3) STOP 9
+ if (size (m1,1) /= 3) STOP 10
+ if (size (m2,1) /= 3) STOP 11
+ if (size (p,2) /= 3) STOP 12
+ if (size (m1,2) /= 3) STOP 13
+ if (size (m2,2) /= 3) STOP 14
call check_shape (p, (/3,3/), 5)
call check_shape (p, shape(p), 5)
allocate (m2(3,4))
m2 = reshape (m1, [3,4], p)
- if (any (m2(1:3,1:3) /= p)) call abort
- if (any (m2(1:3,4) /= m1(1:3,1))) call abort
+ if (any (m2(1:3,1:3) /= p)) STOP 15
+ if (any (m2(1:3,4) /= m1(1:3,1))) STOP 16
call check_shape (m2, (/3,4/), 5)
deallocate (m2)
end do
m2 = transpose(m2)
- if (any(transpose(p) /= m2)) call abort
- if (any(transpose(m1) /= m2)) call abort
- if (any(transpose(m2) /= p)) call abort
- if (any(transpose(m2) /= m1)) call abort
+ if (any(transpose(p) /= m2)) STOP 17
+ if (any(transpose(m1) /= m2)) STOP 18
+ if (any(transpose(m2) /= p)) STOP 19
+ if (any(transpose(m2) /= m1)) STOP 20
m1 = transpose(p)
- if (any(transpose(p) /= m2)) call abort
- if (any(m1 /= m2)) call abort
- if (any(transpose(m2) /= p)) call abort
- if (any(transpose(m2) /= transpose(m1))) call abort
+ if (any(transpose(p) /= m2)) STOP 21
+ if (any(m1 /= m2)) STOP 22
+ if (any(transpose(m2) /= p)) STOP 23
+ if (any(transpose(m2) /= transpose(m1))) STOP 24
deallocate (m2)
allocate (m2(3,3))
m2 = p
m1 = m2
- if (any (spread ( p, 1, 2) /= spread (m1, 1, 2))) call abort
- if (any (spread ( p, 1, 2) /= spread (m2, 1, 2))) call abort
- if (any (spread (m1, 1, 2) /= spread (m2, 1, 2))) call abort
+ if (any (spread ( p, 1, 2) /= spread (m1, 1, 2))) STOP 25
+ if (any (spread ( p, 1, 2) /= spread (m2, 1, 2))) STOP 26
+ if (any (spread (m1, 1, 2) /= spread (m2, 1, 2))) STOP 27
deallocate (m2)
allocate (m2(3,3))
m1 = m2
if (any (pack (p, p /= 4_"") /= [4_" \xFF ", 4_"\0 ", 4_" foo ", &
4_"\u1230\uD67Bde\U31DC8B30", 4_"fa fe", &
- 4_"foo ", 4_"nul\0l"])) call abort
- if (any (len_trim (pack (p, p /= 4_"")) /= [2,1,4,5,5,3,5])) call abort
+ 4_"foo ", 4_"nul\0l"])) STOP 28
+ if (any (len_trim (pack (p, p /= 4_"")) /= [2,1,4,5,5,3,5])) STOP 29
if (any (pack (m1, m1 /= 4_"") /= [4_" \xFF ", 4_"\0 ", 4_" foo ", &
4_"\u1230\uD67Bde\U31DC8B30", 4_"fa fe", &
- 4_"foo ", 4_"nul\0l"])) call abort
- if (any (len_trim (pack (m1, m1 /= 4_"")) /= [2,1,4,5,5,3,5])) call abort
+ 4_"foo ", 4_"nul\0l"])) STOP 30
+ if (any (len_trim (pack (m1, m1 /= 4_"")) /= [2,1,4,5,5,3,5])) STOP 31
if (any (pack (m2, m2 /= 4_"") /= [4_" \xFF ", 4_"\0 ", 4_" foo ", &
4_"\u1230\uD67Bde\U31DC8B30", 4_"fa fe", &
- 4_"foo ", 4_"nul\0l"])) call abort
- if (any (len_trim (pack (m2, m2 /= 4_"")) /= [2,1,4,5,5,3,5])) call abort
+ 4_"foo ", 4_"nul\0l"])) STOP 32
+ if (any (len_trim (pack (m2, m2 /= 4_"")) /= [2,1,4,5,5,3,5])) STOP 33
deallocate (m2)
allocate (m2(1,7))
4_"\u1230\uD67Bde\U31DC8B30", 4_"fa fe", &
4_"foo ", 4_"nul\0l"], [1,7])
m1 = p
- if (any (unpack(m2(1,:), p /= 4_"", 4_" ") /= p)) call abort
- if (any (unpack(m2(1,:), m1 /= 4_"", 4_" ") /= m1)) call abort
+ if (any (unpack(m2(1,:), p /= 4_"", 4_" ") /= p)) STOP 34
+ if (any (unpack(m2(1,:), m1 /= 4_"", 4_" ") /= m1)) STOP 35
deallocate (m2)
contains
integer, dimension(:) :: res
integer :: l
- if (kind (array) /= 4) call abort
- if (len(array) /= l) call abort
+ if (kind (array) /= 4) STOP 36
+ if (len(array) /= l) STOP 37
- if (size (res) /= size (shape (array))) call abort
- if (any (shape (array) /= res)) call abort
+ if (size (res) /= size (shape (array))) STOP 38
+ if (any (shape (array) /= res)) STOP 39
end subroutine check_shape
end
! Check the REPEAT intrinsic
- if (repeat (1_"foo", 2) /= 1_"foofoo") call abort
- if (repeat (1_"fo ", 2) /= 1_"fo fo ") call abort
- if (repeat (1_"fo ", 2) /= 1_"fo fo") call abort
- if (repeat (1_"fo ", 0) /= 1_"") call abort
- if (repeat (s1, 2) /= 1_"fo fo ") call abort
- if (repeat (s1, 2) /= 1_"fo fo") call abort
- if (repeat (s1, 2) /= s1 // s1) call abort
- if (repeat (s1, 3) /= s1 // s1 // s1) call abort
- if (repeat (s1, 1) /= s1) call abort
- if (repeat (s1, 0) /= "") call abort
-
- if (repeat (4_"foo", 2) /= 4_"foofoo") call abort
- if (repeat (4_"fo ", 2) /= 4_"fo fo ") call abort
- if (repeat (4_"fo ", 2) /= 4_"fo fo") call abort
- if (repeat (4_"fo ", 0) /= 4_"") call abort
- if (repeat (s4, 2) /= 4_"fo fo ") call abort
- if (repeat (s4, 2) /= 4_"fo fo") call abort
- if (repeat (s4, 3) /= s4 // s4 // s4) call abort
- if (repeat (s4, 1) /= s4) call abort
- if (repeat (s4, 0) /= 4_"") call abort
+ if (repeat (1_"foo", 2) /= 1_"foofoo") STOP 1
+ if (repeat (1_"fo ", 2) /= 1_"fo fo ") STOP 2
+ if (repeat (1_"fo ", 2) /= 1_"fo fo") STOP 3
+ if (repeat (1_"fo ", 0) /= 1_"") STOP 4
+ if (repeat (s1, 2) /= 1_"fo fo ") STOP 5
+ if (repeat (s1, 2) /= 1_"fo fo") STOP 6
+ if (repeat (s1, 2) /= s1 // s1) STOP 7
+ if (repeat (s1, 3) /= s1 // s1 // s1) STOP 8
+ if (repeat (s1, 1) /= s1) STOP 9
+ if (repeat (s1, 0) /= "") STOP 10
+
+ if (repeat (4_"foo", 2) /= 4_"foofoo") STOP 11
+ if (repeat (4_"fo ", 2) /= 4_"fo fo ") STOP 12
+ if (repeat (4_"fo ", 2) /= 4_"fo fo") STOP 13
+ if (repeat (4_"fo ", 0) /= 4_"") STOP 14
+ if (repeat (s4, 2) /= 4_"fo fo ") STOP 15
+ if (repeat (s4, 2) /= 4_"fo fo") STOP 16
+ if (repeat (s4, 3) /= s4 // s4 // s4) STOP 17
+ if (repeat (s4, 1) /= s4) STOP 18
+ if (repeat (s4, 0) /= 4_"") STOP 19
call check_repeat (s1, s4)
call check_repeat ("", 4_"")
! Check NEW_LINE
- if (ichar(new_line ("")) /= 10) call abort
- if (len(new_line ("")) /= 1) call abort
- if (ichar(new_line (s1)) /= 10) call abort
- if (len(new_line (s1)) /= 1) call abort
- if (ichar(new_line (["",""])) /= 10) call abort
- if (len(new_line (["",""])) /= 1) call abort
- if (ichar(new_line ([s1,s1])) /= 10) call abort
- if (len(new_line ([s1,s1])) /= 1) call abort
-
- if (ichar(new_line (4_"")) /= 10) call abort
- if (len(new_line (4_"")) /= 1) call abort
- if (ichar(new_line (s4)) /= 10) call abort
- if (len(new_line (s4)) /= 1) call abort
- if (ichar(new_line ([4_"",4_""])) /= 10) call abort
- if (len(new_line ([4_"",4_""])) /= 1) call abort
- if (ichar(new_line ([s4,s4])) /= 10) call abort
- if (len(new_line ([s4,s4])) /= 1) call abort
+ if (ichar(new_line ("")) /= 10) STOP 20
+ if (len(new_line ("")) /= 1) STOP 21
+ if (ichar(new_line (s1)) /= 10) STOP 22
+ if (len(new_line (s1)) /= 1) STOP 23
+ if (ichar(new_line (["",""])) /= 10) STOP 24
+ if (len(new_line (["",""])) /= 1) STOP 25
+ if (ichar(new_line ([s1,s1])) /= 10) STOP 26
+ if (len(new_line ([s1,s1])) /= 1) STOP 27
+
+ if (ichar(new_line (4_"")) /= 10) STOP 28
+ if (len(new_line (4_"")) /= 1) STOP 29
+ if (ichar(new_line (s4)) /= 10) STOP 30
+ if (len(new_line (s4)) /= 1) STOP 31
+ if (ichar(new_line ([4_"",4_""])) /= 10) STOP 32
+ if (len(new_line ([4_"",4_""])) /= 1) STOP 33
+ if (ichar(new_line ([s4,s4])) /= 10) STOP 34
+ if (len(new_line ([s4,s4])) /= 1) STOP 35
! Check SIZEOF
- if (sizeof ("") /= 0) call abort
- if (sizeof (4_"") /= 0) call abort
- if (sizeof ("x") /= 1) call abort
- if (sizeof ("\xFF") /= 1) call abort
- if (sizeof (4_"x") /= 4) call abort
- if (sizeof (4_"\UFFFFFFFF") /= 4) call abort
- if (sizeof (s1) /= 3) call abort
- if (sizeof (s4) /= 12) call abort
+ if (sizeof ("") /= 0) STOP 36
+ if (sizeof (4_"") /= 0) STOP 37
+ if (sizeof ("x") /= 1) STOP 38
+ if (sizeof ("\xFF") /= 1) STOP 39
+ if (sizeof (4_"x") /= 4) STOP 40
+ if (sizeof (4_"\UFFFFFFFF") /= 4) STOP 41
+ if (sizeof (s1) /= 3) STOP 42
+ if (sizeof (s4) /= 12) STOP 43
- if (sizeof (["a", "x", "z"]) / sizeof ("a") /= 3) call abort
- if (sizeof ([4_"a", 4_"x", 4_"z"]) / sizeof (4_"a") /= 3) call abort
+ if (sizeof (["a", "x", "z"]) / sizeof ("a") /= 3) STOP 44
+ if (sizeof ([4_"a", 4_"x", 4_"z"]) / sizeof (4_"a") /= 3) STOP 45
call check_sizeof ("", 4_"", 0)
call check_sizeof ("x", 4_"x", 1)
integer :: i
do i = 0, 10
- if (len (repeat(s1, i)) /= i * len(s1)) call abort
- if (len (repeat(s4, i)) /= i * len(s4)) call abort
+ if (len (repeat(s1, i)) /= i * len(s1)) STOP 46
+ if (len (repeat(s4, i)) /= i * len(s4)) STOP 47
if (len_trim (repeat(s1, i)) &
- /= max(0, (i - 1) * len(s1) + len_trim (s1))) call abort
+ /= max(0, (i - 1) * len(s1) + len_trim (s1))) STOP 48
if (len_trim (repeat(s4, i)) &
- /= max(0, (i - 1) * len(s4) + len_trim (s4))) call abort
+ /= max(0, (i - 1) * len(s4) + len_trim (s4))) STOP 49
end do
end subroutine check_repeat
character(kind=4, len=len(s4)) :: t4
integer, intent(in) :: i
- if (sizeof (s1) /= i) call abort
- if (sizeof (s4) / sizeof (4_" ") /= i) call abort
- if (sizeof (t4) / sizeof (4_" ") /= i) call abort
+ if (sizeof (s1) /= i) STOP 50
+ if (sizeof (s4) / sizeof (4_" ") /= i) STOP 51
+ if (sizeof (t4) / sizeof (4_" ") /= i) STOP 52
end subroutine check_sizeof
end
character(kind=4, len=*) :: s4, t4
integer :: res1(6), res4(6)
- if (any (res1 /= res4)) call abort
+ if (any (res1 /= res4)) STOP 1
- if (index (s1, t1, .true.) /= res1(1)) call abort
- if (index (s1, t1, .false.) /= res1(2)) call abort
- if (scan (s1, t1, .true.) /= res1(3)) call abort
- if (scan (s1, t1, .false.) /= res1(4)) call abort
- if (verify (s1, t1, .true.) /= res1(5)) call abort
- if (verify (s1, t1, .false.) /= res1(6)) call abort
+ if (index (s1, t1, .true.) /= res1(1)) STOP 2
+ if (index (s1, t1, .false.) /= res1(2)) STOP 3
+ if (scan (s1, t1, .true.) /= res1(3)) STOP 4
+ if (scan (s1, t1, .false.) /= res1(4)) STOP 5
+ if (verify (s1, t1, .true.) /= res1(5)) STOP 6
+ if (verify (s1, t1, .false.) /= res1(6)) STOP 7
- if (index (s4, t4, .true.) /= res4(1)) call abort
- if (index (s4, t4, .false.) /= res4(2)) call abort
- if (scan (s4, t4, .true.) /= res4(3)) call abort
- if (scan (s4, t4, .false.) /= res4(4)) call abort
- if (verify (s4, t4, .true.) /= res4(5)) call abort
- if (verify (s4, t4, .false.) /= res4(6)) call abort
+ if (index (s4, t4, .true.) /= res4(1)) STOP 8
+ if (index (s4, t4, .false.) /= res4(2)) STOP 9
+ if (scan (s4, t4, .true.) /= res4(3)) STOP 10
+ if (scan (s4, t4, .false.) /= res4(4)) STOP 11
+ if (verify (s4, t4, .true.) /= res4(5)) STOP 12
+ if (verify (s4, t4, .false.) /= res4(6)) STOP 13
end subroutine check1
call check_merge1 ("foo", "gee", .true., .false.)
call check_merge4 (4_"foo", 4_"gee", .true., .false.)
- if (merge ("foo", "gee", .true.) /= "foo") call abort
- if (merge ("foo", "gee", .false.) /= "gee") call abort
- if (merge (4_"foo", 4_"gee", .true.) /= 4_"foo") call abort
- if (merge (4_"foo", 4_"gee", .false.) /= 4_"gee") call abort
+ if (merge ("foo", "gee", .true.) /= "foo") STOP 1
+ if (merge ("foo", "gee", .false.) /= "gee") STOP 2
+ if (merge (4_"foo", 4_"gee", .true.) /= 4_"foo") STOP 3
+ if (merge (4_"foo", 4_"gee", .false.) /= 4_"gee") STOP 4
! Test TRANSFER intrinsic
if (bigendian) then
- if (transfer (4_"x", " ") /= "\0\0\0x") call abort
+ if (transfer (4_"x", " ") /= "\0\0\0x") STOP 5
else
- if (transfer (4_"x", " ") /= "x\0\0\0") call abort
+ if (transfer (4_"x", " ") /= "x\0\0\0") STOP 6
endif
- if (transfer (4_"\U44444444", " ") /= "\x44\x44\x44\x44") call abort
- if (transfer (4_"\U3FE91B5A", 0_4) /= int(z'3FE91B5A', 4)) call abort
+ if (transfer (4_"\U44444444", " ") /= "\x44\x44\x44\x44") STOP 7
+ if (transfer (4_"\U3FE91B5A", 0_4) /= int(z'3FE91B5A', 4)) STOP 8
call check_transfer_i (4_"\U3FE91B5A", [int(z'3FE91B5A', 4)])
call check_transfer_i (4_"\u1B5A", [int(z'1B5A', 4)])
character(kind=1,len=*) :: s1, t1
logical :: t, f
- if (merge (s1, t1, .true.) /= s1) call abort
- if (merge (s1, t1, .false.) /= t1) call abort
- if (len (merge (s1, t1, .true.)) /= len (s1)) call abort
- if (len (merge (s1, t1, .false.)) /= len (t1)) call abort
- if (len_trim (merge (s1, t1, .true.)) /= len_trim (s1)) call abort
- if (len_trim (merge (s1, t1, .false.)) /= len_trim (t1)) call abort
+ if (merge (s1, t1, .true.) /= s1) STOP 9
+ if (merge (s1, t1, .false.) /= t1) STOP 10
+ if (len (merge (s1, t1, .true.)) /= len (s1)) STOP 11
+ if (len (merge (s1, t1, .false.)) /= len (t1)) STOP 12
+ if (len_trim (merge (s1, t1, .true.)) /= len_trim (s1)) STOP 13
+ if (len_trim (merge (s1, t1, .false.)) /= len_trim (t1)) STOP 14
- if (merge (s1, t1, t) /= s1) call abort
- if (merge (s1, t1, f) /= t1) call abort
- if (len (merge (s1, t1, t)) /= len (s1)) call abort
- if (len (merge (s1, t1, f)) /= len (t1)) call abort
- if (len_trim (merge (s1, t1, t)) /= len_trim (s1)) call abort
- if (len_trim (merge (s1, t1, f)) /= len_trim (t1)) call abort
+ if (merge (s1, t1, t) /= s1) STOP 15
+ if (merge (s1, t1, f) /= t1) STOP 16
+ if (len (merge (s1, t1, t)) /= len (s1)) STOP 17
+ if (len (merge (s1, t1, f)) /= len (t1)) STOP 18
+ if (len_trim (merge (s1, t1, t)) /= len_trim (s1)) STOP 19
+ if (len_trim (merge (s1, t1, f)) /= len_trim (t1)) STOP 20
end subroutine check_merge1
character(kind=4,len=*) :: s4, t4
logical :: t, f
- if (merge (s4, t4, .true.) /= s4) call abort
- if (merge (s4, t4, .false.) /= t4) call abort
- if (len (merge (s4, t4, .true.)) /= len (s4)) call abort
- if (len (merge (s4, t4, .false.)) /= len (t4)) call abort
- if (len_trim (merge (s4, t4, .true.)) /= len_trim (s4)) call abort
- if (len_trim (merge (s4, t4, .false.)) /= len_trim (t4)) call abort
+ if (merge (s4, t4, .true.) /= s4) STOP 21
+ if (merge (s4, t4, .false.) /= t4) STOP 22
+ if (len (merge (s4, t4, .true.)) /= len (s4)) STOP 23
+ if (len (merge (s4, t4, .false.)) /= len (t4)) STOP 24
+ if (len_trim (merge (s4, t4, .true.)) /= len_trim (s4)) STOP 25
+ if (len_trim (merge (s4, t4, .false.)) /= len_trim (t4)) STOP 26
- if (merge (s4, t4, t) /= s4) call abort
- if (merge (s4, t4, f) /= t4) call abort
- if (len (merge (s4, t4, t)) /= len (s4)) call abort
- if (len (merge (s4, t4, f)) /= len (t4)) call abort
- if (len_trim (merge (s4, t4, t)) /= len_trim (s4)) call abort
- if (len_trim (merge (s4, t4, f)) /= len_trim (t4)) call abort
+ if (merge (s4, t4, t) /= s4) STOP 27
+ if (merge (s4, t4, f) /= t4) STOP 28
+ if (len (merge (s4, t4, t)) /= len (s4)) STOP 29
+ if (len (merge (s4, t4, f)) /= len (t4)) STOP 30
+ if (len_trim (merge (s4, t4, t)) /= len_trim (s4)) STOP 31
+ if (len_trim (merge (s4, t4, f)) /= len_trim (t4)) STOP 32
end subroutine check_merge4
character(kind=4,len=*) :: s
integer(kind=4), dimension(len(s)) :: i
- if (transfer (s, 0_4) /= ichar (s(1:1))) call abort
- if (transfer (s, 0_4) /= i(1)) call abort
- if (any (transfer (s, [0_4]) /= i)) call abort
- if (any (transfer (s, 0_4, len(s)) /= i)) call abort
+ if (transfer (s, 0_4) /= ichar (s(1:1))) STOP 33
+ if (transfer (s, 0_4) /= i(1)) STOP 34
+ if (any (transfer (s, [0_4]) /= i)) STOP 35
+ if (any (transfer (s, 0_4, len(s)) /= i)) STOP 36
end subroutine check_transfer_i
character(kind=4,len=len(s1)) :: w1, w2, wmin, wmax
w1 = s1 ; w2 = s2 ; wmin = smin ; wmax = smax
- if (min (w1, w2) /= wmin) call abort
- if (max (w1, w2) /= wmax) call abort
- if (min (s1, s2) /= smin) call abort
- if (max (s1, s2) /= smax) call abort
+ if (min (w1, w2) /= wmin) STOP 1
+ if (max (w1, w2) /= wmax) STOP 2
+ if (min (s1, s2) /= smin) STOP 3
+ if (max (s1, s2) /= smax) STOP 4
end subroutine check_minmax_1
subroutine check_minmax_2 (s1, s2, smin, smax)
implicit none
character(kind=4,len=*), intent(in) :: s1, s2, smin, smax
- if (min (s1, s2) /= smin) call abort
- if (max (s1, s2) /= smax) call abort
+ if (min (s1, s2) /= smin) STOP 5
+ if (max (s1, s2) /= smax) STOP 6
end subroutine check_minmax_2
end
subroutine testme(x,y,z)
integer :: x, y, z
- if (x /= y) call abort
- if (x /= z) call abort
+ if (x /= y) STOP 1
+ if (x /= z) STOP 2
end subroutine testme
end
END FUNCTION lstrlen
END INTERFACE
- IF (lstrlen(C_CHAR_"winapi"//C_NULL_CHAR) /= 6) CALL abort()
+ IF (lstrlen(C_CHAR_"winapi"//C_NULL_CHAR) /= 6) STOP 1
END PROGRAM winapi
character(len=10) :: c1, c2
write(c1,"(1pe9.2)") 0.0
write(c2,"(1pe9.2)") 1.0
-if (trim(adjustl(c1)) .ne. "0.00E+00") call abort()
-if (trim(adjustl(c2)) .ne. "1.00E+00") call abort()
+if (trim(adjustl(c1)) .ne. "0.00E+00") STOP 1
+if (trim(adjustl(c2)) .ne. "1.00E+00") STOP 2
end
read(11)idata
read(11)idata
read(11, end=250)idata
- call abort()
+ STOP 1
250 continue
close(11, status="delete")
end
integer :: istatus
open(unit=10, form="unformatted", access="sequential", RECL=16)
write(10, iostat=istatus) array
- if (istatus == 0) call abort()
+ if (istatus == 0) STOP 1
close(10, status="delete")
end program us_recl
implicit none
open(unit = 10, form = 'unformatted', access = 'direct', recl = 4)
write(unit=10,rec=1, err=100) 1d0
- call abort()
+ STOP 1
100 continue
close(unit=10, status='delete')
end
real :: atime
str = '123'
write( str, '(a3,i1)' ) trim(str),4
- if (str.ne."1234") call abort()
+ if (str.ne."1234") STOP 1
end program write_padding
implicit none
character (len=8) :: str, tmp
write (str, '(a)') bar (1234)
- if (str.ne."abcd") call abort()
+ if (str.ne."abcd") STOP 1
str = "wxyz"
write (str, '(2a4)') foo (1), bar (1)
- if (str.ne."abcdabcd") call abort()
+ if (str.ne."abcdabcd") STOP 2
contains
write(11)idata
write(11)idata
read(11,end= 1000 )idata
- call abort()
+ STOP 1
1000 continue
rewind 11
write(11)idata
rewind 11
read(11)idata
read(11, end=250)idata
- call abort()
+ STOP 2
250 continue
close(11,status='delete')
end
idata( 1011) = -708
write(11)idata
read(11,end= 1000 )idata
- call abort()
+ STOP 1
1000 continue
rewind 11
read(11,end= 1001 )idata
- if(idata(1).ne. -705.or.idata( 1011).ne. -706)call abort()
+ if(idata(1).ne. -705.or.idata( 1011).ne. -706)STOP 2
1001 continue
close(11,status='keep')
open(unit=11,form='unformatted')
rewind 11
read(11)idata
if(idata(1).ne.-705)then
- call abort()
+ STOP 3
endif
read(11)idata
if(idata(1).ne.-706)then
- call abort()
+ STOP 4
endif
read(11)idata
if(idata(1).ne.-707)then
- call abort()
+ STOP 5
endif
close(11,status='delete')
stop
integer :: ics
!This was OK
write(msg,*) 'itemp(6:0) = ',itemp(6:0),'a'
- if (msg /= " itemp(6:0) = a") call abort()
+ if (msg /= " itemp(6:0) = a") STOP 1
!This did not work before patch, segfaulted
ics=6
write(msg,*) 'itemp(ics:0) = ',itemp(ics:0),'a'
- if (msg /= " itemp(ics:0) = a") call abort()
+ if (msg /= " itemp(ics:0) = a") STOP 2
end program zeros
read (10, 200) a
read (10, 200) a
do i = 1,60
- if (ichar(a(i:i)).ne.32) call abort ()
+ if (ichar(a(i:i)).ne.32) STOP 1
end do
read (10, 200) a
200 format (a60)
do i = 1,59
- if (ichar(a(i:i)).ne.32) call abort ()
+ if (ichar(a(i:i)).ne.32) STOP 2
end do
- if (a(60:60).ne."*") call abort ()
+ if (a(60:60).ne."*") STOP 3
rewind (10)
c Check that sequences of t- and x-editing generate the correct
read (10, 200) a
read (10, 200) a
do i = 1,59
- if (ichar(a(i:i)).ne.32) call abort ()
+ if (ichar(a(i:i)).ne.32) STOP 4
end do
- if (a(60:60).ne."$") call abort ()
+ if (a(60:60).ne."$") STOP 5
read (10, 200) a
- if (a(1:10).ne."abcdghijkl") call abort ()
+ if (a(1:10).ne."abcdghijkl") STOP 6
do i = 11,59
- if (ichar(a(i:i)).ne.32) call abort ()
+ if (ichar(a(i:i)).ne.32) STOP 7
end do
- if (a(60:60).ne."*") call abort ()
+ if (a(60:60).ne."*") STOP 8
rewind (10)
c Now repeat the first test, with the write broken up into three
read (10, 200) a
read (10, 200) a
do i = 11,59
- if (ichar(a(i:i)).ne.32) call abort ()
+ if (ichar(a(i:i)).ne.32) STOP 9
end do
- if (a(60:60).ne."$") call abort ()
+ if (a(60:60).ne."$") STOP 10
rewind (10)
c Next we check multiple read x- and t-editing.
read (10, 201) b, c
201 format (tr10,49x,a1,/,/,2x,t60,a1)
- if ((b.ne."#").or.(c.ne."$")) call abort ()
+ if ((b.ne."#").or.(c.ne."$")) STOP 11
rewind (10)
c Now break it up into three reads and use left tabs.
203 format ()
read (10, 204) c
204 format (10x,t5,55x,a1)
- if ((b.ne."#").or.(c.ne."$")) call abort ()
+ if ((b.ne."#").or.(c.ne."$")) STOP 12
close (10)
c Now, check that trailing spaces are not transmitted when we have
rewind (10)
read (10, 205, iostat = ier) i, b
205 format (i10,a1)
- if ((ier.eq.0).or.(ichar(b).ne.0)) call abort ()
+ if ((ier.eq.0).or.(ichar(b).ne.0)) STOP 13
c That's all for now, folks!
write (10,'(3X, A, T1, A,/)') 'aa', 'bb'
rewind(10)
read (10,'(A2,1X,A2)') b,a
- if (a /= 'aa' .or. b /= 'bb') call abort
+ if (a /= 'aa' .or. b /= 'bb') STOP 1
close(10,status="delete")
end
mine%b=4
mine%a=1
mine%a=0
- if (any (mine%b .ne. 4)) call abort ()
+ if (any (mine%b .ne. 4)) STOP 1
end program test_assign
character(len=20) :: s
write(s,'(A,I1)') foo(), 0
- if (trim(s) /= "0") call abort
+ if (trim(s) /= "0") STOP 1
contains
contains
subroutine bar (s)
character(len=*), optional :: s
- if (.not. present (S)) call abort
+ if (.not. present (S)) STOP 1
end subroutine bar
end
tempn = 2.0
tempm = 1.0
allocate(foo(0),bar(2,0),gee(0,7))
- if (any(cshift(foo,dim=1,shift=1)/= 0)) call abort
- if (any(cshift(tempn(2:1),dim=1,shift=1)/= 0)) call abort
- if (any(cshift(bar,shift=(/1,-1/),dim=1)/= 0)) call abort
- if (any(cshift(bar,shift=(/1,-1/),dim=2)/= 0)) call abort
- if (any(cshift(gee,shift=(/1,-1/),dim=1)/= 0)) call abort
- if (any(cshift(gee,shift=(/1,-1/),dim=2)/= 0)) call abort
- if (any(cshift(tempm(5:4,:),shift=(/1,-1/),dim=1)/= 0)) call abort
+ if (any(cshift(foo,dim=1,shift=1)/= 0)) STOP 1
+ if (any(cshift(tempn(2:1),dim=1,shift=1)/= 0)) STOP 2
+ if (any(cshift(bar,shift=(/1,-1/),dim=1)/= 0)) STOP 3
+ if (any(cshift(bar,shift=(/1,-1/),dim=2)/= 0)) STOP 4
+ if (any(cshift(gee,shift=(/1,-1/),dim=1)/= 0)) STOP 5
+ if (any(cshift(gee,shift=(/1,-1/),dim=2)/= 0)) STOP 6
+ if (any(cshift(tempm(5:4,:),shift=(/1,-1/),dim=1)/= 0)) STOP 7
deallocate(foo,bar,gee)
end
tempn = 2.0
tempm = 1.0
allocate(foo(0),bar(2,0),gee(0,7))
- if (any(eoshift(foo,dim=1,shift=1)/= 0)) call abort
- if (any(eoshift(tempn(2:1),dim=1,shift=1)/= 0)) call abort
- if (any(eoshift(bar,shift=(/1,-1/),dim=1)/= 0)) call abort
- if (any(eoshift(bar,shift=(/1,-1/),dim=2)/= 0)) call abort
- if (any(eoshift(gee,shift=(/1,-1/),dim=1)/= 0)) call abort
- if (any(eoshift(gee,shift=(/1,-1/),dim=2)/= 0)) call abort
- if (any(eoshift(tempm(5:4,:),shift=(/1,-1/),dim=1)/= 0)) call abort
+ if (any(eoshift(foo,dim=1,shift=1)/= 0)) STOP 8
+ if (any(eoshift(tempn(2:1),dim=1,shift=1)/= 0)) STOP 9
+ if (any(eoshift(bar,shift=(/1,-1/),dim=1)/= 0)) STOP 10
+ if (any(eoshift(bar,shift=(/1,-1/),dim=2)/= 0)) STOP 11
+ if (any(eoshift(gee,shift=(/1,-1/),dim=1)/= 0)) STOP 12
+ if (any(eoshift(gee,shift=(/1,-1/),dim=2)/= 0)) STOP 13
+ if (any(eoshift(tempm(5:4,:),shift=(/1,-1/),dim=1)/= 0)) STOP 14
- if (any(eoshift(foo,dim=1,shift=1,boundary=42.0)/= 0)) call abort
- if (any(eoshift(tempn(2:1),dim=1,shift=1,boundary=42.0)/= 0)) call abort
- if (any(eoshift(bar,shift=(/1,-1/),dim=1,boundary=42.0)/= 0)) call abort
- if (any(eoshift(bar,shift=(/1,-1/),dim=2,boundary=42.0)/= 0)) call abort
- if (any(eoshift(gee,shift=(/1,-1/),dim=1,boundary=42.0)/= 0)) call abort
- if (any(eoshift(gee,shift=(/1,-1/),dim=2,boundary=42.0)/= 0)) call abort
- if (any(eoshift(tempm(5:4,:),shift=(/1,-1/),dim=1,boundary=42.0)/= 0)) call abort
+ if (any(eoshift(foo,dim=1,shift=1,boundary=42.0)/= 0)) STOP 15
+ if (any(eoshift(tempn(2:1),dim=1,shift=1,boundary=42.0)/= 0)) STOP 16
+ if (any(eoshift(bar,shift=(/1,-1/),dim=1,boundary=42.0)/= 0)) STOP 17
+ if (any(eoshift(bar,shift=(/1,-1/),dim=2,boundary=42.0)/= 0)) STOP 18
+ if (any(eoshift(gee,shift=(/1,-1/),dim=1,boundary=42.0)/= 0)) STOP 19
+ if (any(eoshift(gee,shift=(/1,-1/),dim=2,boundary=42.0)/= 0)) STOP 20
+ if (any(eoshift(tempm(5:4,:),shift=(/1,-1/),dim=1,boundary=42.0)/= 0)) STOP 21
- if (any(eoshift(foo,dim=1,shift=1,boundary=42.0)/= 0)) call abort
- if (any(eoshift(tempn(2:1),dim=1,shift=1,boundary=-7.0)/= 0)) call abort
- if (any(eoshift(bar,shift=(/1,-1/),dim=1,boundary=(/42.0,-7.0/))/= 0)) call abort
- if (any(eoshift(bar,shift=(/1,-1/),dim=2,boundary=(/42.0,-7.0/))/= 0)) call abort
- if (any(eoshift(gee,shift=(/1,-1/),dim=1,boundary=(/42.0,-7.0/))/= 0)) call abort
- if (any(eoshift(gee,shift=(/1,-1/),dim=2,boundary=(/42.0,-7.0/))/= 0)) call abort
- if (any(eoshift(tempm(5:4,:),shift=(/1,-1/),dim=1,boundary=(/42.0,-7.0/))/= 0)) call abort
+ if (any(eoshift(foo,dim=1,shift=1,boundary=42.0)/= 0)) STOP 22
+ if (any(eoshift(tempn(2:1),dim=1,shift=1,boundary=-7.0)/= 0)) STOP 23
+ if (any(eoshift(bar,shift=(/1,-1/),dim=1,boundary=(/42.0,-7.0/))/= 0)) STOP 24
+ if (any(eoshift(bar,shift=(/1,-1/),dim=2,boundary=(/42.0,-7.0/))/= 0)) STOP 25
+ if (any(eoshift(gee,shift=(/1,-1/),dim=1,boundary=(/42.0,-7.0/))/= 0)) STOP 26
+ if (any(eoshift(gee,shift=(/1,-1/),dim=2,boundary=(/42.0,-7.0/))/= 0)) STOP 27
+ if (any(eoshift(tempm(5:4,:),shift=(/1,-1/),dim=1,boundary=(/42.0,-7.0/))/= 0)) STOP 28
deallocate(foo,bar,gee)
end
allocate(foo(3,0),bar(-2:-4,7:9))
tempm = -42
allocate(x(3,0),y(-2:-4,7:9))
- if (any(transpose(tempn(-7:-8,:)) /= 'b')) call abort
- if (any(transpose(tempn(:,9:8)) /= 'b')) call abort
- if (any(transpose(foo) /= 'b')) call abort
- if (any(transpose(bar) /= 'b')) call abort
- if (any(transpose(tempm(-7:-8,:)) /= 0)) call abort
- if (any(transpose(tempm(:,9:8)) /= 0)) call abort
- if (any(transpose(x) /= 0)) call abort
- if (any(transpose(y) /= 0)) call abort
+ if (any(transpose(tempn(-7:-8,:)) /= 'b')) STOP 29
+ if (any(transpose(tempn(:,9:8)) /= 'b')) STOP 30
+ if (any(transpose(foo) /= 'b')) STOP 31
+ if (any(transpose(bar) /= 'b')) STOP 32
+ if (any(transpose(tempm(-7:-8,:)) /= 0)) STOP 33
+ if (any(transpose(tempm(:,9:8)) /= 0)) STOP 34
+ if (any(transpose(x) /= 0)) STOP 35
+ if (any(transpose(y) /= 0)) STOP 36
deallocate(foo,bar,x,y)
end
allocate(foo(3,0),bar(-2:-4,7:9),x(3,0),y(-2:-4,7:9))
if (size(reshape(tempn(-7:-8,:),(/3,3/),pad=(/'a'/))) /= 9 .or. &
- any(reshape(tempn(-7:-8,:),(/3,3/),pad=(/'a'/)) /= 'a')) call abort
+ any(reshape(tempn(-7:-8,:),(/3,3/),pad=(/'a'/)) /= 'a')) STOP 37
if (size(reshape(tempn(-7:-8,:),(/3,3,3/),pad=(/'a'/))) /= 27 .or. &
- any(reshape(tempn(-7:-8,:),(/3,3,3/),pad=(/'a'/)) /= 'a')) call abort
+ any(reshape(tempn(-7:-8,:),(/3,3,3/),pad=(/'a'/)) /= 'a')) STOP 38
if (size(reshape(tempn(-7:-8,:),(/3,3,3,3,3,3,3/),pad=(/'a'/))) /= 2187 .or. &
- any(reshape(tempn(-7:-8,:),(/3,3,3,3,3,3,3/),pad=(/'a'/)) /= 'a')) call abort
+ any(reshape(tempn(-7:-8,:),(/3,3,3,3,3,3,3/),pad=(/'a'/)) /= 'a')) STOP 39
if (size(reshape(foo,(/3,3/),pad=(/'a'/))) /= 9 .or. &
- any(reshape(foo,(/3,3/),pad=(/'a'/)) /= 'a')) call abort
+ any(reshape(foo,(/3,3/),pad=(/'a'/)) /= 'a')) STOP 40
if (size(reshape(foo,(/3,3,3/),pad=(/'a'/))) /= 27 .or. &
- any(reshape(foo,(/3,3,3/),pad=(/'a'/)) /= 'a')) call abort
+ any(reshape(foo,(/3,3,3/),pad=(/'a'/)) /= 'a')) STOP 41
if (size(reshape(foo,(/3,3,3,3,3,3,3/),pad=(/'a'/))) /= 2187 .or. &
- any(reshape(foo,(/3,3,3,3,3,3,3/),pad=(/'a'/)) /= 'a')) call abort
+ any(reshape(foo,(/3,3,3,3,3,3,3/),pad=(/'a'/)) /= 'a')) STOP 42
if (size(reshape(bar,(/3,3/),pad=(/'a'/))) /= 9 .or. &
- any(reshape(bar,(/3,3/),pad=(/'a'/)) /= 'a')) call abort
+ any(reshape(bar,(/3,3/),pad=(/'a'/)) /= 'a')) STOP 43
if (size(reshape(bar,(/3,3,3/),pad=(/'a'/))) /= 27 .or. &
- any(reshape(bar,(/3,3,3/),pad=(/'a'/)) /= 'a')) call abort
+ any(reshape(bar,(/3,3,3/),pad=(/'a'/)) /= 'a')) STOP 44
if (size(reshape(bar,(/3,3,3,3,3,3,3/),pad=(/'a'/))) /= 2187 .or. &
- any(reshape(bar,(/3,3,3,3,3,3,3/),pad=(/'a'/)) /= 'a')) call abort
+ any(reshape(bar,(/3,3,3,3,3,3,3/),pad=(/'a'/)) /= 'a')) STOP 45
if (size(reshape(tempm(-7:-8,:),(/3,3/),pad=(/7/))) /= 9 .or. &
- any(reshape(tempm(-7:-8,:),(/3,3/),pad=(/7/)) /= 7)) call abort
+ any(reshape(tempm(-7:-8,:),(/3,3/),pad=(/7/)) /= 7)) STOP 46
if (size(reshape(tempm(-7:-8,:),(/3,3,3/),pad=(/7/))) /= 27 .or. &
- any(reshape(tempm(-7:-8,:),(/3,3,3/),pad=(/7/)) /= 7)) call abort
+ any(reshape(tempm(-7:-8,:),(/3,3,3/),pad=(/7/)) /= 7)) STOP 47
if (size(reshape(tempm(-7:-8,:),(/3,3,3,3,3,3,3/),pad=(/7/))) /= 2187 .or. &
- any(reshape(tempm(-7:-8,:),(/3,3,3,3,3,3,3/),pad=(/7/)) /= 7)) call abort
+ any(reshape(tempm(-7:-8,:),(/3,3,3,3,3,3,3/),pad=(/7/)) /= 7)) STOP 48
if (size(reshape(x,(/3,3/),pad=(/7/))) /= 9 .or. &
- any(reshape(x,(/3,3/),pad=(/7/)) /= 7)) call abort
+ any(reshape(x,(/3,3/),pad=(/7/)) /= 7)) STOP 49
if (size(reshape(x,(/3,3,3/),pad=(/7/))) /= 27 .or. &
- any(reshape(x,(/3,3,3/),pad=(/7/)) /= 7)) call abort
+ any(reshape(x,(/3,3,3/),pad=(/7/)) /= 7)) STOP 50
if (size(reshape(x,(/3,3,3,3,3,3,3/),pad=(/7/))) /= 2187 .or. &
- any(reshape(x,(/3,3,3,3,3,3,3/),pad=(/7/)) /= 7)) call abort
+ any(reshape(x,(/3,3,3,3,3,3,3/),pad=(/7/)) /= 7)) STOP 51
if (size(reshape(y,(/3,3/),pad=(/7/))) /= 9 .or. &
- any(reshape(y,(/3,3/),pad=(/7/)) /= 7)) call abort
+ any(reshape(y,(/3,3/),pad=(/7/)) /= 7)) STOP 52
if (size(reshape(y,(/3,3,3/),pad=(/7/))) /= 27 .or. &
- any(reshape(y,(/3,3,3/),pad=(/7/)) /= 7)) call abort
+ any(reshape(y,(/3,3,3/),pad=(/7/)) /= 7)) STOP 53
if (size(reshape(y,(/3,3,3,3,3,3,3/),pad=(/7/))) /= 2187 .or. &
- any(reshape(y,(/3,3,3,3,3,3,3/),pad=(/7/)) /= 7)) call abort
+ any(reshape(y,(/3,3,3,3,3,3,3/),pad=(/7/)) /= 7)) STOP 54
deallocate(foo,bar,x,y)
end
integer,allocatable :: foo(:,:)
tempn = 2
allocate(foo(0,1:7))
- if (size(pack(foo,foo/=0)) /= 0 .or. any(pack(foo,foo/=0) /= -42)) call abort
+ if (size(pack(foo,foo/=0)) /= 0 .or. any(pack(foo,foo/=0) /= -42)) STOP 55
if (size(pack(foo,foo/=0,(/1,3,4,5,1,0,7,9/))) /= 8 .or. &
- sum(pack(foo,foo/=0,(/1,3,4,5,1,0,7,9/))) /= 30) call abort
+ sum(pack(foo,foo/=0,(/1,3,4,5,1,0,7,9/))) /= 30) STOP 56
if (size(pack(tempn(:,-4:-5),tempn(:,-4:-5)/=0)) /= 0 .or. &
- any(pack(tempn(:,-4:-5),tempn(:,-4:-5)/=0) /= -42)) call abort
+ any(pack(tempn(:,-4:-5),tempn(:,-4:-5)/=0) /= -42)) STOP 57
if (size(pack(tempn(:,-4:-5),tempn(:,-4:-5)/=0,(/1,3,4,5,1,0,7,9/))) /= 8 .or. &
sum(pack(tempn(:,-4:-5),tempn(:,-4:-5)/=0,(/1,3,4,5,1,0,7,9/))) /= 30) &
- call abort
+ STOP 58
if (size(pack(foo,.true.)) /= 0 .or. any(pack(foo,.true.) /= -42)) &
- call abort
+ STOP 59
if (size(pack(foo,.true.,(/1,3,4,5,1,0,7,9/))) /= 8 .or. &
- sum(pack(foo,.true.,(/1,3,4,5,1,0,7,9/))) /= 30) call abort
+ sum(pack(foo,.true.,(/1,3,4,5,1,0,7,9/))) /= 30) STOP 60
if (size(pack(tempn(:,-4:-5),.true.)) /= 0 .or. &
- any(pack(foo,.true.) /= -42)) call abort
+ any(pack(foo,.true.) /= -42)) STOP 61
if (size(pack(tempn(:,-4:-5),.true.,(/1,3,4,5,1,0,7,9/))) /= 8 .or. &
- sum(pack(tempn(:,-4:-5),.true.,(/1,3,4,5,1,0,7,9/))) /= 30) call abort
+ sum(pack(tempn(:,-4:-5),.true.,(/1,3,4,5,1,0,7,9/))) /= 30) STOP 62
deallocate(foo)
end
zero = 0
allocate(foo(0,1:7),bar(0:-1))
if (any(unpack(tempv,tempv/=0,tempv) /= 5) .or. &
- size(unpack(tempv,tempv/=0,tempv)) /= 5) call abort
+ size(unpack(tempv,tempv/=0,tempv)) /= 5) STOP 63
if (any(unpack(tempv(1:0),tempv/=0,tempv) /= 5) .or. &
- size(unpack(tempv(1:0),tempv/=0,tempv)) /= 5) call abort
- if (any(unpack(tempv,tempv(1:zero)/=0,tempv) /= -47)) call abort
- if (any(unpack(tempv(5:4),tempv(1:zero)/=0,tempv) /= -47)) call abort
- if (any(unpack(bar,foo==foo,foo) /= -47)) call abort
+ size(unpack(tempv(1:0),tempv/=0,tempv)) /= 5) STOP 64
+ if (any(unpack(tempv,tempv(1:zero)/=0,tempv) /= -47)) STOP 65
+ if (any(unpack(tempv(5:4),tempv(1:zero)/=0,tempv) /= -47)) STOP 66
+ if (any(unpack(bar,foo==foo,foo) /= -47)) STOP 67
deallocate(foo,bar)
end
tempn = 2.0
allocate(foo(0))
if (any(spread(1,dim=1,ncopies=0) /= -17.0) .or. &
- size(spread(1,dim=1,ncopies=0)) /= 0) call abort
+ size(spread(1,dim=1,ncopies=0)) /= 0) STOP 68
if (any(spread(foo,dim=1,ncopies=1) /= -17.0) .or. &
- size(spread(foo,dim=1,ncopies=1)) /= 0) call abort
+ size(spread(foo,dim=1,ncopies=1)) /= 0) STOP 69
if (any(spread(tempn(2:1),dim=1,ncopies=1) /= -17.0) .or. &
- size(spread(tempn(2:1),dim=1,ncopies=1)) /= 0) call abort
+ size(spread(tempn(2:1),dim=1,ncopies=1)) /= 0) STOP 70
deallocate(foo)
end
mask(:) = (mm == 0)
j = count (mask)
print *, pack (mm, mask)
- if (size (pack (mm, mask)) /= j) call abort
+ if (size (pack (mm, mask)) /= j) STOP 1
deallocate (mm, mask)
end do
end do
a = reshape (val, (/3, 3/))
b = 0
b(1:6:3) = pack (a, a .ne. 0);
- if (any (b(1:6:3) .ne. (/9, 7/))) call abort
+ if (any (b(1:6:3) .ne. (/9, 7/))) STOP 1
b = pack (a(2:3, 2:3), a(2:3, 2:3) .ne. 0, (/1, 2, 3, 4, 5, 6/));
- if (any (b .ne. (/9, 7, 3, 4, 5, 6/))) call abort
+ if (any (b .ne. (/9, 7, 3, 4, 5, 6/))) STOP 2
contains
subroutine tests_with_temp
! A few tests which involve a temporary
- if (any (pack(a, a.ne.0) .ne. (/9, 7/))) call abort
- if (any (pack(a, .true.) .ne. val)) call abort
- if (size(pack (a, .false.)) .ne. 0) call abort
- if (any (pack(a, .false., (/1,2,3/)).ne. (/1,2,3/))) call abort
+ if (any (pack(a, a.ne.0) .ne. (/9, 7/))) STOP 3
+ if (any (pack(a, .true.) .ne. val)) STOP 4
+ if (size(pack (a, .false.)) .ne. 0) STOP 5
+ if (any (pack(a, .false., (/1,2,3/)).ne. (/1,2,3/))) STOP 6
end subroutine tests_with_temp
end program
integer, parameter :: j = huge(j)
integer i
- if (j /= huge(i)) call abort
+ if (j /= huge(i)) STOP 1
end
read(C,'(A7)')D
if (D.NE.'DEFG') then
! print*,D
- call abort
+ STOP 1
endif
read(C,'(A)')D
if (D.NE.'ABCD') then
! print*,D
- call abort
+ STOP 2
endif
end
print*, 'adjustr(s1) = "', adjustr(s1(i)), '"'
if (adjustr(s1(i)).ne.s2(i)) then
print*,'fail'
- call abort
+ STOP 1
endif
enddo
logical first
if (first) then
- if (allocated (p)) call abort ()
+ if (allocated (p)) STOP 1
else
- if (.not. allocated (p)) call abort ()
+ if (.not. allocated (p)) STOP 2
end if
- if (allocated (q)) call abort ()
+ if (allocated (q)) STOP 3
if (first) then
allocate (p(5))
allocate (r(5))
pr = 1.0
deallocate (r)
- if (allocated(r)) call abort ()
+ if (allocated(r)) STOP 4
end subroutine
end program
call myproc (1, *10, 42)
20 continue
- call abort ()
+ STOP 1
10 continue
call myproc(2, *20, 42)
call myproc(3, *20, 42)
contains
subroutine myproc(n, *, i)
integer n, i
- if (i .ne. 42) call abort ()
+ if (i .ne. 42) STOP 2
if (n .eq. 1) return 1
if (n .eq. 2) return
end subroutine
integer, intent (IN) :: a
integer, intent (OUT) :: b
- if (a .ne. 42) call abort
+ if (a .ne. 42) STOP 1
b = 43
end subroutine
i = 42
j = 0
CALL test (i, j)
- if (i .ne. 42) call abort
- if (j .ne. 43) call abort
+ if (i .ne. 42) STOP 2
+ if (j .ne. 43) STOP 3
i = 41
CALL test (i + 1, j)
end program
integer i
integer testif
- if (testif (-10) .ne. -1) call abort
- if (testif (0) .ne. 0) call abort
- if (testif (10) .ne. 1) call abort
+ if (testif (-10) .ne. -1) STOP 1
+ if (testif (0) .ne. 0) STOP 2
+ if (testif (10) .ne. 1) STOP 3
end program
implicit none
integer, dimension (5, 8) :: a
- if (a(1, 1) .ne. 42) call abort
+ if (a(1, 1) .ne. 42) STOP 1
- if (a(5, 8) .ne. 43) call abort
+ if (a(5, 8) .ne. 43) STOP 2
end subroutine
v2 (3, 1::2) = v1 (5:1:-1)
v1 = v1 + 1
- if (v1(1) .ne. 2) call abort
- if (v2(3, 3) .ne. 4) call abort
+ if (v1(1) .ne. 2) STOP 3
+ if (v2(3, 3) .ne. 4) STOP 4
! Passing whole arrays
call f1 (a)
subroutine f2 (a)
integer, dimension (1:, 1:) :: a
- if (a(1, 1) .ne. 42) call abort
+ if (a(1, 1) .ne. 42) STOP 5
- if (a(5, 8) .ne. 43) call abort
+ if (a(5, 8) .ne. 43) STOP 6
end subroutine
end program
call test (a, b)
- if (any (b .ne. (/4, 7, 10, 13, 16/))) call abort
+ if (any (b .ne. (/4, 7, 10, 13, 16/))) STOP 1
contains
subroutine test (x1, x2)
implicit none
integer, dimension(2) :: b
b = ubound (a)
- if (any (b .ne. (/6, 5/))) call abort
- if (a(1, 1) .ne. 42) call abort
- if (a(6, 5) .ne. 43) call abort
+ if (any (b .ne. (/6, 5/))) STOP 1
+ if (a(1, 1) .ne. 42) STOP 2
+ if (a(6, 5) .ne. 43) STOP 3
end subroutine
end program
integer, dimension(2, *) :: p
if (any (p(:, 1:3) .ne. reshape((/1, 2, 4, 5, 7, 8/), (/2, 3/)))) &
- call abort ()
+ STOP 1
end subroutine
program assumed_size
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
call test1(a, (/1, 2, 3, 4, 5, 6/))
- if (a(1,1) .ne. 0) call abort
+ if (a(1,1) .ne. 0) STOP 1
a(1, 1) = 1
call test1(a(1:2, :), (/1, 2, 4, 5, 7, 8/))
- if (a(1,1) .ne. 0) call abort
+ if (a(1,1) .ne. 0) STOP 2
a(1, 1) = 1
call test1(a(3:1:-1, :), (/3, 2, 1, 6, 5, 4/))
- if (a(3,1) .ne. 0) call abort
+ if (a(3,1) .ne. 0) STOP 3
a(3, 1) = 3
call test1(a(:, 2:3), (/4, 5, 6, 7, 8, 9/))
- if (a(1, 2) .ne. 0) call abort
+ if (a(1, 2) .ne. 0) STOP 4
a(1, 2) = 4
call test2(a(1:2, :))
integer, dimension(*) :: p
integer, dimension(1:) :: q
- if (any (p(1:size(q)) .ne. q)) call abort ()
+ if (any (p(1:size(q)) .ne. q)) STOP 2
p(1) = 0
end subroutine
read(10,*)C
backspace(10)
read(10,*) C
- if (C.ne.'a') call abort
+ if (C.ne.'a') STOP 1
close(10,STATUS='DELETE')
end
integer i
! Check compile time simplification
- if (lbound(j,1).ne.1 .or. ubound(j,1).ne.5) call abort ()
+ if (lbound(j,1).ne.1 .or. ubound(j,1).ne.5) STOP 1
allocate (a(3:8, 6:7))
! With one parameter
j = 0;
j(3:4) = ubound(a)
- if (j(3) .ne. 8) call abort
- if (j(4) .ne. 7) call abort
+ if (j(3) .ne. 8) STOP 1
+ if (j(4) .ne. 7) STOP 2
! With two parameters, assigning to an array
j = lbound(a, 1)
- if ((j(1) .ne. 3) .or. (j(5) .ne. 3)) call abort
+ if ((j(1) .ne. 3) .or. (j(5) .ne. 3)) STOP 3
! With a variable second parameter
i = 2
i = lbound(a, i)
- if (i .ne. 6) call abort
+ if (i .ne. 6) STOP 4
call test(a)
contains
integer i
i = 2
- if ((ubound(a, 1) .ne. 6) .or. (ubound(a, i) .ne. 2)) call abort
+ if ((ubound(a, 1) .ne. 6) .or. (ubound(a, i) .ne. 2)) STOP 5
end subroutine
end program
b='B'
x = LSAME(a1,a2)
if ( .not. x ) then
- call abort ();
+ STOP 1;
endif
end
SELECT CASE (C)
CASE ("AAA":"EEE")
- CALL abort
+ STOP 1
CASE ("R":"T")
CONTINUE
CASE DEFAULT
- CALL abort
+ STOP 2
END SELECT
END
x = 3
y = 4
c = cmplx(x,y)
- if (c .ne. (3.0, 4.0)) call abort
+ if (c .ne. (3.0, 4.0)) STOP 1
x = 4
y = 3
z = cmplx(x, y, 8)
- if (z .ne. (4.0, 3.0)) call abort
+ if (z .ne. (4.0, 3.0)) STOP 2
z = c
- if (z .ne. (3.0, 4.0)) call abort
+ if (z .ne. (3.0, 4.0)) STOP 3
! dcmplx intrinsic
x = 3
y = 4
z = dcmplx (x, y)
- if (z .ne. (3.0, 4.0)) call abort
+ if (z .ne. (3.0, 4.0)) STOP 4
! conjucates and aimag
c = (1.0, 2.0)
c = conjg (c)
x = aimag (c)
- if (abs (c - (1.0, -2.0)) .gt. 0.001) call abort
- if (x .ne. -2.0) call abort
+ if (abs (c - (1.0, -2.0)) .gt. 0.001) STOP 5
+ if (x .ne. -2.0) STOP 6
z = (2.0, 1.0)
z = conjg (z)
q = aimag (z)
- if (z .ne. (2.0, -1.0)) call abort
- if (q .ne. -1.0) call abort
+ if (z .ne. (2.0, -1.0)) STOP 7
+ if (q .ne. -1.0) STOP 8
! addition, subtraction and multiplication
c = (1, 3)
d = (5, 2)
- if (c + d .ne. ( 6, 5)) call abort
- if (c - d .ne. (-4, 1)) call abort
- if (c * d .ne. (-1, 17)) call abort
+ if (c + d .ne. ( 6, 5)) STOP 9
+ if (c - d .ne. (-4, 1)) STOP 10
+ if (c * d .ne. (-1, 17)) STOP 11
! test for constant folding
- if ((35.,-10.)**0.NE.(1.,0.)) call abort
+ if ((35.,-10.)**0.NE.(1.,0.)) STOP 12
end program
real (kind=8) b(5), c(5)
common /com1/b,c
equivalence (a(1), b(2))
- if (any (a .ne. (/100,100,100,100,200,200,200,200/))) call abort
+ if (any (a .ne. (/100,100,100,100,200,200,200,200/))) STOP 1
end subroutine
! Common variables as argument
subroutine common_par (a, b, c)
real (kind=8) a(8), b(5), c(5)
- if (any (a .ne. (/100,100,100,100,200,200,200,200/))) call abort
- if (any (b .ne. (/100,100,100,100,100/))) call abort
- if (any (c .ne. (/200,200,200,200,200/))) call abort
+ if (any (a .ne. (/100,100,100,100,200,200,200,200/))) STOP 2
+ if (any (b .ne. (/100,100,100,100,100/))) STOP 3
+ if (any (c .ne. (/200,200,200,200,200/))) STOP 4
end subroutine
! Global equivalence
c = 200
y = 300
z = 400
- if (any (a .ne. (/100,100,100,100,200,200,200,200/))) call abort
- if (any (x .ne. (/200,200,200,300,300,300,300,400/))) call abort
+ if (any (a .ne. (/100,100,100,100,200,200,200,200/))) STOP 5
+ if (any (x .ne. (/200,200,200,300,300,300,300,400/))) STOP 6
end
! Local equivalence
equivalence (a(1), b(3))
b(1:5) = 100
b(6:10) = 200
- if (any (a .ne. (/100,100,100,200,200,200,200,200/))) call abort
+ if (any (a .ne. (/100,100,100,200,200,200,200,200/))) STOP 7
end subroutine
COMMON /X/J
j = 1
i = 2
-if (j.ne.i) call abort()
-if (j.ne.2) call abort()
+if (j.ne.i) STOP 1
+if (j.ne.2) STOP 2
call set_i()
-if (j.ne.5) call abort()
+if (j.ne.5) STOP 3
END
common /block2/ c
common /block/ d, e, f
- if ((d .ne. 42) .or. (e .ne. 43) .or. (f .ne. 2.0)) call abort ()
- if (c .ne. "Hello World ") call abort ()
+ if ((d .ne. 42) .or. (e .ne. 43) .or. (f .ne. 2.0)) STOP 1
+ if (c .ne. "Hello World ") STOP 2
end subroutine
program prog
equivalence (a(1), b(2))
b = 100
c = 200
- if ((a (4) .ne. 100) .or. (a(5) .ne. 200)) call abort
+ if ((a (4) .ne. 100) .or. (a(5) .ne. 200)) STOP 1
end
a = (/1, (i,i=2,4)/)
do i = 1, 4
- if (a(i) .ne. i) call abort
+ if (a(i) .ne. i) STOP 1
end do
b = reshape ((/0, 1, 2, 3, 4, 5/), (/3, 2/)) + 1
do i=1,3
- if (b(i, 1) .ne. i) call abort
- if (b(i, 2) .ne. i + 3) call abort
+ if (b(i, 1) .ne. i) STOP 2
+ if (b(i, 2) .ne. i + 3) STOP 3
end do
k = 1
n = 4
! The remainder assumes constant constructors work ok.
a = (/n, m, l, k/)
- if (any (a .ne. (/4, 3, 2, 1/))) call abort
+ if (any (a .ne. (/4, 3, 2, 1/))) STOP 4
a = (/((/i+10, 42/), i = k, l)/)
- if (any (a .ne. (/11, 42, 12, 42/))) call abort
+ if (any (a .ne. (/11, 42, 12, 42/))) STOP 5
a = (/(I, I=k,l) , (J, J=m,n)/)
- if (any (a .ne. (/1, 2, 3, 4/))) call abort
+ if (any (a .ne. (/1, 2, 3, 4/))) STOP 6
end program
i = 0;
call testproc (40)
- if (i .ne. 42) call abort
+ if (i .ne. 42) STOP 1
contains
subroutine testproc (p)
implicit none
integer p
- if (p .ne. 40) call abort
+ if (p .ne. 40) STOP 2
i = p + 2
end subroutine
end program
integer var1
var1 = 42
- if (f1() .ne. 1) call abort
+ if (f1() .ne. 1) STOP 1
call f2()
- if (var1 .ne. 42) call abort
+ if (var1 .ne. 42) STOP 2
contains
function f1 ()
subroutine f2()
implicit none
- if (f1() .ne. 1) call abort
+ if (f1() .ne. 1) STOP 3
end subroutine
end program
call test
contains
subroutine test
- if (sub(3) .ne. 6) call abort
+ if (sub(3) .ne. 6) STOP 1
end subroutine
integer function sub(i)
integer i
common /flags/ fail
fail = .false.
call square_root
- if (fail) call abort
+ if (fail) STOP 1
end
subroutine square_root
intrinsic sqrt, dsqrt, csqrt
! array element reference
data tmp2(2)%t1(2)%a(3), tmp2(2)%t1(2)%a(1)/223,221/
- if (any(tmp2(1)%t1(1)%a .ne. (/111,0,113,0/))) call abort
- if (tmp2(1)%t1(1)%r .ne. 0.0) call abort
- if (tmp2(1)%b .ne. 10) call abort
+ if (any(tmp2(1)%t1(1)%a .ne. (/111,0,113,0/))) STOP 1
+ if (tmp2(1)%t1(1)%r .ne. 0.0) STOP 2
+ if (tmp2(1)%b .ne. 10) STOP 3
- if (any(tmp2(1)%t1(2)%a .ne. (/121,122,123,124/))) call abort
- if (tmp2(1)%t1(2)%r .ne. 0.0) call abort
- if (tmp2(1)%b .ne. 10) call abort
+ if (any(tmp2(1)%t1(2)%a .ne. (/121,122,123,124/))) STOP 4
+ if (tmp2(1)%t1(2)%r .ne. 0.0) STOP 5
+ if (tmp2(1)%b .ne. 10) STOP 6
- if (any(tmp2(1)%t1(3)%a .ne. (/136,137,138,139/))) call abort
- if (tmp2(1)%t1(3)%r .ne. 0.0) call abort
- if (tmp2(1)%b .ne. 10) call abort
+ if (any(tmp2(1)%t1(3)%a .ne. (/136,137,138,139/))) STOP 7
+ if (tmp2(1)%t1(3)%r .ne. 0.0) STOP 8
+ if (tmp2(1)%b .ne. 10) STOP 9
- if (any(tmp2(1)%t1(4)%a .ne. (/141,142,143,144/))) call abort
- if (tmp2(1)%t1(4)%r .ne. 0.0) call abort
- if (tmp2(1)%b .ne. 10) call abort
+ if (any(tmp2(1)%t1(4)%a .ne. (/141,142,143,144/))) STOP 10
+ if (tmp2(1)%t1(4)%r .ne. 0.0) STOP 11
+ if (tmp2(1)%b .ne. 10) STOP 12
- if (any(tmp2(2)%t1(1)%a .ne. (/0,0,0,0/))) call abort
- if (tmp2(2)%t1(1)%r .ne. 0.0) call abort
- if (tmp2(2)%b .ne. 0) call abort
+ if (any(tmp2(2)%t1(1)%a .ne. (/0,0,0,0/))) STOP 13
+ if (tmp2(2)%t1(1)%r .ne. 0.0) STOP 14
+ if (tmp2(2)%b .ne. 0) STOP 15
- if (any(tmp2(2)%t1(2)%a .ne. (/221,0,223,0/))) call abort
- if (tmp2(2)%t1(2)%r .ne. 220.0) call abort
- if (tmp2(2)%b .ne. 0) call abort
+ if (any(tmp2(2)%t1(2)%a .ne. (/221,0,223,0/))) STOP 16
+ if (tmp2(2)%t1(2)%r .ne. 220.0) STOP 17
+ if (tmp2(2)%b .ne. 0) STOP 18
- if (any(tmp2(2)%t1(3)%a .ne. (/5,5,233,234/))) call abort
- if (tmp2(2)%t1(3)%r .ne. 0.0) call abort
- if (tmp2(2)%b .ne. 0) call abort
+ if (any(tmp2(2)%t1(3)%a .ne. (/5,5,233,234/))) STOP 19
+ if (tmp2(2)%t1(3)%r .ne. 0.0) STOP 20
+ if (tmp2(2)%b .ne. 0) STOP 21
- if (any(tmp2(2)%t1(4)%a .ne. (/241,242,5,5/))) call abort
- if (tmp2(2)%t1(4)%r .ne. 0.0) call abort
- if (tmp2(2)%b .ne. 0) call abort
+ if (any(tmp2(2)%t1(4)%a .ne. (/241,242,5,5/))) STOP 22
+ if (tmp2(2)%t1(4)%r .ne. 0.0) STOP 23
+ if (tmp2(2)%b .ne. 0) STOP 24
end
subroutine sub2()
real r,t
data i,j,r,k,t,b(5),b(2),((a(i,j),i=1,4,1),j=4,1,-1)/1,2,3,4,5,5,2,&
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16/
- if ((i.ne.1) .and. (j.ne.2).and.(k.ne.4)) call abort
- if ((r.ne.3.0).and.(t.ne.5.0)) call abort
- if (any(b.ne.(/0,2,0,0,5,0,0,0,0,0/))) call abort
- if (any(a.ne.reshape((/13,14,15,16,9,10,11,12,5,6,7,8,1,2,3,4/),(/4,4/)))) call abort
+ if ((i.ne.1) .and. (j.ne.2).and.(k.ne.4)) STOP 25
+ if ((r.ne.3.0).and.(t.ne.5.0)) STOP 26
+ if (any(b.ne.(/0,2,0,0,5,0,0,0,0,0/))) STOP 27
+ if (any(a.ne.reshape((/13,14,15,16,9,10,11,12,5,6,7,8,1,2,3,4/),(/4,4/)))) STOP 28
end
data a(:), b%i /1, 2, 3, 4, 5, 6/
data c(1, :), c(2, :) /7, 8, 9, 10/
- if (any (a .ne. (/1, 2, 3/))) call abort ()
- if (any (b%i .ne. (/4, 5, 6/))) call abort ()
+ if (any (a .ne. (/1, 2, 3/))) STOP 1
+ if (any (b%i .ne. (/4, 5, 6/))) STOP 2
if ((any (c(1, :) .ne. (/7, 8/))) &
- .or. (any (c(2,:) .ne. (/9, 10/)))) call abort ()
+ .or. (any (c(2,:) .ne. (/9, 10/)))) STOP 3
end program
DATA d /2*'1234'/
DATA e(4:4), e(1:3) /'45', '123A'/
-IF (a.NE.'aab ') CALL abort()
-IF (b.NE.' AAA ') CALL abort()
-IF (c.NE.'12') CALL abort()
-IF (d(1).NE.d(2) .OR. d(1).NE.'1234') CALL abort()
-IF (e.NE.'1234') CALL abort()
+IF (a.NE.'aab ') STOP 1
+IF (b.NE.' AAA ') STOP 2
+IF (c.NE.'12') STOP 3
+IF (d(1).NE.d(2) .OR. d(1).NE.'1234') STOP 4
+IF (e.NE.'1234') STOP 5
END
DATA A /'A',"A",'A'/
DATA B /3*'A'/
DATA C /'A', 2*'A'/
- IF (ANY(A.NE.B).OR.ANY(A.NE.C)) CALL ABORT
+ IF (ANY(A.NE.B).OR.ANY(A.NE.C)) STOP 1
END
Current = Perm(Current(1), Current(2))%Next
End Do
- if (any(results .ne. reshape ((/2,2,1,2,2,1,1,1/), (/2, 4/)))) call abort
+ if (any(results .ne. reshape ((/2,2,1,2,2,1,1,1/), (/2, 4/)))) STOP 1
! 100 Format( 2I3, '--->', 2I3)
DeAllocate (Perm)
type (t), dimension(2) :: var3
type (t), dimension(2) :: var4 = (/t(7, 9), t(8, 6)/)
- if (var%i .ne. 1 .or. var%j .ne. 2) call abort
- if (var2%j .ne. 4) call abort
+ if (var%i .ne. 1 .or. var%j .ne. 2) STOP 1
+ if (var2%j .ne. 4) STOP 2
var2 = t(6, 5)
- if (var2%i .ne. 6 .or. var2%j .ne. 5) call abort
+ if (var2%i .ne. 6 .or. var2%j .ne. 5) STOP 3
- if ((var3(1)%j .ne. 4) .or. (var3(2)%j .ne. 4)) call abort
+ if ((var3(1)%j .ne. 4) .or. (var3(2)%j .ne. 4)) STOP 4
if ((var4(1)%i .ne. 7) .or. (var4(2)%i .ne. 8) &
- .or. (var4(1)%j .ne. 9) .or. (var4(2)%j .ne. 6)) call abort
+ .or. (var4(1)%j .ne. 9) .or. (var4(2)%j .ne. 6)) STOP 5
! Non-constant constructor
n = 1
m = 5
var2 = t(n, n + m)
- if (var2%i .ne. 1 .or. var2%j .ne. 6) call abort
+ if (var2%i .ne. 1 .or. var2%j .ne. 6) STOP 6
end program
type (foo) :: v
- if ((v%b .ne. 123) .or. any (v%a .ne. 42)) call abort ();
+ if ((v%b .ne. 123) .or. any (v%a .ne. 42)) STOP 1;
end program
type (xyz) :: a !! ok
type (xyz) b !!! not initialized !!!
- if (a%x.ne.123) call abort
- if (b%x.ne.123) call abort
+ if (a%x.ne.123) STOP 1
+ if (b%x.ne.123) STOP 2
end
subroutine foo(a)
type (t), intent(in) :: a
- if (a%i .ne. 5) call abort
+ if (a%i .ne. 5) STOP 1
end subroutine
end program
integer, pointer, dimension(:) :: d => NULL()
end type t
type (t) :: p
- if (associated(p%a)) call abort()
- if (associated(p%b)) call abort()
-! if (associated(p%c)) call abort()
- if (associated(p%d)) call abort()
+ if (associated(p%a)) STOP 1
+ if (associated(p%b)) STOP 2
+! if (associated(p%c)) STOP 3
+ if (associated(p%d)) STOP 4
end
write (buf1, *), xyz(1)%x, xyz(1)%y, xyz(1)%z
! Use function call to ensure it is only evaluated once
write (buf2, *), xyz(bar())
- if (buf1.ne.buf2) call abort
+ if (buf1.ne.buf2) STOP 1
write (buf1, *), abcdef
write (buf2, *), abcdef%a, abcdef%b, abcdef%c, abcdef%d, abcdef%e, abcdef%f
write (buf3, *), abcdef%a, abcdef%b, abcdef%c%x, abcdef%c%y, &
abcdef%c%z, abcdef%d, abcdef%e, abcdef%f
- if (buf1.ne.buf2) call abort
- if (buf1.ne.buf3) call abort
+ if (buf1.ne.buf2) STOP 2
+ if (buf1.ne.buf3) STOP 3
call foo(xyz(1))
type (xyz_type) t
write (buf1, *), t%x, t%y, t%z
write (buf2, *), t
- if (buf1.ne.buf2) call abort
+ if (buf1.ne.buf2) STOP 4
end subroutine foo
integer function bar()
e1%rp%value = 44
e1%rp%rp%value = 55
- if (r1%r1p%value .ne. 22) call abort
- if (r2%r2p%value .ne. 11) call abort
- if (e1%value .ne. 33) call abort
- if (e2%value .ne. 44) call abort
- if (e3%value .ne. 55) call abort
- if (r1%value .ne. 11) call abort
- if (r2%value .ne. 22) call abort
+ if (r1%r1p%value .ne. 22) STOP 1
+ if (r2%r2p%value .ne. 11) STOP 2
+ if (e1%value .ne. 33) STOP 3
+ if (e2%value .ne. 44) STOP 4
+ if (e3%value .ne. 55) STOP 5
+ if (r1%value .ne. 11) STOP 6
+ if (r2%value .ne. 22) STOP 7
end
type (init_type) :: is_init = init_type (10, 11)
integer i;
- if ((def_init%i .ne. 13) .or. (def_init%j .ne. 14)) call abort
- if ((is_init%i .ne. 10) .or. (is_init%j .ne. 11)) call abort
+ if ((def_init%i .ne. 13) .or. (def_init%j .ne. 14)) STOP 1
+ if ((is_init%i .ne. 10) .or. (is_init%j .ne. 11)) STOP 2
! Passing a component as a parameter tests getting the addr of a component
call test_call(def_init%i)
var%c = "Hello World"
- if (var%c .ne. "Hello World") call abort
+ if (var%c .ne. "Hello World") STOP 3
var%r%a(:, :) = 0
var%ca(:, :)%s = 0
var%r%a(1, 1) = 42
var%r%a(4, 5) = 43
var%ca(:, :)%s = var%r%a(:, 1:5:2)
- if (var%ca(1, 1)%s .ne. 42) call abort
- if (var%ca(4, 3)%s .ne. 43) call abort
+ if (var%ca(1, 1)%s .ne. 42) STOP 4
+ if (var%ca(4, 3)%s .ne. 43) STOP 5
contains
subroutine test_call (p)
integer p
- if (p .ne. 13) call abort
+ if (p .ne. 13) STOP 6
end subroutine
end program
READ(10,REC=I,ERR=10)J
IF (J.NE.I) THEN
! PRINT*,' READ ',J,' EXPECTED ',I
- CALL ABORT
+ STOP 1
ENDIF
ENDDO
CLOSE(10,STATUS='DELETE')
STOP
10 CONTINUE
! PRINT*,' ERR= RETURN FROM READ OR WRITE'
- CALL ABORT
+ STOP 2
END
a = reshape ((/2, 3, 4, 5, 6, 7, 8, 9/), (/2, 4/))
b = 0
b(2, :) = e_fn (a(1, :), 1)
- if (any (b .ne. reshape ((/0, 1, 0, 3, 0, 5, 0, 7/), (/2, 4/)))) call abort
+ if (any (b .ne. reshape ((/0, 1, 0, 3, 0, 5, 0, 7/), (/2, 4/)))) STOP 1
a = e_fn (a(:, 4:1:-1), 1 + b)
- if (any (a .ne. reshape ((/7, 7, 5, 3, 3, -1, 1, -5/), (/2, 4/)))) call abort
+ if (any (a .ne. reshape ((/7, 7, 5, 3, 3, -1, 1, -5/), (/2, 4/)))) STOP 2
! This tests intrinsic elemental conversion functions.
c = 2 * a(1, 1)
- if (any (c .ne. 14)) call abort
+ if (any (c .ne. 14)) STOP 3
! This triggered bug due to building ss chains in the wrong order.
b = 0;
a = a - e_fn (a, b)
- if (any (a .ne. 0)) call abort
+ if (any (a .ne. 0)) STOP 4
! Check expressions involving constants
a = e_fn (b + 1, 1)
- if (any (a .ne. 0)) call abort
+ if (any (a .ne. 0)) STOP 5
contains
elemental integer(kind=4) function e_fn (p, q)
!
IF (A10VK.NE.'') THEN
! PRINT*,A10VK
- CALL ABORT
+ STOP 1
ENDIF
END
else
i = 2
endif
- if (i .ne. 2) call abort()
+ if (i .ne. 2) STOP 1
if (i .eq. 0) then
elseif (i .eq. 2) then
i = 3
end if
- if (i .ne. 3) call abort()
+ if (i .ne. 3) STOP 2
end
integer f1, e1, f5, e5
real f2, e2, f6, e6, f7, e7, f8, e8, f9, e9
double precision f3, e3, f4, e4, d
- if (f1 (6) .ne. 21) call abort ()
- if (e1 (7) .ne. 49) call abort ()
- if (f2 () .ne. 45) call abort ()
- if (e2 () .ne. 45) call abort ()
- if (f3 () .ne. 47) call abort ()
- if (e3 () .ne. 47) call abort ()
+ if (f1 (6) .ne. 21) STOP 1
+ if (e1 (7) .ne. 49) STOP 2
+ if (f2 () .ne. 45) STOP 3
+ if (e2 () .ne. 45) STOP 4
+ if (f3 () .ne. 47) STOP 5
+ if (e3 () .ne. 47) STOP 6
d = 17
- if (f4 (d) .ne. 32) call abort ()
- if (e4 (d) .ne. 59) call abort ()
- if (f5 () .ne. 45) call abort ()
- if (e5 () .ne. 45) call abort ()
- if (f6 () .ne. 47) call abort ()
- if (e6 () .ne. 47) call abort ()
- if (f7 () .ne. 163) call abort ()
- if (e7 () .ne. 163) call abort ()
- if (f8 () .ne. 115) call abort ()
- if (e8 () .ne. 115) call abort ()
- if (f9 () .ne. 119) call abort ()
- if (e9 () .ne. 119) call abort ()
+ if (f4 (d) .ne. 32) STOP 7
+ if (e4 (d) .ne. 59) STOP 8
+ if (f5 () .ne. 45) STOP 9
+ if (e5 () .ne. 45) STOP 10
+ if (f6 () .ne. 47) STOP 11
+ if (e6 () .ne. 47) STOP 12
+ if (f7 () .ne. 163) STOP 13
+ if (e7 () .ne. 163) STOP 14
+ if (f8 () .ne. 115) STOP 15
+ if (e8 () .ne. 115) STOP 16
+ if (f9 () .ne. 119) STOP 17
+ if (e9 () .ne. 119) STOP 18
end
end
program entrytest
- if (foo () .ne. 2) call abort ()
- if (bar () .ne. 3) call abort ()
+ if (foo () .ne. 2) STOP 1
+ if (bar () .ne. 3) STOP 2
end
end
program entrytest
- if (i (8).ne.8) call abort
- if (i (4).ne.6) call abort
- if (j (0).ne.3) call abort
- if (j (7).ne.7) call abort
+ if (i (8).ne.8) STOP 1
+ if (i (4).ne.6) STOP 2
+ if (j (0).ne.3) STOP 3
+ if (j (7).ne.7) STOP 4
end
i = 2
j = 6
ret = f1 (str, i, j)
- if ((i .ne. 2) .or. (j .ne. 6)) call abort ()
- if (ret .ne. 'BCDEF') call abort ()
+ if ((i .ne. 2) .or. (j .ne. 6)) STOP 1
+ if (ret .ne. 'BCDEF') STOP 2
ret = e1 (str, i, j)
- if ((i .ne. 3) .or. (j .ne. 5)) call abort ()
- if (ret .ne. 'CDE') call abort ()
+ if ((i .ne. 3) .or. (j .ne. 5)) STOP 3
+ if (ret .ne. 'CDE') STOP 4
ret = e2 (str, i, j)
- if ((i .ne. 3) .or. (j .ne. 4)) call abort ()
- if (ret .ne. 'CD') call abort ()
- if (f3 () .ne. 'ABCDE') call abort ()
- if (e3 (1) .ne. 'abcde') call abort ()
- if (e4 (1) .ne. 'abcde') call abort ()
- if (e3 (0) .ne. 'UVWXY') call abort ()
- if (e4 (0) .ne. 'UVWXY') call abort ()
+ if ((i .ne. 3) .or. (j .ne. 4)) STOP 5
+ if (ret .ne. 'CD') STOP 6
+ if (f3 () .ne. 'ABCDE') STOP 7
+ if (e3 (1) .ne. 'abcde') STOP 8
+ if (e4 (1) .ne. 'abcde') STOP 9
+ if (e3 (0) .ne. 'UVWXY') STOP 10
+ if (e4 (0) .ne. 'UVWXY') STOP 11
end program
subroutine f1 (n, *, i)
integer n, i
- if (i .ne. 42) call abort ()
+ if (i .ne. 42) STOP 1
entry e1 (n, *)
if (n .eq. 1) return 1
if (n .eq. 2) return
return
entry e2 (n, i, *, *, *)
- if (i .ne. 46) call abort ()
+ if (i .ne. 46) STOP 2
if (n .ge. 4) return
return n
entry e3 (n, i)
- if ((i .ne. 48) .or. (n .ne. 61)) call abort ()
+ if ((i .ne. 48) .or. (n .ne. 61)) STOP 3
end subroutine
program alt_return
call f1 (1, *10, 42)
20 continue
- call abort ()
+ STOP 4
10 continue
call f1 (2, *20, 42)
call f1 (3, *20, 42)
call e1 (2, *20)
call e1 (1, *30)
- call abort ()
+ STOP 5
30 continue
call e2 (1, 46, *40, *20, *20)
- call abort ()
+ STOP 6
40 continue
call e2 (2, 46, *20, *50, *20)
- call abort ()
+ STOP 7
50 continue
call e2 (3, 46, *20, *20, *60)
- call abort ()
+ STOP 8
60 continue
call e2 (4, 46, *20, *20, *20)
call e3 (61, 48)
double precision e1, g4
logical e2, e3, f4
complex f2, g3
- if (f1 (6) .ne. 21) call abort ()
- if (e1 (7) .ne. 49) call abort ()
- if (f2 (0) .ne. 45) call abort ()
- if (.not. e2 (45)) call abort ()
- if (e2 (46)) call abort ()
- if (f3 (17) .ne. 32) call abort ()
- if (.not. e3 (42)) call abort ()
- if (e3 (41)) call abort ()
- if (g3 (12) .ne. 23) call abort ()
- if (.not. f4 (-5)) call abort ()
- if (e4 (0) .ne. 16) call abort ()
- if (g4 (2) .ne. 19) call abort ()
+ if (f1 (6) .ne. 21) STOP 1
+ if (e1 (7) .ne. 49) STOP 2
+ if (f2 (0) .ne. 45) STOP 3
+ if (.not. e2 (45)) STOP 4
+ if (e2 (46)) STOP 5
+ if (f3 (17) .ne. 32) STOP 6
+ if (.not. e3 (42)) STOP 7
+ if (e3 (41)) STOP 8
+ if (g3 (12) .ne. 23) STOP 9
+ if (.not. f4 (-5)) STOP 10
+ if (e4 (0) .ne. 16) STOP 11
+ if (g4 (2) .ne. 19) STOP 12
end
i = 2
j = 6
ret = f1 (str, i, j)
- if ((i .ne. 2) .or. (j .ne. 6)) call abort ()
- if (ret .ne. 'BCDEF') call abort ()
+ if ((i .ne. 2) .or. (j .ne. 6)) STOP 1
+ if (ret .ne. 'BCDEF') STOP 2
ret = e1 (str, i, j)
- if ((i .ne. 3) .or. (j .ne. 5)) call abort ()
- if (ret .ne. 'CDE') call abort ()
+ if ((i .ne. 3) .or. (j .ne. 5)) STOP 3
+ if (ret .ne. 'CDE') STOP 4
ret = e2 (str, i, j)
- if ((i .ne. 3) .or. (j .ne. 4)) call abort ()
- if (ret .ne. 'CD') call abort ()
- if (f3 () .ne. 'ABCDE') call abort ()
- if (e3 (1) .ne. 'abcde') call abort ()
- if (e4 (1) .ne. 'abcde') call abort ()
- if (e3 (0) .ne. 'UVWXY') call abort ()
- if (e4 (0) .ne. 'UVWXY') call abort ()
+ if ((i .ne. 3) .or. (j .ne. 4)) STOP 5
+ if (ret .ne. 'CD') STOP 6
+ if (f3 () .ne. 'ABCDE') STOP 7
+ if (e3 (1) .ne. 'abcde') STOP 8
+ if (e4 (1) .ne. 'abcde') STOP 9
+ if (e3 (0) .ne. 'UVWXY') STOP 10
+ if (e4 (0) .ne. 'UVWXY') STOP 11
end program
double precision, dimension (2, 2) :: d, e
i (:, :) = 6
j = f1 (i)
- if (any (j .ne. 21)) call abort ()
+ if (any (j .ne. 21)) STOP 1
i (:, :) = 7
j = e1 (i)
j (:, :) = 49
- if (any (j .ne. 49)) call abort ()
+ if (any (j .ne. 49)) STOP 2
r = f2 ()
- if (any (r .ne. 45)) call abort ()
+ if (any (r .ne. 45)) STOP 3
r = e2 ()
- if (any (r .ne. 45)) call abort ()
+ if (any (r .ne. 45)) STOP 4
e = f3 ()
- if (any (e .ne. 47)) call abort ()
+ if (any (e .ne. 47)) STOP 5
e = e3 ()
- if (any (e .ne. 47)) call abort ()
+ if (any (e .ne. 47)) STOP 6
d (:, :) = 17
e = f4 (d)
- if (any (e .ne. 32)) call abort ()
+ if (any (e .ne. 32)) STOP 7
e = e4 (d)
- if (any (e .ne. 59)) call abort ()
+ if (any (e .ne. 59)) STOP 8
j = f5 ()
- if (any (j .ne. 45)) call abort ()
+ if (any (j .ne. 45)) STOP 9
j = e5 ()
- if (any (j .ne. 45)) call abort ()
+ if (any (j .ne. 45)) STOP 10
r = f6 ()
- if (any (r .ne. 47)) call abort ()
+ if (any (r .ne. 47)) STOP 11
r = e6 ()
- if (any (r .ne. 47)) call abort ()
+ if (any (r .ne. 47)) STOP 12
end
end function
end interface
double precision d
- if (f1 (6) .ne. 21) call abort ()
- if (e1 (7) .ne. 49) call abort ()
- if (f2 () .ne. 45) call abort ()
- if (e2 () .ne. 45) call abort ()
- if (f3 () .ne. 47) call abort ()
- if (e3 () .ne. 47) call abort ()
+ if (f1 (6) .ne. 21) STOP 1
+ if (e1 (7) .ne. 49) STOP 2
+ if (f2 () .ne. 45) STOP 3
+ if (e2 () .ne. 45) STOP 4
+ if (f3 () .ne. 47) STOP 5
+ if (e3 () .ne. 47) STOP 6
d = 17
- if (f4 (d) .ne. 32) call abort ()
- if (e4 (d) .ne. 59) call abort ()
- if (f5 () .ne. 45) call abort ()
- if (e5 () .ne. 45) call abort ()
- if (f6 () .ne. 47) call abort ()
- if (e6 () .ne. 47) call abort ()
+ if (f4 (d) .ne. 32) STOP 7
+ if (e4 (d) .ne. 59) STOP 8
+ if (f5 () .ne. 45) STOP 9
+ if (e5 () .ne. 45) STOP 10
+ if (f6 () .ne. 47) STOP 11
+ if (e6 () .ne. 47) STOP 12
end
type (t) :: f, g, res
res = f (42)
-if (res%i /= 42) call abort ()
+if (res%i /= 42) STOP 1
res = g (1.)
-if (any (res%x /= 1.)) call abort ()
+if (any (res%x /= 1.)) STOP 2
end
program entrytest
integer f1, e1
real f2, e2
- if (f1 (6) .ne. 21) call abort ()
- if (e1 () .ne. 42) call abort ()
- if (f2 () .ne. 45) call abort ()
- if (e2 () .ne. 45) call abort ()
+ if (f1 (6) .ne. 21) STOP 1
+ if (e1 () .ne. 42) STOP 2
+ if (f2 () .ne. 45) STOP 3
+ if (e2 () .ne. 45) STOP 4
end
end enum
- if (red /= 0 ) call abort
- if (yellow /= 1) call abort
- if (blue /= 2) call abort
- if (green /= 3) call abort
+ if (red /= 0 ) STOP 1
+ if (yellow /= 1) STOP 2
+ if (blue /= 2) STOP 3
+ if (green /= 3) STOP 4
- if (a /= 0 ) call abort
- if (b /= 1) call abort
- if (c /= 10) call abort
- if (d /= 11) call abort
+ if (a /= 0 ) STOP 5
+ if (b /= 1) STOP 6
+ if (c /= 10) STOP 7
+ if (d /= 11) STOP 8
end program main
end enum
- if (red /= 4 ) call abort
- if (yellow /= (red + 1)) call abort
- if (blue /= (yellow + 1)) call abort
- if (green /= (blue + 1)) call abort
+ if (red /= 4 ) STOP 1
+ if (yellow /= (red + 1)) STOP 2
+ if (blue /= (yellow + 1)) STOP 3
+ if (green /= (blue + 1)) STOP 4
- if (sun /= -10 ) call abort
- if (mon /= (sun + 1)) call abort
- if (tue /= (mon + 1)) call abort
- if (wed /= 10) call abort
- if (sat /= (wed+1)) call abort
+ if (sun /= -10 ) STOP 5
+ if (mon /= (sun + 1)) STOP 6
+ if (tue /= (mon + 1)) STOP 7
+ if (wed /= 10) STOP 8
+ if (sat /= (wed+1)) STOP 9
end program main
end enum
- if (red /= 0 ) call abort
- if (yellow /= 255) call abort
- if (blue /= 256) call abort
+ if (red /= 0 ) STOP 1
+ if (yellow /= 255) STOP 2
+ if (blue /= 256) STOP 3
- if (r /= 0 ) call abort
- if (y /= 32767) call abort
- if (b /= 32768) call abort
+ if (r /= 0 ) STOP 4
+ if (y /= 32767) STOP 5
+ if (b /= 32768) STOP 6
- if (kind (red) /= 4) call abort
- if (kind (yellow) /= 4) call abort
- if (kind (blue) /= 4) call abort
+ if (kind (red) /= 4) STOP 7
+ if (kind (yellow) /= 4) STOP 8
+ if (kind (blue) /= 4) STOP 9
- if (kind(r) /= 4 ) call abort
- if (kind(y) /= 4) call abort
- if (kind(b) /= 4) call abort
+ if (kind(r) /= 4 ) STOP 10
+ if (kind(y) /= 4) STOP 11
+ if (kind(b) /= 4) STOP 12
- if (aa /= 0 ) call abort
- if (bb /= 65535) call abort
- if (cc /= 65536) call abort
+ if (aa /= 0 ) STOP 13
+ if (bb /= 65535) STOP 14
+ if (cc /= 65536) STOP 15
- if (kind (aa) /= 4 ) call abort
- if (kind (bb) /= 4) call abort
- if (kind (cc) /= 4) call abort
+ if (kind (aa) /= 4 ) STOP 16
+ if (kind (bb) /= 4) STOP 17
+ if (kind (cc) /= 4) STOP 18
- if (m /= 0 ) call abort
- if (n /= 2147483645) call abort
- if (o /= 2147483646) call abort
+ if (m /= 0 ) STOP 19
+ if (n /= 2147483645) STOP 20
+ if (o /= 2147483646) STOP 21
- if (kind (m) /= 4 ) call abort
- if (kind (n) /= 4) call abort
- if (kind (o) /= 4) call abort
+ if (kind (m) /= 4 ) STOP 22
+ if (kind (n) /= 4) STOP 23
+ if (kind (o) /= 4) STOP 24
end program main
use mod
implicit none
- if (red /= 0 ) call abort
- if (yellow /= 1) call abort
- if (blue /= 2) call abort
- if (green /= 3) call abort
+ if (red /= 0 ) STOP 1
+ if (yellow /= 1) STOP 2
+ if (blue /= 2) STOP 3
+ if (green /= 3) STOP 4
end program main
k = 3
l = 4
- if ((a .ne. 3.0) .or. (b .ne. 3.0) .or. (c .ne. 3.0)) call abort ()
+ if ((a .ne. 3.0) .or. (b .ne. 3.0) .or. (c .ne. 3.0)) STOP 1
if ((i .ne. 4) .or. (j .ne. 4) .or. (k .ne. 4) .or. (l .ne. 4)) &
- call abort ()
+ STOP 2
end program
character*4 e
equivalence (c(1:1), d(1)), (c(3:5), e(2:4)), (c(6:6), f(2))
c='abcdefgh'
- if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') call abort
- if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') call abort
+ if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') STOP 1
+ if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') STOP 2
end subroutine test1
subroutine test2
equivalence (c(1:1), d(1)), (c(3:5), e(2:4)), (c(6:6), f(2))
dimension d(2), f(2)
character*4 e
c='abcdefgh'
- if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') call abort
- if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') call abort
+ if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') STOP 3
+ if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') STOP 4
end subroutine test2
subroutine test3
character*8 c
equivalence (c(1:1), d(1)), (c(3:5), e(2:4)), (c(6:6), f(2))
dimension d(2), f(2)
c='abcdefgh'
- if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') call abort
- if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') call abort
+ if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') STOP 5
+ if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') STOP 6
end subroutine test3
subroutine test4
dimension d(2), f(2)
character*1 d, f
character*4 e
c='abcdefgh'
- if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') call abort
- if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') call abort
+ if (c.ne.'abcdefgh'.or.d(1).ne.'a'.or.d(2).ne.'b') STOP 7
+ if (e.ne.'bcde'.or.f(1).ne.'e'.or.f(2).ne.'f') STOP 8
end subroutine test4
program main
call test1
type(t) :: tc, td
equivalence (tc, td)
tc%c='abcdefgh'
- if (tc%c.ne.'abcdefgh'.or.td%c(1:1).ne.'a') call abort
+ if (tc%c.ne.'abcdefgh'.or.td%c(1:1).ne.'a') STOP 1
end subroutine test1
program main
call test1
equivalence (c(6:6), f(2)(:))
d(1)='AB'
c='abcdefgh'
- if (c.ne.'abcdefgh'.or.d(1).ne.'Aa'.or.d(2).ne.'bc') call abort
- if (e.ne.'bcde'.or.f(1).ne.'de'.or.f(2).ne.'fg') call abort
+ if (c.ne.'abcdefgh'.or.d(1).ne.'Aa'.or.d(2).ne.'bc') STOP 1
+ if (e.ne.'bcde'.or.f(1).ne.'de'.or.f(2).ne.'fg') STOP 2
end subroutine test1
subroutine test2
equivalence (c(1:1), d(1)(2:2)), (c(3:5), e(2:4))
character*4 e
d(1)='AB'
c='abcdefgh'
- if (c.ne.'abcdefgh'.or.d(1).ne.'Aa'.or.d(2).ne.'bc') call abort
- if (e.ne.'bcde'.or.f(1).ne.'de'.or.f(2).ne.'fg') call abort
+ if (c.ne.'abcdefgh'.or.d(1).ne.'Aa'.or.d(2).ne.'bc') STOP 3
+ if (e.ne.'bcde'.or.f(1).ne.'de'.or.f(2).ne.'fg') STOP 4
end subroutine test2
subroutine test3
character*8 c
dimension d(2), f(2)
d(1)='AB'
c='abcdefgh'
- if (c.ne.'abcdefgh'.or.d(1).ne.'Aa'.or.d(2).ne.'bc') call abort
- if (e.ne.'bcde'.or.f(1).ne.'de'.or.f(2).ne.'fg') call abort
+ if (c.ne.'abcdefgh'.or.d(1).ne.'Aa'.or.d(2).ne.'bc') STOP 5
+ if (e.ne.'bcde'.or.f(1).ne.'de'.or.f(2).ne.'fg') STOP 6
end subroutine test3
subroutine test4
dimension d(2), f(2)
character*4 e
d(1)='AB'
c='abcdefgh'
- if (c.ne.'abcdefgh'.or.d(1).ne.'Aa'.or.d(2).ne.'bc') call abort
- if (e.ne.'bcde'.or.f(1).ne.'de'.or.f(2).ne.'fg') call abort
+ if (c.ne.'abcdefgh'.or.d(1).ne.'Aa'.or.d(2).ne.'bc') STOP 7
+ if (e.ne.'bcde'.or.f(1).ne.'de'.or.f(2).ne.'fg') STOP 8
end subroutine test4
program main
call test1
equivalence (xs,ys)
data xs /10*"abcdefghij"/
- if (y.ne."abcdefghij") call abort
- if (ys(1).ne."abcdefghij") call abort
- if (ys(10).ne."abcdefghij") call abort
+ if (y.ne."abcdefghij") STOP 1
+ if (ys(1).ne."abcdefghij") STOP 2
+ if (ys(10).ne."abcdefghij") STOP 3
end
subroutine test0
integer :: x = 123
integer :: y
equivalence (x,y)
- if (y.ne.123) call abort
+ if (y.ne.123) STOP 4
end
subroutine test1
integer :: z = 3
equivalence (a(1), x)
equivalence (a(3), z)
- if (x.ne.1) call abort
- if (z.ne.3) call abort
- if (a(1).ne.1) call abort
- if (a(3).ne.3) call abort
+ if (x.ne.1) STOP 5
+ if (z.ne.3) STOP 6
+ if (a(1).ne.1) STOP 7
+ if (a(3).ne.3) STOP 8
end
subroutine test2
integer :: a(3) = 123
equivalence (a(1), x)
equivalence (a(3), z)
- if (x.ne.123) call abort
- if (z.ne.123) call abort
+ if (x.ne.123) STOP 9
+ if (z.ne.123) STOP 10
end
subroutine test3
integer :: a(3)
equivalence (a(1),x), (a(2),y), (a(3),z)
data a(1) /1/, a(3) /3/
- if (x.ne.1) call abort
-!!$ if (y.ne.2) call abort
- if (z.ne.3) call abort
+ if (x.ne.1) STOP 11
+!!$ if (y.ne.2) STOP 12
+ if (z.ne.3) STOP 13
end
subroutine test4
equivalence (a(2),b(1)), (b(2),c)
data a/1,2/
data c/3/
- if (b(1).ne.2) call abort
- if (b(2).ne.3) call abort
+ if (b(1).ne.2) STOP 14
+ if (b(2).ne.3) STOP 15
end
!!$subroutine test5
!!$ data a(1)/1/
!!$ data b(1)/2/
!!$ data c/3/
-!!$ if (a(2).ne.2) call abort
-!!$ if (b(2).ne.3) call abort
+!!$ if (a(2).ne.2) STOP 16
+!!$ if (b(2).ne.3) STOP 17
!!$ print *, "Passed test5"
!!$end
RCON22 = .9
WRITE(LINE,'(F2.0,1H,,F2.1)')RCON21,RCON22
READ(LINE,'(F2.0,1X,F2.1)')XRCON21,XRCON22
- IF (RCON21.NE.XRCON21) CALL ABORT
- IF (RCON22.NE.XRCON22) CALL ABORT
+ IF (RCON21.NE.XRCON21) STOP 1
+ IF (RCON22.NE.XRCON22) STOP 2
END
b(i) = sum (a(:, i))
end forall
- if (b(1) .ne. 6) call abort
- if (b(2) .ne. 15) call abort
- if (b(3) .ne. 24) call abort
+ if (b(1) .ne. 6) STOP 1
+ if (b(2) .ne. 15) STOP 2
+ if (b(3) .ne. 24) STOP 3
end program
forall (x = 1:3, j = 1:4)
a (x,j) = j
end forall
- if (any (a.ne.reshape ((/1,1,1,2,2,2,3,3,3,4,4,4/), (/3,4/)))) call abort
- if ((x.ne.-1).or.(j.ne.100)) call abort
+ if (any (a.ne.reshape ((/1,1,1,2,2,2,3,3,3,4,4,4/), (/3,4/)))) STOP 1
+ if ((x.ne.-1).or.(j.ne.100)) STOP 2
call actual_variable_2 (x, j, a)
end subroutine
b(x,j) = j
end forall
- if (any (a.ne.reshape ((/1,1,1,2,2,2,3,3,3,4,4,4/), (/3,4/)))) call abort
- if (any (b.ne.reshape ((/1,1,1,2,2,2,3,3,3,4,4,4/), (/3,4/)))) call abort
- if ((x.ne.-1).or.(j.ne.100)) call abort
+ if (any (a.ne.reshape ((/1,1,1,2,2,2,3,3,3,4,4,4/), (/3,4/)))) STOP 3
+ if (any (b.ne.reshape ((/1,1,1,2,2,2,3,3,3,4,4,4/), (/3,4/)))) STOP 4
+ if ((x.ne.-1).or.(j.ne.100)) STOP 5
end subroutine
subroutine negative_stride ()
forall (x = 3:1:-1, j = 4:1:-1)
a(x,j) = j + x
end forall
- if (any (a.ne.reshape ((/2,3,4,3,4,5,4,5,6,5,6,7/), (/3,4/)))) call abort
+ if (any (a.ne.reshape ((/2,3,4,3,4,5,4,5,6,5,6,7/), (/3,4/)))) STOP 6
end subroutine
subroutine forall_index
i10=1:2)
a(i1+2*i3+4*i5+8*i7+16*i9-30,i2+2*i4+4*i6+8*i8+16*i10-30) = 1
end forall
- if ((a(5,5).ne.1).or. (a(32,32).ne.1)) call abort
+ if ((a(5,5).ne.1).or. (a(32,32).ne.1)) STOP 7
end subroutine
end
end forall
end forall
if (any (a.ne.reshape ((/0,1,2,3,-1,0,2,3,-2,-1,0,1,-3,-2,-1,0/),&
- (/4,4/)))) call abort
+ (/4,4/)))) STOP 1
end
v(i)%p(1:v(i)%s) = v(6-i)%p(1:v(i)%s)
end forall
- if (any(v(1)%p(:) .ne. (/11, 10/))) call abort
- if (any(v(2)%p(:) .ne. (/13, 14, 15, 16, 17, 18, 19, 20/))) call abort
- if (any(v(4)%p(:) .ne. (/1, 2, 3, 4, 5, 6, 19, 20/))) call abort
- if (any(v(5)%p(:) .ne. (/9, 10/))) call abort
+ if (any(v(1)%p(:) .ne. (/11, 10/))) STOP 1
+ if (any(v(2)%p(:) .ne. (/13, 14, 15, 16, 17, 18, 19, 20/))) STOP 2
+ if (any(v(4)%p(:) .ne. (/1, 2, 3, 4, 5, 6, 19, 20/))) STOP 3
+ if (any(v(5)%p(:) .ne. (/9, 10/))) STOP 4
! I should really free the memory I've allocated.
end program
.ne. reshape((/ 1, 5, 9,13,&
2, 6,10, 8,&
3, 7,11,12,&
- 4,14,15,16/),(/4,4/)))) call abort
- if (any (a(:,:,2) .ne. a(:,:,1) + 16)) call abort
+ 4,14,15,16/),(/4,4/)))) STOP 1
+ if (any (a(:,:,2) .ne. a(:,:,1) + 16)) STOP 2
end
t(i) = i
enddo
- if (any(q(1)%p .ne. (/1,2,3,4,5/))) call abort
- if (any(q(2)%p .ne. (/1,2,3,4,5/))) call abort
- if (any(q(3)%p .ne. (/6,7,8,9,10/))) call abort
- if (any(q(4)%p .ne. (/11,12,13,14,15/))) call abort
- if (any(q(5)%p .ne. (/16,17,18,19,20/))) call abort
+ if (any(q(1)%p .ne. (/1,2,3,4,5/))) STOP 1
+ if (any(q(2)%p .ne. (/1,2,3,4,5/))) STOP 2
+ if (any(q(3)%p .ne. (/6,7,8,9,10/))) STOP 3
+ if (any(q(4)%p .ne. (/11,12,13,14,15/))) STOP 4
+ if (any(q(5)%p .ne. (/16,17,18,19,20/))) STOP 5
end
do i = 1,5
- if (q(i)%p .ne. t(6 - i)) call abort
+ if (q(i)%p .ne. t(6 - i)) STOP 1
end do
end
s = r
end if
end if
- if (a (i, j, k, l) /= r) call abort ()
- if (c (i, j, k, l) /= s) call abort ()
+ if (a (i, j, k, l) /= r) STOP 1
+ if (c (i, j, k, l) /= s) STOP 2
end do
end do
end do
end do
- if (any (a /= b .or. c /= d)) call abort ()
+ if (any (a /= b .or. c /= d)) STOP 3
end
implicit none
p = 0
call AA ()
- if (p /= 1) call abort
+ if (p /= 1) STOP 1
end
I2 = 0
CALL GETARG(I2,ARGS2)
- if (args2.ne.args) call abort
+ if (args2.ne.args) STOP 1
- if (args.eq.'') call abort
+ if (args.eq.'') STOP 2
I = 1
CALL GETARG(I,ARGS)
- if (args.ne.'') call abort
+ if (args.ne.'') STOP 3
I = -1
CALL GETARG(I,ARGS)
- if (args.ne.'') call abort
+ if (args.ne.'') STOP 4
! Assume we won't have been called with more that 4 args.
I = 4
CALL GETARG(I,ARGS)
- if (args.ne.'') call abort
+ if (args.ne.'') STOP 5
I = 1000
CALL GETARG(I,ARGS)
- if (args.ne.'') call abort
+ if (args.ne.'') STOP 6
end
CHARACTER*4 LINE
100 FORMAT (4H12H4)
WRITE(LINE,100)
- IF (LINE .NE. '12H4') call abort ()
+ IF (LINE .NE. '12H4') STOP 1
end
b4 = (/(2*cmplx(i,-i,kind=4),i=1,5)/)
call csub4(a4(5:1:-1),b4(5:1:-1),5)
aa4 = (/(cmplx(5-i+1,i-5-1,kind=4),i=1,5)/)
- if (any(aa4 /= a4)) call abort
+ if (any(aa4 /= a4)) STOP 1
bb4 = (/(2*cmplx(5-i+1,i-5-1,kind=4),i=1,5)/)
- if (any(bb4 /= b4)) call abort
+ if (any(bb4 /= b4)) STOP 2
a8 = (/(cmplx(i,-i,kind=8),i=1,5)/)
b8 = (/(2*cmplx(i,-i,kind=8),i=1,5)/)
call csub8(a8(5:1:-1),b8(5:1:-1),5)
aa8 = (/(cmplx(5-i+1,i-5-1,kind=8),i=1,5)/)
- if (any(aa8 /= a8)) call abort
+ if (any(aa8 /= a8)) STOP 3
bb8 = (/(2*cmplx(5-i+1,i-5-1,kind=8),i=1,5)/)
- if (any(bb8 /= b8)) call abort
+ if (any(bb8 /= b8)) STOP 4
i4 = (/(i, i=1,5)/)
call isub4(i4(5:1:-1),5)
ii4 = (/(5-i+1,i=1,5)/)
- if (any(ii4 /= i4)) call abort
+ if (any(ii4 /= i4)) STOP 5
i8 = (/(i,i=1,5)/)
call isub8(i8(5:1:-1),5)
ii8 = (/(5-i+1,i=1,5)/)
- if (any(ii8 /= i8)) call abort
+ if (any(ii8 /= i8)) STOP 6
end program main
complex(kind=4), dimension(n) :: aa, bb
integer :: n, i
aa = (/(cmplx(n-i+1,i-n-1,kind=4),i=1,n)/)
- if (any(aa /= a)) call abort
+ if (any(aa /= a)) STOP 7
bb = (/(2*cmplx(n-i+1,i-n-1,kind=4),i=1,5)/)
- if (any(bb /= b)) call abort
+ if (any(bb /= b)) STOP 8
a = (/(cmplx(i,-i,kind=4),i=1,5)/)
b = (/(2*cmplx(i,-i,kind=4),i=1,5)/)
end subroutine csub4
complex(kind=8), dimension(n) :: aa, bb
integer :: n, i
aa = (/(cmplx(n-i+1,i-n-1,kind=8),i=1,n)/)
- if (any(aa /= a)) call abort
+ if (any(aa /= a)) STOP 9
bb = (/(2*cmplx(n-i+1,i-n-1,kind=8),i=1,5)/)
- if (any(bb /= b)) call abort
+ if (any(bb /= b)) STOP 10
a = (/(cmplx(i,-i,kind=8),i=1,5)/)
b = (/(2*cmplx(i,-i,kind=8),i=1,5)/)
end subroutine csub8
integer(kind=4), dimension(n) :: aa
integer :: n, i
aa = (/(n-i+1,i=1,n)/)
- if (any(aa /= a)) call abort
+ if (any(aa /= a)) STOP 11
a = (/(i,i=1,5)/)
end subroutine isub4
integer(kind=8), dimension(n) :: aa
integer :: n, i
aa = (/(n-i+1,i=1,n)/)
- if (any(aa /= a)) call abort
+ if (any(aa /= a)) STOP 12
a = (/(i,i=1,5)/)
end subroutine isub8
subroutine x(a)
character(8), intent(in) :: a(:)
integer :: b(count(a < 'F'))
-if (size(b) /= 1) call abort()
+if (size(b) /= 1) STOP 1
end subroutine x
end
character(15) :: d = "Teststring"
integer, dimension(3) :: a = 1
- if (any (a .ne. 1)) call abort
- if (test(11) .ne. 42) call abort
+ if (any (a .ne. 1)) STOP 1
+ if (test(11) .ne. 42) STOP 2
! The second call should return
- if (test(0) .ne. 11) call abort
+ if (test(0) .ne. 11) STOP 3
- if (c .ne. "Hello World") call abort
- if (d .ne. "Teststring") call abort
+ if (c .ne. "Hello World") STOP 4
+ if (d .ne. "Teststring") STOP 5
end program
CHARACTER*10 ACCESS
OPEN(UNIT=9,ACCESS='SEQUENTIAL')
INQUIRE(UNIT=9,ACCESS=ACCESS,BLANK=BLANK)
- IF(BLANK.NE.'NULL') CALL ABORT
- IF(ACCESS.NE.'SEQUENTIAL') CALL ABORT
+ IF(BLANK.NE.'NULL') STOP 1
+ IF(ACCESS.NE.'SEQUENTIAL') STOP 2
CLOSE(UNIT=9,STATUS='DELETE')
END
INTEGER UNIT
OPEN(FILE='CSEQ', UNIT=23)
INQUIRE(FILE='CSEQ',NUMBER=UNIT)
- IF (UNIT.NE.23) CALL ABORT
+ IF (UNIT.NE.23) STOP 1
CLOSE(UNIT, STATUS='DELETE')
END
WRITE(UNIT=9,REC=5) 1
INQUIRE(UNIT=9,NEXTREC=NREC)
! PRINT*,NREC
- IF (NREC.NE.6) CALL ABORT
+ IF (NREC.NE.6) STOP 1
READ(UNIT=9,REC=1) MVI
INQUIRE(UNIT=9,NEXTREC=NREC)
- IF (NREC.NE.2) CALL ABORT
+ IF (NREC.NE.2) STOP 2
! PRINT*,NREC
CLOSE(UNIT=9,STATUS='DELETE')
END
INQUIRE(UNIT=10,NEXTREC=J)
IF (J.NE.2) THEN
! PRINT*,'NEXTREC RETURNED ',J,' EXPECTED 2'
- CALL ABORT
+ STOP 1
ENDIF
200 FORMAT(I4,/,I4)
WRITE(UNIT=10,REC=2,FMT=200)2,3
INQUIRE(UNIT=10,NEXTREC=J)
IF (J.NE.4) THEN
! PRINT*,'NEXTREC RETURNED ',J,' EXPECTED 4'
- CALL ABORT
+ STOP 2
ENDIF
CLOSE(UNIT=10,STATUS='DELETE')
END
unit1 = -1
exist1 = .false.
inquire (file = 'inquire_5.txt', number = unit8, exist = exist8)
- if (unit8 .ne. 78 .or. .not. exist8) call abort
+ if (unit8 .ne. 78 .or. .not. exist8) STOP 1
inquire (file = 'inquire_5.txt', number = unit4, exist = exist4)
- if (unit4 .ne. 78 .or. .not. exist4) call abort
+ if (unit4 .ne. 78 .or. .not. exist4) STOP 2
inquire (file = 'inquire_5.txt', number = unit2, exist = exist2)
- if (unit2 .ne. 78 .or. .not. exist2) call abort
+ if (unit2 .ne. 78 .or. .not. exist2) STOP 3
inquire (file = 'inquire_5.txt', number = unit1, exist = exist1)
- if (unit1 .ne. 78 .or. .not. exist1) call abort
+ if (unit1 .ne. 78 .or. .not. exist1) STOP 4
del = 'delete'
close (unit = 78, status = del)
end
SELECT CASE (I)
CASE (:-1)
- CALL abort
+ STOP 1
CASE (1:)
- CALL abort
+ STOP 2
CASE DEFAULT
CONTINUE
END SELECT
SELECT CASE (I)
CASE (3,2,1)
- CALL abort
+ STOP 3
CASE (0)
CONTINUE
CASE DEFAULT
- call abort
+ STOP 4
END SELECT
! Not aborted by here, so it worked
SELECT CASE (I)
CASE (:-1)
- CALL abort
+ STOP 5
CASE (1:)
CONTINUE
CASE DEFAULT
- CALL abort
+ STOP 6
END SELECT
SELECT CASE (I)
CASE (3,2,1,:0)
- CALL abort
+ STOP 7
CASE (maxI)
CONTINUE
CASE DEFAULT
- call abort
+ STOP 8
END SELECT
I = minI
CASE (:-1)
CONTINUE
CASE (1:)
- CALL abort
+ STOP 9
CASE DEFAULT
- CALL abort
+ STOP 10
END SELECT
SELECT CASE (I)
CASE (3:,2,1,0)
- CALL abort
+ STOP 11
CASE (minI)
CONTINUE
CASE DEFAULT
- call abort
+ STOP 12
END SELECT
END
INTEGER :: I = 1
SELECT CASE (I)
CASE (-3:-5) ! Can never be matched
- CALL abort
+ STOP 1
CASE (1)
CONTINUE
CASE DEFAULT
- CALL abort
+ STOP 2
END SELECT
I = -3
SELECT CASE (I)
CASE (-3:-5) ! Can never be matched
- CALL abort
+ STOP 3
CASE (1)
CONTINUE
CASE DEFAULT
I = -5
SELECT CASE (I)
CASE (-3:-5) ! Can never be matched
- CALL abort
+ STOP 4
CASE (-5)
CONTINUE
CASE DEFAULT
- CALL abort
+ STOP 5
END SELECT
END
IF (A.NE.'GCC ') THEN
! PRINT*,'A was not filled correctly by internal write'
! PRINT*,' A = ',A
- CALL ABORT
+ STOP 1
ENDIF
END
i = 42
i = abs(i)
- if (i .ne. 42) call abort
+ if (i .ne. 42) STOP 1
i = -43
i = abs(i)
- if (i .ne. 43) call abort
+ if (i .ne. 43) STOP 2
r = 42.0
r = abs(r)
- if (r .ne. 42.0) call abort
+ if (r .ne. 42.0) STOP 3
r = -43.0
r = abs(r)
- if (r .ne. 43.0) call abort
+ if (r .ne. 43.0) STOP 4
q = 42.0_8
q = abs(q)
- if (q .ne. 42.0_8) call abort
+ if (q .ne. 42.0_8) STOP 5
q = -43.0_8
q = abs(q)
- if (q .ne. 43.0_8) call abort
+ if (q .ne. 43.0_8) STOP 6
z = (3, 4)
r = abs(z)
- if (r .ne. 5) call abort
+ if (r .ne. 5) STOP 7
end program
integer i
i = 32
- if (achar(i) .ne. " ") call abort
+ if (achar(i) .ne. " ") STOP 1
i = iachar("A")
- if ((i .ne. 65) .or. char(i) .ne. "A") call abort
+ if ((i .ne. 65) .or. char(i) .ne. "A") STOP 2
end program
real(kind=4) :: res1, res2
if (diff(aint(op), res1) .or. &
- diff(anint(op), res2)) call abort
+ diff(anint(op), res2)) STOP 1
contains
function diff(a, b)
real(kind=4) :: a, b
real(kind=8) :: res1, res2
if (diff(aint(op), res1) .or. &
- diff(anint(op), res2)) call abort
+ diff(anint(op), res2)) STOP 2
contains
function diff(a, b)
real(kind=8) :: a, b
character(len=10) line
a = .false.
- if (any(a)) call abort
+ if (any(a)) STOP 1
a(1, 1) = .true.
a(2, 3) = .true.
- if (.not. any(a)) call abort
+ if (.not. any(a)) STOP 2
b = any(a, 1)
- if (.not. b(1)) call abort
- if (b(2)) call abort
- if (.not. b(3)) call abort
+ if (.not. b(1)) STOP 3
+ if (b(2)) STOP 4
+ if (.not. b(3)) STOP 5
b = .false.
write (line, 9000) any(a,1)
read (line, 9000) b
- if (.not. b(1)) call abort
- if (b(2)) call abort
- if (.not. b(3)) call abort
+ if (.not. b(1)) STOP 6
+ if (b(2)) STOP 7
+ if (.not. b(3)) STOP 8
a = .true.
- if (.not. all(a)) call abort
+ if (.not. all(a)) STOP 9
a(1, 1) = .false.
a(2, 3) = .false.
- if (all(a)) call abort
+ if (all(a)) STOP 10
b = all(a, 1)
- if (b(1)) call abort
- if (.not. b(2)) call abort
- if (b(3)) call abort
+ if (b(1)) STOP 11
+ if (.not. b(2)) STOP 12
+ if (b(3)) STOP 13
b = .false.
write (line, 9000) all(a,1)
read (line, 9000) b
- if (b(1)) call abort
- if (.not. b(2)) call abort
- if (b(3)) call abort
+ if (b(1)) STOP 14
+ if (.not. b(2)) STOP 15
+ if (b(3)) STOP 16
9000 format (9L1)
end program
window (1, 2) = 0161
t = associated (window, xy(2:4, 3:4))
- if (.not.t) call abort ()
+ if (.not.t) STOP 1
! Check that none of the array got mangled
if ((xy(2, 3) .ne. 0101) .or. (xy (4, 4) .ne. 4161) &
- .or. (xy(4, 3) .ne. 4101) .or. (xy (2, 4) .ne. 0161)) call abort ()
- if (any (xy(:, 1:2) .ne. 0)) call abort ()
- if (any (xy(:, 5) .ne. 0)) call abort ()
- if (any (xy (1, 3:4) .ne. 0)) call abort ()
- if (any (xy (5, 3:4) .ne. 0)) call abort ()
- if (xy(3, 3) .ne. 10) call abort ()
- if (xy(3, 4) .ne. 10) call abort ()
- if (any (xy(2:4, 3:4) .ne. window)) call abort ()
+ .or. (xy(4, 3) .ne. 4101) .or. (xy (2, 4) .ne. 0161)) STOP 2
+ if (any (xy(:, 1:2) .ne. 0)) STOP 3
+ if (any (xy(:, 5) .ne. 0)) STOP 4
+ if (any (xy (1, 3:4) .ne. 0)) STOP 5
+ if (any (xy (5, 3:4) .ne. 0)) STOP 6
+ if (xy(3, 3) .ne. 10) STOP 7
+ if (xy(3, 4) .ne. 10) STOP 8
+ if (any (xy(2:4, 3:4) .ne. window)) STOP 9
end
subroutine sub1 (a, ap)
subroutine nullify_pp (a)
integer, pointer :: a(:, :)
- if (.not. associated (a)) call abort ()
+ if (.not. associated (a)) STOP 10
nullify (a)
end
allocate (a(80, 80))
b => a
- if (.not. associated(a)) call abort ()
- if (.not. associated(b)) call abort ()
+ if (.not. associated(a)) STOP 11
+ if (.not. associated(b)) STOP 12
call nullify_pp (a)
- if (associated (a)) call abort ()
- if (.not. associated (b)) call abort ()
+ if (associated (a)) STOP 13
+ if (.not. associated (b)) STOP 14
end
subroutine pointer_to_derived_1 ()
type(record2), target :: r2
nullify (r1%r1p, r2%r2p, e1%rp, e2%rp, e3%rp)
- if (associated (r1%r1p)) call abort ()
- if (associated (r2%r2p)) call abort ()
- if (associated (e2%rp)) call abort ()
- if (associated (e1%rp)) call abort ()
- if (associated (e3%rp)) call abort ()
+ if (associated (r1%r1p)) STOP 15
+ if (associated (r2%r2p)) STOP 16
+ if (associated (e2%rp)) STOP 17
+ if (associated (e1%rp)) STOP 18
+ if (associated (e3%rp)) STOP 19
r1%r1p => r2
r2%r2p => r1
r1%value = 11
e1%value = 33
e1%rp%value = 44
e1%rp%rp%value = 55
- if (.not. associated (r1%r1p)) call abort ()
- if (.not. associated (r2%r2p)) call abort ()
- if (.not. associated (e1%rp)) call abort ()
- if (.not. associated (e2%rp)) call abort ()
- if (associated (e3%rp)) call abort ()
- if (r1%r1p%value .ne. 22) call abort ()
- if (r2%r2p%value .ne. 11) call abort ()
- if (e1%value .ne. 33) call abort ()
- if (e2%value .ne. 44) call abort ()
- if (e3%value .ne. 55) call abort ()
- if (r1%value .ne. 11) call abort ()
- if (r2%value .ne. 22) call abort ()
+ if (.not. associated (r1%r1p)) STOP 20
+ if (.not. associated (r2%r2p)) STOP 21
+ if (.not. associated (e1%rp)) STOP 22
+ if (.not. associated (e2%rp)) STOP 23
+ if (associated (e3%rp)) STOP 24
+ if (r1%r1p%value .ne. 22) STOP 25
+ if (r2%r2p%value .ne. 11) STOP 26
+ if (e1%value .ne. 33) STOP 27
+ if (e2%value .ne. 44) STOP 28
+ if (e3%value .ne. 55) STOP 29
+ if (r1%value .ne. 11) STOP 30
+ if (r2%value .ne. 22) STOP 31
end
endinterface
xp => y
- if (.not. associated (xp)) call abort ()
+ if (.not. associated (xp)) STOP 32
call sub1 (x, xp)
- if (associated (xp, y)) call abort ()
- if (.not. associated (xp, x)) call abort ()
+ if (associated (xp, y)) STOP 33
+ if (.not. associated (xp, x)) STOP 34
end
L84 = t8 .and. associated (a4p, a4)
L48 = t4 .and. associated (a8p, a8)
L88 = t8 .and. associated (a8p, a8)
- if (.not. (L44 .and. L84 .and. L48 .and. L88)) call abort ()
+ if (.not. (L44 .and. L84 .and. L48 .and. L88)) STOP 1
nullify (a4p, a8p)
L44 = t4 .and. associated (a4p, a4)
L84 = t8 .and. associated (a4p, a4)
L48 = t4 .and. associated (a8p, a8)
L88 = t8 .and. associated (a8p, a8)
- if (L44 .and. L84 .and. L48 .and. L88) call abort ()
+ if (L44 .and. L84 .and. L48 .and. L88) STOP 2
a4p => a4(1:10:2, 1:10:2)
a8p => a8(1:4, 1:4)
L84 = t8 .and. associated (a4p, a4(1:10:2, 1:10:2))
L48 = t4 .and. associated (a8p, a8(1:4, 1:4))
L88 = t8 .and. associated (a8p, a8(1:4, 1:4))
- if (.not. (L44 .and. L84 .and. L48 .and. L88)) call abort ()
+ if (.not. (L44 .and. L84 .and. L48 .and. L88)) STOP 3
end
k = 12
a = 5
- if (.not. btest (i, o+1)) call abort
- if (btest (i, o+2)) call abort
- if (iand (i, j) .ne. 2) call abort
- if (ibclr (j, o+1) .ne. 1) call abort
- if (ibclr (j, o+2) .ne. 3) call abort
- if (ibits (k, o+1, o+2) .ne. 2) call abort
- if (ibset (j, o+1) .ne. 3) call abort
- if (ibset (j, o+2) .ne. 7) call abort
- if (ieor (i, j) .ne. 1) call abort
- if (ior (i, j) .ne. 3) call abort
- if (ishft (k, o+2) .ne. 48) call abort
- if (ishft (k, o-3) .ne. 1) call abort
- if (ishft (k, o) .ne. 12) call abort
- if (ishftc (k, o+30) .ne. 3) call abort
- if (ishftc (k, o-30) .ne. 48) call abort
- if (ishftc (k, o+1, o+3) .ne. 9) call abort
- if (not (i) .ne. -3) call abort
- if (ishftc (a, 1, bit_size(a)) .ne. 10) call abort
- if (ishftc (1, 1, 32) .ne. 2) call abort
+ if (.not. btest (i, o+1)) STOP 1
+ if (btest (i, o+2)) STOP 2
+ if (iand (i, j) .ne. 2) STOP 3
+ if (ibclr (j, o+1) .ne. 1) STOP 4
+ if (ibclr (j, o+2) .ne. 3) STOP 5
+ if (ibits (k, o+1, o+2) .ne. 2) STOP 6
+ if (ibset (j, o+1) .ne. 3) STOP 7
+ if (ibset (j, o+2) .ne. 7) STOP 8
+ if (ieor (i, j) .ne. 1) STOP 9
+ if (ior (i, j) .ne. 3) STOP 10
+ if (ishft (k, o+2) .ne. 48) STOP 11
+ if (ishft (k, o-3) .ne. 1) STOP 12
+ if (ishft (k, o) .ne. 12) STOP 13
+ if (ishftc (k, o+30) .ne. 3) STOP 14
+ if (ishftc (k, o-30) .ne. 48) STOP 15
+ if (ishftc (k, o+1, o+3) .ne. 9) STOP 16
+ if (not (i) .ne. -3) STOP 17
+ if (ishftc (a, 1, bit_size(a)) .ne. 10) STOP 18
+ if (ishftc (1, 1, 32) .ne. 2) STOP 19
end program
character(len=10) line
a = .false.
- if (count(a) .ne. 0) call abort
+ if (count(a) .ne. 0) STOP 1
a = .true.
- if (count(a) .ne. 15) call abort
+ if (count(a) .ne. 15) STOP 2
a(1, 1) = .false.
a(2, 2) = .false.
a(2, 5) = .false.
- if (count(a) .ne. 12) call abort
+ if (count(a) .ne. 12) STOP 3
write (line, 9000) count(a)
read (line, 9000) i
- if (i .ne. 12) call abort
+ if (i .ne. 12) STOP 4
b(1:3) = count(a, 2);
- if (b(1) .ne. 4) call abort
- if (b(2) .ne. 3) call abort
- if (b(3) .ne. 5) call abort
+ if (b(1) .ne. 4) STOP 5
+ if (b(2) .ne. 3) STOP 6
+ if (b(3) .ne. 5) STOP 7
b = 0
write (line, 9000) count(a,2)
read (line, 9000) b
- if (b(1) .ne. 4) call abort
- if (b(2) .ne. 3) call abort
- if (b(3) .ne. 5) call abort
+ if (b(1) .ne. 4) STOP 8
+ if (b(2) .ne. 3) STOP 9
+ if (b(3) .ne. 5) STOP 10
9000 format(3I3)
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = cshift (a, 1, 1)
if (any (a .ne. reshape ((/2, 3, 1, 5, 6, 4, 8, 9, 7/), (/3, 3/)))) &
- call abort
+ STOP 1
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = cshift (a, -2, dim = 2)
if (any (a .ne. reshape ((/4, 5, 6, 7, 8, 9, 1, 2, 3/), (/3, 3/)))) &
- call abort
+ STOP 2
! Array shift
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = cshift (a, (/1, 0, -1/))
if (any (a .ne. reshape ((/2, 3, 1, 4, 5, 6, 9, 7, 8/), (/3, 3/)))) &
- call abort
+ STOP 3
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = cshift (a, (/2, -2, 0/), dim = 2)
if (any (a .ne. reshape ((/7, 5, 3, 1, 8, 6, 4, 2, 9/), (/3, 3/)))) &
- call abort
+ STOP 4
! Test arrays > rank 2
b = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17,&
b = cshift (b, 1)
if (any (b .ne. reshape ((/2, 3, 1, 5, 6, 4, 8, 9, 7, 12, 13, 11, 15,&
16, 14, 18, 19, 17/), (/3, 3, 2/)))) &
- call abort
+ STOP 5
b = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17,&
18, 19/), (/3, 3, 2/))
b = cshift (b, reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/)), 3)
if (any (b .ne. reshape ((/11, 2, 13, 4, 15, 6, 17, 8, 19, 1, 12, 3,&
14, 5, 16, 7, 18, 9/), (/3, 3, 2/)))) &
- call abort
+ STOP 6
end program
i = 1
j = 4
- if (dim (i, j) .ne. 0) call abort
- if (dim (j, i) .ne. 3) call abort
+ if (dim (i, j) .ne. 0) STOP 1
+ if (dim (j, i) .ne. 3) STOP 2
r = 1.0
s = 4.0
- if (dim (r, s) .ne. 0.0) call abort
- if (dim (s, r) .ne. 3.0) call abort
+ if (dim (r, s) .ne. 0.0) STOP 3
+ if (dim (s, r) .ne. 3.0) STOP 4
p = 1.0
q = 4.0
- if (dim (p, q) .ne. 0.0) call abort
- if (dim (q, p) .ne. 3.0) call abort
+ if (dim (p, q) .ne. 0.0) STOP 5
+ if (dim (q, p) .ne. 3.0) STOP 6
end program
b = (/4, 5, 6/);
c = (/4, 5, 6/);
- if (dot_product(a, b) .ne. 32) call abort
+ if (dot_product(a, b) .ne. 32) STOP 1
r = dot_product(a, c)
- if (abs(r - 32.0) .gt. 0.001) call abort
+ if (abs(r - 32.0) .gt. 0.001) STOP 2
z1 = (/(1.0, 2.0), (2.0, 3.0)/)
z2 = (/(3.0, 4.0), (4.0, 5.0)/)
z = dot_product (z1, z2)
- if (abs (z - (34.0, -4.0)) .gt. 0.001) call abort
+ if (abs (z - (34.0, -4.0)) .gt. 0.001) STOP 3
end program
r = 2e30
s = 4e30
dp = dprod (r, s)
- if ((dp .gt. 8.001d60) .or. (dp .lt. 7.999d60)) call abort
+ if ((dp .gt. 8.001d60) .or. (dp .lt. 7.999d60)) STOP 1
end program
b = sin (a)
c = proc (a)
- if (abs (b - c) .gt. 0.001) call abort
+ if (abs (b - c) .gt. 0.001) STOP 1
end subroutine
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, 1, 99, 1)
if (any (a .ne. reshape ((/2, 3, 99, 5, 6, 99, 8, 9, 99/), (/3, 3/)))) &
- call abort
+ STOP 1
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, 9999, 99, 1)
- if (any (a .ne. 99)) call abort
+ if (any (a .ne. 99)) STOP 2
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, -2, dim = 2)
if (any (a .ne. reshape ((/0, 0, 0, 0, 0, 0, 1, 2, 3/), (/3, 3/)))) &
- call abort
+ STOP 3
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, -9999, 99, 1)
- if (any (a .ne. 99)) call abort
+ if (any (a .ne. 99)) STOP 4
! Array shift and scalar bound.
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, (/1, 0, -1/), 99, 1)
if (any (a .ne. reshape ((/2, 3, 99, 4, 5, 6, 99, 7, 8/), (/3, 3/)))) &
- call abort
+ STOP 5
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, (/9999, 0, -9999/), 99, 1)
if (any (a .ne. reshape ((/99, 99, 99, 4, 5, 6, 99, 99, 99/), (/3, 3/)))) &
- call abort
+ STOP 6
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, (/2, -2, 0/), dim = 2)
if (any (a .ne. reshape ((/7, 0, 3, 0, 0, 6, 0, 2, 9/), (/3, 3/)))) &
- call abort
+ STOP 7
! Scalar shift and array bound.
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, 1, (/99, -1, 42/), 1)
if (any (a .ne. reshape ((/2, 3, 99, 5, 6, -1, 8, 9, 42/), (/3, 3/)))) &
- call abort
+ STOP 8
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, 9999, (/99, -1, 42/), 1)
if (any (a .ne. reshape ((/99, 99, 99, -1, -1, -1, 42, 42, 42/), &
- (/3, 3/)))) call abort
+ (/3, 3/)))) STOP 9
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, -9999, (/99, -1, 42/), 1)
if (any (a .ne. reshape ((/99, 99, 99, -1, -1, -1, 42, 42, 42/), &
- (/3, 3/)))) call abort
+ (/3, 3/)))) STOP 10
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, -2, (/99, -1, 42/), 2)
if (any (a .ne. reshape ((/99, -1, 42, 99, -1, 42, 1, 2, 3/), (/3, 3/)))) &
- call abort
+ STOP 11
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
bo = (/99, -1, 42/)
a = eoshift (a, -2, bo, 2)
if (any (a .ne. reshape ((/99, -1, 42, 99, -1, 42, 1, 2, 3/), (/3, 3/)))) &
- call abort
+ STOP 12
! Array shift and array bound.
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, (/1, 0, -1/), (/99, -1, 42/), 1)
if (any (a .ne. reshape ((/2, 3, 99, 4, 5, 6, 42, 7, 8/), (/3, 3/)))) &
- call abort
+ STOP 13
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, (/2, -2, 0/), (/99, -1, 42/), 2)
if (any (a .ne. reshape ((/7, -1, 3, 99, -1, 6, 99, 2, 9/), (/3, 3/)))) &
- call abort
+ STOP 14
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
sh = (/ 3, -1, -3 /)
bo = (/-999, -99, -9 /)
a = eoshift(a, shift=sh, boundary=bo)
if (any (a .ne. reshape ((/ -999, -999, -999, -99, 4, 5, -9, -9, -9 /), &
- shape(a)))) call abort
+ shape(a)))) STOP 15
a = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = eoshift (a, (/9999, -9999, 0/), (/99, -1, 42/), 2)
if (any (a .ne. reshape ((/99, -1, 3, 99, -1, 6, 99, -1, 9/), (/3, 3/)))) &
- call abort
+ STOP 16
! Test arrays > rank 2
b(:, :, 1) = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
b(:, :, 2) = 10 + reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
b = eoshift (b, 1, 99, 1)
if (any (b(:, :, 1) .ne. reshape ((/2, 3, 99, 5, 6, 99, 8, 9, 99/), (/3, 3/)))) &
- call abort
+ STOP 17
if (any (b(:, :, 2) .ne. reshape ((/12, 13, 99, 15, 16, 99, 18, 19, 99/), (/3, 3/)))) &
- call abort
+ STOP 18
! TODO: Test array sections
end program
else
y = (y / 2.) * (2. ** (z + 1))
end if
-if (abs (x - y) .gt. spacing (max (abs (x), abs (y)))) call abort()
+if (abs (x - y) .gt. spacing (max (abs (x), abs (y)))) STOP 1
end
subroutine test_8(x)
else
y = (y / 2._8) * (2._8 ** (z + 1))
end if
-if (abs (x - y) .gt. spacing (max (abs (x), abs(y)))) call abort()
+if (abs (x - y) .gt. spacing (max (abs (x), abs(y)))) STOP 2
end
program test
character(len=10) a
integer w
- if (index("FORTRAN", "R") .ne. 3) call abort
- if (index("FORTRAN", "R", .TRUE.) .ne. 5) call abort
- if (w ("FORTRAN") .ne. 3) call abort
+ if (index("FORTRAN", "R") .ne. 3) STOP 1
+ if (index("FORTRAN", "R", .TRUE.) .ne. 5) STOP 2
+ if (w ("FORTRAN") .ne. 3) STOP 3
end
function w(str)
integer, dimension(4) :: res
if ((floor(val) .ne. res(1)) .or. (ceiling(val) .ne. res(2)) &
- .or. (int(val) .ne. res(3)) .or. (nint(val) .ne. res(4))) call abort
+ .or. (int(val) .ne. res(3)) .or. (nint(val) .ne. res(4))) STOP 1
end subroutine
end program
integer(kind=4) :: z4, i4, e4
integer(kind=8) :: z8, i8, e8
- if (leadz(0_1) /= 8) call abort()
- if (leadz(0_2) /= 16) call abort()
- if (leadz(0_4) /= 32) call abort()
- if (leadz(0_8) /= 64) call abort()
-
- if (leadz(1_1) /= 7) call abort()
- if (leadz(1_2) /= 15) call abort()
- if (leadz(1_4) /= 31) call abort()
- if (leadz(1_8) /= 63) call abort()
-
- if (leadz(8_1) /= 4) call abort()
- if (leadz(8_2) /= 12) call abort()
- if (leadz(8_4) /= 28) call abort()
- if (leadz(8_8) /= 60) call abort()
-
- if (leadz(z1) /= 8) call abort()
- if (leadz(z2) /= 16) call abort()
- if (leadz(z4) /= 32) call abort()
- if (leadz(z8) /= 64) call abort()
-
- if (leadz(i1) /= 7) call abort()
- if (leadz(i2) /= 15) call abort()
- if (leadz(i4) /= 31) call abort()
- if (leadz(i8) /= 63) call abort()
-
- if (leadz(e1) /= 4) call abort()
- if (leadz(e2) /= 12) call abort()
- if (leadz(e4) /= 28) call abort()
- if (leadz(e8) /= 60) call abort()
+ if (leadz(0_1) /= 8) STOP 1
+ if (leadz(0_2) /= 16) STOP 2
+ if (leadz(0_4) /= 32) STOP 3
+ if (leadz(0_8) /= 64) STOP 4
+
+ if (leadz(1_1) /= 7) STOP 5
+ if (leadz(1_2) /= 15) STOP 6
+ if (leadz(1_4) /= 31) STOP 7
+ if (leadz(1_8) /= 63) STOP 8
+
+ if (leadz(8_1) /= 4) STOP 9
+ if (leadz(8_2) /= 12) STOP 10
+ if (leadz(8_4) /= 28) STOP 11
+ if (leadz(8_8) /= 60) STOP 12
+
+ if (leadz(z1) /= 8) STOP 13
+ if (leadz(z2) /= 16) STOP 14
+ if (leadz(z4) /= 32) STOP 15
+ if (leadz(z8) /= 64) STOP 16
+
+ if (leadz(i1) /= 7) STOP 17
+ if (leadz(i2) /= 15) STOP 18
+ if (leadz(i4) /= 31) STOP 19
+ if (leadz(i8) /= 63) STOP 20
+
+ if (leadz(e1) /= 4) STOP 21
+ if (leadz(e2) /= 12) STOP 22
+ if (leadz(e4) /= 28) STOP 23
+ if (leadz(e8) /= 60) STOP 24
end subroutine test_leadz
end program
integer n
a = w (n)
- if ((a .ne. "01234567") .or. (n .ne. 8)) call abort
- if (len(Tom%name) .ne. 10) call abort
+ if ((a .ne. "01234567") .or. (n .ne. 8)) STOP 1
+ if (len(Tom%name) .ne. 10) STOP 2
call array_test()
end
subroutine array_test
implicit none
character(len=10) a(4)
- if (len(a) .NE. 10) call abort()
+ if (len(a) .NE. 10) STOP 1
end subroutine array_test
y = (/1, 2, 3/)
r = matmul(a, b)
- if (any(r .ne. reshape((/14, 20, 26, 38/), (/2, 2/)))) call abort
+ if (any(r .ne. reshape((/14, 20, 26, 38/), (/2, 2/)))) STOP 1
v = matmul(x, a)
- if (any(v .ne. (/5, 8, 11/))) call abort
+ if (any(v .ne. (/5, 8, 11/))) STOP 2
v(1:2) = matmul(a, y)
- if (any(v(1:2) .ne. (/14, 20/))) call abort
+ if (any(v(1:2) .ne. (/14, 20/))) STOP 3
aa = reshape((/ 1.0, 1.0, 0.0, 1.0/), shape(aa))
cc = 42.
cc(1:2,1:2) = matmul(aa, transpose(aa))
- if (any(cc(1:2,1:2) .ne. reshape((/ 1.0, 1.0, 1.0, 2.0 /), (/2,2/)))) call abort
- if (any(cc(3:4,1:2) .ne. 42.)) call abort
+ if (any(cc(1:2,1:2) .ne. reshape((/ 1.0, 1.0, 1.0, 2.0 /), (/2,2/)))) STOP 4
+ if (any(cc(3:4,1:2) .ne. 42.)) STOP 5
end program
a = (/-1, 2, 3/)
i = 5
- if (merge (-1, 1, i .gt. 3) .ne. -1) call abort
+ if (merge (-1, 1, i .gt. 3) .ne. -1) STOP 1
i = 1
- if (merge (-1, 1, i .ge. 3) .ne. 1) call abort
+ if (merge (-1, 1, i .ge. 3) .ne. 1) STOP 2
b = merge(a, 0, a .ge. 0)
- if (any (b .ne. (/0, 2, 3/))) call abort
+ if (any (b .ne. (/0, 2, 3/))) STOP 3
end program
j = -2
k = 3
m = 4
- if (min (i, k) .ne. 1) call abort
- if (min (i, j, k, m) .ne. -2) call abort
- if (max (i, k) .ne. 3) call abort
- if (max (i, j, k, m) .ne. 4) call abort
- if (max (i+1, j) .ne. 2) call abort
+ if (min (i, k) .ne. 1) STOP 1
+ if (min (i, j, k, m) .ne. -2) STOP 2
+ if (max (i, k) .ne. 3) STOP 3
+ if (max (i, j, k, m) .ne. 4) STOP 4
+ if (max (i+1, j) .ne. 2) STOP 5
r = 1
s = -2
t = 3
u = 4
- if (min (r, t) .ne. 1) call abort
- if (min (r, s, t, u) .ne. -2) call abort
- if (max (r, t) .ne. 3) call abort
- if (max (r, s, t, u) .ne. 4) call abort
+ if (min (r, t) .ne. 1) STOP 6
+ if (min (r, s, t, u) .ne. -2) STOP 7
+ if (max (r, t) .ne. 3) STOP 8
+ if (max (r, s, t, u) .ne. 4) STOP 9
- if (max (4d0, r) .ne. 4d0) call abort
- if (amax0 (i, j) .ne. 1.0) call abort
- if (min1 (r, s) .ne. -2) call abort
+ if (max (4d0, r) .ne. 4d0) STOP 10
+ if (amax0 (i, j) .ne. 1.0) STOP 11
+ if (min1 (r, s) .ne. -2) STOP 12
! Test simplify.
- if (min (1, -2, 3, 4) .ne. -2) call abort
- if (max (1, -2, 3, 4) .ne. 4) call abort
- if (amax0 (1, -2) .ne. 1.0) call abort
- if (min1 (1., -2.) .ne. -2) call abort
+ if (min (1, -2, 3, 4) .ne. -2) STOP 13
+ if (max (1, -2, 3, 4) .ne. 4) STOP 14
+ if (amax0 (1, -2) .ne. 1.0) STOP 15
+ if (min1 (1., -2.) .ne. -2) STOP 16
end program
tr = .true.
b = minloc (a, 1)
- if (b(1) .ne. 1) call abort
- if (b(2) .ne. 2) call abort
- if (b(3) .ne. 3) call abort
+ if (b(1) .ne. 1) STOP 1
+ if (b(2) .ne. 2) STOP 2
+ if (b(3) .ne. 3) STOP 3
b = -1
write (line, 9000) minloc(a,1)
read (line, 9000) b
- if (b(1) .ne. 1) call abort
- if (b(2) .ne. 2) call abort
- if (b(3) .ne. 3) call abort
+ if (b(1) .ne. 1) STOP 4
+ if (b(2) .ne. 2) STOP 5
+ if (b(3) .ne. 3) STOP 6
m = .true.
m(1, 1) = .false.
m(1, 2) = .false.
b = minloc (a, 1, m)
- if (b(1) .ne. 2) call abort
- if (b(2) .ne. 2) call abort
- if (b(3) .ne. 3) call abort
+ if (b(1) .ne. 2) STOP 7
+ if (b(2) .ne. 2) STOP 8
+ if (b(3) .ne. 3) STOP 9
b = minloc (a, 1, m .and. tr)
- if (b(1) .ne. 2) call abort
- if (b(2) .ne. 2) call abort
- if (b(3) .ne. 3) call abort
+ if (b(1) .ne. 2) STOP 10
+ if (b(2) .ne. 2) STOP 11
+ if (b(3) .ne. 3) STOP 12
b = -1
write (line, 9000) minloc(a, 1, m)
read (line, 9000) b
- if (b(1) .ne. 2) call abort
- if (b(2) .ne. 2) call abort
- if (b(3) .ne. 3) call abort
+ if (b(1) .ne. 2) STOP 13
+ if (b(2) .ne. 2) STOP 14
+ if (b(3) .ne. 3) STOP 15
b(1:2) = minloc(a)
- if (b(1) .ne. 1) call abort
- if (b(2) .ne. 1) call abort
+ if (b(1) .ne. 1) STOP 16
+ if (b(2) .ne. 1) STOP 17
b = -1
write (line, 9000) minloc(a)
read (line, 9000) b
- if (b(1) .ne. 1) call abort
- if (b(2) .ne. 1) call abort
- if (b(3) .ne. 0) call abort
+ if (b(1) .ne. 1) STOP 18
+ if (b(2) .ne. 1) STOP 19
+ if (b(3) .ne. 0) STOP 20
b(1:2) = minloc(a, mask=m)
- if (b(1) .ne. 2) call abort
- if (b(2) .ne. 1) call abort
+ if (b(1) .ne. 2) STOP 21
+ if (b(2) .ne. 1) STOP 22
b(1:2) = minloc(a, mask=m .and. tr)
- if (b(1) .ne. 2) call abort
- if (b(2) .ne. 1) call abort
+ if (b(1) .ne. 2) STOP 23
+ if (b(2) .ne. 1) STOP 24
b = -1
write (line, 9000) minloc(a, mask=m)
read (line, 9000) b
- if (b(1) .ne. 2) call abort
- if (b(2) .ne. 1) call abort
- if (b(3) .ne. 0) call abort
+ if (b(1) .ne. 2) STOP 25
+ if (b(2) .ne. 1) STOP 26
+ if (b(3) .ne. 0) STOP 27
b = maxloc (a, 1)
- if (b(1) .ne. 3) call abort
- if (b(2) .ne. 3) call abort
- if (b(3) .ne. 1) call abort
+ if (b(1) .ne. 3) STOP 28
+ if (b(2) .ne. 3) STOP 29
+ if (b(3) .ne. 1) STOP 30
b = -1
write (line, 9000) maxloc(a, 1)
read (line, 9000) b
- if (b(1) .ne. 3) call abort
- if (b(2) .ne. 3) call abort
- if (b(3) .ne. 1) call abort
+ if (b(1) .ne. 3) STOP 31
+ if (b(2) .ne. 3) STOP 32
+ if (b(3) .ne. 1) STOP 33
m = .true.
m(1, 2) = .false.
m(1, 3) = .false.
b = maxloc (a, 1, m)
- if (b(1) .ne. 3) call abort
- if (b(2) .ne. 3) call abort
- if (b(3) .ne. 2) call abort
+ if (b(1) .ne. 3) STOP 34
+ if (b(2) .ne. 3) STOP 35
+ if (b(3) .ne. 2) STOP 36
b = maxloc (a, 1, m .and. tr)
- if (b(1) .ne. 3) call abort
- if (b(2) .ne. 3) call abort
- if (b(3) .ne. 2) call abort
+ if (b(1) .ne. 3) STOP 37
+ if (b(2) .ne. 3) STOP 38
+ if (b(3) .ne. 2) STOP 39
b = -1
write (line, 9000) maxloc(a, 1, m)
read (line, 9000) b
- if (b(1) .ne. 3) call abort
- if (b(2) .ne. 3) call abort
- if (b(3) .ne. 2) call abort
+ if (b(1) .ne. 3) STOP 40
+ if (b(2) .ne. 3) STOP 41
+ if (b(3) .ne. 2) STOP 42
b(1:2) = maxloc(a)
- if (b(1) .ne. 1) call abort
- if (b(2) .ne. 3) call abort
+ if (b(1) .ne. 1) STOP 43
+ if (b(2) .ne. 3) STOP 44
b = -1
write (line, 9000) maxloc(a)
read (line, 9000) b
- if (b(1) .ne. 1) call abort
- if (b(2) .ne. 3) call abort
+ if (b(1) .ne. 1) STOP 45
+ if (b(2) .ne. 3) STOP 46
b(1:2) = maxloc(a, mask=m)
- if (b(1) .ne. 2) call abort
- if (b(2) .ne. 3) call abort
+ if (b(1) .ne. 2) STOP 47
+ if (b(2) .ne. 3) STOP 48
b(1:2) = maxloc(a, mask=m .and. tr)
- if (b(1) .ne. 2) call abort
- if (b(2) .ne. 3) call abort
+ if (b(1) .ne. 2) STOP 49
+ if (b(2) .ne. 3) STOP 50
b = -1
write (line, 9000) maxloc(a, mask=m)
read (line, 9000) b
- if (b(1) .ne. 2) call abort
- if (b(2) .ne. 3) call abort
- if (b(3) .ne. 0) call abort
+ if (b(1) .ne. 2) STOP 51
+ if (b(2) .ne. 3) STOP 52
+ if (b(3) .ne. 0) STOP 53
9000 format (3I3)
end program
b(2) = 1
c(1) = 1
- if (maxloc (a, 1) .ne. 1) call abort()
- if (maxloc (b, 1) .ne. 1) call abort()
- if (maxloc (c, 1) .ne. 1) call abort()
+ if (maxloc (a, 1) .ne. 1) STOP 1
+ if (maxloc (b, 1) .ne. 1) STOP 2
+ if (maxloc (c, 1) .ne. 1) STOP 3
! We were giving MINLOC and MAXLOC the wrong return type
vc = (/4.0d0, 2.50d1, 1.0d1/)
i = minloc (vc)
- if (i(1) .ne. 1) call abort()
+ if (i(1) .ne. 1) STOP 4
END PROGRAM
l = .true.
d = -huge (d)
- if (maxloc (d, 1) .ne. 1) call abort ()
+ if (maxloc (d, 1) .ne. 1) STOP 1
d = huge (d)
- if (minloc (d, 1) .ne. 1) call abort ()
+ if (minloc (d, 1) .ne. 1) STOP 2
d = -huge (d)
- if (maxloc (d, 1, k) .ne. 1) call abort ()
+ if (maxloc (d, 1, k) .ne. 1) STOP 3
d = huge (d)
- if (minloc (d, 1, k) .ne. 1) call abort ()
+ if (minloc (d, 1, k) .ne. 1) STOP 4
a = -huge (a)
d = maxloc (a)
- if (any (d .ne. 1)) call abort ()
+ if (any (d .ne. 1)) STOP 5
a = huge (a)
d = minloc (a)
- if (any (d .ne. 1)) call abort ()
+ if (any (d .ne. 1)) STOP 6
a = -huge (a)
d = maxloc (a, l)
- if (any (d .ne. 1)) call abort ()
+ if (any (d .ne. 1)) STOP 7
a = huge (a)
d = minloc (a, l)
- if (any (d .ne. 1)) call abort ()
+ if (any (d .ne. 1)) STOP 8
end program
integer, dimension(2) :: b
allocate (d(0))
- if (maxloc (d, 1) .ne. 0) call abort()
+ if (maxloc (d, 1) .ne. 0) STOP 1
allocate (a(1, 0))
b = minloc (a)
- if (any (b .ne. 0)) call abort()
+ if (any (b .ne. 0)) STOP 2
end program
tr = .true.
b = minval (a, 1)
- if (any(b .ne. (/1, 4, 7/))) call abort
+ if (any(b .ne. (/1, 4, 7/))) STOP 1
write (line, 9000) minval (a, 1)
- if (line .ne. ' 1 4 7') call abort
+ if (line .ne. ' 1 4 7') STOP 2
m = .true.
m(1, 1) = .false.
m(1, 2) = .false.
b = minval (a, 1, m)
- if (any(b .ne. (/2, 4, 7/))) call abort
+ if (any(b .ne. (/2, 4, 7/))) STOP 3
b = minval (a, 1, m .and. tr)
- if (any(b .ne. (/2, 4, 7/))) call abort
+ if (any(b .ne. (/2, 4, 7/))) STOP 4
write (line, 9000) minval(a, 1, m)
- if (line .ne. ' 2 4 7') call abort
+ if (line .ne. ' 2 4 7') STOP 5
b = maxval (a, 1)
- if (any(b .ne. (/3, 6, 9/))) call abort
+ if (any(b .ne. (/3, 6, 9/))) STOP 6
write (line, 9000) maxval (a, 1)
- if (line .ne. ' 3 6 9') call abort
+ if (line .ne. ' 3 6 9') STOP 7
m = .true.
m(1, 2) = .false.
m(1, 3) = .false.
b = maxval (a, 1, m)
- if (any(b .ne. (/3, 6, 8/))) call abort
+ if (any(b .ne. (/3, 6, 8/))) STOP 8
b = maxval (a, 1, m .and. tr)
- if (any(b .ne. (/3, 6, 8/))) call abort
+ if (any(b .ne. (/3, 6, 8/))) STOP 9
write (line, 9000) maxval(a, 1, m)
- if (line .ne. ' 3 6 8') call abort
+ if (line .ne. ' 3 6 8') STOP 10
9000 format(3I3)
end program
integer, dimension(2) :: res
if ((mod(ops(1), ops(2)) .ne. res(1)) .or. &
- (modulo(ops(1), ops(2)) .ne. res(2))) call abort
+ (modulo(ops(1), ops(2)) .ne. res(2))) STOP 1
end subroutine
subroutine real4test (ops, res)
real(kind=4), dimension(2) :: res
if (diff(mod(ops(1), ops(2)), res(1)) .or. &
- diff(modulo(ops(1), ops(2)), res(2))) call abort
+ diff(modulo(ops(1), ops(2)), res(2))) STOP 2
contains
function diff(a, b)
real(kind=4) :: a, b
real(kind=8), dimension(2) :: res
if (diff(mod(ops(1), ops(2)), res(1)) .or. &
- diff(modulo(ops(1), ops(2)), res(2))) call abort
+ diff(modulo(ops(1), ops(2)), res(2))) STOP 3
contains
function diff(a, b)
real(kind=8) :: a, b
DATA result / z'7777FFFE' /
CALL mvbits(from, 2, 16, to, 1)
-if (to /= result) CALL abort()
+if (to /= result) STOP 1
to8 = 0_8
from8 = b'1011'*2_8**32
call mvbits (from8, 33, 3, to8, 2)
-if (to8 /= b'10100') call abort
+if (to8 /= b'10100') STOP 1
end
s = 0
x = nearest(s, r)
y = nearest(s, -r)
- if (.not. (x .gt. s .and. y .lt. s )) call abort()
+ if (.not. (x .gt. s .and. y .lt. s )) STOP 1
! ??? This is pretty sketchy, but passes on most targets.
infi = z'7f800000'
real s, e, x
x = nearest(s, 1.0)
- if (x .ne. e) call abort()
+ if (x .ne. e) STOP 2
end
subroutine test_down(s, e)
real s, e, x
x = nearest(s, -1.0)
- if (x .ne. e) call abort()
+ if (x .ne. e) STOP 3
end
subroutine test_n(s1, r)
real r, s1, x
x = nearest(s1, r)
- if (nearest(x, -r) .ne. s1) call abort()
+ if (nearest(x, -r) .ne. s1) STOP 4
x = nearest(s1, -r)
- if (nearest(x, r) .ne. s1) call abort()
+ if (nearest(x, r) .ne. s1) STOP 5
s1 = -s1
x = nearest(s1, r)
- if (nearest(x, -r) .ne. s1) call abort()
+ if (nearest(x, -r) .ne. s1) STOP 6
x = nearest(s1, -r)
- if (nearest(x, r) .ne. s1) call abort()
+ if (nearest(x, r) .ne. s1) STOP 7
end
a = reshape (val, (/3, 3/))
b = 0
b(1:6:3) = pack (a, a .ne. 0);
- if (any (b(1:6:3) .ne. (/9, 7/))) call abort
+ if (any (b(1:6:3) .ne. (/9, 7/))) STOP 1
b = pack (a(2:3, 2:3), a(2:3, 2:3) .ne. 0, (/1, 2, 3, 4, 5, 6/));
- if (any (b .ne. (/9, 7, 3, 4, 5, 6/))) call abort
+ if (any (b .ne. (/9, 7, 3, 4, 5, 6/))) STOP 2
call tests_with_temp()
contains
subroutine tests_with_temp
! A few tests which involve a temporary
- if (any (pack(a, a.ne.0) .ne. (/9, 7/))) call abort
- if (any (pack(a, .true.) .ne. val)) call abort
- if (size(pack (a, .false.)) .ne. 0) call abort
- if (any (pack(a, .false., (/1,2,3/)).ne. (/1,2,3/))) call abort
+ if (any (pack(a, a.ne.0) .ne. (/9, 7/))) STOP 3
+ if (any (pack(a, .true.) .ne. val)) STOP 4
+ if (size(pack (a, .false.)) .ne. 0) STOP 5
+ if (any (pack(a, .false., (/1,2,3/)).ne. (/1,2,3/))) STOP 6
end subroutine tests_with_temp
end program
integer, dimension(10) :: c
integer, pointer, dimension(:) :: d
- if (testvar()) call abort ()
- if (.not. testvar(a)) call abort ()
- if (testptr()) call abort ()
- if (.not. testptr(b)) call abort ()
- if (testarray()) call abort ()
- if (.not. testarray(c)) call abort ()
- if (testparray()) call abort ()
- if (.not. testparray(d)) call abort ()
+ if (testvar()) STOP 1
+ if (.not. testvar(a)) STOP 2
+ if (testptr()) STOP 3
+ if (.not. testptr(b)) STOP 4
+ if (testarray()) STOP 5
+ if (.not. testarray(c)) STOP 6
+ if (testparray()) STOP 7
+ if (.not. testparray(d)) STOP 8
contains
logical function testvar (p)
tr = .true.
- if (any(b .ne. (/6, 120, 504/))) call abort
+ if (any(b .ne. (/6, 120, 504/))) STOP 1
write (line, 9000) product(a,1)
- if (line .ne. ' 6 120 504') call abort
+ if (line .ne. ' 6 120 504') STOP 2
- if (product (a) .ne. 362880) call abort
+ if (product (a) .ne. 362880) STOP 3
write (line, 9010) product(a)
- if (line .ne. '362880') call abort
+ if (line .ne. '362880') STOP 4
m = .true.
m(1, 1) = .false.
m(2, 1) = .false.
b = product (a, 2, m)
- if (any(b .ne. (/28, 40, 162/))) call abort
+ if (any(b .ne. (/28, 40, 162/))) STOP 5
b = product (a, 2, m .and. tr)
- if (any(b .ne. (/28, 40, 162/))) call abort
+ if (any(b .ne. (/28, 40, 162/))) STOP 6
write (line, 9000) product(a, 2, m)
- if (line .ne. ' 28 40 162') call abort
+ if (line .ne. ' 28 40 162') STOP 7
- if (product (a, mask=m) .ne. 181440) call abort
+ if (product (a, mask=m) .ne. 181440) STOP 8
- if (product (a, mask=m .and. tr) .ne. 181440) call abort
+ if (product (a, mask=m .and. tr) .ne. 181440) STOP 9
write (line, 9010) product(a, mask=m)
- if (line .ne. '181440') call abort
+ if (line .ne. '181440') STOP 10
9000 format (3I4)
9010 format (I6)
p = 24
y = abs (x * 2.0 ** (- exponent (x))) * (2.0 ** p)
x = rrspacing(x)
- if (abs (x - y) .gt. abs(x * 1e-6)) call abort
+ if (abs (x - y) .gt. abs(x * 1e-6)) STOP 1
end
subroutine test_real8(orig)
p = 53
y = abs (x * 2.0 ** (- exponent (x))) * (2.0 ** p)
x = rrspacing(x)
- if (abs (x - y) .gt. abs(x * 1e-6)) call abort
+ if (abs (x - y) .gt. abs(x * 1e-6)) STOP 2
end
x = orig
y = x * (2.0 ** i)
x = scale (x, i)
- if (abs (x - y) .gt. abs(x * 1e-6)) call abort
+ if (abs (x - y) .gt. abs(x * 1e-6)) STOP 1
end
subroutine test_real8 (orig, i)
x = orig
y = x * (2.0 ** i)
x = scale (x, i)
- if (abs (x - y) .gt. abs(x * 1e-6)) call abort
+ if (abs (x - y) .gt. abs(x * 1e-6)) STOP 2
end
n = -148
x = 1024.0
y = set_exponent (x, n)
- if ((y .ne. 0.0) .and. (exponent (y) .ne. n)) call abort()
+ if ((y .ne. 0.0) .and. (exponent (y) .ne. n)) STOP 1
n = 8
x = 1024.0
y = set_exponent (x, n)
- if (exponent (y) .ne. n) call abort()
+ if (exponent (y) .ne. n) STOP 2
n = 128
i = 8388607
x = transfer (i, x) ! z'007fffff' Positive denormalized floating-point.
y = set_exponent (x, n)
- if (exponent (y) .ne. n) call abort()
+ if (exponent (y) .ne. n) STOP 3
n = -148
x = -1024.0
y = set_exponent (x, n)
- if ((y .ne. 0.0) .and. (exponent (y) .ne. n)) call abort()
+ if ((y .ne. 0.0) .and. (exponent (y) .ne. n)) STOP 4
n = 8
x = -1024.0
y = set_exponent (x, n)
- if (y .ne. -128.0) call abort()
- if (exponent (y) .ne. n) call abort()
+ if (y .ne. -128.0) STOP 5
+ if (exponent (y) .ne. n) STOP 6
n = 128
i = -2139095041
x = transfer (i, x) ! z'807fffff' Negative denormalized floating-point.
y = set_exponent (x, n)
- if (exponent (y) .ne. n) call abort()
+ if (exponent (y) .ne. n) STOP 7
end
n = -1073
x = 1024.0_8
y = set_exponent (x, n)
- if ((y .ne. 0.0_8) .and. (exponent (y) .ne. n)) call abort()
+ if ((y .ne. 0.0_8) .and. (exponent (y) .ne. n)) STOP 8
n = 8
x = 1024.0_8
y = set_exponent (x, n)
- if (y .ne. 128.0) call abort()
- if (exponent (y) .ne. n) call abort()
+ if (y .ne. 128.0) STOP 9
+ if (exponent (y) .ne. n) STOP 10
n = 1024
i = 4503599627370495_8
x = transfer (i, x) !z'000fffffffffffff' Positive denormalized floating-point.
y = set_exponent (x, n)
- if (exponent (y) .ne. n) call abort()
+ if (exponent (y) .ne. n) STOP 11
n = -1073
x = -1024.0
y = set_exponent (x, n)
- if ((y .ne. 0.0) .and. (exponent (y) .ne. n)) call abort()
+ if ((y .ne. 0.0) .and. (exponent (y) .ne. n)) STOP 12
n = 8
x = -1024.0
y = set_exponent (x, n)
- if (y .ne. -128.0) call abort()
- if (exponent (y) .ne. n) call abort()
+ if (y .ne. -128.0) STOP 13
+ if (exponent (y) .ne. n) STOP 14
n = 1024
i = -9218868437227405313_8
x = transfer (i, x)!z'800fffffffffffff' Negative denormalized floating-point.
y = set_exponent (x, n)
- if (exponent (y) .ne. n) call abort()
+ if (exponent (y) .ne. n) STOP 15
end
allocate (a(3:8, 6:7))
j = shape (a);
- if (any (j .ne. (/ 6, 2 /))) call abort
+ if (any (j .ne. (/ 6, 2 /))) STOP 1
call test(a)
contains
subroutine test (a)
real, dimension (1:, 1:) :: a
- if (any (shape (a) .ne. (/ 6, 2 /))) call abort
+ if (any (shape (a) .ne. (/ 6, 2 /))) STOP 2
end subroutine
end program
t = huge (i1)
t = log10 (t)
res = selected_int_kind (int (t))
- if (res .ne. 1) call abort
+ if (res .ne. 1) STOP 1
t = huge (i2)
t = log10 (t)
res = selected_int_kind (int (t))
- if (res .ne. 2) call abort
+ if (res .ne. 2) STOP 2
t = huge (i4)
t = log10 (t)
res = selected_int_kind (int (t))
- if (res .ne. 4) call abort
+ if (res .ne. 4) STOP 3
t = huge (i8)
t = log10 (t)
res = selected_int_kind (int (t))
- if (res .ne. 8) call abort
+ if (res .ne. 8) STOP 4
i4 = huge (i4)
res = selected_int_kind (i4)
- if (res .ne. (-1)) call abort
+ if (res .ne. (-1)) STOP 5
end program
i = 2
j = 3
- if (sign (i, j) .ne. 2) call abort
+ if (sign (i, j) .ne. 2) STOP 1
i = 4
j = -5
- if (sign (i, j) .ne. -4) call abort
+ if (sign (i, j) .ne. -4) STOP 2
i = -6
j = 7
- if (sign (i, j) .ne. 6) call abort
+ if (sign (i, j) .ne. 6) STOP 3
i = -8
j = -9
- if (sign (i, j) .ne. -8) call abort
+ if (sign (i, j) .ne. -8) STOP 4
r = 1
s = 2
- if (sign (r, s) .ne. 1) call abort
+ if (sign (r, s) .ne. 1) STOP 5
r = 1
s = -2
- if (sign (r, s) .ne. -1) call abort
+ if (sign (r, s) .ne. -1) STOP 6
s = 0
- if (sign (r, s) .ne. 1) call abort
+ if (sign (r, s) .ne. 1) STOP 7
! Will fail on machines which cannot represent negative zero.
s = -s ! Negative zero
- if (sign (r, s) .ne. -1) call abort
+ if (sign (r, s) .ne. -1) STOP 8
end program
integer, dimension(2, 3) :: b
integer i
- if (size (b(2, :), 1) .ne. 3) call abort
+ if (size (b(2, :), 1) .ne. 3) STOP 1
allocate (a(3:8, 5:7))
! With one parameter
- if (size(a) .ne. 18) call abort
+ if (size(a) .ne. 18) STOP 2
! With two parameters, assigning to an array
j = size(a, 1)
- if (any (j .ne. (/6, 6, 6, 6, 6/))) call abort
+ if (any (j .ne. (/6, 6, 6, 6, 6/))) STOP 3
! With a variable second parameter
i = 2
i = size(a, i)
- if (i .ne. 3) call abort
+ if (i .ne. 3) STOP 4
call test(a)
contains
integer i
i = 2
- if ((size(a, 1) .ne. 6) .or. (size(a, i) .ne. 3)) call abort
- if (size (a) .ne. 18 ) call abort
+ if ((size(a, 1) .ne. 6) .or. (size(a, i) .ne. 3)) STOP 5
+ if (size (a) .ne. 18 ) STOP 6
end subroutine
end program
t = tiny(x)
x = spacing(x)
if ((abs (x - y) .gt. abs(x * 1e-6)) &
- .and. (abs (x - t) .gt. abs(x * 1e-6)))call abort
+ .and. (abs (x - t) .gt. abs(x * 1e-6)))STOP 1
end
subroutine test_real8(orig)
t = tiny (x)
x = spacing(x)
if ((abs (x - y) .gt. abs(x * 1e-6)) &
- .and. (abs (x - t) .gt. abs(x * 1e-6)))call abort
+ .and. (abs (x - t) .gt. abs(x * 1e-6)))STOP 2
end
b = spread (a, 1, 2)
if (any (b .ne. reshape ((/1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6/), &
(/2, 2, 3/)))) &
- call abort
+ STOP 1
write(line1, 9000) b
write(line2, 9000) spread (a, 1, 2)
- if (line1 /= line2) call abort
+ if (line1 /= line2) STOP 2
write(line3, 9000) spread (a, 1, 2) + 0
- if (line1 /= line3) call abort
+ if (line1 /= line3) STOP 3
9000 format(12I3)
end program
if (i8 .gt. t) i8 = t
res = selected_real_kind (r = i4)
- if (res .ne. 4) call abort
+ if (res .ne. 4) STOP 1
res = selected_real_kind (r = i8)
- if (res .ne. 8) call abort
+ if (res .ne. 8) STOP 2
! We can in fact have kinds wider than r8. How do we want to check?
! res = selected_real_kind (r = (i8 + 1))
-! if (res .ne. -2) call abort
+! if (res .ne. -2) STOP 3
res = selected_real_kind (p = precision (r4))
- if (res .ne. 4) call abort
+ if (res .ne. 4) STOP 4
res = selected_real_kind (p = precision (r4), r = i4)
- if (res .ne. 4) call abort
+ if (res .ne. 4) STOP 5
res = selected_real_kind (p = precision (r4), r = i8)
- if (res .ne. 8) call abort
+ if (res .ne. 8) STOP 6
! res = selected_real_kind (p = precision (r4), r = i8 + 1)
-! if (res .ne. -2) call abort
+! if (res .ne. -2) STOP 7
res = selected_real_kind (p = precision (r8))
- if (res .ne. 8) call abort
+ if (res .ne. 8) STOP 8
res = selected_real_kind (p = precision (r8), r = i4)
- if (res .ne. 8) call abort
+ if (res .ne. 8) STOP 9
res = selected_real_kind (p = precision (r8), r = i8)
- if (res .ne. 8) call abort
+ if (res .ne. 8) STOP 10
! res = selected_real_kind (p = precision (r8), r = i8 + 1)
-! if (res .ne. -2) call abort
+! if (res .ne. -2) STOP 11
! res = selected_real_kind (p = (precision (r8) + 1))
-! if (res .ne. -1) call abort
+! if (res .ne. -1) STOP 12
! res = selected_real_kind (p = (precision (r8) + 1), r = i4)
-! if (res .ne. -1) call abort
+! if (res .ne. -1) STOP 13
! res = selected_real_kind (p = (precision (r8) + 1), r = i8)
-! if (res .ne. -1) call abort
+! if (res .ne. -1) STOP 14
! res = selected_real_kind (p = (precision (r8) + 1), r = i8 + 1)
-! if (res .ne. -3) call abort
+! if (res .ne. -3) STOP 15
end
tr = .true.
- if (sum(a) .ne. 45) call abort
+ if (sum(a) .ne. 45) STOP 1
write (line, 9000) sum(a)
- if (line .ne. ' 45 ') call abort
+ if (line .ne. ' 45 ') STOP 2
b = sum (a, 1)
- if (b(1) .ne. 6) call abort
- if (b(2) .ne. 15) call abort
- if (b(3) .ne. 24) call abort
+ if (b(1) .ne. 6) STOP 3
+ if (b(2) .ne. 15) STOP 4
+ if (b(3) .ne. 24) STOP 5
write (line, 9000) sum (a, 1)
- if (line .ne. ' 6 15 24') call abort
+ if (line .ne. ' 6 15 24') STOP 6
m = .true.
m(1, 1) = .false.
m(2, 1) = .false.
- if (sum (a, mask=m) .ne. 42) call abort
- if (sum (a, mask=m .and. tr) .ne. 42) call abort
+ if (sum (a, mask=m) .ne. 42) STOP 7
+ if (sum (a, mask=m .and. tr) .ne. 42) STOP 8
write(line, 9000) sum (a, mask=m)
- if (line .ne. ' 42 ') call abort
+ if (line .ne. ' 42 ') STOP 9
b = sum (a, 2, m)
- if (b(1) .ne. 11) call abort
- if (b(2) .ne. 13) call abort
- if (b(3) .ne. 18) call abort
+ if (b(1) .ne. 11) STOP 10
+ if (b(2) .ne. 13) STOP 11
+ if (b(3) .ne. 18) STOP 12
b = sum (a, 2, m .and. tr)
- if (b(1) .ne. 11) call abort
- if (b(2) .ne. 13) call abort
- if (b(3) .ne. 18) call abort
+ if (b(1) .ne. 11) STOP 13
+ if (b(2) .ne. 13) STOP 14
+ if (b(3) .ne. 18) STOP 15
write (line, 9000) sum (a, 2, m)
- if (line .ne. ' 11 13 18') call abort
+ if (line .ne. ' 11 13 18') STOP 16
9000 format(3I3)
end program
integer(kind=4) :: z4, i4, e4
integer(kind=8) :: z8, i8, e8
- if (trailz(0_1) /= 8) call abort()
- if (trailz(0_2) /= 16) call abort()
- if (trailz(0_4) /= 32) call abort()
- if (trailz(0_8) /= 64) call abort()
-
- if (trailz(1_1) /= 0) call abort()
- if (trailz(1_2) /= 0) call abort()
- if (trailz(1_4) /= 0) call abort()
- if (trailz(1_8) /= 0) call abort()
-
- if (trailz(8_1) /= 3) call abort()
- if (trailz(8_2) /= 3) call abort()
- if (trailz(8_4) /= 3) call abort()
- if (trailz(8_8) /= 3) call abort()
-
- if (trailz(z1) /= 8) call abort()
- if (trailz(z2) /= 16) call abort()
- if (trailz(z4) /= 32) call abort()
- if (trailz(z8) /= 64) call abort()
-
- if (trailz(i1) /= 0) call abort()
- if (trailz(i2) /= 0) call abort()
- if (trailz(i4) /= 0) call abort()
- if (trailz(i8) /= 0) call abort()
-
- if (trailz(e1) /= 3) call abort()
- if (trailz(e2) /= 3) call abort()
- if (trailz(e4) /= 3) call abort()
- if (trailz(e8) /= 3) call abort()
+ if (trailz(0_1) /= 8) STOP 1
+ if (trailz(0_2) /= 16) STOP 2
+ if (trailz(0_4) /= 32) STOP 3
+ if (trailz(0_8) /= 64) STOP 4
+
+ if (trailz(1_1) /= 0) STOP 5
+ if (trailz(1_2) /= 0) STOP 6
+ if (trailz(1_4) /= 0) STOP 7
+ if (trailz(1_8) /= 0) STOP 8
+
+ if (trailz(8_1) /= 3) STOP 9
+ if (trailz(8_2) /= 3) STOP 10
+ if (trailz(8_4) /= 3) STOP 11
+ if (trailz(8_8) /= 3) STOP 12
+
+ if (trailz(z1) /= 8) STOP 13
+ if (trailz(z2) /= 16) STOP 14
+ if (trailz(z4) /= 32) STOP 15
+ if (trailz(z8) /= 64) STOP 16
+
+ if (trailz(i1) /= 0) STOP 17
+ if (trailz(i2) /= 0) STOP 18
+ if (trailz(i4) /= 0) STOP 19
+ if (trailz(i8) /= 0) STOP 20
+
+ if (trailz(e1) /= 3) STOP 21
+ if (trailz(e2) /= 3) STOP 22
+ if (trailz(e4) /= 3) STOP 23
+ if (trailz(e8) /= 3) STOP 24
end subroutine test_trailz
end program
b = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
a = transpose (b)
if (any (a .ne. reshape ((/1, 4, 7, 2, 5, 8, 3, 6, 9/), (/3, 3/)))) &
- call abort
+ STOP 1
c = (0.0, 0.0)
d = reshape ((/(1d0,2d0), (3d0, 4d0), (5d0, 6d0), (7d0, 8d0)/), (/2, 2/))
c = transpose (d);
if (any (c .ne. reshape ((/(1d0, 2d0), (5d0, 6d0), &
(3d0, 4d0), (7d0, 8d0)/), (/2, 2/)))) &
- call abort ();
+ STOP 1;
e = reshape ((/(1.0,2.0), (3.0, 4.0), (5.0, 6.0), (7.0, 8.0)/), (/2, 2/))
e = transpose (e);
if (any (e .ne. reshape ((/(1.0, 2.0), (5.0, 6.0), &
(3.0, 4.0), (7.0, 8.0)/), (/2, 2/)))) &
- call abort ();
+ STOP 2;
end program
character(len=4) b,work
a='1234 '
b=work(8,a)
- if (llt(b,"1234")) call abort()
+ if (llt(b,"1234")) STOP 1
a=' '
b=trim(a)
- if (b .gt. "") call abort()
+ if (b .gt. "") STOP 2
b='12'
a=repeat(b,0)
- if (a .gt. "") call abort()
+ if (a .gt. "") STOP 3
a=repeat(b,2)
- if (a .ne. "12 12 ") call abort()
+ if (a .ne. "12 12 ") STOP 4
end
function work(i,a)
a = reshape ((/1, 0, 0, 0, 1, 0, 0, 0, 1/), (/3, 3/));
b = unpack ((/2, 3, 4/), mask, a)
if (any (b .ne. reshape ((/1, 2, 0, 3, 1, 0, 0, 0, 4/), (/3, 3/)))) &
- call abort
+ STOP 1
write (line1,'(10I4)') b
write (line2,'(10I4)') unpack((/2, 3, 4/), mask, a)
- if (line1 .ne. line2) call abort
+ if (line1 .ne. line2) STOP 2
b = -1
b = unpack ((/2, 3, 4/), mask, 0)
if (any (b .ne. reshape ((/0, 2, 0, 3, 0, 0, 0, 0, 4/), (/3, 3/)))) &
- call abort
+ STOP 3
end program
allocate(a(alength))
inquire (iolength = iol) a
if ( 4*alength /= iol) then
- call abort
+ STOP 1
end if
end program iolength_1
type(foo) :: d
inquire (iolength = iol) d
if ( 32 /= iol) then
- call abort
+ STOP 1
end if
end program iolength_2
real(dp) :: c
inquire (iolength = iol) a, b, c
if ( 16 /= iol) then
- call abort
+ STOP 1
end if
end program iolength_3
read(nin, fmt = *) (x(i,j), j=1, n)
if (debug) write(*, *) (x(i,j), j=1, n)
do K = 1,n
- if (x(i,k).ne.y(i,k)) call abort
+ if (x(i,k).ne.y(i,k)) STOP 1
end do
end do
m = 0
read(nin, fmt = *) (x(i,j), j=1, n)
if (debug) write(*, *) (x(i,j), j=1, n)
do K = 1,n
- if (x(i,k).ne.y(i,k)) call abort
+ if (x(i,k).ne.y(i,k)) STOP 2
end do
end do
close(nin, status='delete')
SELECT CASE (L)
CASE (.TRUE.)
- CALL abort
+ STOP 1
CASE (.FALSE.)
CONTINUE
CASE DEFAULT
- CALL abort
+ STOP 2
END SELECT
SELECT CASE (L)
CASE (.TRUE., .FALSE.)
CONTINUE
CASE DEFAULT
- CALL abort
+ STOP 3
END SELECT
SELECT CASE (L)
CASE (.FALSE.)
CONTINUE
CASE DEFAULT
- CALL abort
+ STOP 4
END SELECT
SELECT CASE (L)
CASE (.NOT. .TRUE.)
CONTINUE
CASE DEFAULT
- CALL abort
+ STOP 5
END SELECT
SELECT CASE (.NOT. L)
CASE (.TRUE.)
CONTINUE
CASE DEFAULT
- CALL abort
+ STOP 6
END SELECT
SELECT CASE (Truth_or_Dare() .OR. L)
CASE (.TRUE.)
CONTINUE
CASE DEFAULT
- CALL abort
+ STOP 7
END SELECT
CONTAINS
i = 0
call test (i)
- if (i .ne. 42) call abort
+ if (i .ne. 42) STOP 1
end program
subroutine test (p)
real(kind=8) val8
integer n
- if (abs (val4 - known) .gt. 0.001) call abort
- if (abs (real (val8, kind=4) - known) .gt. 0.001) call abort
+ if (abs (val4 - known) .gt. 0.001) STOP 1
+ if (abs (real (val8, kind=4) - known) .gt. 0.001) STOP 2
end subroutine
subroutine dotestc (n, val4, val8, known)
complex(kind=4) val4, known
complex(kind=8) val8
integer n
- if (abs (val4 - known) .gt. 0.001) call abort
- if (abs (cmplx (val8, kind=4) - known) .gt. 0.001) call abort
+ if (abs (val4 - known) .gt. 0.001) STOP 3
+ if (abs (cmplx (val8, kind=4) - known) .gt. 0.001) STOP 4
end subroutine
program testmath
data a(1:3:2) /2*1.0/
end module m1
use m1
-if (a(1).NE.1.) call abort()
-if (a(1).NE.a(3)) call abort()
+if (a(1).NE.1.) STOP 1
+if (a(1).NE.a(3)) STOP 2
end
subroutine bar (r)
real r
- if (r .ne. 1.0) call abort ()
+ if (r .ne. 1.0) STOP 1
end subroutine
end module
subroutine myfoo (i)
integer i
- if (i .ne. 42) call abort ()
+ if (i .ne. 42) STOP 2
end subroutine
program test
! check a field width = 0
fmt = '(F0.0)'
write(l,fmt=fmt)pos_inf
- if (l.ne.'Inf') call abort
+ if (l.ne.'Inf') STOP 1
write(l,fmt=fmt)neg_inf
- if (l.ne.'-Inf') call abort
+ if (l.ne.'-Inf') STOP 2
write(l,fmt=fmt)nan
- if (l.ne.'NaN') call abort
+ if (l.ne.'NaN') STOP 3
! check a field width < 3
fmt = '(F2.0)'
write(l,fmt=fmt)pos_inf
- if (l.ne.'**') call abort
+ if (l.ne.'**') STOP 4
write(l,fmt=fmt)neg_inf
- if (l.ne.'**') call abort
+ if (l.ne.'**') STOP 5
write(l,fmt=fmt)nan
- if (l.ne.'**') call abort
+ if (l.ne.'**') STOP 6
! check a field width = 3
fmt = '(F3.0)'
write(l,fmt=fmt)pos_inf
- if (l.ne.'Inf') call abort
+ if (l.ne.'Inf') STOP 7
write(l,fmt=fmt)neg_inf
- if (l.ne.'***') call abort
+ if (l.ne.'***') STOP 8
write(l,fmt=fmt)nan
- if (l.ne.'NaN') call abort
+ if (l.ne.'NaN') STOP 9
! check a field width > 3
fmt = '(F4.0)'
write(l,fmt=fmt)pos_inf
- if (l.ne.' Inf') call abort
+ if (l.ne.' Inf') STOP 10
write(l,fmt=fmt)neg_inf
- if (l.ne.'-Inf') call abort
+ if (l.ne.'-Inf') STOP 11
write(l,fmt=fmt)nan
- if (l.ne.' NaN') call abort
+ if (l.ne.' NaN') STOP 12
! check a field width = 7
fmt = '(F7.0)'
write(l,fmt=fmt)pos_inf
- if (l.ne.' Inf') call abort
+ if (l.ne.' Inf') STOP 13
write(l,fmt=fmt)neg_inf
- if (l.ne.' -Inf') call abort
+ if (l.ne.' -Inf') STOP 14
write(l,fmt=fmt)nan
- if (l.ne.' NaN') call abort
+ if (l.ne.' NaN') STOP 15
! check a field width = 8
fmt = '(F8.0)'
write(l,fmt=fmt)pos_inf
- if (l.ne.'Infinity') call abort
+ if (l.ne.'Infinity') STOP 16
write(l,fmt=fmt)neg_inf
- if (l.ne.' -Inf') call abort
+ if (l.ne.' -Inf') STOP 17
write(l,fmt=fmt)nan
- if (l.ne.' NaN') call abort
+ if (l.ne.' NaN') STOP 18
! check a field width = 9
fmt = '(F9.0)'
write(l,fmt=fmt)pos_inf
- if (l.ne.' Infinity') call abort
+ if (l.ne.' Infinity') STOP 19
write(l,fmt=fmt)neg_inf
- if (l.ne.'-Infinity') call abort
+ if (l.ne.'-Infinity') STOP 20
write(l,fmt=fmt)nan
- if (l.ne.' NaN') call abort
+ if (l.ne.' NaN') STOP 21
! check a field width = 14
fmt = '(F14.0)'
write(l,fmt=fmt)pos_inf
- if (l.ne.' Infinity') call abort
+ if (l.ne.' Infinity') STOP 22
write(l,fmt=fmt)neg_inf
- if (l.ne.' -Infinity') call abort
+ if (l.ne.' -Infinity') STOP 23
write(l,fmt=fmt)nan
- if (l.ne.' NaN') call abort
+ if (l.ne.' NaN') STOP 24
end
integer, dimension(6) :: w2
w2 = (/ 1, 2, w1(3:1:-1), 3 /)
- if (any (w2 .ne. (/ 1, 2, 7, 6, 5, 3/))) call abort
+ if (any (w2 .ne. (/ 1, 2, 7, 6, 5, 3/))) STOP 1
end
CONTAINS
SUBROUTINE A(B)
REAL, POINTER :: B
- IF (ASSOCIATED(B)) CALL ABORT()
+ IF (ASSOCIATED(B)) STOP 1
END SUBROUTINE A
END MODULE T
USE T
character(len=*), optional :: b
integer, optional :: c
if (i .eq. 1) then
- if (a .ne. "test") call abort
+ if (a .ne. "test") STOP 1
else
- if (b .ne. "Hello World") call abort
- if (c .ne. 42) call abort
+ if (b .ne. "Hello World") STOP 2
+ if (c .ne. 42) STOP 3
end if
end subroutine
end program
REAL, PARAMETER :: rr(10) = ii
do i = 1, 10
- if (ii(i) /= i) call abort()
- if (rr(i) /= i) call abort()
+ if (ii(i) /= i) STOP 1
+ if (rr(i) /= i) STOP 2
end do
end program parameter_1
end module m
use m
-if (p .ne. -1.) CALL abort()
+if (p .ne. -1.) STOP 1
end
subroutine test (p)
integer, dimension (3) :: p
- if (any (p .ne. (/ 2, 4, 6/))) call abort
+ if (any (p .ne. (/ 2, 4, 6/))) STOP 1
end subroutine
program partparm
integer :: j = +100
if ((p .ne. 3.1415) .or. (i .ne. 42) .or. (q .ne. 1.234) .or. (j .ne. 100)) &
- call abort
+ STOP 1
end program
i = 2
j = i ** 10
- if (abs (j - 1024) .gt. del) call abort
+ if (abs (j - 1024) .gt. del) STOP 1
j = i ** (-10)
- if (abs (j - 0) .gt. del) call abort
+ if (abs (j - 0) .gt. del) STOP 2
j = i ** 0
- if (abs (j - 1) .gt. del) call abort
+ if (abs (j - 1) .gt. del) STOP 3
i = 1
j = i ** 10
- if (abs (j - 1) .gt. del) call abort
+ if (abs (j - 1) .gt. del) STOP 4
j = i ** (-10)
- if (abs (j - 1) .gt. del) call abort
+ if (abs (j - 1) .gt. del) STOP 5
j = i ** 0
- if (abs (j - 1) .gt. del) call abort
+ if (abs (j - 1) .gt. del) STOP 6
i = -1
j = i ** 10
- if (abs (j - 1) .gt. del) call abort
+ if (abs (j - 1) .gt. del) STOP 7
j = i ** (-10)
- if (abs (j - 1) .gt. del) call abort
+ if (abs (j - 1) .gt. del) STOP 8
j = i ** 0
- if (abs (j - 1) .gt. del) call abort
+ if (abs (j - 1) .gt. del) STOP 9
j = i ** 11
- if (abs (j - (-1)) .gt. del) call abort
+ if (abs (j - (-1)) .gt. del) STOP 10
j = i ** (-11)
- if (abs (j - (-1)) .gt. del) call abort
+ if (abs (j - (-1)) .gt. del) STOP 11
c = (2.0, 3.0)
z = c ** 2
- if (abs(z - (-5.0, 12.0)) .gt. del) call abort
+ if (abs(z - (-5.0, 12.0)) .gt. del) STOP 12
z = c ** 7
- if (abs(z - (6554.0, 4449.0)) .gt. del) call abort
+ if (abs(z - (6554.0, 4449.0)) .gt. del) STOP 13
two = 2.0
r = two ** 1
- if (abs (r - 2.0) .gt. del) call abort
+ if (abs (r - 2.0) .gt. del) STOP 14
r = two ** 2
- if (abs (r - 4.0) .gt. del) call abort
+ if (abs (r - 4.0) .gt. del) STOP 15
r = two ** 3
- if (abs (r - 8.0) .gt. del) call abort
+ if (abs (r - 8.0) .gt. del) STOP 16
r = two ** 4
- if (abs (r - 16.0) .gt. del) call abort
+ if (abs (r - 16.0) .gt. del) STOP 17
r = two ** 0
- if (abs (r - 1.0) .gt. del) call abort
+ if (abs (r - 1.0) .gt. del) STOP 18
r = two ** (-1)
- if (abs (r - 0.5) .gt. del) call abort
+ if (abs (r - 0.5) .gt. del) STOP 19
r = two ** (-2)
- if (abs (r - 0.25) .gt. del) call abort
+ if (abs (r - 0.25) .gt. del) STOP 20
r = two ** (-4)
- if (abs (r - 0.0625) .gt. del) call abort
+ if (abs (r - 0.0625) .gt. del) STOP 21
s = 3.0
r = two ** s
- if (abs (r - 8.0) .gt. del) call abort
+ if (abs (r - 8.0) .gt. del) STOP 22
s = -3.0
r = two ** s
- if (abs (r - 0.125) .gt. del) call abort
+ if (abs (r - 0.125) .gt. del) STOP 23
i = 3
r = two ** i
- if (abs (r - 8.0) .gt. del) call abort
+ if (abs (r - 8.0) .gt. del) STOP 24
i = -3
r = two ** i
- if (abs (r - 0.125) .gt. del) call abort
+ if (abs (r - 0.125) .gt. del) STOP 25
c = (2.0, 3.0)
c = c ** two
- if (abs(c - (-5.0, 12.0)) .gt. del) call abort
+ if (abs(c - (-5.0, 12.0)) .gt. del) STOP 26
end program
subroutine test (a)
character (len = *), dimension (:, :) :: a
- if (size (a, 1) .ne. 2) call abort
- if (size (a, 2) .ne. 2) call abort
- if (len (a) .ne. 1) call abort
+ if (size (a, 1) .ne. 2) STOP 1
+ if (size (a, 2) .ne. 2) STOP 2
+ if (len (a) .ne. 1) STOP 3
- if (a (1, 1) .ne. 'a') call abort
- if (a (2, 1) .ne. 'b') call abort
- if (a (1, 2) .ne. 'c') call abort
- if (a (2, 2) .ne. 'd') call abort
+ if (a (1, 1) .ne. 'a') STOP 4
+ if (a (2, 1) .ne. 'b') STOP 5
+ if (a (1, 2) .ne. 'c') STOP 6
+ if (a (2, 2) .ne. 'd') STOP 7
end subroutine test
end program main
real, dimension (:), pointer :: x
x => null ()
x => test (x)
- if (.not. associated (x)) call abort
- if (size (x) .ne. 10) call abort
+ if (.not. associated (x)) STOP 1
+ if (size (x) .ne. 10) STOP 2
contains
function test (p)
real, dimension (:), pointer :: p, test
- if (associated (p)) call abort
+ if (associated (p)) STOP 3
allocate (test (10))
- if (associated (p)) call abort
+ if (associated (p)) STOP 4
end function test
end program main
real, dimension (:), pointer :: x
x => null ()
x => test ()
- if (.not. associated (x)) call abort
- if (size (x) .ne. 10) call abort
+ if (.not. associated (x)) STOP 1
+ if (size (x) .ne. 10) STOP 2
contains
function test()
real, dimension (:), pointer :: test
- if (associated (x)) call abort
+ if (associated (x)) STOP 3
allocate (test (10))
- if (associated (x)) call abort
+ if (associated (x)) STOP 4
end function test
end program main
USE TEST
character(len=12) :: line
write(line,'(3A4)') s2a_3("a","bb","ccc")
-IF (line.NE."a bb ccc") CALL ABORT()
+IF (line.NE."a bb ccc") STOP 1
END
DATA DY/0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0/
CALL DAXPY (N,DA,DX,DY)
DO 10 I = 1, N
- if (DX(I).ne.DY(I)) call abort
+ if (DX(I).ne.DY(I)) STOP 1
10 CONTINUE
STOP
END
logical :: l2(4)
l1 = (/.TRUE.,.FALSE.,.TRUE.,.FALSE./)
l2 = (/.FALSE.,.TRUE.,.FALSE.,.TRUE./)
- if (dot_product (l1, l2)) call abort ()
+ if (dot_product (l1, l2)) STOP 1
l2 = .TRUE.
- if (.not.dot_product (l1, l2)) call abort ()
+ if (.not.dot_product (l1, l2)) STOP 2
end
ENDDO
IF (ivvv.NE.2) THEN
- call abort
+ STOP 1
ENDIF
END subroutine
r(k,k) = a(k, k - 1) * dj
enddo
- if (r(0,0) .ne. -2.) call abort
+ if (r(0,0) .ne. -2.) STOP 1
end subroutine
implicit none
integer a
- if (a .ne. 42) call abort
+ if (a .ne. 42) STOP 1
end subroutine
subroutine test2 (p)
a = (/ 1, 2, 3, 4, 5, 6 /)
b => a
- if (any (b .ne. (/ 1, 2, 3, 4, 5, 6 /))) call abort
+ if (any (b .ne. (/ 1, 2, 3, 4, 5, 6 /))) STOP 1
b => a(1:6:2)
- if (any (b .ne. (/ 1, 3, 5/))) call abort
+ if (any (b .ne. (/ 1, 3, 5/))) STOP 2
p => i
i = 42
- if (p .ne. 42) call abort
+ if (p .ne. 42) STOP 3
p => a(4)
- if (p .ne. 4) call abort
+ if (p .ne. 4) STOP 4
end program
call random_number (b(1:5))
call random_seed(get=seed)
call random_number (b(6:10))
- if (any (a .ne. b)) call abort
+ if (any (a .ne. b)) STOP 1
! Get the last 5 numbers again.
call random_seed (put=seed)
call random_number (b(6:10))
- if (any (a .ne. b)) call abort
+ if (any (a .ne. b)) STOP 2
end program
call random_number(r8)
call random_number (r8(10))
- if (any ((r4 - r8) .gt. delta)) call abort
+ if (any ((r4 - r8) .gt. delta)) STOP 1
end program
real :: r(5) = 0.0
call random_number(r)
- if (all (r .eq. 0)) call abort
+ if (all (r .eq. 0)) STOP 1
end program
! PR 13919, segfault when file is empty
open(unit=8,status='scratch')
read(8,*,end=1)i
- call abort
+ STOP 1
1 continue
end
rewind(7)
read(7, *) t
read(7, *) temp_name
- if (temp_name.ne.'') call abort
+ if (temp_name.ne.'') STOP 1
end
! These first two shouldn't require a temporary.
a = 0
a = test(6, 5)
- if (a(1,1) .ne. 42) call abort
- if (a(6,5) .ne. 43) call abort
+ if (a(1,1) .ne. 42) STOP 1
+ if (a(6,5) .ne. 43) STOP 2
a = 0
a(1:6:2, 2:5) = test2()
- if (a(1,2) .ne. 42) call abort
- if (a(5,5) .ne. 43) call abort
+ if (a(1,2) .ne. 42) STOP 3
+ if (a(5,5) .ne. 43) STOP 4
a = 1
! This requires a temporary
a = test(6, 5) - a
- if (a(1,1) .ne. 41) call abort
- if (a(6,5) .ne. 42) call abort
+ if (a(1,1) .ne. 41) STOP 5
+ if (a(6,5) .ne. 42) STOP 6
contains
use retarray_2
integer, dimension(4) :: b, a=(/1,2,3,4/)
b = z(a)
- if (any (b .ne. (/1, 2, 3, 4/))) call abort
+ if (any (b .ne. (/1, 2, 3, 4/))) STOP 1
end
j = 131
s = 'This is a test string'
else
- if (i .ne. 26 .or. j .ne. 131) call abort
- if (s .ne. 'This is a test string') call abort
+ if (i .ne. 26 .or. j .ne. 131) STOP 1
+ if (s .ne. 'This is a test string') STOP 2
end if
end subroutine foo
subroutine bar (s)
character*42 s
- if (s .ne. '0123456789012345678901234567890123456') call abort
+ if (s .ne. '0123456789012345678901234567890123456') STOP 3
call foo (.false.)
end subroutine bar
subroutine baz
i = 1
h = 12345
end if
- if (h .ne. 12345) call abort
+ if (h .ne. 12345) STOP 1
end subroutine foo
subroutine bar
a(:, 2:4) = a(:, 1:3)
do n = 1, 5
- if (a(n, 3) .ne. (n + 1)) call abort
- if (b(4, n) .ne. (6 - n)) call abort
+ if (a(n, 3) .ne. (n + 1)) STOP 1
+ if (b(4, n) .ne. (6 - n)) STOP 2
end do
end program
a(:, 2:4) = a(:, 1:3)
do n = 1, 5
- if (a(n, 3) .ne. (n + 1)) call abort
- if (b(4, n) .ne. (6 - n)) call abort
+ if (a(n, 3) .ne. (n + 1)) STOP 1
+ if (b(4, n) .ne. (6 - n)) STOP 2
end do
end program
a = reshape ((/1, 2, 3, 4, 5, 6/), (/3, 2/))
a = a(3:1:-1, 2:1:-1);
- if (any (a .ne. reshape ((/6, 5, 4, 3, 2, 1/), (/3, 2/)))) call abort
+ if (any (a .ne. reshape ((/6, 5, 4, 3, 2, 1/), (/3, 2/)))) STOP 1
end program
end select
end function
-if (j(2).NE.2 .OR. j(11).NE.0) call abort()
+if (j(2).NE.2 .OR. j(11).NE.0) STOP 1
end
if (debug) then
print '(A,Z8)','m(1) incorrect. m(1) = ',m(1)
else
- call abort
+ STOP 1
endif
endif
if (debug) then
print '(A,Z8)','m(2) incorrect. m(2) = ',m(2)
else
- call abort
+ STOP 2
endif
endif
if (debug) then
print '(A,Z8)','n incorrect. n = ',n
else
- call abort
+ STOP 3
endif
endif
if (debug) then
print*,'element ',i,' was ',r(i),' should be ',i
else
- call abort
+ STOP 4
endif
endif
end do
200 FORMAT(I4,///I4)
READ(7,200)I,J
CLOSE(7, STATUS='DELETE')
- IF (I.NE.1) CALL ABORT
- IF (J.NE.4) CALL ABORT
+ IF (I.NE.1) STOP 1
+ IF (J.NE.4) STOP 2
END
INTRINSIC IABS
INTEGER FF324
IVCOMP = FF324(IABS,-7)
- IF (IVCOMP.NE.8) CALL ABORT
+ IF (IVCOMP.NE.8) STOP 1
END
INTEGER FUNCTION FF324(NINT, IDON03)
FF324 = NINT(IDON03) + 1
complex fn
complex val, res
- if (diff(fn(val),res)) call abort
+ if (diff(fn(val),res)) STOP 1
contains
function diff(a,b)
complex a,b
double complex fn
double complex val, res
- if (diff(fn(val),res)) call abort
+ if (diff(fn(val),res)) STOP 2
contains
function diff(a,b)
double complex a,b
real fn, res
complex val
- if (diff(fn(val),res)) call abort
+ if (diff(fn(val),res)) STOP 3
contains
function diff(a,b)
real a,b
double precision fn, res
double complex val
- if (diff(fn(val),res)) call abort
+ if (diff(fn(val),res)) STOP 4
contains
function diff(a,b)
double precision a,b
real fn
real val, res
- if (diff(fn(val), res)) call abort
+ if (diff(fn(val), res)) STOP 5
contains
function diff(a, b)
real a, b
double precision fn
double precision val, res
- if (diff(fn(val), res)) call abort
+ if (diff(fn(val), res)) STOP 6
contains
function diff(a, b)
double precision a, b
real fn
real val1, val2, res
- if (diff(fn(val1, val2), res)) call abort
+ if (diff(fn(val1, val2), res)) STOP 7
contains
function diff(a, b)
real a, b
double precision fn
double precision val1, val2, res
- if (diff(fn(val1, val2), res)) call abort
+ if (diff(fn(val1, val2), res)) STOP 8
contains
function diff(a, b)
double precision a, b
subroutine test_dprod(fn)
double precision fn
- if (abs (fn (2.0, 3.0) - 6d0) .gt. 0.00001) call abort
+ if (abs (fn (2.0, 3.0) - 6d0) .gt. 0.00001) STOP 9
end subroutine
subroutine test_nint(fn,val,res)
integer fn, res
real val
- if (res .ne. fn(val)) call abort
+ if (res .ne. fn(val)) STOP 10
end subroutine
subroutine test_idnint(fn,val,res)
integer fn, res
double precision val
- if (res .ne. fn(val)) call abort
+ if (res .ne. fn(val)) STOP 11
end subroutine
subroutine test_idim(fn,val1,val2,res)
integer fn, res, val1, val2
- if (res .ne. fn(val1,val2)) call abort
+ if (res .ne. fn(val1,val2)) STOP 12
end subroutine
subroutine test_iabs(fn,val,res)
integer fn, res, val
- if (res .ne. fn(val)) call abort
+ if (res .ne. fn(val)) STOP 13
end subroutine
subroutine test_len(fn,val,res)
integer fn, res
character(len=*) val
- if (res .ne. fn(val)) call abort
+ if (res .ne. fn(val)) STOP 14
end subroutine
subroutine test_index(fn,val1,val2,res)
integer fn, res
character(len=*) val1, val2
- if (fn(val1,val2) .ne. res) call abort
+ if (fn(val1,val2) .ne. res) STOP 15
end subroutine
program specifics
st1 (i, j) = i + j
st2 (i, j) = c(i, j)
- if (st1 (1, 2) .ne. 3) call abort
+ if (st1 (1, 2) .ne. 3) STOP 1
c = 3
- if (st2 (1, 2) .ne. 3 .or. st2 (2, 3) .ne. 3) call abort
+ if (st2 (1, 2) .ne. 3 .or. st2 (2, 3) .ne. 3) STOP 2
end subroutine
subroutine with_function_call
integer fun, st3
st3 (i, j) = fun (i) + fun (j)
- if (st3 (fun (2), 4) .ne. 16) call abort
+ if (st3 (fun (2), 4) .ne. 16) STOP 3
end subroutine
subroutine with_character_dummy
st4 (i, j) = "0123456789"(i:j)
st5 (s1, s2) = s1 // s2
- if (st4 (1, 4) .ne. "0123" ) call abort
- if (st5 ("01", "02") .ne. "01 02 ") call abort ! { dg-warning "Character length of actual argument shorter" }
+ if (st4 (1, 4) .ne. "0123" ) STOP 4
+ if (st5 ("01", "02") .ne. "01 02 ") STOP 5! { dg-warning "Character length of actual argument shorter" }
end subroutine
subroutine with_derived_type_dummy
me%age = 5
me%name = "Tom"
tom = st6 (me)
- if (tom%age .ne. 5) call abort
- if (tom%name .gt. "Tom") call abort
+ if (tom%age .ne. 5) STOP 6
+ if (tom%name .gt. "Tom") STOP 7
end subroutine
subroutine with_pointer_dummy
p1 => i
i = '1234'
- if (a (p1) .ne. '123410') call abort
+ if (a (p1) .ne. '123410') STOP 8
end subroutine
subroutine multiple_eval
st7(i) = i + fun(i)
- if (st7(fun2(10)) .ne. 3) call abort
+ if (st7(fun2(10)) .ne. 3) STOP 9
end subroutine
end
subroutine check(a, b)
character (len=*) :: a, b
- if ((a .ne. b) .or. (len(a) .ne. len(b))) call abort ()
+ if ((a .ne. b) .or. (len(a) .ne. len(b))) STOP 1
end subroutine
end program
program st_function_2
integer fn, a, b
fn(a, b) = a + b
- if (foo(1) .ne. 43) call abort
+ if (foo(1) .ne. 43) STOP 1
! Check that values aren't modified when avaluating the arguments.
a = 1
b = 5
- if (fn (b + 2, a + 3) .ne. 11) call abort
+ if (fn (b + 2, a + 3) .ne. 11) STOP 2
contains
function foo (x)
integer z, y, foo, x
m = 10
n = 20
k = 30
- if ((a .ne. 10.0).or.(b(1) .ne. 20.0).or.(c(1) .ne. 30.0)) call abort
- if ((m .ne. 10).or.(n(256,4) .ne. 20).or.(k(1,1024) .ne. 30)) call abort
+ if ((a .ne. 10.0).or.(b(1) .ne. 20.0).or.(c(1) .ne. 30.0)) STOP 1
+ if ((m .ne. 10).or.(n(256,4) .ne. 20).or.(k(1,1024) .ne. 30)) STOP 2
end subroutine
! Local variables defined in recursive subroutine are always put on stack.
real a (32769)
a (1) = 42
if (n .ge. 1) call sub2 (n-1)
- if (a(1) .ne. 42) call abort
+ if (a(1) .ne. 42) STOP 3
a (1) = 0
end subroutine
end
v = f() // g()
- if (v .ne. "Hello World ") call abort ()
+ if (v .ne. "Hello World ") STOP 1
end program
(/'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'/)
c = hex_chars(i)
-if (c.ne.'3') call abort()
+if (c.ne.'3') STOP 1
end
program strarray_1
program strarray_2
character c
call foo(3,c)
- if (c.ne.'3') call abort()
+ if (c.ne.'3') STOP 1
end
implicit none
character(len=5), dimension(2) :: a
- if ((a(1) .ne. "Hello") .or. (a(2) .ne. "World")) call abort
+ if ((a(1) .ne. "Hello") .or. (a(2) .ne. "World")) STOP 1
end subroutine
subroutine foo2(a, m)
integer m
character(len=5), dimension(m) :: a
- if ((a(1) .ne. "Hello") .or. (a(2) .ne. "World")) call abort
+ if ((a(1) .ne. "Hello") .or. (a(2) .ne. "World")) STOP 2
end subroutine
subroutine foo3(a, n)
integer n
character(len=n), dimension(:) :: a
- if ((a(1) .ne. "Hello") .or. (a(2) .ne. "World")) call abort
+ if ((a(1) .ne. "Hello") .or. (a(2) .ne. "World")) STOP 3
end subroutine
subroutine foo4(a, n, m)
integer n, m
character(len=n), dimension(m) :: a
- if ((a(1) .ne. "Hello") .or. (a(2) .ne. "World")) call abort
+ if ((a(1) .ne. "Hello") .or. (a(2) .ne. "World")) STOP 4
end subroutine
subroutine foo5(a)
implicit none
character(len=2), dimension(5) :: a
- if ((a(1) .ne. "Wo") .or. (a(3) .ne. "dH") .or. (a(5) .ne. "lo")) call abort
+ if ((a(1) .ne. "Wo") .or. (a(3) .ne. "dH") .or. (a(5) .ne. "lo")) STOP 5
end subroutine
end program
character(len=5), dimension(2) :: b
b = a;
- if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) call abort
+ if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) STOP 1
end subroutine
subroutine foo2(a, m)
character(len=5), dimension(m) :: b
b = a
- if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) call abort
+ if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) STOP 2
end subroutine
subroutine foo3(a, n, m)
character(len=n), dimension(m) :: b
b = a
- if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) call abort
+ if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) STOP 3
end subroutine
end program
foo="hello"
- if (llt(foo, "hello")) call abort
- if (.not. lle(foo, "hello")) call abort
- if (lgt("hello", foo)) call abort
- if (.not. lge("hello", foo)) call abort
+ if (llt(foo, "hello")) STOP 1
+ if (.not. lle(foo, "hello")) STOP 2
+ if (lgt("hello", foo)) STOP 3
+ if (.not. lge("hello", foo)) STOP 4
- if (.not. llt(foo, "world")) call abort
- if (.not. lle(foo, "world")) call abort
- if (lgt(foo, "world")) call abort
- if (lge(foo, "world")) call abort
+ if (.not. llt(foo, "world")) STOP 5
+ if (.not. lle(foo, "world")) STOP 6
+ if (lgt(foo, "world")) STOP 7
+ if (lge(foo, "world")) STOP 8
end
common /block/ c
character(len=12) :: c
- if (c .ne. "Hello World") call abort
+ if (c .ne. "Hello World") STOP 1
end subroutine
subroutine test2
common /block/ a
character(len=6), dimension(2) :: a
- if ((a(1) .ne. "Hello") .or. (a(2) .ne. "World")) call abort
+ if ((a(1) .ne. "Hello") .or. (a(2) .ne. "World")) STOP 2
end subroutine
program strcommon_1
b = 'World'
c = a//b
- if (c .ne. 'HelloWorld') call abort
- if (c .eq. 'WorldHello') call abort
- if (a//'World' .ne. 'HelloWorld') call abort
- if (a .ge. b) call abort
+ if (c .ne. 'HelloWorld') STOP 1
+ if (c .eq. 'WorldHello') STOP 2
+ if (a//'World' .ne. 'HelloWorld') STOP 3
+ if (a .ge. b) STOP 4
end program
character(len(c)) d
d = c
- if (len(d) .ne. 20) call abort
- if (d .ne. "Longer Test String") call abort
+ if (len(d) .ne. 20) STOP 1
+ if (d .ne. "Longer Test String") STOP 2
c = "Hello World"
end subroutine
character(len(c)) d
d = c
- if (len(d) .ne. 6) call abort
- if (d .ne. "Foobar") call abort
+ if (len(d) .ne. 6) STOP 3
+ if (d .ne. "Foobar") STOP 4
end subroutine
program strlen
c = "Longer Test String"
call test (c)
- if (len(c) .ne. 20) call abort
- if (len_trim(c) .ne. 11) call abort
+ if (len(c) .ne. 20) STOP 5
+ if (len_trim(c) .ne. 11) STOP 6
call test2 ("Foobar");
end program
character(len=5) :: test2
s = test ()
- if (s .ne. "World") call abort
+ if (s .ne. "World") STOP 1
s = "Hello " // test ()
- if (s .ne. test2 () //" World") call abort
+ if (s .ne. test2 () //" World") STOP 2
end
implicit none
character*80 line
WRITE(line,'(T5,A,T10,A,T15,A)')'AA','BB','CC'
- if (line.ne.' AA BB CC ') call abort
+ if (line.ne.' AA BB CC ') STOP 1
WRITE(line,'(5HAAAAA,TL4,4HABCD)')
- if (line.ne.'AABCD') call abort
+ if (line.ne.'AABCD') STOP 2
END
real (kind = 8) :: min, max
x = 1.0
- if (minval(x(1, 1:2, 1:1)) .ne. 1.0) call abort ()
- if (maxval(x(1, 1:2, 1:1)) .ne. 1.0) call abort ()
- if (any (shape(x(1, 1:2, 1:1)) .ne. (/2, 1/))) call abort ()
+ if (minval(x(1, 1:2, 1:1)) .ne. 1.0) STOP 1
+ if (maxval(x(1, 1:2, 1:1)) .ne. 1.0) STOP 2
+ if (any (shape(x(1, 1:2, 1:1)) .ne. (/2, 1/))) STOP 3
- if (any (shape(x(1, 1:2, 1)) .ne. (/2/))) call abort ()
- if (any (shape(x(1:1, 1:2, 1:1)) .ne. (/1, 2, 1/))) call abort ()
+ if (any (shape(x(1, 1:2, 1)) .ne. (/2/))) STOP 4
+ if (any (shape(x(1:1, 1:2, 1:1)) .ne. (/1, 2, 1/))) STOP 5
end program test_slice
ix = transfer(x,ix)
iy = transfer(y,iy)
print '(2z20.8)', ix, iy
- if (ix /= iy) call abort
+ if (ix /= iy) STOP 1
end program chop
value = transfer(byte_string(1:4),value)
value1 = transfer(byte_array(1:4),value1)
- if (value .ne. value1) call abort()
+ if (value .ne. value1) STOP 1
end program test_convert
Rewind(99)
Do I = 1,10
Read(99,*)J
- If (J.ne.I) Call abort
+ If (J.ne.I) STOP 1
End Do
Close(99, Status='Delete')
End program
b = .true.
c = .true.
- if (b * c) call abort
+ if (b * c) STOP 1
c = .false.
- if (.not. (b * c)) call abort
- if (c * b) call abort
+ if (.not. (b * c)) STOP 2
+ if (c * b) STOP 3
b = .false.
- if (b * c) call abort
+ if (b * c) STOP 4
i = 0
b = i
- if (b) call abort
+ if (b) STOP 5
i = 2
b = i
- if (.not. b) call abort
+ if (.not. b) STOP 6
j = 3
- if ((i .foo. j) .ne. 5) call abort
+ if ((i .foo. j) .ne. 5) STOP 7
end program
elsewhere (a .le. 3)
a = 4
endwhere
- if (any (a .ne. (/2, 3, 4/))) call abort
+ if (any (a .ne. (/2, 3, 4/))) STOP 1
end program
c = 3
endwhere
if (any (a .ne. (/1, 2, 2, 2/))) &
- call abort
+ STOP 1
a = (/1, 1, 1, 1/)
where (c .eq. 1)
b = 3
endwhere
if (any (a .ne. (/2, 2, 2, 1/))) &
- call abort
+ STOP 2
end program
c = b
endwhere
if (any (a .ne. (/1, 2, 2, 3/))) &
- call abort ()
+ STOP 1
a = (/1, 2, 3, 4/)
where (c .gt. 1)
b = c
endwhere
if (any (a .ne. (/2, 3, 4, 4/))) &
- call abort ()
+ STOP 2
end program
! This classic case worked before the patch.
a = (/1, 2, 3, 4/)
where (b .gt. 1) a(2:4) = a(1:3)
- if (any(a .ne. (/1,2,2,3/))) call abort ()
+ if (any(a .ne. (/1,2,2,3/))) STOP 1
! This is the original manifestation of the problem
! and is repeated in where_19.f90.
where (b .gt. 1)
c = b
endwhere
- if (any(a .ne. (/1,2,2,3/))) call abort ()
+ if (any(a .ne. (/1,2,2,3/))) STOP 2
! Mask to.destination dependency.
a = (/1, 2, 3, 4/)
where (b .gt. 1)
c = d
endwhere
- if (any(a .ne. (/1,2,2,3/))) call abort ()
+ if (any(a .ne. (/1,2,2,3/))) STOP 3
! Source to.destination dependency.
a = (/1, 2, 3, 4/)
where (d .gt. 1)
c = b
endwhere
- if (any(a .ne. (/1,2,2,3/))) call abort ()
+ if (any(a .ne. (/1,2,2,3/))) STOP 4
! Check the simple where.
a = (/1, 2, 3, 4/)
where (b .gt. 1) c = b
- if (any(a .ne. (/1,2,2,3/))) call abort ()
+ if (any(a .ne. (/1,2,2,3/))) STOP 5
! This was OK before the patch.
a = (/1, 2, 3, 4/)
c = b
end where
endwhere
- if (any(a .ne. (/1,2,2,3/))) call abort ()
+ if (any(a .ne. (/1,2,2,3/))) STOP 6
end program
integer, parameter :: i(4) = (/ 1, 1, 1, 1 /)
integer :: z(4) = (/ 1, 1, -1, -1 /)
where(z < 0) z(:) = 1
- if (any(z /= i)) call abort
+ if (any(z /= i)) STOP 1
end program a
end forall
if (any (A .ne. reshape ((/1, 1, 1, 1, 1, 0, 1, 2, 1, 2, 0, 1, 2, 3, 0, &
- 0, 1, 4, 2, 0, 0, 5, 6, 6, 5/), (/5, 5/)))) call abort
+ 0, 1, 4, 2, 0, 0, 5, 6, 6, 5/), (/5, 5/)))) STOP 1
! Where inside DO
A(1,:) = (/1,0,0,0,0/)
enddo
if (any (A .ne. reshape ((/1, 1, 1, 1, 1, 0, 1, 2, 1, 2, 0, 1, 2, 6, 0, &
- 0, 1, 0, 2, 0, 0, 0, 5, 5, 5/), (/5, 5/)))) call abort
+ 0, 1, 0, 2, 0, 0, 0, 5, 5, 5/), (/5, 5/)))) STOP 2
end
b = 5
endwhere
if (any (b .ne. (/3, 1, 4, 1, 5/))) &
- call abort
+ STOP 1
end program
b = 5
endwhere
if (any (b .ne. (/3, 1, 4, 1, 5/))) &
- call abort
+ STOP 1
end program
elsewhere
endwhere
if (any (b .ne. (/3, 0, 0, 0, 0/))) &
- call abort
+ STOP 1
end program
b = 2
endwhere
if (any (b .ne. (/0, 2, 2, 2, 2/))) &
- call abort
+ STOP 1
end program
endwhere
endwhere
if (any (c .ne. (/1, 2, 3, 4, 5, 6, 7, 8, 9/))) &
- call abort
+ STOP 1
end program
END WHERE
if (any (temp .ne. (/100, 100, 100, 210, 210, 210, 310, 310, 337, 337/))) &
- call abort
+ STOP 1
end program
B(:,1) = B(:,1) + 10
endwhere
if (any (B .ne. reshape ((/0, 0, 0, 0, 0, 15, 15, 15, 15, 15, &
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0/), (/10, 2/)))) call abort
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0/), (/10, 2/)))) STOP 1
end subroutine
end program
where (b .ne. 0)
a(:) = a(5:1:-1)
endwhere
- if (any (a .ne. (/5, 2, 3, 4, 1/))) call abort
+ if (any (a .ne. (/5, 2, 3, 4, 1/))) STOP 1
end program
where (b .ne. 0d0)
a(:) = a(:) + 10
endwhere
- if (any (a .ne. (/11, 2, 13, 4, 15/))) call abort
+ if (any (a .ne. (/11, 2, 13, 4, 15/))) STOP 1
end program
endwhere
end forall
if (any (A .ne. reshape ((/1,2,6,2,1,0,1,2,1,2,0,1,2,5,0,0,1,6,2,0,0,0,2,&
- 6,0/), (/5, 5/)))) call abort
+ 6,0/), (/5, 5/)))) STOP 1
end
end where
end forall
- if (any(v(1)%p(:) .ne. (/11, 10/))) call abort
- if (any(v(2)%p(:) .ne. (/1, 2, 3, 4, 17, 18, 19, 20/))) call abort
- if (any(v(4)%p(:) .ne. (/1, 2, 3, 4, 5, 6, 19, 20/))) call abort
- if (any(v(5)%p(:) .ne. (/9, 10/))) call abort
+ if (any(v(1)%p(:) .ne. (/11, 10/))) STOP 1
+ if (any(v(2)%p(:) .ne. (/1, 2, 3, 4, 17, 18, 19, 20/))) STOP 2
+ if (any(v(4)%p(:) .ne. (/1, 2, 3, 4, 5, 6, 19, 20/))) STOP 3
+ if (any(v(5)%p(:) .ne. (/9, 10/))) STOP 4
v(1)%p(:) = (/9, 10/)
v(2)%p(:) = (/1, 2, 3, 4, 5, 6, 7, 8/)
end where
end forall
- if (any(v(1)%p(:) .ne. (/9, 10/))) call abort
- if (any(v(2)%p(:) .ne. (/13, 14, 15, 16, 5, 6, 7, 8/))) call abort
- if (any(v(4)%p(:) .ne. (/13, 14, 15, 16, 17, 18, 19, 20/))) call abort
- if (any(v(5)%p(:) .ne. (/11, 12/))) call abort
+ if (any(v(1)%p(:) .ne. (/9, 10/))) STOP 5
+ if (any(v(2)%p(:) .ne. (/13, 14, 15, 16, 5, 6, 7, 8/))) STOP 6
+ if (any(v(4)%p(:) .ne. (/13, 14, 15, 16, 17, 18, 19, 20/))) STOP 7
+ if (any(v(5)%p(:) .ne. (/11, 12/))) STOP 8
! I should really free the memory I've allocated.
end program
end where
end forall
- if (any(v(1)%p(:) .ne. (/21, 10, 0, 0, 0, 0, 0, 0/))) call abort
- if (any(v(2)%p(:) .ne. (/1, 2, 3, 4, 21, 21, 21, 21/))) call abort
- if (any(v(4)%p(:) .ne. (/21, 21, 21, 21, 21, 21, 19, 20/))) call abort
- if (any(v(5)%p(:) .ne. (/21, 21, 0, 0, 0, 0, 0, 0/))) call abort
+ if (any(v(1)%p(:) .ne. (/21, 10, 0, 0, 0, 0, 0, 0/))) STOP 1
+ if (any(v(2)%p(:) .ne. (/1, 2, 3, 4, 21, 21, 21, 21/))) STOP 2
+ if (any(v(4)%p(:) .ne. (/21, 21, 21, 21, 21, 21, 19, 20/))) STOP 3
+ if (any(v(5)%p(:) .ne. (/21, 21, 0, 0, 0, 0, 0, 0/))) STOP 4
end program
character*25 s
! string = format
write(s,'(A11)') "hello world"
- if (s.ne."hello world") call abort
+ if (s.ne."hello world") STOP 1
! string < format
write(s,'(A2)') "hello world"
- if (s.ne."he") call abort
+ if (s.ne."he") STOP 2
! string > format
write(s,'(A18)') "hello world"
- if (s.ne." hello world") call abort
+ if (s.ne." hello world") STOP 3
end
false = .FALSE.
b = ''
write (b, '(L1)') true
- if (b(1:1) .ne. 'T') call abort
+ if (b(1:1) .ne. 'T') STOP 1
b = ''
write (b, '(L1)') false
- if (b(1:1) .ne. 'F') call abort
+ if (b(1:1) .ne. 'F') STOP 2
b = ''
write(b, '(L4)') true
- if (b(1:4) .ne. ' T') call abort
+ if (b(1:4) .ne. ' T') STOP 3
b = ''
write(b, '(L4)') false
- if (b(1:4) .ne. ' F') call abort
+ if (b(1:4) .ne. ' F') STOP 4
end