25 #include "pips_config.h"
63 user_warning(
"MakeParameter",
"Variable %s redefined as parameter\n",
65 ParserError(
"MakeParameter",
"A variable cannot be redefined as a parameter\n");
68 user_warning(
"MakeParameter",
"Symbol %s redefined as parameter\n",
70 ParserError(
"MakeParameter",
"A symbol cannot be redefined as a parameter\n");
84 long long int ival = (
long long int) fval;
93 user_warning(
"MakeParameter",
"Initial value for variable %s redefined\n",
95 FatalError(
"MakeParameter",
"An initial value cannot be redefined by parameter\n");
124 FatalError(
"MakeImpliedDo",
"function call as DO variable\n");
127 FatalError(
"MakeImpliedDo",
"variable reference as DO variable\n");
157 "and loop for loop-to-implieddo conversion.\n");
236 FatalError(
"MakeAtom",
"label dans une expression\n");
239 FatalError(
"MakeAtom",
"area dans une expression\n");
242 FatalError(
"MakeAtom",
"void dans une expression\n");
245 FatalError(
"MakeAtom",
"unknown dans une expression\n");
248 if(!HasParenthesis) {
252 user_warning(
"MakeAtom",
"reference to functional entity %s\n",
266 if (
indices == NULL && !HasParenthesis) {
268 debug(2,
"MakeAtom",
"implicit declaration of scalar variable: %s\n",
274 pips_debug(2,
"reference to a functional parameter: %s\n",
293 debug(2,
"MakeAtom",
"implicit type declaration of scalar variable: %s\n",
302 debug(2,
"MakeAtom",
"new user function: %s\n",
317 && (
indices!=NULL || HasParenthesis)) {
369 "Substring operations can only be applied to "
370 "strings in Fortran 77\n");
408 "Too many or too few subscript expressions"
409 " for reference to %s\n",
411 ParserError(
"MakeAtom",
"Illegal array reference\n");
419 if (
indices ==
NIL && HasParenthesis ==
false) {
496 ParserError(
"FortranExpressionList",
"Unexpected implied DO\n");
510 ParserError(
"MakeFortranBinaryCall",
"Unexpected implied DO\n");
526 ParserError(
"MakeFortranUnaryCall",
"Unexpected implied DO\n");
563 pips_debug(7,
"Substring assignment detected\n");
571 "Name conflict between local variable %s and intrinsics %s\n",
582 "Name conflict between statement function %s and intrinsics %s\n",
functional make_functional(list a1, type a2)
call make_call(entity a1, list a2)
value make_value_unknown(void)
expression make_expression(syntax a1, normalized a2)
storage make_storage_rom(void)
reference make_reference(entity a1, list a2)
void free_syntax(syntax p)
syntax make_syntax(enum syntax_utype tag, void *val)
type make_type(enum type_utype tag, void *val)
syntax make_syntax_reference(reference _field_)
static reference ref
Current stmt (an integer)
void const char const char const int
expression MakeCharacterConstantExpression(string s)
END_EOLE.
entity make_C_or_Fortran_constant_entity(const char *name, tag bt, size_t size, bool is_fortran, bool(*error_manager)(const char *, const char *))
This function creates a constant.
value MakeValueSymbolic(expression e)
this function creates a value for a symbolic constant.
void DeclareVariable(entity e, type t, list d, storage s, value v)
void DeclareVariable(e, t, d, s, v): update entity e description as declaration statements are encoun...
type ImplicitType(entity e)
This function computes the Fortran implicit type of entity e.
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
const char * get_current_module_name(void)
Get the name of the current module.
#define ENDP(l)
Test if a list is empty.
list gen_nreverse(list cp)
reverse a list in place
#define NIL
The empty list (nil in Lisp)
size_t gen_length(const list l)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define CDR(pcons)
Get the list less its first element.
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_internal_error
#define user_warning(fn,...)
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
entity MakeExternalFunction(entity e, type r)
void update_called_modules(entity e)
void reify_ghost_variable_entity(entity e)
It is possible to change one's mind and effectively use an entity which was previously assumed useles...
#define UNBOUNDED_DIMENSION_NAME
#define SUBSTRING_FUNCTION_NAME
#define IO_LIST_STRING_NAME
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
entity FindOrCreateEntity(const char *package, const char *local_name)
Problem: A functional global entity may be referenced without parenthesis or CALL keyword in a functi...
bool intrinsic_entity_p(entity e)
entity CreateIntrinsic(string name)
this function does not create an intrinsic function because they must all be created beforehand by th...
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
expression MakeNullaryCall(entity f)
Creates a call expression to a function with zero arguments.
expression MakeUnaryCall(entity f, expression a)
Creates a call expression to a function with one argument.
bool expression_implied_do_p(e)
int basic_type_size(basic)
See also SizeOfElements()
bool scalar_integer_type_p(type)
string type_to_string(const type)
type.c
#define type_functional_p(x)
#define value_undefined_p(x)
#define normalized_undefined
#define syntax_reference_p(x)
#define instruction_sequence_p(x)
#define storage_formal_p(x)
#define syntax_reference(x)
#define type_unknown_p(x)
#define instruction_loop_p(x)
#define reference_variable(x)
#define constant_float_p(x)
#define symbolic_constant(x)
#define instruction_loop(x)
#define value_unknown_p(x)
#define entity_storage(x)
#define type_statement_p(x)
#define value_symbolic(x)
#define EXPRESSION(x)
EXPRESSION.
#define type_undefined_p(x)
#define constant_int_p(x)
#define expression_undefined
#define value_symbolic_p(x)
#define sequence_statements(x)
#define reference_indices(x)
#define instruction_sequence(x)
#define instruction_expression(x)
#define variable_dimensions(x)
#define statement_instruction(x)
#define constant_float(x)
#define call_arguments(x)
#define basic_string_p(x)
#define type_variable_p(x)
#define storage_undefined_p(x)
#define variable_basic(x)
#define instruction_expression_p(x)
#define storage_undefined
#define entity_initial(x)
The structure used to build lists in NewGen.
syntax MakeAtom(entity e, cons *indices, expression fc, expression lc, int HasParenthesis)
MakeAtom: this function creates a syntax, ie.
entity make_Fortran_constant_entity(string name, tag bt, size_t size)
expression MakeImpliedDo(syntax v, range r, cons *l)
expressions from input output lists might contain implied do loops.
cons * MakeIoList(cons *l)
This function takes a list of io elements (i, j, t(i,j)), and returns the same list,...
syntax CheckLeftHandSide(syntax s)
If a left hand side is a call, it should be a substring operator or a macro.
list FortranExpressionList(list l)
Make sure that no call to implied do is in l.
char vcid_syntax_expression[]
expression.c
entity MakeParameter(entity e, expression x)
lint
expression loop_to_implieddo(loop)
expression MakeFortranUnaryCall(entity op, expression e1)
static list make_arg_from_stmt(statement stmt, list args)
this used to be a nested function, but compilation on macos dislikes nested functions ....
expression MakeFortranBinaryCall(entity op, expression e1, expression e2)
bool ParserError(const char *f, const char *m)
void update_functional_type_with_actual_arguments(entity e, list l)