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/43217] Output of Hollerith constants which are not a multiple of 4 bytes



------- Comment #4 from burnus at gcc dot gnu dot org  2010-03-02 09:50 -------
For DATA gfortran already pads the Hollerith constant; maybe the simplest would
be to modify primary.c's match_hollerith_constant to simply add tailing spaces
such that the length is multiples of the storage size of, e.g., a default
integer - or of gfc_numeric_storage_size? (They are not the same).

Something like
  chunk_size = gfc_integer_kinds[gfc_default_integer_kind].bit_size
               /gfc_char_kinds[gfc_default_char_kind].bit_size;
  extra_size = num % chunk_size;
  size = num + 1 + (extra_size > 0) ? chunk_size - extra_size : 0;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43217


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