public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/34006]  New: vectorization with 64-bit integers
@ 2007-11-06 16:23 valera dot veryazov at teokem dot lu dot se
  2007-11-06 17:46 ` [Bug fortran/34006] " kargl at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: valera dot veryazov at teokem dot lu dot se @ 2007-11-06 16:23 UTC (permalink / raw)
  To: gcc-bugs

Hi, 
the code (see below) compiled with 
gfortran -O2 -Wall -fdefault-integer-8 -ftree-vectorize a.f
gives a complete garbage, since compiler changing the order of execution 
inside the loop. 
=========================

     DIMENSION Nvec(10),iVEC(10)
      do i=1,10
        Nvec(i)=i
      enddo
      call Zbase(Nvec,iVec,10)
      print *,iVec
      end

      SUBROUTINE ZBASE(NVEC,IVEC,NCLASS)
      DIMENSION NVEC(NCLASS),IVEC(NCLASS)
      IVEC(1) = 1
      DO 100 ICLASS = 2,NCLASS
        IVEC(ICLASS) = IVEC(ICLASS-1)+NVEC(ICLASS-1)
  100 CONTINUE

      RETURN
      END



=========================



Removing -ftree-vectorize, or -fdefault-integer-8, or changing loop to 
'Do 100 ICLASS= 2, 10' solves the problem.

           Best Regards,
                    Valera.


-- 
           Summary: vectorization with 64-bit integers
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: valera dot veryazov at teokem dot lu dot se
  GCC host triplet: Linux_x86-64 CentOS


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-03-31  0:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-06 16:23 [Bug fortran/34006] New: vectorization with 64-bit integers valera dot veryazov at teokem dot lu dot se
2007-11-06 17:46 ` [Bug fortran/34006] " kargl at gcc dot gnu dot org
2007-11-07  9:45 ` valera dot veryazov at teokem dot lu dot se
2007-11-08 14:04 ` [Bug middle-end/34006] [4.2 only] " fxcoudert at gcc dot gnu dot org
2007-12-12  4:06 ` victork at gcc dot gnu dot org
2008-02-05 11:12 ` [Bug middle-end/34006] [4.2 Regression] " rguenth at gcc dot gnu dot org
2008-03-16 17:36 ` [Bug tree-optimization/34006] " rguenth at gcc dot gnu dot org
2008-03-26 10:28 ` victork at gcc dot gnu dot org
2008-04-10 10:37 ` victork at gcc dot gnu dot org
2008-05-19 20:30 ` jsm28 at gcc dot gnu dot org
2009-03-31  0:37 ` jsm28 at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).