diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-16 07:51:13 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-16 07:51:13 +0000 |
commit | 394f17d84617bc148fdd9705e55f37444edd37b5 (patch) | |
tree | db317581f4fc3fbe2eb66e866479a54d2f6c5260 /gcc/testsuite | |
parent | ab37e77c21e85ab537e4606f51db141d2ec682d8 (diff) | |
download | gcc-394f17d84617bc148fdd9705e55f37444edd37b5.tar.gz |
2011-03-16 Basile Starynkevitch <basile@starynkevitch.net>
* melt/xtramelt-ana-base.melt (make_empty_basicblock): New.
(loop_body_tuple): Move the function after basic block primitives.
* testsuite/melt/twrongprim-1.melt: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@171032 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/melt/twrongprim-1.melt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/melt/twrongprim-1.melt b/gcc/testsuite/melt/twrongprim-1.melt new file mode 100644 index 00000000000..301b828129c --- /dev/null +++ b/gcc/testsuite/melt/twrongprim-1.melt @@ -0,0 +1,23 @@ +;; -*- lisp -*- +;; file twrongprim-1.melt + +;; demonstrate a bug in MELT rev 171018. The function make_empty_bb +;; calls a forwardly defined primitive which is incorrectly translated +;; to nil without any error messages... + +#| run in buildir/gcc + ./cc1 -fmelt=translatefile -fmelt-module-path=melt-modules:. \ + -fmelt-source-path=melt-sources:.:$GCCMELT_SOURCE/gcc/melt \ + -fmelt-tempdir=/tmp \ + -fmelt-arg=$GCCMELT_SOURCE/gcc/testsuite/melt/twrongprim-1.melt \ + -fmelt-debug empty-file-for-melt.c +|# + +;; internal routine to make an empty basicblock boc +(defun make_empty_bb () + (make_bb discr_basic_block (null_basicblock))) + +(defprimitive make_bb (discr :basic_block bb) :value + #{/*make_bb*/(meltgc_new_basicblock((meltobject_ptr_t)($discr),($bb)))}# ) + +;; eof twrongprim-1.melt |