         Edinburgh IMP77 Compiler - Version 8.4
    1 %begin
		.Ltext0:
				.globl	main
		main:
		.LFB189:
				leal	4(%esp), %ecx
				andl	$-16, %esp
				pushl	-4(%ecx)
				pushl	%ebp
				movl	%esp, %ebp
				pushl	%ebx
				pushl	%ecx
				subl	$16, %esp
				call	__x86.get_pc_thunk.bx
				addl	$_GLOBAL_OFFSET_TABLE_, %ebx
				movl	%ecx, %eax
				subl	$8, %esp
				pushl	4(%eax)
				pushl	(%eax)
				call	_imp_initialise@PLT
				addl	$16, %esp
    2   %integer x
    3
    4   ! The intention was this:
    5   x = (65 << 24) ! (76 << 16) ! (71 << 8) ! 3
				movl	$1095517955, -16(%ebp)
    6
    7   ! but the vax compiler contained this line:
    8
    9   x = ((3 + (71 << 8)) + 76 << 16) + 65 << 24
				movl	$1095517955, -16(%ebp)
				movl	$0, -12(%ebp)
		.LBB4:
		.LBB5:
				subl	$12, %esp
				pushl	-12(%ebp)
				call	exit@PLT
		.LBE5:
		.LBE4:
		.LFE189:
				.section	.text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat
				.globl	__x86.get_pc_thunk.bx
				.hidden	__x86.get_pc_thunk.bx
		__x86.get_pc_thunk.bx:
		.LFB190:
				movl	(%esp), %ebx
				ret
		.LFE190:
		.Letext0:
   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
    5 Statements compiled
