int sample_compare_rgba;
struct pipe_sampler_state {
unsigned compare_func : 3;
};
void
sample_compare(struct pipe_sampler_state *sp_samp) {
switch (sp_samp->compare_func) {
case PIPE_FUNC_LESS:
case PIPE_FUNC_LEQUAL:
case PIPE_FUNC_GREATER:
case PIPE_FUNC_GEQUAL:
case PIPE_FUNC_EQUAL:
case PIPE_FUNC_NOTEQUAL:
sample_compare_k_0 != sample_compare_rgba;
case PIPE_FUNC_ALWAYS:
case PIPE_FUNC_NEVER:
break;
default:
for (;;)
;
}
}
fails here:
$ gcc pr96130.c -c -O1
during IPA pass: fnsummary
pr96130.c: In function ‘sample_compare’:
pr96130.c:34:1: internal compiler error: Segmentation fault
34 | }
| ^
0xdc22ef crash_signal
/home/marxin/Programming/gcc/gcc/toplev.c:328
0x7ffff78d752f ???
/usr/src/debug/glibc-2.31-6.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0xb938f9 analyze_function_body
/home/marxin/Programming/gcc/gcc/ipa-fnsummary.c:2769
0xb944e3 compute_fn_summary(cgraph_node*, bool)
/home/marxin/Programming/gcc/gcc/ipa-fnsummary.c:2974
0xb94990 inline_analyze_function(cgraph_node*)
/home/marxin/Programming/gcc/gcc/ipa-fnsummary.c:4078
0xb94b73 ipa_fn_summary_generate
/home/marxin/Programming/gcc/gcc/ipa-fnsummary.c:4121
0xcea35b execute_ipa_summary_passes(ipa_opt_pass_d*)
/home/marxin/Programming/gcc/gcc/passes.c:2191
0x966a97 ipa_passes
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2646
0x966a97 symbol_table::compile()
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2756
0x96885c symbol_table::compile()
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2736
0x96885c symbol_table::finalize_compilation_unit()
/home/marxin/Programming/gcc/gcc/cgraphunit.c:3003
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.
Reduced test-case:
$ cat pr96130.c FUNC_GREATER, FUNC_NOTEQUAL,
enum {
PIPE_FUNC_NEVER,
PIPE_FUNC_LESS,
PIPE_FUNC_EQUAL,
PIPE_FUNC_LEQUAL,
PIPE_
PIPE_
PIPE_FUNC_GEQUAL,
PIPE_FUNC_ALWAYS
} sample_compare_k_0;
int sample_ compare_ rgba;
struct pipe_sampler_state {
unsigned compare_func : 3;
};
void compare( struct pipe_sampler_state *sp_samp) { >compare_ func) { compare_ k_0 != sample_ compare_ rgba;
sample_
switch (sp_samp-
case PIPE_FUNC_LESS:
case PIPE_FUNC_LEQUAL:
case PIPE_FUNC_GREATER:
case PIPE_FUNC_GEQUAL:
case PIPE_FUNC_EQUAL:
case PIPE_FUNC_NOTEQUAL:
sample_
case PIPE_FUNC_ALWAYS:
case PIPE_FUNC_NEVER:
break;
default:
for (;;)
;
}
}
fails here:
$ gcc pr96130.c -c -O1 marxin/ Programming/ gcc/gcc/ toplev. c:328 debug/glibc- 2.31-6. 1.x86_64/ signal/ ../sysdeps/ unix/sysv/ linux/x86_ 64/sigaction. c:0 function_ body marxin/ Programming/ gcc/gcc/ ipa-fnsummary. c:2769 fn_summary( cgraph_ node*, bool) marxin/ Programming/ gcc/gcc/ ipa-fnsummary. c:2974 analyze_ function( cgraph_ node*) marxin/ Programming/ gcc/gcc/ ipa-fnsummary. c:4078 summary_ generate marxin/ Programming/ gcc/gcc/ ipa-fnsummary. c:4121 ipa_summary_ passes( ipa_opt_ pass_d* ) marxin/ Programming/ gcc/gcc/ passes. c:2191 marxin/ Programming/ gcc/gcc/ cgraphunit. c:2646 table:: compile( ) marxin/ Programming/ gcc/gcc/ cgraphunit. c:2756 table:: compile( ) marxin/ Programming/ gcc/gcc/ cgraphunit. c:2736 table:: finalize_ compilation_ unit() marxin/ Programming/ gcc/gcc/ cgraphunit. c:3003 /gcc.gnu. org/bugs/> for instructions.
during IPA pass: fnsummary
pr96130.c: In function ‘sample_compare’:
pr96130.c:34:1: internal compiler error: Segmentation fault
34 | }
| ^
0xdc22ef crash_signal
/home/
0x7ffff78d752f ???
/usr/src/
0xb938f9 analyze_
/home/
0xb944e3 compute_
/home/
0xb94990 inline_
/home/
0xb94b73 ipa_fn_
/home/
0xcea35b execute_
/home/
0x966a97 ipa_passes
/home/
0x966a97 symbol_
/home/
0x96885c symbol_
/home/
0x96885c symbol_
/home/
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https:/
started with