https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69064
Bug ID: 69064 Summary: Unhelpful error message when a module variable was not included in the only list Product: gcc Version: 5.3.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: kottinge at utk dot edu Target Milestone: --- Created attachment 37141 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37141&action=edit preprocessed source file with bug This is pretty trivial and I figured it out so no hurry, but I thought you guys might want to fix it. Bug: I forgot to list a variable in the only list 'max_line_len2' used at line 2663 of the attached input file (I did the -save-temps option but the files weren't *.i* they were just .f90, but they were preprocessed) and it gave me this weird error instead of just telling me the variable wasn't defined. I did compile the compiler from scratch, which I haven't done before so I could have messed something up there, but the only option I used was something that turned off 32 bit libraries, because it wouldn't compile otherwise. Compiler info: GNU Fortran2008 (GCC) version 5.3.0 (x86_64-unknown-linux-gnu) compiled by GNU C version 5.3.0, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1 Error message and compile command: gcc -I/usr/lib/openmpi/include -pthread -I/usr/lib/openmpi/lib -L/usr//lib -L/usr/lib/openmpi/lib -lmpi_f90 -lmpi_f77 -lmpi -ldl -lhwloc -o lwropt.exe -ggdb -ffree-line-length-none -fcheck=all -fbacktrace -J src -cpp src/calc_param_mod.f90 src/input_var_mod.f90 src/soln_struct_mod.f90 src/mpi_mod.f90 src/utility_mod.f90 src/v2m_mod.f90 src/cr_pos_mod.f90 src/plot_var_mod.f90 src/sort_mod.f90 src/read_nestle_in_mod.f90 src/plot_mod.f90 src/find_loc_mod.f90 src/soln_pack_unpack_mod.f90 src/soln_mpi_xfer_mod.f90 src/read_nestle_out_mod.f90 src/new_type_line_mod.f90 src/sample_mod.f90 src/write_nestle_in_mod.f90 src/of_mod.f90 src/crp_gen_mod.f90 src/read_input_mod.f90 src/archive_mod.f90 src/evaluate_solution_mod.f90 src/accept1.f90 src/lwr_opt_driver.f90 src/lwr_opt.f90 src/fuel_cost.f90 src/initialize_lp.f90 src/manual_shuffle.f90 src/num_fresh_change.f90 src/psa.f90 src/random_num_init.f90 src/read_soln.f90 src/restart_read.f90 src/restart_write.f90 src/soln_allocate.f90 src/soln_deallocate.f90 src/soln_sample.f90 src/soln_store.f90 src/soln_write.f90 src/soln_unique.f90 src/write_crp_stat.f90 src/write_output.f90 src/write_soln.f90 src/read_input_mod.f90:7:0: SUBROUTINE READ_INPUT(s,input,inp_lines) 1 internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:1084 0x73386b gfc_typenode_for_spec(gfc_typespec*) /home/keith/Downloads/gcc-5.3.0/gcc/fortran/trans-types.c:1084 0x733b7f gfc_sym_type(gfc_symbol*) /home/keith/Downloads/gcc-5.3.0/gcc/fortran/trans-types.c:2170 0x6e833a gfc_get_symbol_decl(gfc_symbol*) /home/keith/Downloads/gcc-5.3.0/gcc/fortran/trans-decl.c:1511 0x6eb137 generate_local_decl /home/keith/Downloads/gcc-5.3.0/gcc/fortran/trans-decl.c:5055 0x6eb50e expr_decls /home/keith/Downloads/gcc-5.3.0/gcc/fortran/trans-decl.c:5003 0x6414a9 gfc_traverse_expr(gfc_expr*, gfc_symbol*, bool (*)(gfc_expr*, gfc_symbol*, int*), int) /home/keith/Downloads/gcc-5.3.0/gcc/fortran/expr.c:4161 0x6eb448 generate_expr_decls /home/keith/Downloads/gcc-5.3.0/gcc/fortran/trans-decl.c:5010 0x6eb448 generate_dependency_declarations /home/keith/Downloads/gcc-5.3.0/gcc/fortran/trans-decl.c:5025 0x6eb448 generate_local_decl /home/keith/Downloads/gcc-5.3.0/gcc/fortran/trans-decl.c:5052 0x6b7a5b do_traverse_symtree /home/keith/Downloads/gcc-5.3.0/gcc/fortran/symbol.c:3646 0x6eb67a generate_local_vars /home/keith/Downloads/gcc-5.3.0/gcc/fortran/trans-decl.c:5245 0x6eb67a gfc_generate_function_code(gfc_namespace*) /home/keith/Downloads/gcc-5.3.0/gcc/fortran/trans-decl.c:5781 0x6cf081 gfc_generate_module_code(gfc_namespace*) /home/keith/Downloads/gcc-5.3.0/gcc/fortran/trans.c:2036 0x6898bd translate_all_program_units /home/keith/Downloads/gcc-5.3.0/gcc/fortran/parse.c:5330 0x6898bd gfc_parse_file() /home/keith/Downloads/gcc-5.3.0/gcc/fortran/parse.c:5540 0x6c8f15 gfc_be_parse_file /home/keith/Downloads/gcc-5.3.0/gcc/fortran/f95-lang.c:229 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. make: *** [all] Error 1 Thanks, Keith