fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
503 B11 linesraw
1-include ../tools.mk
2
3# Test to make sure that inner functions within a polymorphic outer function
4# don't get re-codegened when the outer function is monomorphized.  The test
5# code monomorphizes the outer functions several times, but the magic constants
6# used in the inner functions should each appear only once in the generated IR.
7
8all:
9	$(RUSTC) foo.rs --emit=llvm-ir
10	[ "$$(grep -c 'ret i32 8675309' "$(TMPDIR)/foo.ll")" -eq "1" ]
11	[ "$$(grep -c 'ret i32 11235813' "$(TMPDIR)/foo.ll")" -eq "1" ]