Skip to content

Fix gcc internal error

Raphael Schlarb requested to merge fix_gcc_error into develop

Changes

Pass struct arguments of gribapiVarCompare by const pointer instead of value.

Reason

When compiling Icon (/icon/icon-mpim@8792df95ff07b361455bf7b5598f92d38b1764ce) with the config/generic/gcc configuration, I get the following error:

/home/raphael/Code/Mpi/icon-mpim/externals/cdi/src/stream_gribapi.c: In function ‘gribapiVarCompare.isra’:
/home/raphael/Code/Mpi/icon-mpim/externals/cdi/src/stream_gribapi.c:873:1: internal compiler error: in classify_argument, at config/i386/i386.cc:2388
  873 | gribapiVarCompare(compvar2_t compVar, record_t record, int flag)
      | ^~~~~~~~~~~~~~~~~
0x184b968 internal_error(char const*, ...)
        ???:0
0x62a410 fancy_abort(char const*, int, char const*)
        ???:0
0x8f830b expand_function_start(tree_node*)
        ???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.archlinux.org/> for instructions.
make[4]: *** [Makefile:1019: stream_gribapi.lo] Error 1
make[4]: Leaving directory '/home/raphael/Code/Mpi/icon-mpim/build/externals/cdi/src'
make[3]: *** [Makefile:766: all] Error 2
make[3]: Leaving directory '/home/raphael/Code/Mpi/icon-mpim/build/externals/cdi/src'
make[2]: *** [Makefile:540: all-recursive] Error 1
make[2]: Leaving directory '/home/raphael/Code/Mpi/icon-mpim/build/externals/cdi'
make[1]: *** [icon.mk:554: externals/cdi] Error 2
make[1]: Leaving directory '/home/raphael/Code/Mpi/icon-mpim/build'
make: *** [Makefile:14: all] Error 2

Passing compVar and record by pointer instead of value, fixes the build.

Merge request reports