Commit 07cdae91 by Mark Mitchell Committed by Mark Mitchell

MAINTAINERS: Remove chill maintainers.

	* MAINTAINERS: Remove chill maintainers.
	* Makefile.in (CHILLFLAGS): Remove.
	(CHILL_LIB): Remove.
	(TARGET_CONFIGDIRS): Remove libchill.
	(CHILL_FOR_TARGET): Remove.
	(BASE_FLAGS_TO_PASS): Don't pass CHILLFLAGS, CHILL_FOR_TARGET, or
	CHILL_LIB.
	(CONFIGURE_TARGET_MODULES): Remove configure-target-libchill.
	(CHECK_TARGET_MODULES): Likewise.
	(INSTALL_TARGET_MODULES): Likewise.
	(CLEAN_TARGET_MODULES): Likewise.
	(configure-target-libchill): Remove.
	(all-target-libchill): Remove.
	* configure.in (target_libs): Remove target-libchill.
	Do not compute CHILL_FOR_TARGET.
	* libchill: Remove directory.

	Remove Chill front end.
	* gcc.c (default_compilers): Remove Chill entries.
	* ch: Remove directory.
	* doc/frontends.texi: Remove information about Chill.
	* doc/sourcebuild.texi: Likewise.
	* doc/standards.texi: Likewise.

	* testsuite/lib/chill.exp: Remove.

	* g77.texi: Remove Chill reference.

	* gcc_release (build_tarfiles): Do not build Chill tarfiles.
	(CHILL_DIRS): Remove.

