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/40472] Simplification of spread intrinsic takes a long time



------- Comment #10 from burnus at gcc dot gnu dot org  2009-06-22 11:51 -------
(In reply to comment #9)
> At revision 148777 (but not at r148732) [...] Segmentation fault

Does not segfault here, but I get with valgrind:

==23187== Use of uninitialised value of size 8
==23187==    at 0x52A29C8: __gmpz_get_si (in /usr/lib64/libgmp.so.3.5.0)
==23187==    by 0x5166F9: gfc_simplify_spread (simplify.c:5291)
==23187==    by 0x4A3BB9: gfc_check_spread (check.c:2868)
==23187==    by 0x5AE7397: ???

That's the following line:
  if (mpz_get_si (size)*ncopies > gfc_option.flag_max_array_constructor)
where size is initialized using:
  gfc_array_size (source, &size);

The problem is that SOURCE is   1   and not an array. gfc_array_size duly
returns FAILURE, but this is ignored.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu dot
                   |                            |org
   Last reconfirmed|2009-06-20 09:58:13         |2009-06-22 11:51:34
               date|                            |


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


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