Created attachment 1578491 [details] preprocessor output Description of problem: Internal compiler error when compiling a component of SU2 suite on Fedora 30 Version-Release number of selected component (if applicable): https://bugzilla.redhat.com/token.cgi How reproducible: Allways Steps to Reproduce: 1. Download SU2 release 6.2.0 from git clone https://github.com/su2code/SU2.git 2. Follow build from source / simple build from https://su2code.github.io/docs/Simple-Build/ 3. Error occurs when compiling TecioSZL.cpp Actual results: Expected results: Additional info: CXX teciosrc/libtecio_a-TecioSZL.o durant l'étape GIMPLE: printf-return-value teciosrc/TecioSZL.cpp: Dans la fonction « bool tecplot::tecioszl::{anonymous}::checkAuxNameAndValue(tecplot::tecioszl::{anonymous}::OutputInfo*, const char*, const char*, const char*) »: teciosrc/TecioSZL.cpp:218: erreur interne du compilateur: dans subspan, à input.h:68 218 | if (!getOutputInfoAndZoneOrPartitionPtr(&outputInfo, &zonePtr, fileHandle, zone, ___2977, routineName)) return -1; if (count + zonePtr->___2497->storedValueCount() > zonePtr->___2497->___2500 * zonePtr->___2497->___2392) { ___3187("Error in %s: Too many node map values for this zone. %" PRIu64 " supplied, need only %" PRIu64 ".\n", routineName, count, zonePtr->___2497->___2500 * zonePtr->___2497->___2392 - zonePtr->___2497->storedValueCount()); ++outputInfo->m_numErrs; return -1; } if (outputInfo->m_debugLevel && (count > 1)) ___3186("Writing %" PRId64 " nodes to zone %d.\n", count, zone); for (int64_t i = 0; i < count; ++i) { T ___2709 = nodes[i]; if (nodesAreOneBased) --___2709; if (___2709 < 0 || zonePtr->___2682.i() <= (___81)___2709) { T maxValue = static_cast<T>(zonePtr->___2682.i()); if (!nodesAreOneBased) --maxValue; std::ostringstream ___2892; ___2892 << routineName << ": Invalid node map value at position " << i << std::endl << " node map value = " << nodes[i] << ", max value = " << maxValue << "." << std::endl; ___3185("Error in %s", ___2892.str().c_str()); ++outputInfo->m_numErrs; return -1; } zonePtr->___2497->appendValue(___2709); } return 0; } } int32_t tecZoneNodeMapWrite32_SZL( void* fileHandle, int32_t zone, int32_t ___2977, int32_t nodesAreOneBased, int64_t count, int32_t const* nodes) { return zoneNodeMapWrite(fileHandle, zone, ___2977, nodesAreOneBased, count, nodes, "tecZoneNodeMapWrite32"); } int32_t tecZoneNodeMapWrite64_SZL( void* fileHandle, int32_t zone, int32_t ___2977, int32_t nodesAreOneBased, int64_t count, int64_t const* nodes) { return zoneNodeMapWrite(fileHandle, zone, ___2977, nodesAreOneBased, count, nodes, "tecZoneNodeMapWrite64"); } namespace { template <typename T> int32_t zoneFaceNbrWriteConnections( void* fileHandle, int32_t zone, T const* faceNeighbors, char const* routineName) { OutputInfo* outputInfo = (OutputInfo*)fileHandle; Zone_s* zonePtr = outputInfo->m_tecioData.zonePtr(zone); if (!getOutputInfoAndZonePtr(&outputInfo, &zonePtr, fileHandle, zone, routineName)) return -1; if (outputInfo->m_debugLevel) ___3185("\nInserting face neighbor data for zone %d\n", zone); try { if (outputInfo->m_debugLevel) ___3185("\nInserting face neighbor data for zone %d\n", zone); outputInfo->m_tecioData.___431(zonePtr, faceNeighbors); } catch (std::exception const& e) { ___3186("Error in %s: %s\n", routineName, e.what()); ++outputInfo->m_numErrs; return -1; } return 0; } } int32_t tecZoneFaceNbrWriteConnections32_SZL( void* fileHandle, int32_t zone, int32_t const* faceNeighbors) { return zoneFaceNbrWriteConnections(fileHandle, zone, faceNeighbors, "tecZoneFaceNbrWriteConnections32"); } int32_t tecZoneFaceNbrWriteConnections64_SZL( void* fileHandle, int32_t zone, int64_t const* faceNeighbors) { return zoneFaceNbrWriteConnections(fileHandle, zone, faceNeighbors, "tecZoneFaceNbrWriteConnections64"); } int32_t tecZoneWritePolyFaces32_SZL( void* , int32_t , int32_t , int32_t , int32_t const* , int32_t const* , int32_t const* , int32_t const* , int32_t ) { return 0; } int32_t tecZoneWritePolyFaces64_SZL( void* , int32_t , int32_t , int64_t , int32_t const* , int64_t const* , int64_t const* , int64_t const* , int32_t ) { return 0; } int32_t tecZoneWritePolyBoundaryConnections32_SZL( void* , int32_t , int32_t , int32_t , int32_t const* , int32_t const* , int32_t const* , int32_t ) { return 0; } int32_t tecZoneWritePolyBoundaryConnections64_SZL( void* , int32_t , int32_t , int64_t , int32_t const* , int64_t const* , int32_t const* , int32_t ) { return 0; } namespace { bool auxDataIsValidNameChar(char c, bool isLeadChar) { REQUIRE(0 <= c && "c <= 127"); bool isValidNameChar = (c == '_' || tecplot::___1998(c)); if (!isLeadChar) isValidNameChar = (isValidNameChar || c == '.' || tecplot::___2012(c)); return isValidNameChar; } bool auxDataIsValidName(char const* ___2685) { REQUIRE(VALID_REF(___2685)); bool isValidName = auxDataIsValidNameChar(*___2685, true); for (char const* nPtr = ___2685; isValidName && *nPtr != '\0'; ++nPtr) isValidName = auxDataIsValidNameChar(*nPtr, false); return isValidName; } bool checkAuxNameAndValue(OutputInfo* outputInfo, char const* ___2685, char const* ___4314, char const* routineName) { if ((___2685 == NULL) || !auxDataIsValidName(___2685)) { ___3185("Error in %s: Invalid Name string\n", routineName); ++outputInfo->m_numErrs; return false; } if ((___4314 == NULL) || (*___4314 == '\0')) { ___3185("Error in %s: Invalid Value string\n", routineName); ++outputInfo->m_numErrs; return false; } return true; } } int32_t tecDataSetAddAuxData_SZL( void* fileHandle, char const* ___2685, char const* ___4314) { OutputInfo* outputInfo; if (!getOutputInfo(&outputInfo, fileHandle, "tecDataSetAddAuxData"))
Edit 1: Copy/Paste error Version-Release number of selected component (if applicable): gcc (GCC) 9.1.1 20190503 (Red Hat 9.1.1-1)
Can't reproduce, with gcc 9.1.1-1.fc30.x86_64 /usr/libexec/gcc/x86_64-redhat-linux/9/cc1plus -quiet -I . -D_GNU_SOURCE -D PACKAGE_NAME="SU2" -D PACKAGE_TARNAME="SU2" -D PACKAGE_VERSION="6.2.0" -D PACKAGE_STRING="SU2 6.2.0" -D PACKAGE_BUGREPORT="su2code-dev.edu" -D PACKAGE_URL="https://su2code.github.io" -D PACKAGE="SU2" -D VERSION="6.2.0" -D STDC_HEADERS=1 -D HAVE_SYS_TYPES_H=1 -D HAVE_SYS_STAT_H=1 -D HAVE_STDLIB_H=1 -D HAVE_STRING_H=1 -D HAVE_MEMORY_H=1 -D HAVE_STRINGS_H=1 -D HAVE_INTTYPES_H=1 -D HAVE_STDINT_H=1 -D HAVE_UNISTD_H=1 -D SIZEOF_SHORT_INT=2 -D SIZEOF_INT=4 -D SIZEOF_UNSIGNED_INT=4 -D SIZEOF_LONG_INT=8 -D SIZEOF_FLOAT=4 -D SIZEOF_DOUBLE=8 -D SIZEOF_VOID_P=8 -D SIZEOF_VOID_P=8 -D HAVE_TECPLOT_API=1 -D HAVE_TECPLOT_API_112=1 -D HAVE_CGNS=1 -D LINUX64 -D LINUX -D USEENUM -D THREED -D MAKEARCHIVE -D NO_ASSERTS -D NO_THIRD_PARTY_LIBS ccL4xfgC.out -quiet -mtune=generic -march=x86-64 -g -O2 -fPIC -frandom-seed=0 -fdump-noaddr compiles just fine.
Thanks. Using the same options and still the same situation here. I'm not a developer, just a user and have no idea how I can do differently.
Do you mean you can reproduce it by running the #c2 command on the *.out file you've attached? Or just on the original source file, not the preprocessed one? If the latter, can you try to preprocess it with -E -fdirectives-only and see if you can reproduce it on that (the ICE mentioned above is the token handling, so it is possible it could be only reproduceable with exact macro information which is lost during normal preprocessing).
OK, I did it wrong, I used /usr/bin/g++. I'll try to make it clear: With /usr/bin/g++ on source file: internal error With /usr/bin/g++ on preprocessed file: file format not recognized With /usr/libexec/gcc/x86_64-redhat-linux/9/cc1plus on source file: internal error. With /usr/libexec/gcc/x86_64-redhat-linux/9/cc1plus on initial preprocessed file: OK.
Then see above, can you try g++ -I . -D_GNU_SOURCE -D PACKAGE_NAME="SU2" -D PACKAGE_TARNAME="SU2" -D PACKAGE_VERSION="6.2.0" -D PACKAGE_STRING="SU2 6.2.0" -D PACKAGE_BUGREPORT="su2code-dev.edu" -D PACKAGE_URL="https://su2code.github.io" -D PACKAGE="SU2" -D VERSION="6.2.0" -D STDC_HEADERS=1 -D HAVE_SYS_TYPES_H=1 -D HAVE_SYS_STAT_H=1 -D HAVE_STDLIB_H=1 -D HAVE_STRING_H=1 -D HAVE_MEMORY_H=1 -D HAVE_STRINGS_H=1 -D HAVE_INTTYPES_H=1 -D HAVE_STDINT_H=1 -D HAVE_UNISTD_H=1 -D SIZEOF_SHORT_INT=2 -D SIZEOF_INT=4 -D SIZEOF_UNSIGNED_INT=4 -D SIZEOF_LONG_INT=8 -D SIZEOF_FLOAT=4 -D SIZEOF_DOUBLE=8 -D SIZEOF_VOID_P=8 -D SIZEOF_VOID_P=8 -D HAVE_TECPLOT_API=1 -D HAVE_TECPLOT_API_112=1 -D HAVE_CGNS=1 -D LINUX64 -D LINUX -D USEENUM -D THREED -D MAKEARCHIVE -D NO_ASSERTS -D NO_THIRD_PARTY_LIBS -mtune=generic -march=x86-64 -g -O2 -fPIC -frandom-seed=0 -E -fdirectives-only -o TecioSZL.ii teciosrc/TecioSZL.cpp g++ -g -O2 -fPIC -S TecioSZL.ii and see if the second command ICEs too?
First command OK if run in teciosrc directory. Then it seems that the second command doesn't know how to interpret TecioSZL.ii, lot of errors on lines beginning with # for example. Maybe it's something obvious, I would not want to make you lose your time
Either use -xc++ before TecioSZL.ii, or say rename TecioSZL.ii to TecioSZL-X.C and use that instead on the command line.
OK this time, a .s is created with only a couple of intern warnings concerning redefined STDC.
This message is a reminder that Fedora 30 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '30'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 30 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.