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/41777] wrong-code shown with EXCITING



------- Comment #1 from burnus at gcc dot gnu dot org  2009-10-21 09:10 -------
Created an attachment (id=18851)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18851&action=view)
Slightly reduced test case - needs now only FoX

Reduced test case -- still pretty large, but now only depends on FoX. Use
similarly to PR 41772:

wget http://www.uszla.me.uk/FoX/source/FoX-4.0.4.tar.gz
tar xfz FoX-4.0.4.tar.gz
cd FoX-4.0.4 && ./configure FC=gfortran && make -j4

gfortran -Iobjs/finclude fox.f90 objs/lib/libFoX_{dom,utils,sax,common,fsys}.a
./a.out

In order to see better what goes wrong, patch dom/m_dom_dom.F90's removeChild
by adding the PRINT statements:

    do i = 1, size(arg%childNodes%nodes)
      print *, 'removeChild: Walking list, i = ', i
      if (associated(arg%childNodes%nodes(i)%this, oldChild)) then
        print *, 'removeChild: Walking list, fount it, i_t = ', i_t

The gfortran output is then:

 removeChild: Walking list, i =            1
 [...]
 removeChild: Walking list, i =            9
NOT_FOUND_ERR

While g95/NAG f95 have:
 removeChild: Walking list, i =  1
 [...]
 removeChild: Walking list, fount it, i_t =  4
 [...]
  removeChild: Walking list, i =  9
FoX_NODE_IS_NULL

(Afterwards, all core dump. The result that it = 4 is found, can also be seen
with the full program, where no segfault occurs.)

The needed input.xml can be found in attachment 18846 of PR 41772


-- 


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


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