Add test for PR#6216. Not fixed yet.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14250 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
04bc532c2b
commit
9212dd34ac
|
@ -44,11 +44,12 @@ SET_LD_PATH=CAML_LD_LIBRARY_PATH="$(LD_PATH)"
|
|||
include $(TOPDIR)/config/Makefile
|
||||
|
||||
OCFLAGS=-nostdlib -I $(OTOPDIR)/stdlib $(COMPFLAGS)
|
||||
OCOPTFLAGS=
|
||||
|
||||
OCAML=$(OCAMLRUN) $(OTOPDIR)/ocaml $(OCFLAGS) \
|
||||
-init $(OTOPDIR)/testsuite/lib/empty
|
||||
OCAMLC=$$($(CAMLC_BIN_CMD_TO_EVAL)) $(OCFLAGS)
|
||||
OCAMLOPT=$$($(CAMLOPT_BIN_CMD_TO_EVAL)) $(OCFLAGS)
|
||||
OCAMLOPT=$$($(CAMLOPT_BIN_CMD_TO_EVAL)) $(OCFLAGS) $(OCOPTFLAGS)
|
||||
OCAMLDOC=$(OCAMLRUN) $(OTOPDIR)/ocamldoc/ocamldoc
|
||||
OCAMLLEX=$(OCAMLRUN) $(OTOPDIR)/lex/ocamllex
|
||||
OCAMLMKLIB=$(OCAMLRUN) $(OTOPDIR)/tools/ocamlmklib \
|
||||
|
|
|
@ -15,3 +15,4 @@ MODULES=testing
|
|||
|
||||
include $(BASEDIR)/makefiles/Makefile.several
|
||||
include $(BASEDIR)/makefiles/Makefile.common
|
||||
OCOPTFLAGS=-inline 20
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
(* PR6216: wrong inlining of GADT match *)
|
||||
|
||||
type _ t =
|
||||
| Float : float t
|
||||
| String : string t
|
||||
|
||||
let f : type a . a t -> a -> unit = fun t a ->
|
||||
match t with
|
||||
| Float -> ()
|
||||
| String -> ignore (String.length a : int)
|
||||
|
||||
let _g (kind : float t) (x : float) : unit = f kind (x *. 13.)
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
All tests succeeded.
|
Loading…
Reference in New Issue