From-SVN: r52327
parent 41823c5e
2002-04-15 Mark Mitchell <mark@codesourcery.com>
* MAINTAINERS: Remove chill maintainers.
* Makefile.in (CHILLFLAGS): Remove.
(CHILL_LIB): Remove.
(TARGET_CONFIGDIRS): Remove libchill.
(CHILL_FOR_TARGET): Remove.
(BASE_FLAGS_TO_PASS): Don't pass CHILLFLAGS, CHILL_FOR_TARGET, or
CHILL_LIB.
(CONFIGURE_TARGET_MODULES): Remove configure-target-libchill.
(CHECK_TARGET_MODULES): Likewise.
(INSTALL_TARGET_MODULES): Likewise.
(CLEAN_TARGET_MODULES): Likewise.
(configure-target-libchill): Remove.
(all-target-libchill): Remove.
* configure.in (target_libs): Remove target-libchill.
Do not compute CHILL_FOR_TARGET.
* libchill: Remove directory.
2002-04-11 DJ Delorie <dj@redhat.com>
* Makefile.in, configure.in: Sync with binutils, entries
......
......@@ -77,8 +77,6 @@ fortran Richard Henderson rth@redhat.com
fortran Toon Moene toon@moene.indiv.nluug.nl
c++ Jason Merrill jason@redhat.com
c++ Mark Mitchell mark@codesourcery.com
chill Dave Brolley brolley@redhat.com
chill Per Bothner per@bothner.com
cpplib Dave Brolley brolley@redhat.com
cpplib Per Bothner per@bothner.com
cpplib Zack Weinberg zack@codesourcery.com
......
......@@ -100,8 +100,6 @@ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
PICFLAG =
PICFLAG_FOR_TARGET =
CHILLFLAGS = $(CFLAGS)
CHILL_LIB = -lchill
CXX = c++
# Use -O2 to stress test the compiler.
......@@ -178,7 +176,7 @@ OTHERS =
# This is set by the configure script to the list of directories which
# should be built using the target tools.
TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib librx winsup opcodes bsp libstub cygmon libf2c libchill libobjc
TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib librx winsup opcodes bsp libstub cygmon libf2c libobjc
# Target libraries are put under this directory:
# Changed by configure to $(target_alias) if cross.
......@@ -235,7 +233,6 @@ INSTALL_TARGET_CROSS = installdirs \
# Should be substed by configure.in
FLAGS_FOR_TARGET =
CC_FOR_TARGET =
CHILL_FOR_TARGET =
CXX_FOR_TARGET =
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE =
GCJ_FOR_TARGET =
......@@ -359,9 +356,6 @@ BASE_FLAGS_TO_PASS = \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
"CFLAGS=$(CFLAGS)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"CHILLFLAGS=$(CHILLFLAGS)" \
"CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
"CHILL_LIB=$(CHILL_LIB)" \
"GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
"CXXFLAGS=$(CXXFLAGS)" \
......@@ -789,7 +783,6 @@ ALL_TARGET_MODULES = \
all-target-librx \
all-target-newlib \
all-target-libf2c \
all-target-libchill \
all-target-libobjc \
all-target-libtermcap \
all-target-winsup \
......@@ -813,7 +806,6 @@ CONFIGURE_TARGET_MODULES = \
configure-target-librx \
configure-target-newlib \
configure-target-libf2c \
configure-target-libchill \
configure-target-libobjc \
configure-target-libtermcap \
configure-target-winsup \
......@@ -836,7 +828,6 @@ CHECK_TARGET_MODULES = \
check-target-libstdc++-v3 \
check-target-newlib \
check-target-libf2c \
check-target-libchill \
check-target-libobjc \
check-target-winsup \
check-target-libiberty \
......@@ -853,7 +844,6 @@ INSTALL_TARGET_MODULES = \
install-target-libstdc++-v3 \
install-target-newlib \
install-target-libf2c \
install-target-libchill \
install-target-libobjc \
install-target-libtermcap \
install-target-winsup \
......@@ -942,7 +932,6 @@ CLEAN_TARGET_MODULES = \
clean-target-librx \
clean-target-newlib \
clean-target-libf2c \
clean-target-libchill \
clean-target-libobjc \
clean-target-winsup \
clean-target-libgloss \
......@@ -1787,8 +1776,6 @@ all-target-libstub: configure-target-libstub
all-libtool:
configure-target-libf2c: $(ALL_GCC_C)
all-target-libf2c: configure-target-libf2c all-target-libiberty
configure-target-libchill: $(ALL_GCC_C)
all-target-libchill: configure-target-libchill all-target-libiberty
configure-target-libobjc: $(ALL_GCC_C)
all-target-libobjc: configure-target-libobjc all-target-libiberty
all-m4: all-libiberty all-texinfo
......
......@@ -73,7 +73,6 @@ target_libs="target-libiberty \
target-librx \
${libstdcxx_version} \
target-libf2c \
target-libchill \
${libgcj}
target-libobjc"
......@@ -1526,20 +1525,6 @@ case $CC_FOR_TARGET in
*) CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
esac
if test "x${CHILL_FOR_TARGET+set}" = xset; then
:
elif test -d ${topsrcdir}/gcc; then
CHILL_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/'
elif test "$host" = "$target"; then
CHILL_FOR_TARGET='$(CC)'
else
CHILL_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}`
fi
case $CHILL_FOR_TARGET in
*' $(FLAGS_FOR_TARGET)') ;;
*) CHILL_FOR_TARGET=$CHILL_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
esac
if test "x${GCJ_FOR_TARGET+set}" = xset; then
:
elif test -d ${topsrcdir}/gcc; then
......@@ -1586,7 +1571,6 @@ s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:
s%^TARGET_CONFIGARGS[ ]*=.*$%TARGET_CONFIGARGS = ${targargs}%
s%^FLAGS_FOR_TARGET[ ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%
s%^CC_FOR_TARGET[ ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%
s%^CHILL_FOR_TARGET[ ]*=.*$%CHILL_FOR_TARGET = ${CHILL_FOR_TARGET}%
s%^GCJ_FOR_TARGET[ ]*=.*$%GCJ_FOR_TARGET = ${GCJ_FOR_TARGET}%
s%^CXX_FOR_TARGET[ ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%
s%^CXX_FOR_TARGET_FOR_RECURSIVE_MAKE[ ]*=.*$%CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = ${qqCXX_FOR_TARGET}%
......
2002-04-15 Mark Mitchell <mark@codesourcery.com>
Remove Chill front end.
* gcc.c (default_compilers): Remove Chill entries.
* ch: Remove directory.
* doc/frontends.texi: Remove information about Chill.
* doc/sourcebuild.texi: Likewise.
* doc/standards.texi: Likewise.
2002-04-15 Douglas B Rupp <rupp@gnat.com>
* config/alpha/vms.h (INCLUDE_DEFAULTS): Add /gnu/lib/gcc-lib/include.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
# Top level Makefile fragment for GNU CHILL.
# Copyright (C) 1994, 1998, 2000 Free Software Foundation, Inc.
#This file is part of GNU CC.
#GNU CC is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2, or (at your option)
#any later version.
#GNU CC is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with GNU CC; see the file COPYING. If not, write to
#the Free Software Foundation, 59 Temple Place - Suite 330,
#Boston, MA 02111-1307, USA. */
# This file provides the language dependent support in the main Makefile.
# Each language makefile fragment must provide the following targets:
#
# foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap,
# foo.info, foo.dvi,
# foo.install-normal, foo.install-common, foo.install-info, foo.install-man,
# foo.uninstall,
# foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean,
# foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
#
# where `foo' is the name of the language.
#
# It should also provide rules for:
#
# - making any compiler driver (eg: g++)
# - the compiler proper (eg: cc1plus)
# - define the names for selecting the language in LANGUAGES.
#
# define version of GNUCHILL compiler. Note: maybe we have to change the
# mechanism
GNUCHILL_VERSION = 1.5.2
# Actual names to use when installing a native compiler.
# (Cygnus configure overrides these when using -program-transform-name).
CHILL_INSTALL_NAME = chill
# Actual names to use when installing a cross-compiler.
# (Cygnus configure overrides these when using -program-transform-name).
CHILL_CROSS_NAME = $(target_alias)-chill
CHILL_SRCS = $(srcdir)/ch/actions.c $(srcdir)/ch/convert.c \
$(srcdir)/ch/decl.c $(srcdir)/ch/except.c $(srcdir)/ch/expr.c \
$(srcdir)/ch/grant.c $(srcdir)/ch/inout.c $(srcdir)/ch/lang.c \
$(srcdir)/ch/lex.c $(srcdir)/ch/loop.c \
$(srcdir)/ch/parse.c $(srcdir)/ch/satisfy.c \
$(srcdir)/ch/tasking.c $(srcdir)/ch/timing.c $(srcdir)/ch/tree.c \
$(srcdir)/ch/typeck.c
# Extra flags to pass to recursive makes.
CHILL_FLAGS_TO_PASS = \
"CHILLFLAGS=$(CHILLFLAGS)" \
"CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
"CHILL_LIB=$(CHILL_LIB)" \
"GNUCHILL_VERSION=$(GNUCHILL_VERSION)"
#
# Define the names for selecting languages in LANGUAGES.
CHILL: chill cc1chill$(exeext)
# handle startfile in chill script and build script to install
chill: $(srcdir)/ch/chill.in Makefile
thisdir=`pwd` ; \
sed -e "s:startfile=chillrt0:startfile=$${thisdir}/ch/runtime/chillrt0.o:" \
-e "s:libpath=chillrt:libpath=-L$${thisdir}/ch/runtime/:" \
-e "s:whatgcc=gcc:whatgcc=\"$${thisdir}/xgcc$(exeext) -B$${thisdir}/\":" \
-e "s:gnuchill_version=unknown:gnuchill_version=$(GNUCHILL_VERSION):" \
-e "s:gnuchill_script_flags=:gnuchill_script_flags=\"$(GNUCHILL_SCRIPT_FLAGS)\":" $(srcdir)/ch/chill.in > chill ; \
chmod a+x chill ; \
if [ -f ../gcc-cross$(exeext) ]; then \
whatgcc=$(GCC_CROSS_NAME) ; \
else \
whatgcc=$(GCC_INSTALL_NAME) ; \
fi; \
sed -e "s:startfile=chillrt0:startfile=$(libsubdir)/chillrt0.o:" \
-e "s:whatgcc=gcc:whatgcc=$(bindir)/$${whatgcc}:" \
-e "s:gnuchill_version=unknown:gnuchill_version=$(GNUCHILL_VERSION):" \
-e "s:libpath=chillrt:libpath=:" \
-e "s:gnuchill_script_flags=:gnuchill_script_flags=\"$(GNUCHILL_SCRIPT_FLAGS)\":" $(srcdir)/ch/chill.in > chill.install ; \
chmod a+x chill.install
# Don't depend on cc1chill$(exeext), because chill-cross is always built for cross,
# and thus a cc1chill$(exeext) dependence would force cc1chill$(exeext) to always be built.
# Note that gcc-cross and g++-cross do not have cc1 or cc1plus dependencies.
chill-cross: $(srcdir)/ch/chill.in
touch $@
cc1chill$(exeext): $(P) $(CHILL_SRCS) $(LIBDEPS) $(BACKEND) \
insn-config.h insn-flags.h insn-attr.h insn-codes.h \
attribs.o c-typeck.o c-aux-info.o c-common.o \
ggc-callbacks.o
cd ch; $(MAKE) $(LANG_FLAGS_TO_PASS) $(CHILL_FLAGS_TO_PASS) ../cc1chill$(exeext)
#
# Build hooks:
CHILL.all.build: chill
CHILL.all.cross: chill-cross
CHILL.start.encap: chill
CHILL.rest.encap:
CHILL.dvi: ch/chill.dvi
CHILL.generated-manpages:
CHILL.info: $(srcdir)/ch/chill.info
$(srcdir)/ch/chill.info: $(srcdir)/ch/chill.texi
cd $(srcdir)/ch && $(MAKEINFO) -o chill.info chill.texi
ch/chill.dvi: $(srcdir)/ch/chill.texi
s=`cd $(srcdir); pwd`; export s; \
cd ch && $(TEXI2DVI) $$s/ch/chill.texi
#
# Install hooks:
# cc1chill is installed elsewhere as part of $(COMPILERS).
CHILL.install-normal:
# Install the driver program
CHILL.install-common: installdirs
-if [ -f cc1chill$(exeext) ] ; then \
if [ -f chill.install ] ; then \
if [ -f gcc-cross$(exeext) ]; then \
rm -f $(bindir)/$(CHILL_CROSS_NAME); \
$(INSTALL_SCRIPT) chill.install $(bindir)/$(CHILL_CROSS_NAME); \
chmod a+x $(bindir)/$(CHILL_CROSS_NAME); \
else \
rm -f $(bindir)/$(CHILL_INSTALL_NAME); \
$(INSTALL_SCRIPT) chill.install $(bindir)/$(CHILL_INSTALL_NAME); \
chmod a+x $(bindir)/$(CHILL_INSTALL_NAME); \
fi ; \
fi ; \
fi
# Don't delete $(infodir)/ch.info* unless there's actually new
# docs to install (in case LANGUAGES didn't contain chill earlier).
CHILL.install-info: installdirs
-cd $(srcdir)/ch; for i in chill.info*; do \
rm -f $(infodir)/chill.info*; \
realfile=`echo $$i | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
$(INSTALL_DATA) $$i $(infodir)/$$realfile; \
done
CHILL.install-man:
CHILL.uninstall:
-rm -rf $(bindir)/$(CHILL_INSTALL_NAME)
-rm -rf $(bindir)/$(CHILL_CROSS_NAME)
#
# Clean hooks:
# A lot of the ancillary files are deleted by the main makefile.
# We just have to delete files specific to us.
CHILL.mostlyclean:
-rm -f chill.install ch/*.o ch/ch-version.c
CHILL.clean:
CHILL.distclean:
-rm -f ch/config.status ch/Makefile
CHILL.extraclean:
CHILL.maintainer-clean:
-rm -f ch/TAGS
-rm -f $(srcdir)/ch/chill.info* ch/chill.dvi ch/chill.??s ch/chill.*aux
# Delete locally created file.
-rm -f ch/hash.h
#
# Stage hooks:
# The main makefile has already created stage?/ch.
CHILL.stage1: stage1-start
-mv ch/*.o stage1/ch
CHILL.stage2: stage2-start
-mv ch/*.o stage2/ch
CHILL.stage3: stage3-start
-mv ch/*.o stage3/ch
CHILL.stage4: stage4-start
-mv ch/*.o stage4/ch
This directory contains the GNU front-end for the Chill language,
contributed by Cygnus Solutions.
Chill is the "CCITT High-Level Language", where CCITT is the old
name for what is now ITU, the International Telecommunications Union.
It is is language in the Modula2 family, and targets many of the
same applications as Ada (especially large embedded systems).
Chill was never used much in the United States, but is still
being used in Europe, Brazil, Korea, and other places.
Chill has been standardized by a series of reports/standards.
The GNU implementation mostly follows the 1988 version of
the language, with some backwards compatibility options for
the 1984 version, and some other extensions. However, it
does not implement all of the features of any standard.
The most recent standard is Z.200 (11/93), available from
http://www.itu.int/itudoc/itu-t/rec/z.html.
The GNU Chill implementation is not being actively developed.
Cygnus has one customer we are maintaining Chill for,
but we are not planning on putting major work into Chill.
This Net release is for educational purposes (as an example
of a different Gcc front-end), and for those who find it useful.
It is an unsupported hacker release. Bug reports without
patches are likely to get ignored. Questions may get answered or
ignored depending on our mood! If you want to try your luck,
you can send a note to David Brolley <brolley@cygnus.com> or
Per Bothner <bothner@cygnus.com>.
One known problem is that we only support native builds of GNU Chill.
If you need a cross-compiler, you will find various problems,
including the directory structure, and the setjmp-based exception
handling mechanism.
The Chill run-time system is in the runtime sub-directory.
Notice rts.c contains a poor main's implementation of Chill
"processes" (threads). It is not added to libchill.a.
We only use it for testing. (Our customer uses a different
implementation for production work.)
The GNU Chill implementation was primarily written by
Per Bothner, along with Bill Cox, Wilfried Moser, Michael
Tiemann, and David Brolley.
/* Declarations for ch-actions.c.
Copyright (C) 1992, 1993, 1994, 1998, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* used by compile_file */
void init_chill PARAMS ((void));
extern int grant_count;
extern void push_handler PARAMS ((void));
extern void pop_handler PARAMS ((int));
extern void push_action PARAMS ((void));
extern int chill_handle_single_dimension_case_label PARAMS ((tree, tree, int *, int *));
extern tree build_chill_multi_dimension_case_expr PARAMS ((tree, tree, tree));
extern tree build_multi_case_selector_expression PARAMS ((tree, tree));
extern void compute_else_ranges PARAMS ((tree, tree));
/* This file contains the definitions and documentation for the
additional tree codes used in the CHILL front end (see tree.def
for the standard codes).
Copyright (C) 1992, 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/*
* CHILL types.
*/
DEFTREECODE (GRANT_TYPE, "grant_type", 't', 0)
DEFTREECODE (SEIZE_TYPE, "seize_type", 't', 0)
/*
* CHILL decls.
*/
DEFTREECODE (KEYWORD_DECL, "keyword_decl", 'd', 0)
DEFTREECODE (INSTANCE_METHOD_DECL, "instance_method_decl", 'd', 0)
DEFTREECODE (CLASS_METHOD_DECL, "class_method_decl", 'd', 0)
/* A 'SEIZE (OLD->NEW)!POSTFIX' or 'GRANT (OLD->NEW)!POSTFIX' is
represented as an ALIAS_DECL where DECL_OLD_PREFIX, DECL_NEW_PREFIX,
and DECL_POSTFIX points to OLD, NEW, and POSTFIX, respectively.
These are IDENTIFIER_NODEs, or NULL if empty.
DECL_NAME is NEW!POSTFIX. After binding, DECL_ABSTRACT_ORIGIN
(if not an error_mark) points to a decl whose DECL_NAME is OLD!POSTFIX.
and which this name is linked to.
For SEIZE, DECL_SEIZEFILE names the most recent use_seize_file directive.
For GRANT, DECL_SEIZEFILE names the seizefile doing the granting. */
DEFTREECODE (ALIAS_DECL, "alias_decl", 'd', 0)
/* A variable, which is BASED on a pointer variable in DECL_ABSTRACT_ORIGIN. */
DEFTREECODE (BASED_DECL, "based_decl", 'd', 0)
/* A pseudo-variable declared by a DO WITH. */
DEFTREECODE (WITH_DECL, "with_decl", 'd', 0)
/*
* CHILL exprs.
*/
DEFTREECODE (CONCAT_EXPR, "concat_expr", '2', 2)
/* A slice (sub-array or sub-string) of operand 0, where
operand 1 is the start of the slice, and operand 2 is its length.
Currently, only used for bitstring sclices. */
DEFTREECODE (SLICE_EXPR, "slice_expr", 'e', 3)
/* Later, SET_IN_EXPR might be replaced by BIT_FIELD_REF or IN_EXPR. */
DEFTREECODE (SET_IN_EXPR, "set_in_expr", '2', 2)
/* A CASE_EXPR EX implements Chill CASE expression.
TREE_OPERAND (EX, 0) is a TREE_LIST representing the <case selector list>,
with one node for each expression. (Only one is supported by the
current implementation.)
TREE_OPERAND (EX, 1) is also a TREE_LIST, with one node for each
<value case alternative>. The TREE_VALUE of these node is the
<sub expression> (case element body); the TREE_PURPOSE contains
the <case label specification>. (The TREE_PURPOSE for the
optional ELSE (default) branch is NULL_TREE.) Each <case label
specification> is also represented as a list with one TREE_LIST
node for each <case label list> (though only length==1 is currently
supported). And finally: each <case label list> is again a list
with one TREE_LIST node for each <case label>. */
DEFTREECODE (CASE_EXPR, "case_expr", 'e', 2)
/* Powerset and static bit array operations.
Operands have same mode as result. */
DEFTREECODE (SET_NOT_EXPR, "set_not_expr", '1', 1)
DEFTREECODE (SET_IOR_EXPR, "set_ior_expr", '2', 2)
DEFTREECODE (SET_XOR_EXPR, "set_xor_expr", '2', 2)
DEFTREECODE (SET_AND_EXPR, "set_and_expr", '2', 2)
DEFTREECODE (SET_DIFF_EXPR, "set_diff_expr", '2', 2)
DEFTREECODE (PAREN_EXPR, "paren_expr", '1', 1)
DEFTREECODE (STRING_EQ_EXPR, "string_eq_expr", '2', 2)
DEFTREECODE (STRING_LT_EXPR, "string_lt_expr", '2', 2)
/* Used to represent a string repetition expression, until
we have a type for it; a SET_TYPE replicator needs a
TYPE_DOMAIN even if it represents the empty set */
DEFTREECODE (REPLICATE_EXPR, "replicate_expr", 'e', 2)
/* An undefined value. Used for the Chill operator '*',
and sometimes for padding. */
DEFTREECODE (UNDEFINED_EXPR, "undefined_expr", 'e', 0)
/* Used to represent a process instance */
DEFTREECODE (INSTANCE_TYPE, "instance_type", 't', 0)
/* Used to represent a reference to an array of bitfields. Currently restricted
to fields which are 1 bit wide. */
DEFTREECODE (PACKED_ARRAY_REF, "packed_array_ref", 'r', 2)
/* ALSO NOTE: LANG_TYPE is used for two things during pass 1;
such a node is converted to some other type node during satisfy.
If CH_NOVELTY_FLAG is set, then this node is a logical copy of
its TREE_TYPE, but with a different novelty.
If TYPE_READONLY is set, then the node stands for 'READ M'
where M is the TREE_TYPE. */
#!/bin/sh
# Compile GNU Chill programs.
: || exec /bin/sh -f $0 $argv:q
# The compiler name might be different when doing cross-compilation
# (this should be configured)
gcc_name=gcc
whatgcc=gcc
speclang=-xnone
startfile=chillrt0
gnuchill_script_flags=
gnuchill_version=unknown
extraflags=
# replace the command name by the name of the new command
progname=`basename $0`
case "$0" in
*/*)
gcc=`echo $0 | sed -e "s;/[^/]*$;;"`/$gcc_name
;;
*)
gcc=$gcc_name
;;
esac
# $first is yes for first arg, no afterwards.
first=yes
# If next arg is the argument of an option, $quote is non-empty.
# More precisely, it is the option that wants an argument.
quote=
# $library is made empty to disable use of libchill.
library="-lchill"
libpath=chillrt
numargs=$#
for arg
do
if [ $first = yes ]
then
# Need some 1st arg to `set' which does not begin with `-'.
# We get rid of it after the loop ends.
set gcc
first=no
fi
# If you have to ask what this does, you should not edit this file. :-)
# The ``S'' at the start is so that echo -nostdinc does not eat the
# -nostdinc.
arg=`echo "S$arg" | sed "s/^S//; s/'/'\\\\\\\\''/g"`
if [ x$quote != x ]
then
quote=
else
quote=
case $arg in
-nostdlib)
# Inhibit linking with -lchill.
library=
libpath=
startfile=
;;
-B*)
gcc=`echo $arg | sed -e "s/^-B//"`$gcc_name
;;
-[bBVDUoeTuIYmLiA] | -Tdata | -Xlinker)
# these switches take following word as argument,
# so don't treat it as a file name.
quote=$arg
;;
-[cSEM] | -MM)
# Don't specify libraries if we won't link,
# since that would cause a warning.
library=
libpath=
startfile=
;;
-x*)
speclang=$arg
;;
-v)
# catch `chill -v'
if [ $numargs = 1 ] ; then
library=
libpath=
startfile=
fi
echo "GNUCHILL version $gnuchill_version"
;;
-fgrant-only | -fchill-grant-only)
#inhibit production of an object file
extraflags="-S -o /dev/null"
library=
libpath=
startfile=
;;
-*)
# Pass other options through; they don't need -x and aren't inputs.
;;
*)
# If file ends in .i, put options around it.
# But not if a specified -x option is currently active.
case "$speclang $arg" in -xnone\ *.[i])
set "$@" -xchill "'$arg'" -xnone
continue
esac
;;
esac
fi
set "$@" "'$arg'"
done
# Get rid of that initial 1st arg
if [ $first = no ]; then
shift
else
echo "$0: No input files specified."
exit 1
fi
if [ x$quote != x ]
then
echo "$0: argument to \`$quote' missing"
exit 1
fi
# The '-ansi' flag prevents cpp from changing this:
# NEWMODE x = SET (sun, mon, thu, wed, thu, fri, sat);
#to this:
# NEWMODE x = SET (1, mon, thu, wed, thu, fri, sat);
#which is a CHILL syntax error.
eval $whatgcc -ansi $gnuchill_script_flags $startfile "$@" $libpath $library $extraflags
# Top level configure fragment for GNU CHILL.
# Copyright (C) 1994, 2000, 2001 Free Software Foundation, Inc.
#This file is part of GNU CC.
#GNU CC is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2, or (at your option)
#any later version.
#GNU CC is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with GNU CC; see the file COPYING. If not, write to
#the Free Software Foundation, 59 Temple Place - Suite 330,
#Boston, MA 02111-1307, USA. */
# Configure looks for the existence of this file to auto-config each language.
# We define several parameters used by configure:
#
# language - name of language as it would appear in $(LANGUAGES)
# compilers - value to add to $(COMPILERS)
# stagestuff - files to add to $(STAGESTUFF)
language="CHILL"
compilers="cc1chill\$(exeext)"
stagestuff="chill chill-cross\$(exeext) cc1chill\$(exeext)"
outputs=ch/Makefile
target_libs=target-libchill
build_by_default=no
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
struct resword {
const char *name;
short token;
enum rid rid;
enum toktype { RESERVED, DIRECTIVE, PREDEF } flags;
};
extern tree ridpointers [];
#ifdef __GNUC__
__inline
#endif
static unsigned int hash PARAMS ((const char *, unsigned int));
#ifdef __GNUC__
__inline
#endif
struct resword *in_word_set PARAMS ((const char *, unsigned int));
%%
access, ACCESS, NORID, RESERVED
after, AFTER, NORID, RESERVED
all, ALL, NORID, RESERVED
all_static_off, ALL_STATIC_OFF, NORID, DIRECTIVE
all_static_on, ALL_STATIC_ON, NORID, DIRECTIVE
and, AND, NORID, RESERVED
andif, ANDIF, NORID, RESERVED
array, ARRAY, NORID, RESERVED
asm, ASM_KEYWORD, NORID, RESERVED
assert, ASSERT, NORID, RESERVED
at, AT, NORID, RESERVED
based, BASED, NORID, RESERVED
begin, BEGINTOKEN, NORID, RESERVED
bin, BIN, NORID, RESERVED
bit, BOOLS, RID_BOOLS, PREDEF
body, BODY, NORID, RESERVED
bools, BOOLS, RID_BOOLS, RESERVED
buffer, BUFFER, NORID, RESERVED
buffer_code, IGNORED_DIRECTIVE, NORID, DIRECTIVE
by, BY, NORID, RESERVED
call, CALL, NORID, RESERVED
case, CASE, NORID, RESERVED
cause, CAUSE, NORID, RESERVED
ccitt_os, IGNORED_DIRECTIVE, NORID, DIRECTIVE
chars, CHARS, NORID, RESERVED
context, CONTEXT, NORID, RESERVED
continue, CONTINUE, NORID, RESERVED
cycle, CYCLE, NORID, RESERVED
dcl, DCL, NORID, RESERVED
debug_lines, IGNORED_DIRECTIVE, NORID, DIRECTIVE
debug_symbols, IGNORED_DIRECTIVE, NORID, DIRECTIVE
debug_types, IGNORED_DIRECTIVE, NORID, DIRECTIVE
delay, DELAY, NORID, RESERVED
do, DO, NORID, RESERVED
down, DOWN, NORID, RESERVED
dynamic, DYNAMIC, RID_DYNAMIC, RESERVED
else, ELSE, NORID, RESERVED
elsif, ELSIF, NORID, RESERVED
empty_off, EMPTY_OFF, NORID, DIRECTIVE
empty_on, EMPTY_ON, NORID, DIRECTIVE
end, END, NORID, RESERVED
esac, ESAC, NORID, RESERVED
even, IGNORED_DIRECTIVE, NORID, DIRECTIVE
event, EVENT, NORID, RESERVED
event_code, IGNORED_DIRECTIVE, NORID, DIRECTIVE
ever, EVER, NORID, RESERVED
exceptions, EXCEPTIONS, NORID, RESERVED
exit, EXIT, NORID, RESERVED
extra_const_seg, IGNORED_DIRECTIVE, NORID, DIRECTIVE
far, IGNORED_DIRECTIVE, NORID, DIRECTIVE
fi, FI, NORID, RESERVED
for, FOR, NORID, RESERVED
forbid, FORBID, NORID, RESERVED
general, GENERAL, NORID, RESERVED
generate_all_set_names, IGNORED_DIRECTIVE, NORID, DIRECTIVE
generate_set_names, IGNORED_DIRECTIVE, NORID, DIRECTIVE
goto, GOTO, NORID, RESERVED
grant, GRANT, NORID, RESERVED
grant_file_size, IGNORED_DIRECTIVE, NORID, DIRECTIVE
if, IF, NORID, RESERVED
in, IN, RID_IN, RESERVED
init, INIT, NORID, RESERVED
inline, INLINE, RID_INLINE, RESERVED
inout, PARAMATTR, RID_INOUT, RESERVED
large, IGNORED_DIRECTIVE, NORID, DIRECTIVE
list, IGNORED_DIRECTIVE, NORID, DIRECTIVE
loc, LOC, NORID, RESERVED
make_publics_for_discrete_syns, IGNORED_DIRECTIVE, NORID, DIRECTIVE
medium, IGNORED_DIRECTIVE, NORID, DIRECTIVE
mod, MOD, NORID, RESERVED
module, MODULE, NORID, RESERVED
multiple_const_segs, IGNORED_DIRECTIVE, NORID, DIRECTIVE
multiple_data_segs, IGNORED_DIRECTIVE, NORID, DIRECTIVE
newmode, NEWMODE, NORID, RESERVED
nolist, IGNORED_DIRECTIVE, NORID, DIRECTIVE
no_overlap_check, IGNORED_DIRECTIVE, NORID, DIRECTIVE
nonref, NONREF, NORID, RESERVED
nopack, NOPACK, NORID, RESERVED
not, NOT, NORID, RESERVED
od, OD, NORID, RESERVED
of, OF, NORID, RESERVED
on, ON, NORID, RESERVED
only_for_simulation, IGNORED_DIRECTIVE, NORID, DIRECTIVE
only_for_target, IGNORED_DIRECTIVE, NORID, DIRECTIVE
optimize, IGNORED_DIRECTIVE, NORID, DIRECTIVE
optimize_runtime, IGNORED_DIRECTIVE, NORID, DIRECTIVE
optimization_window, IGNORED_DIRECTIVE, NORID, DIRECTIVE
or, OR, NORID, RESERVED
orif, ORIF, NORID, RESERVED
out, PARAMATTR, RID_OUT, RESERVED
pack, PACK, NORID, RESERVED
page, IGNORED_DIRECTIVE, NORID, DIRECTIVE
pos, POS, NORID, RESERVED
powerset, POWERSET, NORID, RESERVED
prefixed, PREFIXED, NORID, RESERVED
print_o_code, IGNORED_DIRECTIVE, NORID, DIRECTIVE
print_symbol_table, IGNORED_DIRECTIVE, NORID, DIRECTIVE
priority, PRIORITY, NORID, RESERVED
proc, PROC, NORID, RESERVED
process, PROCESS, NORID, RESERVED
process_type, PROCESS_TYPE_TOKEN, NORID, DIRECTIVE
range, RANGE, NORID, RESERVED
range_off, RANGE_OFF, NORID, DIRECTIVE
range_on, RANGE_ON, NORID, DIRECTIVE
read, READ, RID_READ, RESERVED
receive, RECEIVE, NORID, RESERVED
recursive, RECURSIVE, NORID, RESERVED
reentrant, IGNORED_DIRECTIVE, NORID, DIRECTIVE
reentrant_all, IGNORED_DIRECTIVE, NORID, DIRECTIVE
ref, REF, NORID, RESERVED
region, REGION, NORID, RESERVED
rem, REM, NORID, RESERVED
remote, REMOTE, NORID, RESERVED
result, RESULT, NORID, RESERVED
return, RETURN, NORID, RESERVED
returns, RETURNS, NORID, RESERVED
row, ROW, NORID, RESERVED
seize, SEIZE, NORID, RESERVED
send, SEND, NORID, RESERVED
send_buffer_default_priority, SEND_BUFFER_DEFAULT_PRIORITY, NORID, DIRECTIVE
send_signal_default_priority, SEND_SIGNAL_DEFAULT_PRIORITY, NORID, DIRECTIVE
set, SET, NORID, RESERVED
short_pred_succ, IGNORED_DIRECTIVE, NORID, DIRECTIVE
signal, SIGNAL, NORID, RESERVED
signal_code, SIGNAL_CODE, NORID, DIRECTIVE
signal_max_length, IGNORED_DIRECTIVE, NORID, DIRECTIVE
simple, SIMPLE, NORID, RESERVED
small, IGNORED_DIRECTIVE, NORID, DIRECTIVE
spec, SPEC, NORID, RESERVED
start, START, NORID, RESERVED
state_routine, IGNORED_DIRECTIVE, NORID, DIRECTIVE
static, STATIC, NORID, RESERVED
step, STEP, NORID, RESERVED
stop, STOP, NORID, RESERVED
struct, STRUCT, NORID, RESERVED
support_causing_address, IGNORED_DIRECTIVE, NORID, DIRECTIVE
syn, SYN, NORID, RESERVED
synmode, SYNMODE, NORID, RESERVED
text, TEXT, NORID, RESERVED
then, THEN, NORID, RESERVED
this, THIS, NORID, RESERVED
timeout, TIMEOUT, NORID, RESERVED
to, TO, NORID, RESERVED
up, UP, NORID, RESERVED
use_seize_file, USE_SEIZE_FILE, NORID, DIRECTIVE
use_seize_file_restricted, USE_SEIZE_FILE_RESTRICTED, NORID, DIRECTIVE
varying, VARYING, NORID, RESERVED
while, WHILE, NORID, RESERVED
with, WITH, NORID, RESERVED
xor, XOR, NORID, RESERVED
This source diff could not be displayed because it is too large. You can view the blob instead.
/* Definitions for switches for GNU CHILL.
Copyright (C) 1995, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This is the contribution to the `documented_lang_options' array in
toplev.c for CHILL. */
DEFINE_LANG_NAME ("Chill")
{ "-lang-chill", "" },
{ "-flocal-loop-counter", "" },
{ "-fno-local-loop-counter", "Do not make separate scopes for every 'for' loop"},
{ "-fgrant-only", "Stop after successfully generating a grant file" },
{ "-fchill-grant-only", "" },
{ "-fold-strings", "Implement the 1984 Chill string semantics" },
{ "-fno-old-strings", "" },
{ "-fignore-case", "convert all idenitifers to lower case" },
{ "-fno-ignore-case", "" },
{ "-fpack", "Pack structures into available space"},
{ "-fno-pack", "" },
{ "-fspecial_UC", "Make special words be in uppercase" },
{ "-fspecial_LC", "" },
{ "-fruntime-checking", "" },
{ "-fno-runtime-checking", "Disable runtime checking of parameters" },
/* Definitions for specs for GNU CHILL.
Copyright (C) 1995, 1998, 1999 Free Software Foundation, Inc..
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This is the contribution to the `default_compilers' array in gcc.c for
CHILL. */
{".ch", "@chill"},
{".chi", "@chill"},
{"@chill",
"tradcpp0 -lang-chill %{!no-gcc:-D__GNUCHILL__=%v1} %(cpp_options)\
%{!M:%{!MM:%{!E:%{!pipe:%g.i} |\n\
cc1chill %{!pipe:%g.i} %(cc1_options)\
%{!fsyntax-only:%(invoke_as)}}}}\n"},
/* Language-specific hook definitions for CHILL front end.
Copyright (C) 1992, 1993, 1994, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "tree.h"
#include "ch-tree.h"
#include "lex.h"
#include "input.h"
#include "toplev.h"
#include "rtl.h"
#include "expr.h"
#include "diagnostic.h"
/* Type node for boolean types. */
tree boolean_type_node;
/* True if STRING(INDEX) yields a CHARS(1) (or BOOLS(1)) rather than
a CHAR (or BOOL). Also, makes CHARS(1) similar for CHAR,
and BOOLS(1) similar to BOOL. This is for compatibility
for the 1984 version of Z.200.*/
int flag_old_strings = 0;
/* This is set non-zero to force user input tokens to lower case.
This is non-standard. See Z.200, page 8. */
int ignore_case = 1;
/* True if reserved and predefined words ('special' words in the Z.200
terminology) are in uppercase. Obviously, this had better not be
true if we're ignoring input case. */
int special_UC = 0;
/* The actual name of the input file, regardless of any #line directives */
const char* chill_real_input_filename;
extern FILE* finput;
static int deep_const_expr PARAMS ((tree));
static void chill_print_error_function PARAMS ((diagnostic_context *,
const char *));
/* Return 1 if the expression tree given has all
constant nodes as its leaves,otherwise. */
static int
deep_const_expr (exp)
tree exp;
{
enum chill_tree_code code;
int length;
int i;
if (exp == NULL_TREE)
return 0;
code = TREE_CODE (exp);
length = first_rtl_op (TREE_CODE (exp));
/* constant leaf? return TRUE */
if (TREE_CODE_CLASS (code) == 'c')
return 1;
/* Recursively check next level down. */
for (i = 0; i < length; i++)
if (! deep_const_expr (TREE_OPERAND (exp, i)))
return 0;
return 1;
}
tree
const_expr (exp)
tree exp;
{
if (TREE_CODE (exp) == INTEGER_CST)
return exp;
if (TREE_CODE (exp) == CONST_DECL)
return const_expr (DECL_INITIAL (exp));
if (TREE_CODE_CLASS (TREE_CODE (exp)) == 'd'
&& DECL_INITIAL (exp) != NULL_TREE
&& TREE_READONLY (exp))
return DECL_INITIAL (exp);
if (deep_const_expr (exp))
return exp;
if (TREE_CODE (exp) != ERROR_MARK)
error ("non-constant expression");
return error_mark_node;
}
/* Each of the functions defined here
is an alternative to a function in objc-actions.c. */
/* Used by c-lex.c, but only for objc. */
tree
lookup_interface (arg)
tree arg ATTRIBUTE_UNUSED;
{
return 0;
}
int
maybe_objc_comptypes (lhs, rhs)
tree lhs ATTRIBUTE_UNUSED, rhs ATTRIBUTE_UNUSED;
{
return -1;
}
tree
maybe_building_objc_message_expr ()
{
return 0;
}
int
recognize_objc_keyword ()
{
return 0;
}
void
lang_init_options ()
{
}
/* used by print-tree.c */
void
lang_print_xnode (file, node, indent)
FILE *file ATTRIBUTE_UNUSED;
tree node ATTRIBUTE_UNUSED;
int indent ATTRIBUTE_UNUSED;
{
}
/*
* process chill-specific compiler command-line options
* do not complain if the option is not recognised
*/
int
lang_decode_option (argc, argv)
int argc;
char **argv;
{
char *p = argv[0];
static int explicit_ignore_case = 0;
if (!strcmp(p, "-lang-chill"))
; /* do nothing */
else if (!strcmp (p, "-fruntime-checking"))
{
range_checking = 1;
empty_checking = 1;
}
else if (!strcmp (p, "-fno-runtime-checking"))
{
range_checking = 0;
empty_checking = 0;
runtime_checking_flag = 0;
}
else if (!strcmp (p, "-flocal-loop-counter"))
flag_local_loop_counter = 1;
else if (!strcmp (p, "-fno-local-loop-counter"))
flag_local_loop_counter = 0;
else if (!strcmp (p, "-fold-strings"))
flag_old_strings = 1;
else if (!strcmp (p, "-fno-old-strings"))
flag_old_strings = 0;
else if (!strcmp (p, "-fignore-case"))
{
explicit_ignore_case = 1;
if (special_UC)
{
error ("ignoring case upon input and");
error ("making special words uppercase wouldn't work");
}
else
ignore_case = 1;
}
else if (!strcmp (p, "-fno-ignore-case"))
ignore_case = 0;
else if (!strcmp (p, "-fspecial_UC"))
{
if (explicit_ignore_case)
{
error ("making special words uppercase and");
error (" ignoring case upon input wouldn't work");
}
else
special_UC = 1, ignore_case = 0;
}
else if (!strcmp (p, "-fspecial_LC"))
special_UC = 0;
else if (!strcmp (p, "-fpack"))
maximum_field_alignment = BITS_PER_UNIT;
else if (!strcmp (p, "-fno-pack"))
maximum_field_alignment = 0;
else if (!strcmp (p, "-fchill-grant-only"))
grant_only_flag = 1;
else if (!strcmp (p, "-fgrant-only"))
grant_only_flag = 1;
/* user has specified a seize-file path */
else if (p[0] == '-' && p[1] == 'I')
register_seize_path (&p[2]);
if (!strcmp(p, "-itu")) /* Force Z.200 semantics */
{
pedantic = 1; /* FIXME: new flag name? */
flag_local_loop_counter = 1;
}
else
return c_decode_option (argc, argv);
return 1;
}
static void
chill_print_error_function (context, file)
diagnostic_context *buffer __attribute__((__unused__));
const char *file;
{
static tree last_error_function = NULL_TREE;
static struct module *last_error_module = NULL;
if (last_error_function == current_function_decl
&& last_error_module == current_module)
return;
last_error_function = current_function_decl;
last_error_module = current_module;
if (file)
fprintf (stderr, "%s: ", file);
if (current_function_decl == global_function_decl
|| current_function_decl == NULL_TREE)
{
if (current_module == NULL)
fprintf (stderr, "At top level:\n");
else
fprintf (stderr, "In module %s:\n",
IDENTIFIER_POINTER (current_module->name));
}
else
{
const char *kind = "function";
const char *name = (*decl_printable_name) (current_function_decl, 2);
fprintf (stderr, "In %s `%s':\n", kind, name);
}
}
/* Print an error message for invalid use of an incomplete type.
VALUE is the expression that was used (or 0 if that isn't known)
and TYPE is the type that was invalid. */
void
incomplete_type_error (value, type)
tree value ATTRIBUTE_UNUSED;
tree type ATTRIBUTE_UNUSED;
{
error ("internal error - use of undefined type");
}
/* Return the typed-based alias set for T, which may be an expression
or a type. Return -1 if we don't do anything special. */
HOST_WIDE_INT
lang_get_alias_set (t)
tree t ATTRIBUTE_UNUSED;
{
/* ??? Need to figure out what the rules are. Certainly we'd need
to handle union-like things, and probably variant records.
Until then, turn off type-based aliasing completely. */
return 0;
}
void
lang_init ()
{
chill_real_input_filename = input_filename;
/* the beginning of the file is a new line; check for # */
/* With luck, we discover the real source file's name from that
and put it in input_filename. */
ungetc (check_newline (), finput);
/* set default grant file */
set_default_grant_file ();
print_error_function = chill_print_error_function;
}
/* Define constants for communication with the CHILL parser.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1999, 2000
Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
enum rid
{
RID_UNUSED, /* keep this one first, please */
RID_ALL,
RID_ASSERTFAIL,
RID_ASSOCIATION,
RID_BIN,
RID_BIT,
RID_BOOL,
RID_BOOLS,
RID_BYTE,
RID_CHAR,
RID_CHARS,
RID_DOUBLE,
RID_DURATION,
RID_DYNAMIC,
RID_ELSE,
RID_EMPTY,
RID_FALSE,
RID_FLOAT,
RID_GENERAL,
RID_IN,
RID_INLINE,
RID_INOUT,
RID_INSTANCE,
RID_INT,
RID_LOC,
RID_LONG,
RID_LONG_REAL,
RID_NULL,
RID_OUT,
RID_OVERFLOW,
RID_PTR,
RID_RANGE,
RID_RANGEFAIL,
RID_READ,
RID_REAL,
RID_RECURSIVE,
RID_SHORT,
RID_SIMPLE,
RID_TIME,
RID_TRUE,
RID_UBYTE,
RID_UINT,
RID_ULONG,
RID_UNSIGNED,
RID_USHORT,
RID_VOID,
RID_MAX /* Last element */
};
#define NORID RID_UNUSED
#define RID_FIRST_MODIFIER RID_UNSIGNED
/* The elements of `ridpointers' are identifier nodes
for the reserved type names and storage classes.
It is indexed by a RID_... value. */
extern tree ridpointers[(int) RID_MAX];
extern char *token_buffer; /* Pointer to token buffer. */
extern tree make_pointer_declarator PARAMS ((tree, tree));
extern void reinit_parse_for_function PARAMS ((void));
extern int yylex PARAMS ((void));
extern tree default_grant_file;
extern tree current_grant_file;
extern tree current_seize_file;
extern int chill_at_module_level;
extern tree chill_initializer_name;
extern void prepare_paren_colon PARAMS ((void));
This source diff could not be displayed because it is too large. You can view the blob instead.
typedef union {
long itype;
tree ttype;
enum tree_code code;
char *filename;
int lineno;
} YYSTYPE;
extern YYSTYPE yylval;
/* DELAY is defined in the standard headers on some platforms like
SunOS 4.1.4. */
#ifdef DELAY
#undef DELAY
#endif
enum terminal
{
/*EOF = 0,*/
last_char_nonterminal = 256,
/* Please keep these in alphabetic order, for easier reference and updating.
*/
ABSOLUTE, ACCESS, AFTER, ALL, ALLOCATE, AND, ANDIF, ARRAY,
ARROW, ASGN, ASM_KEYWORD, ASSERT, ASSOCIATION, AT,
BASED, BEGINTOKEN, BIN, BIT, BITSTRING, BODY, BOOLS, BUFFER,
BUFFERNAME, BUFFER_CODE, BY,
CALL, CASE, CAUSE, CDDEL, CHAR, CHARS, COLON, COMMA, CONCAT, CONST,
CONTINUE, CYCLE,
DCL, DELAY, DIV, DO, DOT, DOWN, DYNAMIC,
ELSE, ELSIF, END, ENTRY, EQL, ESAC, EVENT, EVENT_CODE, EVER,
EXCEPTIONS, EXIT,
EXPR, /* an expression that has been pushed back */
FI, FLOATING, FOR, FORBID,
GENERAL, GOTO, GRANT, GT, GTE,
HEADEREL,
IF, IGNORED_DIRECTIVE, IN, INIT, INOUT, INLINE,
LC, LOC, LPC, LPRN, LT, LTE,
MOD, MODULE, MUL,
NAME, NE, NEW, NEWMODE, NONREF, NOPACK, NOT, NUMBER,
OD, OF, ON, OR, ORIF,
PACK, PARAMATTR, PERVASIVE, PLUS, POS, POWERSET,
PREFIXED, PRIORITY, PROC, PROCESS,
RANGE, RC, READ, READTEXT, RECEIVE, RECURSIVE, REF, REGION, REM,
RESULT, RETURN, RETURNS, ROUND, ROW, RPC, RPRN, RPRN_COLON,
SAME, SC, SEIZE, SEND, SET, SHARED, SIGNAL, SIGNALNAME, SIMPLE,
SINGLECHAR, SPEC, START, STATIC, STEP, STOP, STREAM, STRING,
STRUCT, SUB, SYN, SYNMODE,
TERMINATE, TEXT, THEN, THIS, TIMEOUT, TO, TRUNC, TYPENAME,
UP, USAGE,
VARYING,
WHERE, WHILE, WITH,
XOR,
/* These tokens only used within ch-lex.l to process compiler directives */
ALL_STATIC_OFF, ALL_STATIC_ON, EMPTY_OFF, EMPTY_ON,
GRANT_FILE_SIZE, PROCESS_TYPE_TOKEN, RANGE_OFF, RANGE_ON,
SEND_BUFFER_DEFAULT_PRIORITY, SEND_SIGNAL_DEFAULT_PRIORITY,
SIGNAL_CODE, SIGNAL_MAX_LENGTH, USE_SEIZE_FILE, USE_SEIZE_FILE_RESTRICTED,
USE_GRANT_FILE,
/* These tokens are recognized, and reported as errors, by the lexer. */
CONTEXT, REMOTE,
/* This token is passed back to the parser when an the main
input file (not a seize file) has reached end-of-file. */
END_PASS_1,
EMPTY, UMINUS,
dummy_last_terminal
};
/* Implement process-related declarations for CHILL.
Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef GCC_TASKING_H
#define GCC_TASKING_H
/* list of this module's process, buffer, etc. decls */
extern tree tasking_list;
#endif /* ! GCC_TASKING_H */
/* Language-dependent node constructors for parse phase of GNU compiler.
Copyright (C) 1992, 1993, 1994, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "obstack.h"
#include "tree.h"
#include "ch-tree.h"
#include "toplev.h"
extern struct obstack permanent_obstack;
/* This is special sentinel used to communicate from build_string_type
to layout_chill_range_type for the index range of a string. */
tree string_index_type_dummy;
static tree make_powerset_type PARAMS ((tree));
/* Build a chill string type.
For a character string, ELT_TYPE==char_type_node;
for a bit-string, ELT_TYPE==boolean_type_node. */
tree
build_string_type (elt_type, length)
tree elt_type;
tree length;
{
register tree t;
if (TREE_CODE (elt_type) == ERROR_MARK || TREE_CODE (length) == ERROR_MARK)
return error_mark_node;
/* Allocate the array after the pointer type,
in case we free it in type_hash_canon. */
if (pass > 0 && TREE_CODE (length) == INTEGER_CST
&& ! tree_int_cst_equal (length, integer_zero_node)
&& compare_int_csts (LT_EXPR, TYPE_MAX_VALUE (chill_unsigned_type_node),
length))
{
error ("string length > UPPER (UINT)");
length = integer_one_node;
}
/* Subtract 1 from length to get max index value.
Note we cannot use size_binop for pass 1 expressions. */
if (TREE_CODE (length) == INTEGER_CST || pass != 1)
length = size_binop (MINUS_EXPR, length, size_one_node);
else
length = build (MINUS_EXPR, sizetype, length, size_one_node);
t = make_node (elt_type == boolean_type_node ? SET_TYPE : ARRAY_TYPE);
TREE_TYPE (t) = elt_type;
MARK_AS_STRING_TYPE (t);
TYPE_DOMAIN (t) = build_chill_range_type (string_index_type_dummy,
integer_zero_node, length);
if (pass == 1 && TREE_CODE (length) == INTEGER_CST)
TYPE_DOMAIN (t) = layout_chill_range_type (TYPE_DOMAIN (t), 0);
if (pass != 1
|| (TREE_CODE (length) == INTEGER_CST && TYPE_SIZE (elt_type)))
{
if (TREE_CODE (t) == SET_TYPE)
t = layout_powerset_type (t);
else
t = layout_chill_array_type (t);
}
return t;
}
static tree
make_powerset_type (domain)
tree domain;
{
tree t = make_node (SET_TYPE);
TREE_TYPE (t) = boolean_type_node;
TYPE_DOMAIN (t) = domain;
return t;
}
/* Used to layout both bitstring and powerset types. */
tree
layout_powerset_type (type)
tree type;
{
tree domain = TYPE_DOMAIN (type);
if (! discrete_type_p (domain))
{
error ("can only build a powerset from a discrete mode");
return error_mark_node;
}
if (TREE_CODE (TYPE_MAX_VALUE (domain)) == ERROR_MARK ||
TREE_CODE (TYPE_MIN_VALUE (domain)) == ERROR_MARK)
return error_mark_node;
if (TREE_CODE (TYPE_MAX_VALUE (domain)) != INTEGER_CST
|| TREE_CODE (TYPE_MIN_VALUE (domain)) != INTEGER_CST)
{
if (CH_BOOLS_TYPE_P (type))
error ("non-constant bitstring size invalid");
else
error ("non-constant powerset size invalid");
return error_mark_node;
}
if (TYPE_SIZE (type) == 0)
layout_type (type);
return type;
}
/* Build a SET_TYPE node whose elements are from the set of values
in TYPE. TYPE must be a discrete mode; we check for that here. */
tree
build_powerset_type (type)
tree type;
{
tree t = make_powerset_type (type);
if (pass != 1)
t = layout_powerset_type (t);
return t;
}
tree
build_bitstring_type (size_in_bits)
tree size_in_bits;
{
return build_string_type (boolean_type_node, size_in_bits);
}
/* Return get_identifier (the concatenations of part1, part2, and part3). */
tree
get_identifier3 (part1, part2, part3)
const char *part1, *part2, *part3;
{
char *buf = (char*)
alloca (strlen(part1) + strlen(part2) + strlen(part3) + 1);
sprintf (buf, "%s%s%s", part1, part2, part3);
return get_identifier (buf);
}
/* Build an ALIAS_DECL for the prefix renamed clause:
(OLD_PREFIX -> NEW_PREFIX) ! POSTFIX. */
tree
build_alias_decl (old_prefix, new_prefix, postfix)
tree old_prefix, new_prefix, postfix;
{
tree decl = make_node (ALIAS_DECL);
const char *postfix_pointer = IDENTIFIER_POINTER (postfix);
int postfix_length = IDENTIFIER_LENGTH (postfix);
int old_length = old_prefix ? IDENTIFIER_LENGTH(old_prefix) : 0;
int new_length = new_prefix ? IDENTIFIER_LENGTH(new_prefix) : 0;
char *buf = (char*) alloca (old_length + new_length + postfix_length + 3);
/* Convert (OP->NP)!P!ALL to (OP!P->NP!P)!ALL */
if (postfix_length > 1 && postfix_pointer[postfix_length-1] == '*')
{
int chopped_length = postfix_length - 2; /* Without final "!*" */
if (old_prefix)
sprintf (buf, "%s!%.*s", IDENTIFIER_POINTER (old_prefix),
chopped_length, postfix_pointer);
else
sprintf (buf, "%.*s", chopped_length, postfix_pointer);
old_prefix = get_identifier (buf);
if (new_prefix)
sprintf (buf, "%s!%.*s", IDENTIFIER_POINTER (new_prefix),
chopped_length, postfix_pointer);
else
sprintf (buf, "%.*s", chopped_length, postfix_pointer);
new_prefix = get_identifier (buf);
postfix = ALL_POSTFIX;
}
DECL_OLD_PREFIX (decl) = old_prefix;
DECL_NEW_PREFIX (decl) = new_prefix;
DECL_POSTFIX (decl) = postfix;
if (DECL_POSTFIX_ALL (decl))
DECL_NAME (decl) = NULL_TREE;
else if (new_prefix == NULL_TREE)
DECL_NAME (decl) = postfix;
else
DECL_NAME (decl) = get_identifier3 (IDENTIFIER_POINTER (new_prefix),
"!", IDENTIFIER_POINTER (postfix));
return decl;
}
/* Return the "old name string" of an ALIAS_DECL. */
tree
decl_old_name (decl)
tree decl;
{
if (DECL_OLD_PREFIX (decl) == NULL_TREE)
return DECL_POSTFIX (decl);
return get_identifier3 (IDENTIFIER_POINTER (DECL_OLD_PREFIX (decl)),
"!", IDENTIFIER_POINTER (DECL_POSTFIX (decl)));
}
/* See if OLD_NAME (an identifier) matches the OLD_PREFIX!POSTFIX
of ALIAS. If so, return the corresponding NEW_NEW!POSTFIX. */
tree
decl_check_rename (alias, old_name)
tree alias, old_name;
{
const char *old_pointer = IDENTIFIER_POINTER (old_name);
int old_len = IDENTIFIER_LENGTH (old_name);
if (DECL_OLD_PREFIX (alias))
{
int old_prefix_len = IDENTIFIER_LENGTH (DECL_OLD_PREFIX (alias));
if (old_prefix_len >= old_len
|| old_pointer[old_prefix_len] != '!'
|| strncmp (old_pointer, IDENTIFIER_POINTER (DECL_OLD_PREFIX (alias)), old_prefix_len) != 0)
return NULL_TREE;
/* Skip the old prefix. */
old_pointer += old_prefix_len + 1; /* Also skip the '!', */
}
if (DECL_POSTFIX_ALL (alias)
|| strcmp (IDENTIFIER_POINTER (DECL_POSTFIX (alias)), old_pointer) == 0)
{
if (DECL_NEW_PREFIX (alias))
return get_identifier3 (IDENTIFIER_POINTER (DECL_NEW_PREFIX (alias)),
"!", old_pointer);
else if (old_pointer == IDENTIFIER_POINTER (old_name))
return old_name;
else
return get_identifier (old_pointer);
}
else
return NULL_TREE;
}
/* 'EXIT foo' is treated like 'GOTO EXIT!foo'.
This function converts LABEL into a labal name for EXIT. */
tree
munge_exit_label (label)
tree label;
{
return get_identifier3 ("EXIT", "!", IDENTIFIER_POINTER (label));
}
/* Make SAVE_EXPRs as needed, but don't turn a location into a non-location. */
tree
save_if_needed (exp)
tree exp;
{
return CH_REFERABLE (exp) ? stabilize_reference (exp) : save_expr (exp);
}
/* Return the number of elements in T, which must be a discrete type. */
tree
discrete_count (t)
tree t;
{
tree hi = convert (sizetype, TYPE_MAX_VALUE (t));
if (TYPE_MIN_VALUE (t))
hi = size_binop (MINUS_EXPR, hi, convert (sizetype, TYPE_MIN_VALUE (t)));
return size_binop (PLUS_EXPR, hi, integer_one_node);
}
This source diff could not be displayed because it is too large. You can view the blob instead.
/* Copyright (C) 1992, 1993, 1994, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#if 0
tree
build_component_ref (datum, field_name)
tree datum, field_name;
{
return build_chill_component_ref (datum, field_name);
}
/* Mark EXP saying that we need to be able to take the
address of it; it should not be allocated in a register.
Value is 1 if successful. */
int
mark_addressable (exp)
tree exp;
{
register tree x = exp;
while (1)
switch (TREE_CODE (x))
{
case ADDR_EXPR:
case COMPONENT_REF:
case ARRAY_REF:
case REALPART_EXPR:
case IMAGPART_EXPR:
x = TREE_OPERAND (x, 0);
break;
case CONSTRUCTOR:
TREE_ADDRESSABLE (x) = 1;
return 1;
case VAR_DECL:
case CONST_DECL:
case PARM_DECL:
case RESULT_DECL:
if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x)
&& DECL_NONLOCAL (x))
{
if (TREE_PUBLIC (x))
{
error ("global register variable `%s' used in nested function",
IDENTIFIER_POINTER (DECL_NAME (x)));
return 0;
}
pedwarn ("register variable `%s' used in nested function",
IDENTIFIER_POINTER (DECL_NAME (x)));
}
else if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x))
{
if (TREE_PUBLIC (x))
{
error ("address of global register variable `%s' requested",
IDENTIFIER_POINTER (DECL_NAME (x)));
return 0;
}
/* If we are making this addressable due to its having
volatile components, give a different error message. Also
handle the case of an unnamed parameter by not trying
to give the name. */
else if (C_TYPE_FIELDS_VOLATILE (TREE_TYPE (x)))
{
error ("cannot put object with volatile field into register");
return 0;
}
pedwarn ("address of register variable `%s' requested",
IDENTIFIER_POINTER (DECL_NAME (x)));
}
put_var_into_stack (x);
/* drops in */
case FUNCTION_DECL:
TREE_ADDRESSABLE (x) = 1;
#if 0 /* poplevel deals with this now. */
if (DECL_CONTEXT (x) == 0)
TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (x)) = 1;
#endif
default:
return 1;
}
}
/* Return an unsigned type the same as TYPE in other respects. */
tree
unsigned_type (type)
tree type;
{
tree type1 = TYPE_MAIN_VARIANT (type);
if (type1 == signed_char_type_node || type1 == char_type_node)
return unsigned_char_type_node;
if (type1 == integer_type_node)
return unsigned_type_node;
if (type1 == short_integer_type_node)
return short_unsigned_type_node;
if (type1 == long_integer_type_node)
return long_unsigned_type_node;
if (type1 == long_long_integer_type_node)
return long_long_unsigned_type_node;
return type;
}
/* Return a signed type the same as TYPE in other respects. */
tree
signed_type (type)
tree type;
{
tree type1 = TYPE_MAIN_VARIANT (type);
if (type1 == unsigned_char_type_node || type1 == char_type_node)
return signed_char_type_node;
if (type1 == unsigned_type_node)
return integer_type_node;
if (type1 == short_unsigned_type_node)
return short_integer_type_node;
if (type1 == long_unsigned_type_node)
return long_integer_type_node;
if (type1 == long_long_unsigned_type_node)
return long_long_integer_type_node;
return type;
}
/* Return a type the same as TYPE except unsigned or
signed according to UNSIGNEDP. */
tree
signed_or_unsigned_type (unsignedp, type)
int unsignedp;
tree type;
{
if (! INTEGRAL_TYPE_P (type))
return type;
if (TYPE_PRECISION (type) == TYPE_PRECISION (signed_char_type_node))
return unsignedp ? unsigned_char_type_node : signed_char_type_node;
if (TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node))
return unsignedp ? unsigned_type_node : integer_type_node;
if (TYPE_PRECISION (type) == TYPE_PRECISION (short_integer_type_node))
return unsignedp ? short_unsigned_type_node : short_integer_type_node;
if (TYPE_PRECISION (type) == TYPE_PRECISION (long_integer_type_node))
return unsignedp ? long_unsigned_type_node : long_integer_type_node;
if (TYPE_PRECISION (type) == TYPE_PRECISION (long_long_integer_type_node))
return (unsignedp ? long_long_unsigned_type_node
: long_long_integer_type_node);
return type;
}
extern tree intHI_type_node;
extern tree intSI_type_node;
extern tree intDI_type_node;
extern tree unsigned_intHI_type_node;
extern tree unsigned_intSI_type_node;
extern tree unsigned_intDI_type_node;
/* Return an integer type with BITS bits of precision,
that is unsigned if UNSIGNEDP is nonzero, otherwise signed. */
tree
type_for_size (bits, unsignedp)
unsigned bits;
int unsignedp;
{
if (bits == TYPE_PRECISION (signed_char_type_node))
return unsignedp ? unsigned_char_type_node : signed_char_type_node;
if (bits == TYPE_PRECISION (short_integer_type_node))
return unsignedp ? short_unsigned_type_node : short_integer_type_node;
if (bits == TYPE_PRECISION (integer_type_node))
return unsignedp ? unsigned_type_node : integer_type_node;
if (bits == TYPE_PRECISION (long_integer_type_node))
return unsignedp ? long_unsigned_type_node : long_integer_type_node;
if (bits == TYPE_PRECISION (long_long_integer_type_node))
return (unsignedp ? long_long_unsigned_type_node
: long_long_integer_type_node);
if (bits <= TYPE_PRECISION (intHI_type_node))
return unsignedp ? unsigned_intHI_type_node : intHI_type_node;
if (bits <= TYPE_PRECISION (intSI_type_node))
return unsignedp ? unsigned_intSI_type_node : intSI_type_node;
if (bits <= TYPE_PRECISION (intDI_type_node))
return unsignedp ? unsigned_intDI_type_node : intDI_type_node;
return 0;
}
/* Return a data type that has machine mode MODE.
If the mode is an integer,
then UNSIGNEDP selects between signed and unsigned types. */
tree
type_for_mode (mode, unsignedp)
enum machine_mode mode;
int unsignedp;
{
if (mode == TYPE_MODE (signed_char_type_node))
return unsignedp ? unsigned_char_type_node : signed_char_type_node;
if (mode == TYPE_MODE (short_integer_type_node))
return unsignedp ? short_unsigned_type_node : short_integer_type_node;
if (mode == TYPE_MODE (integer_type_node))
return unsignedp ? unsigned_type_node : integer_type_node;
if (mode == TYPE_MODE (long_integer_type_node))
return unsignedp ? long_unsigned_type_node : long_integer_type_node;
if (mode == TYPE_MODE (long_long_integer_type_node))
return unsignedp ? long_long_unsigned_type_node : long_long_integer_type_node;
if (mode == TYPE_MODE (intHI_type_node))
return unsignedp ? unsigned_intHI_type_node : intHI_type_node;
if (mode == TYPE_MODE (intSI_type_node))
return unsignedp ? unsigned_intSI_type_node : intSI_type_node;
if (mode == TYPE_MODE (intDI_type_node))
return unsignedp ? unsigned_intDI_type_node : intDI_type_node;
if (mode == TYPE_MODE (float_type_node))
return float_type_node;
if (mode == TYPE_MODE (double_type_node))
return double_type_node;
if (mode == TYPE_MODE (long_double_type_node))
return long_double_type_node;
if (mode == TYPE_MODE (build_pointer_type (char_type_node)))
return build_pointer_type (char_type_node);
if (mode == TYPE_MODE (build_pointer_type (integer_type_node)))
return build_pointer_type (integer_type_node);
return 0;
}
tree
truthvalue_conversion (expr)
tree expr;
{
return chill_truthvalue_conversion (expr);
}
#endif
......@@ -4,17 +4,16 @@
@c For copying conditions, see the file gcc.texi.
@node G++ and GCC
@chapter Compile C, C++, Objective-C, Ada, CHILL, Fortran, or Java
@chapter Compile C, C++, Objective-C, Ada, Fortran, or Java
@cindex Objective-C
@cindex Fortran
@cindex Java
@cindex CHILL
@cindex Ada
Several versions of the compiler (C, C++, Objective-C, Ada, CHILL,
Several versions of the compiler (C, C++, Objective-C, Ada,
Fortran, and Java) are integrated; this is why we use the name
``GNU Compiler Collection''. GCC can compile programs written in any of these
languages. The Ada, CHILL, Fortran, and Java compilers are described in
languages. The Ada, Fortran, and Java compilers are described in
separate manuals.
@cindex GCC
......
......@@ -50,9 +50,6 @@ language front ends, and test suites. @xref{gcc Directory, , The
@item include
Headers for the @code{libiberty} library.
@item libchill
The CHILL runtime library.
@item libf2c
The Fortran runtime library.
......
@c Copyright (C) 2000, 2001 Free Software Foundation, Inc.
@c Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
......@@ -171,9 +171,6 @@ information as well.
GNAT Reference Manual}, for information on standard
conformance and compatibility of the Ada compiler.
@xref{References,,Language Definition References, chill, GNU Chill},
for details of the CHILL standard.
@xref{Language,,The GNU Fortran Language, g77, Using and Porting GNU
Fortran}, for details of the Fortran language supported by GCC@.
......
Mon Apr 15 10:59:14 2002 Mark Mitchell <mark@codesourcery.com>
* g77.texi: Remove Chill reference.
2002-04-13 Toon Moene <toon@moene.indiv.nluug.nl>
* news.texi: Deprecate frontend version number;
......
......@@ -841,7 +841,7 @@ files and accepts Fortran-specific command-line options, plus some
command-line options that are designed to cater to Fortran users
but apply to other languages as well.
@xref{G++ and GCC,,Compile C; C++; Objective-C; Ada; CHILL; Fortran;
@xref{G++ and GCC,,Compile C; C++; Objective-C; Ada; Fortran;
or Java,gcc,Using the GNU Compiler Collection (GCC)},
for information on the way different languages are handled
by the GNU CC compiler (@command{gcc}).
......
......@@ -825,7 +825,6 @@ static const struct compiler default_compilers[] =
{".F", "#Fortran", 0}, {".FOR", "#Fortran", 0}, {".FPP", "#Fortran", 0},
{".r", "#Ratfor", 0},
{".p", "#Pascal", 0}, {".pas", "#Pascal", 0},
{".ch", "#Chill", 0}, {".chi", "#Chill", 0},
{".java", "#Java", 0}, {".class", "#Java", 0},
{".zip", "#Java", 0}, {".jar", "#Java", 0},
/* Next come the entries for C. */
......
2002-04-15 Mark Mitchell <mark@codesourcery.com>
* testsuite/lib/chill.exp: Remove.
2002-04-14 Jakub Jelinek <jakub@redhat.com>
* g++.dg/other/big-struct.C: New test.
......
#
# Expect script for Chill Regression Tests
# Copyright (C) 1993, 1996, 1997 Free Software Foundation
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Written by Jeffrey Wheat (cassidy@cygnus.com)
#
#
# chill support library procedures and testsuite specific instructions
#
#
# default_chill_version
# extract and print the version number of the chill compiler
# exits if compiler does not exist
#
proc default_chill_version { } {
global GCC_UNDER_TEST
# ignore any arguments after the command
set compiler [lindex $GCC_UNDER_TEST 0]
# verify that the compiler exists
if {[which $compiler] != 0} then {
set tmp [ exec $compiler -v ]
regexp "version.*$" $tmp version
if [info exists version] then {
clone_output "[which $compiler] $version\n"
}
} else {
warning "$compiler does not exist"
exit -1
}
}
#
# chill_compile
# compile the specified file
#
# returns values:
# return 0 on success
# return 1 on failure with $result containing compiler output
# exit with -1 if compiler doesn't exist
#
# verbosity output:
# 1 - indicate compile in progress
# 2 - indicate compile, target name
# 3 - indicate compile, target name, exec command, and result
#
proc chill_compile { src obj } {
global GCC_UNDER_TEST
global CFLAGS
global errno
global result
global verbose
global subdir
global tmpdir
set errno 0
set cflags $CFLAGS
set dumpfile [file rootname $obj].cmp ;# name of file to dump stderr in
# verify that the compiler exists
if { [which $GCC_UNDER_TEST] == 0 } then {
warning "$GCC_UNDER_TEST does not exist"
exit -1
}
if { $verbose == 1 } then {
send_user "Compiling... "
} else {
verbose " - CMPL: Compiling [file tail $src]" 2
}
# if object type is a grt file, then only build a grant file
if [string match "*.grt" $obj] then {
set cflags [concat $cflags -fgrant-only]
}
# build command line
set commandline "$GCC_UNDER_TEST $cflags -I$subdir -c $src"
# write command line to logfile
send_log "\n### EXEC: $commandline\n"
# tell us whats going on if verbose
verbose "### EXEC: $commandline" 3
# exec the compiler with the appropriate flags
set errno [catch "exec $commandline" result]
# dump compiler's stderr output into $dumpfile - this is a gross hack
set dumpfile [open $dumpfile w+]; puts $dumpfile $result; close $dumpfile
# log any compiler output unless its null
if ![string match "" $result] then { send_log "\n$result\n" }
unset cflags
return
}
#
# chill_link
# link the specified files
#
# returns values:
# return 0 on success
# return 1 on failure with $result containing compiler output
# exit with -1 if compiler doesn't exist
#
# verbosity output:
# 1 - indicate linking in progress
# 2 - indicate linking, target name
# 3 - indicate linking, target name, exec command, and result
#
proc chill_link { target } {
global GCC_UNDER_TEST
global CFLAGS
global errno
global result
global verbose
global tmptarget
global crt0
global libs
global objs
set errno 0
# verify that the compiler exists
if { [which $GCC_UNDER_TEST] == 0 } then {
warning "$GCC_UNDER_TEST does not exist"
exit -1
}
if { $verbose == 1 } then {
send_user "Linking... "
} else {
verbose " - LINK: Linking [file tail $target]" 2
}
# verify that the object exists
if ![file exists $target.o] then {
set errno 1
set result "file $target.o doesn't exist"
return
}
# build command line
set commandline "$GCC_UNDER_TEST $CFLAGS -o $target $target.o $objs $crt0 $libs"
# write command line to logfile
send_log "\n### EXEC: $commandline\n"
# tell us whats going on if we are verbose
verbose "### EXEC: $commandline" 3
# link the objects, sending any linker output to $result
set errno [catch "exec $commandline > $tmptarget.lnk" result]
# log any linker output unless its null
if ![string match "" $result] then { send_log "\n$result\n" }
return
}
#
# default_chill_start
#
proc default_chill_start { } {
global srcdir
global subdir
global tmpdir
global verbose
if { $verbose > 1 } then { send_user "Configuring testsuite... " }
# tmpdir is obtained from $objdir/site.exp. if not, set it to /tmp
if ![info exists tmpdir] then { set tmpdir /tmp }
# save and convert $srcdir to an absolute pathname, stomp on the old value
# stomp on $subdir and set to the absolute path to the subdirectory
global osrcdir; set osrcdir $srcdir; set srcdir [cd $srcdir; pwd]
global osubdir; set osubdir $subdir; set subdir $srcdir/$subdir
# cd the temporary directory, $tmpdir
cd $tmpdir; verbose "### PWD: [pwd]" 5
# copy init files to the tmpdir
foreach initfile [glob -nocomplain $subdir/*.init] {
set targfile $tmpdir/[file tail [file rootname $initfile]]
verbose "### EXEC: cp $initfile $targfile" 5
if [catch "exec cp $initfile $targfile"] then {
send_user "\nConfigure failed.\n"
exit -1
}
}
if { $verbose > 1 } then { send_user "Configuring finished.\n" }
}
#
# default_chill_exit
#
#
proc default_chill_exit { } {
global srcdir
global objdir
global tmpdir
global osrcdir
global osubdir
# reset directory variables
set srcdir $osrcdir; set subdir $osubdir
# remove all generated targets and objects
verbose "### EXEC: rm -f $tmpdir/*" 3
catch "exec rm -f $tmpdir/*" result
# change back to the main object directory
cd $objdir
verbose "### SANITY: [pwd]" 5
}
#
# chill_diff
# compare two files line-by-line
#
# returns values:
# return 0 on success
# return 1 if different
# return -1 if output file doesn't exist
#
# verbosity output:
# 1 - indicate diffing in progress
# 2 - indicate diffing, target names
# 3 - indicate diffing, target names, and result
#
proc chill_diff { file_1 file_2 } {
global errno
global result
global target
global tmptarget
global verbose
set eof -1
set errno 0
set differences 0
if { $verbose == 1 } then {
send_user "Diffing... "
} else {
verbose " - DIFF: Diffing [file tail $file_1] [file tail $file_2]" 2
}
# write command line to logfile
send_log "### EXEC: diff $file_1 $file_2\n"
# tell us whats going on if we are verbose
verbose "### EXEC: diff $file_1 $file_2" 3
# verify file exists and open it
if [file exists $file_1] then {
set file_a [open $file_1 r]
} else {
set errno -1; set result "$file_1 doesn't exist"
return
}
# verify file exists and is not zero length, and then open it
if [file exists $file_2] then {
if [file size $file_2]!=0 then {
set file_b [open $file_2 r]
} else {
set errno -1; set result "$file_2 is zero bytes"; return
}
} else {
set errno -1; set result "$file_2 doesn't exist"; return
}
# spoof the diff routine
lappend list_a $target
while { [gets $file_a line] != $eof } {
if [regexp "^#.*$" $line] then {
continue
} else {
lappend list_a $line
}
}
close $file_a
# spoof the diff routine
lappend list_b $target
while { [gets $file_b line] != $eof } {
if [regexp "^#.*$" $line] then {
continue
} else {
# use [file tail $line] to strip off pathname
lappend list_b [file tail $line]
}
}
close $file_b
for { set i 0 } { $i < [llength $list_a] } { incr i } {
set line_a [lindex $list_a $i]
set line_b [lindex $list_b $i]
if [string compare $line_a $line_b] then {
set errno 1
set count [expr $i+1]
set linenum [format %dc%d $count $count]
verbose "$linenum" 3
verbose "< $line_a" 3
verbose "---" 3
verbose "> $line_b" 3
send_log "$file_1: < $count: $line_a\n"
send_log "$file_2: > $count: $line_b\n"
set result "differences found"
}
}
return
}
#
# chill_fail
# a wrapper around the framework fail proc
#
proc chill_fail { target result } {
global verbose
if { $verbose == 1 } then { send_user "\n" }
fail $target
verbose "--------------------------------------------------" 3
verbose "### RESULT: $result" 3
}
#
# chill_pass
# a wrapper around the framework fail proc
#
proc chill_pass { target } {
global verbose
if { $verbose == 1 } then { send_user "\n" }
pass $target
}
2002-04-15 Mark Mitchell <mark@codesourcery.com>
* gcc_release (build_tarfiles): Do not build Chill tarfiles.
(CHILL_DIRS): Remove.
2002-03-10 Joseph S. Myers <jsm28@cam.ac.uk>
* gcc_release: Build diffs for ada and chill. Make "bzip2" a new
......
......@@ -268,7 +268,6 @@ build_tarfiles() {
# Now, build one for each of the languages.
build_tarfile gcc-ada-${RELEASE} ${ADA_DIRS}
build_tarfile gcc-chill-${RELEASE} ${CHILL_DIRS}
build_tarfile gcc-g++-${RELEASE} ${CPLUSPLUS_DIRS}
build_tarfile gcc-g77-${RELEASE} ${FORTRAN_DIRS}
build_tarfile gcc-java-${RELEASE} ${JAVA_DIRS}
......@@ -277,7 +276,7 @@ build_tarfiles() {
# The core is everything else.
EXCLUDES=""
for x in ${ADA_DIRS} ${CHILL_DIRS} ${CPLUSPLUS_DIRS} ${FORTRAN_DIRS} \
for x in ${ADA_DIRS} ${CPLUSPLUS_DIRS} ${FORTRAN_DIRS} \
${JAVA_DIRS} ${OBJECTIVEC_DIRS} ${TESTSUITE_DIRS}; do
EXCLUDES="${EXCLUDES} --exclude $x"
done
......@@ -410,7 +409,6 @@ SOURCE_DIRECTORY=""
# The directories that should be part of the various language-specific
# tar files. These are all relative to the top of the source tree.
ADA_DIRS="gcc/ada"
CHILL_DIRS="gcc/ch libchill"
CPLUSPLUS_DIRS="gcc/cp libstdc++-v3"
FORTRAN_DIRS="gcc/f libf2c"
JAVA_DIRS="gcc/java libjava libffi fastjar zlib boehm-gc"
......@@ -540,7 +538,6 @@ SOURCE_DIRECTORY="${WORKING_DIRECTORY}/gcc-${RELEASE}"
# Recompute the names of all the language-specific directories,
# relative to the WORKING_DIRECTORY.
ADA_DIRS=`adjust_dirs ${ADA_DIRS}`
CHILL_DIRS=`adjust_dirs ${CHILL_DIRS}`
CPLUSPLUS_DIRS=`adjust_dirs ${CPLUSPLUS_DIRS}`
FORTRAN_DIRS=`adjust_dirs ${FORTRAN_DIRS}`
JAVA_DIRS=`adjust_dirs ${JAVA_DIRS}`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment