PIPS
flint_check.c
Go to the documentation of this file.
1 /*
2 
3  $Id: flint_check.c 23065 2016-03-02 09:05:50Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6 
7  This file is part of PIPS.
8 
9  PIPS is free software: you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 #ifdef HAVE_CONFIG_H
25  #include "pips_config.h"
26 #endif
27 /*
28  * flint_check.c
29  *
30  * Fabien Coelho & Laurent Aniort May 1992
31  *
32  * Modification : 92 09 Author : Arnauld Leservot
33  *
34  */
35 
36 #include "local.h"
37 
38 #define FATAL(msg,value) {(void) fprintf(stderr,msg,value); exit(1); }
39 
40 /* some defines usefull to clean the code */
41 
42 #define BOOL_UNDEF -1
43 #define param_ref_p(P) \
44  (mode_reference_p(parameter_mode(P)))
45 
46 #define arg_const_p(arg) \
47  (syntax_call_p(expression_syntax(arg)) && \
48  value_constant_p(entity_initial(call_function( \
49  syntax_call(expression_syntax(arg))))))
50 
51 #define call_constant_p(C) \
52  (value_constant_p(entity_initial(call_function(C))))
53 
54 /* The following define may be replaced by #define ... (true) */
55 #define effect_may_or_must_p(my_effect) \
56  ((approximation_may_p(effect_approximation(my_effect))) || \
57  (approximation_exact_p(effect_approximation(my_effect))) )
58 
59 #define effect_to_name(the_effect)\
60  entity_name(reference_variable(effect_any_reference(the_effect)))
61 
62 #define entity_is_a_common_p(Ent) \
63  (type_area_p(entity_type(Ent)))
64 
65 #define special_common(Ent) \
66  ((!strcmp(entity_local_name(Ent),DYNAMIC_AREA_LOCAL_NAME)) || \
67  (!strcmp(entity_local_name(Ent),STATIC_AREA_LOCAL_NAME)) )
68 
69 
70 /***************************************************************************/
71 
72 /* extern char *current_module_name; unused and modified */
73 
74 /*
75  * check call sites
76  *
77  */
78 
79 
80 /*
81  * check_procedure
82  *
83  * this function verify that a statement_call is a subroutine call. if not, a
84  * message is broadcast. intrinsics are not checked. Calls to things that are
85  * not functions are not checked, (for instance, there are calls to labels
86  * which describe the format of a write or a read; that's quite strange!)
87  */
89  call c;
90 {
91  entity the_fnct;
92  type the_tp;
93  functional ft;
94  type result;
95  bool tmpbool= BOOL_UNDEF;
96 
97  if (call_intrinsic_p(c))
98  tmpbool = BOOL_UNDEF;
99  else {
100  the_fnct = call_function(c);
101  the_tp = entity_type(the_fnct);
102  if (!type_functional_p(the_tp))
103  tmpbool = BOOL_UNDEF;
104  else {
105  ft = type_functional(the_tp);
106  result = functional_result(ft);
107  if (!type_void_p(result)) {
108  flint_message("check procedure",
109  "warning, function used as a procedure : %s\n",
110  entity_name(the_fnct));
111  tmpbool = false;
112  }
113  }
114  }
115  return (tmpbool);
116 }
117 
118 /***************************************************************************/
119 
120 /*
121  * check_call
122  *
123  * check other calls : number of arguments, the basic of these args, and if
124  * possible the dimensions. There is also a warning if a reference to a
125  * constant may be modified. Calls to intrinsics are checked separately.
126  * Calls to things that are not functions are not checked, (for instance,
127  * there are calls to labels which describe the format of a write or a read;
128  * that's quite strange!)
129  */
131  call c;
132 {
133  list la = call_arguments(c);
134  entity the_fnct = call_function(c);
135  type the_tp = entity_type(the_fnct);
136  functional ft;
137  list lt;
138 
139  if (!type_functional_p(the_tp))
140  return (BOOL_UNDEF);
141 
142  ft = type_functional(the_tp);
143  lt = functional_parameters(ft);
144 
145 
146  if (!check_call_args_number(la, lt, c))
147  return (false);
148 
149  /* else */
150  if (call_intrinsic_p(c))
151  return (check_call_intrinsic(la, lt, c));
152 
153  if ((int) gen_length(la) == 0)
154  return (true);
155 
156  /* else */
157  if (!check_call_types_compatibility(la, lt, c))
158  return (false);
159 
160  /* else */
161  if (call_constant_p(c))
162  return (true);
163 
164  /* else */
165  /* Errors in parameter modes are found out by effect computation.
166  * A second check, later, is meaningless.
167  */
168  /* return (check_call_mode_consistency(la, lt, the_fnct)); */
169 
170  return true;
171 }
172 
173 
174 /*
175  * check_call_intrinsic
176  *
177  * This function is dedicated to the check of calls to intrinsics. Only the
178  * assignment is checked: Same basic and dimension for both arguments.
179  * problem :there is no casting, so there may be messages despite the call
180  * should be considered as ok. overloaded basics are not checked, and no
181  * message is broadcast.
182  */
183 bool
185  list __attribute__ ((unused)) lt,
186  call c)
187 {
188  entity the_fnct = call_function(c);
189  bool ok1, ok2;
190  basic ba1, ba2;
191  list da1, da2;
192 
193  /* check a call to the assign operator */
194  if (ENTITY_ASSIGN_P(the_fnct)) {
195  ok1 = find_bd_expression(EXPRESSION(CAR(la)), &ba1, &da1);
196  ok2 = find_bd_expression(EXPRESSION(CAR(CDR(la))), &ba2, &da2);
197 
198  if (!(ok1 && ok2))
199  return (BOOL_UNDEF);
200 
201  if (basic_overloaded_p(ba1) || basic_overloaded_p(ba2))
202  return (BOOL_UNDEF);
203 
204  if (!check_call_basic(ba2, ba1, c, 0))
205  return (false);
206 
207  return (check_call_dim(da1, da2, c, 0) && check_call_dim(da2, da1, c, 0));
208  }
209  /* other intrinsics */
210  return (BOOL_UNDEF);
211 }
212 
213 
214 
215 /*
216  * check_call_args_number
217  *
218  * This function check that the number of arguments of a call is valid.
219  * intrinsics without parameter are not checked. (they are supposed to be
220  * varryings)
221  */
223  list la, /* list of actual arguments */
224  list lt, /* list of parameters */
225  call c)
226 {
227  int na = gen_length(la);
228  int nt = gen_length(lt);
229 
230  if (na == nt ||
231  (nt<=na && type_varargs_p(parameter_type(PARAMETER(CAR(gen_last(lt)))))))
232  return (true);
233 
234  if (call_intrinsic_p(c) && (nt == 0)) { /* sometimes out... */
235  return (BOOL_UNDEF);
236  }
237  flint_message("check call",
238  "too %s arguments (%d) in call to %s (%d)\n",
239  ((na > nt) ? "many" : "few"),
240  na,
242  nt);
243  return (false);
244 }
245 
246 
247 /*
248  * check_call_types_compatibility
249  *
250  * This function checks that the list of parameters and the list of arguments
251  * are compatible.
252  */
253 bool
255  list la, lt;
256  call c;
257 {
258  expression exp;
260  bool ok = true;
261  int i, len = gen_length(lt);
262  list ca = la, ct = lt;
263 
264  for (i = 1; i <= len; i++) {
265  bool temp;
266  exp = EXPRESSION(CAR(ca));
267  POP(ca);
268  param = PARAMETER(CAR(ct));
269  POP(ct);
270  temp = check_call_one_type(exp, param, c, i);
271  ok = (ok && temp);
272  }
273 
274  return (ok);
275 }
276 
277 /*-----------------------------------------------------------------------*/
278 
279 /*
280  * check_call_one_type
281  *
282  * this function checks that an argument and a parameter are compatible. It is
283  * not very interesting a function, but it may have other calls to
284  * check-functions later
285  *
286  */
288  expression exp;
290  call c;
291  int i;
292 {
293  return (check_call_basic_and_dim(exp, param, c, i));
294 }
295 
296 
297 /*-----------------------------------------------------------------------*/
298 
299 /*
300  * check_call_basic
301  *
302  * This function checks that two basics are compatible (ie the same) if not, a
303  * message is broadcast
304  */
305 bool check_call_basic(be, bp, c, i)
306  basic be, bp;
307  call c;
308  int i;
309 {
310  if (basic_tag(be) == basic_tag(bp))
311  return (true);
312 
313  if (basic_overloaded_p(be))
314  flint_message("check_call: WARNING",
315  "may be incompatible basic type, %dth arg in call to %s\n",
316  i, entity_name(call_function(c)));
317  else
318  flint_message("check_call",
319  "incompatible basic type, %dth arg in call to %s, %s>%s\n",
320  i, entity_name(call_function(c)),
322  return (false);
323 }
324 
325 
326 /*-----------------------------------------------------------------------*/
327 /* loose version */
328 
329 /*
330  * check_call_dim
331  *
332  * This function checks that the dimensions of two arrays are compatible. if
333  * not, a message... (dimension means here the number of elements of the
334  * array)
335  */
336 bool check_call_dim(list de, list dp, call c, int i)
337 {
338  intptr_t n_de, n_dp;
339  bool
340  ok_de = number_of_elements(de, &n_de),
341  ok_dp = number_of_elements(dp, &n_dp);
342 
343  if (!(ok_de && ok_dp))
344  return (BOOL_UNDEF);
345 
346  /* else */
347  if (n_de >= n_dp)
348  return (true);
349 
350  /* else */
351  flint_message("check_call",
352  "incompatible dim, %dth arg in call to %s, (%d<%d)\n",
353  i, entity_name(call_function(c)),
354  n_de, n_dp);
355  return (false);
356 }
357 
358 
359 /*-----------------------------------------------------------------------*/
360 
361 /*
362  * check_call_basic_and_dim
363  *
364  * This function checks that the list of parameters and the list of arguments
365  * are compatible. ie same basics and compatible dimensions.
366  */
368  expression exp;
370  call c;
371  int i;
372 {
373  basic bexp, bpar;
374  list dexp, dpar;
375  bool okexp = find_bd_expression(exp, &bexp, &dexp), okpar = find_bd_parameter(param, &bpar, &dpar);
376 
377  if (!(okexp && okpar))
378  return (BOOL_UNDEF);
379 
380  /* else */
381  if (!check_call_basic(bexp, bpar, c, i))
382  return (false);
383 
384  /* else */
385  return (check_call_dim(dexp, dpar, c, i));
386 }
387 
388 /***************************************************************************/
389 
390 /*
391  * check_reference
392  *
393  * this function checks that the indexes of an array are all mere integers.
394  * maybe it could accept floats with a cast, if the ANSI says so.
395  */
397  reference ref;
398 {
399  list the_indices = reference_indices(ref);
400  int i, len = gen_length(the_indices);
401  basic base;
402  list dims;
404  type tp = entity_type(var);
405  int len_ind = gen_length(the_indices), len_dim;
406  bool ok;
407 
408  ok = find_bd_type_variable(tp, &base, &dims);
409  if (!ok)
410  return;
411 
412  len_dim = gen_length(dims);
413 
414  if (len_dim < len_ind) {
415  flint_message("reference",
416  "too many indices (%d>%d) in reference to %s\n",
417  len_ind, len_dim, entity_local_name(var));
418  return;
419  }
420 
421  if (len_dim > len_ind) {
422  flint_message("reference",
423  "too few indices (%d<%d) in reference to %s\n",
424  len_ind, len_dim, entity_local_name(var));
425  return;
426  }
427 
429  return;
430 
431  for (i = 1; i <= len; i++) {
433  EXPRESSION(CAR(the_indices))))
434  flint_message("check reference: WARNING",
435  "the %dth index may not be a mere integer\n", i);
436  else
438  EXPRESSION(CAR(the_indices))))
439  flint_message("check reference",
440  "the %dth index is not a mere integer\n", i);
441 
442  the_indices = CDR(the_indices);
443  }
444 }
445 
446 /***************************************************************************/
447 
448 /*
449  * check_call_mode_consistency
450  *
451  * this function checks all the arguments of a call, looking for so called "mode
452  * inconsistency".
453  */
454 bool check_call_mode_consistency(la, lt, the_fnct)
455  list la, lt;
456  entity the_fnct;
457 {
458  const char*module_name;
459  list
460  sefs_list = list_undefined;
461  expression
462  exp;
463  parameter
464  param;
465  bool
466  ok = true,
467  temp = -1;
468  int
469  i, len = gen_length(lt);
470 
471  module_name = module_local_name(the_fnct);
472 
473  /* FI: the last argument should be pure=TRUE
474  * since summary effects should not be touched
475  */
476  sefs_list = effects_to_list( (effects)
477  db_get_memory_resource(DBR_SUMMARY_EFFECTS, module_name, true));
478 
479  pips_debug(7, "summary effects list for %s (%p)\n",
480  module_name, sefs_list);
481 
482  for (i = 1; i <= len; i++) {
483  exp = EXPRESSION(CAR(la));
484  la = CDR(la);
485  param = PARAMETER(CAR(lt));
486  lt = CDR(lt);
487  temp = check_call_one_mode(exp, param, the_fnct, sefs_list, i);
488  ok = (ok && temp);
489  }
490 
491  return (ok);
492 }
493 
494 /***************************************************************************/
495 
496 /* This function checks that a reference to a constant in a call may not be
497  * modified, if it could happen, a message is broadcast.
498  */
501  entity the_fnct,
502  list sefs_list,
503  int i)
504 {
505  list sefl = sefs_list; /* locally */
506  bool encountered = false;
507  effect the_effect;
508  entity the_ent;
509 
510  if (!(param_ref_p(param) && arg_const_p(exp)))
511  return (true);
512 
513  /* else : control */
514 
515  the_ent = find_ith_formal_parameter(the_fnct, i);
516 
517  while ((sefl != NULL) && (!encountered))
518  {
519  the_effect = EFFECT(CAR(sefl));
520  sefl = CDR(sefl);
521  encountered = (effect_write_p(the_effect) &&
522  effect_may_or_must_p(the_effect) &&
523  (!strcmp(entity_name(the_ent), effect_to_name(the_effect))));
524  }
525 
526  if (encountered)
527  flint_message("check call mode",
528  "modified reference to a constant, %dth argument in call to %s\n",
529  i, entity_name(the_fnct));
530 
531  return (!encountered);
532 }
533 
534 /*-----------------------------------------------------------------------*/
535 
536 /*
537  * look_at_the_commons
538  *
539  * this function looks at the common declaration, just to see what it looks
540  * like, in order to decide what we can do about it. it should not be
541  * necessary if good and up to date documentations were provided.
542  */
544 {
546  entity local;
547 
548  while (ldecl != NULL) {
549  local = ENTITY(CAR(ldecl));
550  ldecl = CDR(ldecl);
551 
552  if (type_area_p(entity_type(local))) {
553  fprintf(stdout,
554  "common : %s, in module %s\n",
555  entity_name(local),
557  if (!special_common(local)) {
558  list llayout = area_layout(type_area(entity_type(local)));
559  while (llayout != NULL) {
560 
561  fprintf(stdout, "variable %s at offset %td\n",
562  entity_name(ENTITY(CAR(llayout))),
564  llayout = CDR(llayout);
565  }
566  }
567  }
568  }
569  return (true);
570 }
571 
572 /*-----------------------------------------------------------------------*/
573 
574 /*
575  * position_in_the_area
576  *
577  * this function gives back, if possible, the starting and ending offsets of the
578  * variable in the area
579  */
580 bool position_in_the_area(entity the_var, intptr_t *inf, intptr_t *sup)
581 {
582  basic base;
583  list dims;
584  intptr_t len_unit = 0;
585  intptr_t nb_of_elements = 0;
586 
587  if (!find_bd_type_variable(entity_type(the_var), &base, &dims))
588  return (false);
589  if (!number_of_elements(dims, &nb_of_elements))
590  return (false);
591  if (!(basic_int_p(base) || basic_float_p(base) ||
593  return (false);
594 
595  switch (basic_tag(base)) {
596  case is_basic_int:{
597  len_unit = basic_int(base);
598  break;
599  }
600  case is_basic_float:{
601  len_unit = basic_float(base);
602  break;
603  }
604  case is_basic_logical:{
605  len_unit = basic_logical(base);
606  break;
607  }
608  case is_basic_complex:{
609  len_unit = basic_complex(base);
610  break;
611  }
612  default:
613  pips_internal_error("unknown basic tag %d", basic_tag(base));
614  }
615 
616  *inf = ram_offset(storage_ram(entity_storage(the_var)));
617  *sup = (*inf) + (nb_of_elements * len_unit) - 1;
618 
619  return (true);
620 }
621 
622 /*-----------------------------------------------------------------------*/
623 
624 /*
625  * check_commons
626  *
627  * this function checks the commons of the module, looking for all variables of
628  * the module in commons, that could overlap with other variables and may be
629  * incompatible. the bool given back is set to true whatever happens.
630  * Special Commons used by PIPS, (dynamic and static) are not checked.
631  */
633 {
634  list
636  entity
637  local;
638 
639  while (ldecl != NULL)
640  {
641  local = ENTITY(CAR(ldecl));
642  ldecl = CDR(ldecl);
643 
644  if (entity_is_a_common_p(local) && (!special_common(local)))
645  check_one_common(local, module);
646  }
647 
648  return (true);
649 }
650 
651 /*
652  * check_one_common
653  *
654  * This function checks one given common in one given module. for each argument
655  * belonging to the common [while llayout], every other arguments belonging
656  * to another [while lothers] declaration of the common is checked to find if
657  * there is a possible overlap [call to check_overlap_in_common]. possible
658  * synonymous variable within the same module and common are also checked.
659  */
661 {
662  list
663  llayout_init = area_layout(type_area(entity_type(local))),
664  llayout = llayout_init;
665 
666  pips_debug(4, "checking common %s of module %s\n",
667  entity_local_name(local),
669 
670  while (!ENDP(llayout))
671  {
672  intptr_t
673  common_beginning_offset = -1,
674  common_ending_offset = -1,
675  other_beginning_offset = -1,
676  other_ending_offset = -1;
677  entity
678  current_variable = ENTITY(CAR(llayout));
679  list
680  lothers = llayout_init;
681 
682  llayout = CDR(llayout);
683 
684  if (strcmp(entity_module_name(current_variable),
686  continue;
687 
688  if (!position_in_the_area(current_variable,
689  &common_beginning_offset,
690  &common_ending_offset))
691  continue;
692 
693  while (lothers != NULL)
694  {
695  entity head = ENTITY(CAR(lothers));
696  int synonymous = 0;
697  lothers = CDR(lothers);
698 
699  if (!strcmp(entity_name(current_variable), entity_name(head)))
700  {
701  if (synonymous)
702  flint_message("check common",
703  "%s used twice in common %s\n",
704  entity_name(current_variable),
705  module_local_name(local));
706  synonymous++;
707  continue;
708  }
709  if (!position_in_the_area(head,
710  &other_beginning_offset,
711  &other_ending_offset))
712  continue;
713 
715  current_variable,
716  common_beginning_offset,
717  common_ending_offset,
718  head,
719  other_beginning_offset,
720  other_ending_offset);
721  }
722  }
723 }
724 
725 /*-----------------------------------------------------------------------*/
726 
727 /*
728  * check_overlap_in_common
729  *
730  * This function is used to detect possible overlap between two variables of the
731  * same common in two declarations, with incompatible basics (ANSI says that
732  * a compiler must allows that one complex is also two floats) if so, a
733  * message is broadcast.
734  */
735 bool check_overlap_in_common(the_common, e1, inf1, sup1, e2, inf2, sup2)
736  entity the_common;
737  entity e1;
738  int inf1, sup1;
739  entity e2;
740  int inf2, sup2;
741 {
742  basic b1, b2;
743  bool ok1, ok2;
744  list l1, l2; /* unused */
745 
746  /* testing overlap */
747  if ((sup1 < inf2) || (sup2 < inf1))
748  return (true);
749 
750  /* else I must check basic compatibility */
751  ok1 = find_bd_type_variable(entity_type(e1), &b1, &l1);
752  ok2 = find_bd_type_variable(entity_type(e2), &b2, &l2);
753 
754  if (!(ok1 && ok2))
755  return (true); /* benefice du doute! */
756 
757  if (basic_tag(b1) == basic_tag(b2))
758  return (true);
759 
760  if ((basic_float_p(b1) && (basic_complex_p(b2))) ||
762  return (true);
763 
764  flint_message_2("check common",
765  "overlap of incompatible variables (%s, %s) in common %s\n",
766  entity_name(e1),
767  entity_name(e2),
768  module_local_name(the_common));
769  return (false);
770 }
771 
772 
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
Definition: 3dnow.h:3
static reference ref
Current stmt (an integer)
Definition: adg_read_paf.c:163
bdt base
Current expression.
Definition: bdt_read_paf.c:100
#define effect_write_p(eff)
list effects_to_list(effects)
Definition: effects.c:209
#define EFFECT(x)
EFFECT.
Definition: effects.h:608
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
void flint_message(char *fun, char *fmt,...)
Definition: flint.c:147
void flint_message_2(char *fun, char *fmt,...)
Same as flint_message but without the function name
Definition: flint.c:183
bool find_bd_type_variable(type, basic *, list *)
Definition: flint_utils.c:125
bool find_bd_parameter(parameter, basic *, list *)
Definition: flint_utils.c:116
bool control_type_in_expression(enum basic_utype, int, expression)
bool find_bd_expression(expression, basic *, list *)
Definition: flint_utils.c:141
bool number_of_elements(list, intptr_t *)
flint_utils.c
Definition: flint_utils.c:50
bool check_overlap_in_common(entity the_common, entity e1, int inf1, int sup1, entity e2, int inf2, int sup2)
Definition: flint_check.c:735
#define effect_may_or_must_p(my_effect)
The following define may be replaced by #define ...
Definition: flint_check.c:55
bool check_call_args_number(list la, list lt, call c)
Definition: flint_check.c:222
bool check_call_mode_consistency(list la, list lt, entity the_fnct)
Definition: flint_check.c:454
bool check_call_basic_and_dim(expression exp, parameter param, call c, int i)
Definition: flint_check.c:367
bool check_call_types_compatibility(list la, list lt, call c)
Definition: flint_check.c:254
bool check_call_basic(basic be, basic bp, call c, int i)
Definition: flint_check.c:305
bool check_call_one_mode(expression exp, parameter param, entity the_fnct, list sefs_list, int i)
This function checks that a reference to a constant in a call may not be modified,...
Definition: flint_check.c:499
bool check_call_dim(list de, list dp, call c, int i)
loose version
Definition: flint_check.c:336
bool look_at_the_commons(entity module)
Definition: flint_check.c:543
void check_one_common(entity local, entity module)
Definition: flint_check.c:660
#define BOOL_UNDEF
some defines usefull to clean the code
Definition: flint_check.c:42
#define effect_to_name(the_effect)
Definition: flint_check.c:59
#define call_constant_p(C)
Definition: flint_check.c:51
#define special_common(Ent)
Definition: flint_check.c:65
#define entity_is_a_common_p(Ent)
Definition: flint_check.c:62
bool check_procedure(call c)
extern char *current_module_name; unused and modified
Definition: flint_check.c:88
bool position_in_the_area(entity the_var, intptr_t *inf, intptr_t *sup)
Definition: flint_check.c:580
#define arg_const_p(arg)
Definition: flint_check.c:46
void check_the_reference(reference ref)
Definition: flint_check.c:396
bool check_the_call(call c)
Definition: flint_check.c:130
#define param_ref_p(P)
Definition: flint_check.c:43
bool check_call_one_type(expression exp, parameter param, call c, int i)
Definition: flint_check.c:287
bool check_call_intrinsic(list la, list __attribute__((unused)) lt, call c)
Definition: flint_check.c:184
bool check_commons(entity module)
Definition: flint_check.c:632
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
#define POP(l)
Modify a list pointer to point on the next element of the list.
Definition: newgen_list.h:59
size_t gen_length(const list l)
Definition: list.c:150
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
list gen_last(list l)
Return the last element of a list.
Definition: list.c:578
#define CDR(pcons)
Get the list less its first element.
Definition: newgen_list.h:111
#define list_undefined
Undefined list definition :-)
Definition: newgen_list.h:69
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
Definition: database.c:755
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
#define pips_internal_error
Definition: misc-local.h:149
static char * module
Definition: pips.c:74
string basic_to_string(basic)
Definition: type.c:87
#define ENTITY_ASSIGN_P(e)
#define call_intrinsic_p(C)
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...
Definition: entity.c:453
const char * module_local_name(entity e)
Returns the module local user name.
Definition: entity.c:582
entity find_ith_formal_parameter(entity the_fnct, int rank)
This function gives back the ith formal parameter, which is found in the declarations of a call or a ...
Definition: entity.c:1863
const char * entity_module_name(entity e)
See comments about module_name().
Definition: entity.c:1092
#define type_functional_p(x)
Definition: ri.h:2950
@ is_basic_float
Definition: ri.h:572
@ is_basic_overloaded
Definition: ri.h:574
@ is_basic_int
Definition: ri.h:571
@ is_basic_logical
Definition: ri.h:573
@ is_basic_complex
Definition: ri.h:575
#define functional_result(x)
Definition: ri.h:1444
#define basic_complex_p(x)
Definition: ri.h:626
#define parameter_type(x)
Definition: ri.h:1819
#define basic_int_p(x)
Definition: ri.h:614
#define call_function(x)
Definition: ri.h:709
#define reference_variable(x)
Definition: ri.h:2326
#define basic_int(x)
Definition: ri.h:616
#define ENTITY(x)
ENTITY.
Definition: ri.h:2755
#define type_functional(x)
Definition: ri.h:2952
#define basic_tag(x)
Definition: ri.h:613
#define entity_storage(x)
Definition: ri.h:2794
#define code_declarations(x)
Definition: ri.h:784
#define basic_overloaded_p(x)
Definition: ri.h:623
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
#define basic_logical(x)
Definition: ri.h:622
#define type_void_p(x)
Definition: ri.h:2959
#define entity_name(x)
Definition: ri.h:2790
#define area_layout(x)
Definition: ri.h:546
#define functional_parameters(x)
Definition: ri.h:1442
#define PARAMETER(x)
PARAMETER.
Definition: ri.h:1788
#define reference_indices(x)
Definition: ri.h:2328
#define value_code(x)
Definition: ri.h:3067
#define type_area(x)
Definition: ri.h:2946
#define basic_float(x)
Definition: ri.h:619
#define type_varargs_p(x)
Definition: ri.h:2953
#define storage_ram(x)
Definition: ri.h:2521
#define basic_complex(x)
Definition: ri.h:628
#define type_area_p(x)
Definition: ri.h:2944
#define call_arguments(x)
Definition: ri.h:711
#define entity_type(x)
Definition: ri.h:2792
#define basic_logical_p(x)
Definition: ri.h:620
#define ram_offset(x)
Definition: ri.h:2251
#define basic_float_p(x)
Definition: ri.h:617
#define entity_initial(x)
Definition: ri.h:2796
Value b2
Definition: sc_gram.c:105
Value b1
booleen indiquant quel membre est en cours d'analyse
Definition: sc_gram.c:105
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
static bool ok
#define intptr_t
Definition: stdint.in.h:294
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
Definition: replace.c:135
#define exp
Avoid some warnings from "gcc -Wshadow".
Definition: vasnprintf.c:207