https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93537
Bug ID: 93537 Summary: gcc 9.2 takes a Segmentation Violation when compiled file Product: gcc Version: 9.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: bob.huemmer at sas dot com Target Milestone: --- Created attachment 47765 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47765&action=edit Standalone 'C' program which exhibits problem described above /* * PROBLEM: GCC 9.2 takes a SEGV when compiling this program. * * System: Red Hat Enterprise Linux Server release 6.7 (Santiago) * Linux foo.unx.sas.com 2.6.32-573.el6.x86_64 * #1 SMP Wed Jul 1 18:23:37 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux * * GCC: Output of gcc -v * Using built-in specs. * Target: x86_64-pc-linux-gnu * Configured with: ../configure --enable-languages=c,c++,fortran * Thread model: posix * gcc version 9.2.0 (GCC) * * To reproduce: gcc -g ./t.c -o t.o -c * * Error produced: * ‘(stmth->conh != 0 ? ((struct FOO_Generic_Handle_S *)stmth->conh)->type == * In function ‘FOO’: * Segmentation fault * 74 | cbNativeCatalogName = BAR( TSCGetPublicTMILCath(stmth->conh), * | ^~~~~~~~~~~~~~~~~~~ * 0xa9010f crash_signal * ../../gcc/toplev.c:326 * 0xccaca0 location_wrapper_p(tree_node const*) * ../../gcc/tree.h:3812 * 0xccaca0 tree_strip_any_location_wrapper(tree_node*) * ../../gcc/tree.h:3824 * 0xccaca0 tree_int_cst_equal(tree_node const*, tree_node const*) * ../../gcc/tree.c:7200 * 0x699dc4 pp_c_enumeration_constant * ../../gcc/c-family/c-pretty-print.c:985 * 0x699dc4 c_pretty_printer::constant(tree_node*) * ../../gcc/c-family/c-pretty-print.c:1141 * 0x69a8a8 c_pretty_printer::conditional_expression(tree_node*) * ../../gcc/c-family/c-pretty-print.c:2092 * 0x69a8a8 c_pretty_printer::conditional_expression(tree_node*) * ../../gcc/c-family/c-pretty-print.c:2088 * 0x69a8ec c_pretty_printer::conditional_expression(tree_node*) * ../../gcc/c-family/c-pretty-print.c:2096 * 0x69a8ec c_pretty_printer::conditional_expression(tree_node*) * ../../gcc/c-family/c-pretty-print.c:2088 * 0x69ae74 c_pretty_printer::primary_expression(tree_node*) * ../../gcc/c-family/c-pretty-print.c:1268 * 0x699acd c_pretty_printer::postfix_expression(tree_node*) * ../../gcc/c-family/c-pretty-print.c:1580 * 0x699acd c_pretty_printer::postfix_expression(tree_node*) * ../../gcc/c-family/c-pretty-print.c:1580 * 0x625796 c_tree_printer * ../../gcc/c/c-objc-common.c:198 * 0x625796 c_tree_printer * ../../gcc/c/c-objc-common.c:135 * 0x12c4fbc pp_format(pretty_printer*, text_info*) * ../../gcc/pretty-print.c:1390 * 0x12bbc52 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) * ../../gcc/diagnostic.c:1015 * 0x12bc0dd diagnostic_impl * ../../gcc/diagnostic.c:1159 * 0x12bd430 pedwarn(rich_location*, int, char const*, ...) * ../../gcc/diagnostic.c:1386 * 0x612033 convert_for_assignment * ../../gcc/c/c-typeck.c:7242 * Please submit a full bug report, * with preprocessed source if appropriate. * Please include the complete backtrace with any bug report. * See <https://gcc.gnu.org/bugs/> for instructions. * * NOTES: * This problem occurs with gcc 9.1 and 9.2, but not with gcc 8.3 */