summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-03 10:40:28 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-03 10:40:28 +0000
commit1e018b94d3ad69051e1ae8a1b14b59c79bbed9af (patch)
tree3eb0cd38ea32b86ec6a49c551c60941be00e0bba
parent479179acb762fb09c01c0c7d1761436ceebd130f (diff)
downloadgcc-1e018b94d3ad69051e1ae8a1b14b59c79bbed9af.tar.gz
2014-03-03 Basile Starynkevitch <basile@starynkevitch.net>
* melt-run.proto.h (MELT_GCC_VERSION): Include very early <cstdlib>, as suggested in http://gcc.gnu.org/ml/gcc/2012-08/msg00277.html message. Use GCCPLUGIN_VERSION by default. * Makefile.in (melt-run.h): Substitute GCCPLUGIN_VERSION by the actual number for MELT_GCC_VERSION. * melt/warmelt-first.melt (ctype_gimple_seq): Since gimple_seq is synonym of gimple, use the gimple marker routine. * melt/xtramelt-ana-gimple.melt (melt_walk_use_def_chains): Clear the local meltwalkhookdata_st structure after the walk. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@208271 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.MELT16
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/melt-run.proto.h6
-rw-r--r--gcc/melt/warmelt-first.melt4
-rw-r--r--gcc/melt/xtramelt-ana-gimple.melt3
5 files changed, 26 insertions, 5 deletions
diff --git a/gcc/ChangeLog.MELT b/gcc/ChangeLog.MELT
index db28831698d..c284f782d65 100644
--- a/gcc/ChangeLog.MELT
+++ b/gcc/ChangeLog.MELT
@@ -1,4 +1,20 @@
+2014-03-03 Basile Starynkevitch <basile@starynkevitch.net>
+
+ * melt-run.proto.h (MELT_GCC_VERSION): Include very early
+ <cstdlib>, as suggested in
+ http://gcc.gnu.org/ml/gcc/2012-08/msg00277.html message. Use
+ GCCPLUGIN_VERSION by default.
+
+ * Makefile.in (melt-run.h): Substitute GCCPLUGIN_VERSION by the
+ actual number for MELT_GCC_VERSION.
+
+ * melt/warmelt-first.melt (ctype_gimple_seq): Since gimple_seq is
+ synonym of gimple, use the gimple marker routine.
+
+ * melt/xtramelt-ana-gimple.melt (melt_walk_use_def_chains): Clear
+ the local meltwalkhookdata_st structure after the walk.
+
2014-02-26 Basile Starynkevitch <basile@starynkevitch.net>
* melt/generated/*: Regenerated.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 32d91087b4c..47cbe2f50cd 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2082,7 +2082,7 @@ melt-run-md5.h melt-run.h: $(srcdir)/melt-run.proto.h \
melt_run_md5=`$(COMPILER) -C -E -DMELT_GCC_VERSION=$(MELT_GCC_VERSION_NUM) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(srcdir)/melt-run.proto.h | grep -v '^#' | md5sum | cut -c 1-32`; \
( echo "const char melt_run_preprocessed_md5[]=\"$$melt_run_md5\";" > melt-run-md5.h-tmp ; \
sed -e "s,#define *MELT_RUN_HASHMD5 *XX,#define MELT_RUN_HASHMD5 \"$$melt_run_md5\"," \
- -e "s,#define *MELT_GCC_VERSION *YY,#define MELT_GCC_VERSION $(MELT_GCC_VERSION_NUM)," \
+ -e "s,#define *MELT_GCC_VERSION *GCCPLUGIN_VERSION,#define MELT_GCC_VERSION $(MELT_GCC_VERSION_NUM)," \
< $(srcdir)/melt-run.proto.h > melt-run.h-tmp )
$(SHELL) $(srcdir)/../move-if-change melt-run-md5.h-tmp melt-run-md5.h
$(SHELL) $(srcdir)/../move-if-change melt-run.h-tmp melt-run.h
diff --git a/gcc/melt-run.proto.h b/gcc/melt-run.proto.h
index 147d7de90c4..cf030ef2bc6 100644
--- a/gcc/melt-run.proto.h
+++ b/gcc/melt-run.proto.h
@@ -24,12 +24,16 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+/* We need <cstdlib> very early for GCC 4.8 & 4.9; see http://gcc.gnu.org/ml/gcc/2012-08/msg00277.html */
+#include <cstdlib>
+
#ifndef MELT_GCC_VERSION
/* Actually, the generated melt-run.h contains a number like 4007 for
GCC 4.7 etc. This is the version of the GCC using this MELT. */
-#define MELT_GCC_VERSION YY
+#define MELT_GCC_VERSION GCCPLUGIN_VERSION
#endif
+
/* all file including this are somehow plugins, perhaps MELT specific ones */
#include "gcc-plugin.h"
diff --git a/gcc/melt/warmelt-first.melt b/gcc/melt/warmelt-first.melt
index 4ad784b3c7e..0cad088286d 100644
--- a/gcc/melt/warmelt-first.melt
+++ b/gcc/melt/warmelt-first.melt
@@ -2742,7 +2742,7 @@ list.}#
;; the C type for gcc gimple_seq-s
(definstance ctype_gimple_seq class_ctype_gty
:doc #{The $CTYPE_GIMPLE_SEQ is the c-type of raw GCC gimple_seq stuff. See also $DISCR_GIMPLE_SEQ.
-Keyword is :gimple_seq.}#
+Keyword is :gimple_seq. Notice that @code{gimple_seq} is a typedef for @code{gimple}.}#
:predef CTYPE_GIMPLE_SEQ
:named_name '"CTYPE_GIMPLE_SEQ"
:ctype_keyword ':gimple_seq
@@ -2752,7 +2752,7 @@ Keyword is :gimple_seq.}#
:ctype_parstring '"MELTBPARSTR_GIMPLESEQ"
:ctype_argfield '"meltbp_gimpleseq"
:ctype_resfield '"meltbp_gimpleseqptr"
- :ctype_marker '"/*:gimple_seq marker*/ gt_ggc_mx_gimple_seq_d"
+ :ctype_marker '"/*:gimple_seq marker, really gimple marker*/ gt_ggc_mx_gimple_statement_d"
:ctype_autoboxdiscr discr_gimple_seq
:ctype_autoconstboxdiscr discr_constant_gimple_seq
;; GTY ctype
diff --git a/gcc/melt/xtramelt-ana-gimple.melt b/gcc/melt/xtramelt-ana-gimple.melt
index 05de5124000..2a0ef281723 100644
--- a/gcc/melt/xtramelt-ana-gimple.melt
+++ b/gcc/melt/xtramelt-ana-gimple.melt
@@ -2689,7 +2689,8 @@ MELT_EXTERN bool melt_4dot8_walk_hook_use_def_wrapper(tree, gimple, void *);
mwhdata_$WALKUSEDEF_CHK.mwh_magic = MELTWALKHOOKDATA_MAGIC;
walk_use_def_chains ($TRVAR, melt_4dot8_walk_hook_use_def_wrapper,
(void*)&mwhdata_$WALKUSEDEF_CHK,
- true);
+ true);
+ memset (&mwhdata_$WALKUSEDEF_CHK, 0, sizeof(struct meltwalkhookdata_st ));
/* melt_walk_use_def_chains $WALKUSEDEF_CHK end */
}#
)