Hi, Range bounds for a gdb type can have LONGEST values for low and high bounds. Fortran range bounds functions however use only int. The larger ranges don't compile by default on gcc, but it is possible to override the check in the compiler by using -fno-range-check. As a result, this check is necessary so that we don't print junk in case of an overflow. Attached patch does this expansion and also includes a test case that verifies that the problem is fixed. I have also verified on x86_64 that this patch does not cause any regressions. Regards, Siddhesh gdb/ChangeLog: * f-lang.h (f77_get_upperbound): Return LONGEST. (f77_get_lowerbound): Likewise. * f-typeprint.c (f_type_print_varspec_suffix): Expand UPPER_BOUND and LOWER_BOUND to LONGEST. Use plongest to format print them. (f_type_print_base): Expand UPPER_BOUND to LONGEST. Use plongest to format print it. * f-valprint.c (f77_get_lowerbound): Return LONGEST. (f77_get_upperbound): Likewise. (f77_get_dynamic_length_of_aggregate): Expand UPPER_BOUND, LOWER_BOUND to LONGEST. (f77_create_arrayprint_offset_tbl): Likewise. testsuite/ChangeLog: * gdb.fortran/array-bounds.exp: New test case. * gdb.fortran/array-bounds.f: New test case.