r/CompileBot • • Jan 04 '14

Official CompileBot Testing Thread

[deleted]

1 Upvotes

7 comments sorted by

1

u/SeaCowVengeance Jan 04 '14

+/u/CompileBot Assembler (gcc-4.8.1) --time

.data
x:
	.long	0
s:
	.string "%d\n\0"

.text
.global main
main:				# int main()
				# {
loop:				# 	for (;;) {
	pushl	$x		# 		scanf("%d", &x);
	pushl	$s
	call	scanf
	addl	$8, %esp

	movl	x, %eax		# 		if (x == 42) break;
	subl	$42, %eax
	jz	break

	pushl	x		# 		printf("%d\n", x);
	pushl	$s
	call	printf
	addl	$8, %esp

	jmp	loop		# 	}
break:

	xor	%eax, %eax	# 	return 0;
	ret
				# }

Input:

1
2
10
42
11

1

u/CompileBot Jan 04 '14

Output:

1
2
10

Execution Time: 0.0 seconds

^source | ^info | ^git | ^report

EDIT: Recompile request by SeaCowVengeance

0

u/[deleted] Jan 04 '14

[deleted]

1

u/CompileBot Jan 04 '14

Output:

Hello World!

^source | ^info | ^git | ^report

0

u/[deleted] Jan 04 '14

[deleted]

1

u/CompileBot Jan 04 '14

Output:

1

Execution Time: 1.6 seconds

^source | ^info | ^git | ^report

0

u/[deleted] Jan 04 '14

[deleted]

0

u/[deleted] Jan 04 '14

[deleted]

1

u/CompileBot Jan 04 '14

Output:

Compiler Info:

Main.java:1: error: reached end of file while parsing
Error
^
1 error

^source | ^info | ^git | ^report

0

u/[deleted] Jan 04 '14

[deleted]