https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81110
--- Comment #5 from Ada Liu ---
(In reply to Andrew Pinski from comment #3)
> 65536*d[1] will overflow if d[1] is 65535 (0x).
>
> If you did this instead it would be defined:
> 65536u*d[1]
>
> as that is an unsigned * unsigned short so the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81110
--- Comment #2 from Ada Liu ---
Comment on attachment 41567
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41567
reduced testcase
>
>unsigned short d[2];
>__attribute__ ((noinline))int DiffInt ()
>{
> if ((unsigned long)(65536*d[1]+d[0]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81110
--- Comment #1 from Ada Liu ---
Comment on attachment 41567
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41567
reduced testcase
>
>unsigned short d[2];
>__attribute__ ((noinline))int DiffInt ()
>{
> if ((unsigned long)(65536*d[1]+d[0]
: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: qian.liu at ingenic dot com
Target Milestone: ---
Target: mips-linux-gnu mipsel-linux-gnu
Created attachment 41567
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41567&action=edit