This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: Problems building GFortran on Cygwin


Angelo Graziosi <Angelo.Graziosi@roma1.infn.it> wrote on Fri, 19 Jan 2007:
I want to flag that building GFC, trunk 120954, on Cygwin fails in this
way:
------------------------------------------
...
/tmp/gcc/.build/./prev-gcc/xgcc -B/tmp/gcc/.build/./prev-gcc/
-B/usr/local/gfortran/i686-pc-cygwin/bin/ -c   -g -O2 -DIN_GCC   -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-Wold-style-definition -Wmissing-format-attribute -Werror -fno-common
-DHAVE_CONFIG_H -I. -Ifortran -I/tmp/gcc/gcc -I/tmp/gcc/gcc/fortran
-I/tmp/gcc/gcc/../include -I/tmp/gcc/gcc/../libcpp/include
-I/tmp/gcc/gcc/../libdecnumber -I../libdecnumber
/tmp/gcc/gcc/fortran/symbol.c -o fortran/symbol.o
cc1: warnings being treated as errors
/tmp/gcc/gcc/fortran/symbol.c: In function 'gfc_get_namespace':
/tmp/gcc/gcc/fortran/symbol.c:1842:

warning: array subscript is above array bounds
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Looks like it's related to this patch <http://gcc.gnu.org/ml/gcc-patches/2007-01/msg01335.html>.


The code in question looks like this:
  for (i = 'a'; i <= 'z'; i++)
    {
      ns->set_flag[i - 'a'] = 0;
      ts = &ns->default_type[i - 'a'];   // Warning on this line.

default_type is an array declared as
    gfc_typespec default_type[26];
(where 26 comes from GFC_LETTERS), so the code looks ok to me.

Dirk any insight into what's going wrong?

Cheers,
- Tobi



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



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