IRA: Ignore debug insns for uses in split_live_ranges_for_shrink_wrap. [PR116179]
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / compound-assignment-pr112969.c
blob4bc037cb7cfc44b4fc94ba6bee893bddc1e2de8f
1 /* Reduced from -Wanalyzer-exposure-through-uninit-copy false positives
2 seen in Linux kernel in drivers/net/ethernet/intel/ice/ice_ptp.c */
4 #include "analyzer-decls.h"
6 /* { dg-do compile } */
8 struct hwtstamp_config
10 int flags;
11 int tx_type;
12 int rx_filter;
15 struct ice_ptp
17 long placeholder;
18 struct hwtstamp_config tstamp_config;
21 struct ice_pf
23 struct ice_ptp ptp;
26 void
27 ice_ptp_set_ts_config(struct ice_pf* pf)
29 struct hwtstamp_config config;
30 pf->ptp.tstamp_config.tx_type = 1;
31 pf->ptp.tstamp_config.rx_filter = 2;
32 config = pf->ptp.tstamp_config;
33 __analyzer_eval (config.flags == pf->ptp.tstamp_config.flags); /* { dg-warning "TRUE" } */
34 /* { dg-bogus "use of uninitialized value 'config.flags'" "PR analyzer/112969" { target *-*-* } .-1 } */