This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/81552] New: -finit-integer=n


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81552

            Bug ID: 81552
           Summary: -finit-integer=n
           Product: gcc
           Version: 7.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: poupycle at hotmail dot fr
  Target Milestone: ---

Hello, 

  If I put the option : -fdefault-integer-8 it is not taken into account to
define the value in -finit-integer=N

  In fact, N is an 32-bit INTEGER in the range [-2147483648 ; 2147483647]

Analyse : 

In the file fortran/options.c you can define the value : 
    case OPT_finit_integer_:
      gfc_option.flag_init_integer = GFC_INIT_INTEGER_ON;
      gfc_option.flag_init_integer_value = atoi (arg);
      break;

  but atoi is an INT function...

In the file fortran/fortran.h the structure gfc_option is defined :
/* Structure for holding compile options */
typedef struct
{
  char *module_dir;
  gfc_source_form source_form;
  int max_continue_fixed;
  int max_continue_free;
  int max_identifier_length;

  int max_errors;

  int flag_preprocessed;
  int flag_d_lines;
  int flag_init_integer;
  int flag_init_integer_value;
  int flag_init_logical;
  int flag_init_character;
  char flag_init_character_value;

  int fpe;
  int fpe_summary;
  int rtcheck;

  int warn_std;
  int allow_std;
}
gfc_option_t;

extern gfc_option_t gfc_option;

  Here again flag_init_integer_value is an INTEGER 32-bits


is it possible to make the flag_init_integer_value compatible with the
-fdefault-integer-8 ?


Best Regard
Poupycle

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]