Hi,
Could a gatekeeper please help revie the fix for bug911
https://bugs.open64.net/show_bug.cgi?id=911?
A cutted down bug case below:
union flexcop_ibi_value {
struct {
u32 unused : 2;
u32 dma_cur_addr :30;
} dma_0x8;
u32 no;
} t;
extern union flexcop_ibi_value f(void);
u64 x;
void foo(void) {
x=f().dma_0x8.dma_cur_addr << 2 ;
}
### Compiler Error during Writing WHIRL file phase:
### Widen_Mtype: for MTYPE_V or MTYPE_BS
Analysis:
expression f().dma_0x8.dma_cur_addr has a MTYPE_BS type in WHIRL, it should
not be put to CVTL for optimise.
Suggested patch:
--- a/osprey/wgen/wgen_expr.cxx
+++ b/osprey/wgen/wgen_expr.cxx
@@ -9969,6 +9969,8 @@ WGEN_Expand_Expr (gs_t exp,
// such that I4I1LDID will be sign extended and
// U4U2 will be zero extended
if (MTYPE_is_integral(rtype) && MTYPE_is_integral(desc) &&
+ // bug911 open64.net. Add Safe guard for CVTL.
+ (desc != MTYPE_BS) &&
MTYPE_byte_size( rtype ) > MTYPE_byte_size( desc )) {
wn = WN_CreateCvtl(OPR_CVTL, Widen_Mtype(desc), MTYPE_V,
MTYPE_size_min(desc), wn);
Would a gatekeeper please help a reivew? thanks a lot.
Regards
Gang
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel