#include <perms.h>

                                                                //      1  %begin
#line 1 "regression-compile-tmp/shiftprecbug.imp"
int main(int argc, char **argv) {
  _imp_initialise(argc, argv);
                                                                //      2    %integer x
#line 2 "regression-compile-tmp/shiftprecbug.imp"
int X;
                                                                //      3  
                                                                //      4    ! The intention was this:
                                                                //      5    x = (65 << 24) ! (76 << 16) ! (71 << 8) ! 3
#line 5 "regression-compile-tmp/shiftprecbug.imp"
X = ((((((((65) << (24))) | (((76) << (16))))) | (((71) << (8))))) | (3));
                                                                //      6    
                                                                //      7    ! but the vax compiler contained this line:
                                                                //      8    
                                                                //      9    x = ((3 + (71 << 8)) + 76 << 16) + 65 << 24
#line 9 "regression-compile-tmp/shiftprecbug.imp"
X = ((((((((3) + ((int)(((71) << (8))))))) + (((76) << (16)))))) + (((65) << (24))));
                                                                //     10    
                                                                //     11    ! and C is complaining that the result does not fit in 32 bits.
                                                                //     12    ! So clearly, the precedence of shift vs add is wrong!
                                                                //     13  
                                                                //     14  !    5 Statements compiled
                                                                //     15  ! test/shiftprecbug.c: In function 'main':
                                                                //     16  ! test/shiftprecbug.c:17:39: warning: result of '1196359745 << 24' requires 56 bits to represent, but 'int' only has 32 bits [-Wshift-overflow=]
                                                                //     17  !    17 | X = ((3 + (71 << 8)) + 76 << 16) + 65 << 24;
                                                                //     18  !       |                                       ^~
                                                                //     19  
                                                                //     20  %endofprogram
#line 20 "regression-compile-tmp/shiftprecbug.imp"
/* Remove %on %event handler here if present for this block */
return 0;
} // End of block _imp_main at level 1
#line 20 "regression-compile-tmp/shiftprecbug.imp"
// End of file
