[Bug fortran/58852] New: ASSOCIATE returns nothing after changing the value

2013-10-23 Thread sarantis.pantazis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58852

Bug ID: 58852
   Summary: ASSOCIATE returns nothing after changing the value
   Product: gcc
   Version: 4.7.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sarantis.pantazis at gmail dot com

Created attachment 31081
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31081&action=edit
Minimal working example for associate bug (?)

Hello. I was not able to find anything online related to this problem, so here
goes.

I would like to use the ASSOCIATE feature of fortran to shorten the names of
some variables. However, when I use the associated variable as a subroutine
argument, something goes wrong and the variable values are not passed as
arguments correctly.

I have attached a minimal working example to show what I mean. Any feedback is
welcome.


[Bug fortran/58852] ASSOCIATE returns nothing after changing the value

2013-10-24 Thread sarantis.pantazis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58852

Sarantis Pantazis  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Sarantis Pantazis  ---
I confirm that it has been fixed with 4.8.2.
Thank you for the assistance!


[Bug fortran/59168] New: Wrong result with non-optimized (!) compilation

2013-11-18 Thread sarantis.pantazis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59168

Bug ID: 59168
   Summary: Wrong result with non-optimized (!) compilation
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sarantis.pantazis at gmail dot com

I wanted to check the difference in CPU time in the calculation of a sum when
the terms are included in the same expression and when they are added
separately. For this reason I wrote the attached code.

First I compiled with
"gfortran -o test testPartialSum.f08"
and got the following results:

   199204048.
   67108864.0
  0.11706  0.24403

Then I compiled with 
"gfortran -o test testPartialSum.f08 -O3"
and got the following results:

   2.
   2.
   7.8016E-02   7.5030E-02

It seems clear that the optimized compilation provides the correct results but
the non-optimized one does not (which seems very weird to me!!!).

>uname -a
Linux i75454 3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013
(97c14ba) i686 i686 i386 GNU/Linux

>cat /etc/issue
Welcome to openSUSE 12.3 "Dartmouth" - Kernel \r (\l).

>gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/myUserame/gcc-latest/gcc-4.8.2/lib/gcc/i686-pc-linux-gnu/4.8.2/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/home/myUsername/gcc-latest/gcc-4.8.2
--enable-languages=c,fortran,c++
Thread model: posix
gcc version 4.8.2 (GCC)


[Bug fortran/59168] Wrong result with non-optimized (!) compilation

2013-11-18 Thread sarantis.pantazis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59168

--- Comment #1 from Sarantis Pantazis  ---
Created attachment 31234
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31234&action=edit
Bug code


[Bug fortran/59525] New: Inheritance problems

2013-12-16 Thread sarantis.pantazis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59525

Bug ID: 59525
   Summary: Inheritance problems
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sarantis.pantazis at gmail dot com

I have some problems with inheritance.
In particular, I can not allocate an allocatable class variable to a child type
(the extra components are not recognized by the compiler).

Attached is a minimal working example.
The error message is the following:

testInheritance.f08:25.23:
write(*,*) bla%i, bla%j
Error: 'j' at (1) is not a member of the 'mytype' structure


[Bug fortran/59525] Inheritance problems

2013-12-16 Thread sarantis.pantazis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59525

--- Comment #1 from Sarantis Pantazis  ---
Created attachment 31446
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31446&action=edit
Minimal working example


[Bug fortran/60543] [4.7/4.8/4.9 Regression] Function with side effect removed by the optimizer.

2014-03-23 Thread sarantis.pantazis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60543

--- Comment #8 from Sarantis Pantazis  ---
Created attachment 32430
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32430&action=edit
Compilation logs and installation workflow


[Bug fortran/60543] [4.7/4.8/4.9 Regression] Function with side effect removed by the optimizer.

2014-03-23 Thread sarantis.pantazis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60543

--- Comment #9 from Sarantis Pantazis  ---
Thank you for the fast response and effort. I have installed gcc from svn but
the results are still the same. Perhaps I mis-installed something? Attached you
will find the logs and the installation workflow. Is step #14 perhaps wrong?

The output of gfortran -v seems correct though.

Using built-in specs.
COLLECT_GCC=/home/sarantis/latestGcc/gcc-build/gcc/gfortran
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/home/sarantis/latestGcc
--enable-languages=c,fortran,c++ --disable-multilib
Thread model: posix
gcc version 4.9.0 20140323 (experimental) (GCC)


[Bug fortran/60543] [4.7/4.8/4.9 Regression] Function with side effect removed by the optimizer.

2014-03-23 Thread sarantis.pantazis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60543

--- Comment #11 from Sarantis Pantazis  ---
Yes, I did; I used "make clean" first (also "rm *.o *.f90 *.s" in the main
folder to clean up the files generated by -save-temps).


[Bug fortran/60543] [4.7/4.8/4.9 Regression] Function with side effect removed by the optimizer.

2014-03-24 Thread sarantis.pantazis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60543

--- Comment #13 from Sarantis Pantazis  ---
> Did you update the compiler name in your makefile?

I have left the line COMPILER=gfortran at the top as it is and I have defined
an alias in my ~/.bashrc for gfortran pointing to the newly installed location
(alias gfortran='$HOME/latestGcc/gcc-build/gcc/gfortran').


> cp MOD/generalfunctions.mod generalFunctions.mod.gz
> gunzip generalFunctions.mod.gz

I get "gzip: generalFunctions.mod.gz: not in gzip format". But anyway, the mod
file is readable so I can skip to the third line.


> grep PURE generalFunctions.mod

UNKNOWN-INTENT MODULE-PROC DECL UNKNOWN 0 0 SUBROUTINE IMPLICIT_PURE) (
MODULE-PROC DECL UNKNOWN 0 0 FUNCTION IMPLICIT_PURE) (REAL 8 0 0 0 REAL

So, I still get IMPLICIT_PURE. And when I run it I still get the infinite loop
as well, so I guess I missed something during the installation?


[Bug fortran/60543] [4.7/4.8/4.9 Regression] Function with side effect removed by the optimizer.

2014-03-24 Thread sarantis.pantazis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60543

--- Comment #15 from Sarantis Pantazis  ---
> Did you install the compiler (i.e. run 'make install')?

Yes, I did. I read http://gcc.gnu.org/install/index.html and made a summary of
the steps I followed (attached here). I also kept a log of "make" and "make
install" (also attached here).


I also tried changing COMPILER=gfortran to
COMPILER=/home/sarantis/latestGcc/gcc-build/gcc/gfortran and got the following
error:

gfortran: error trying to exec 'f951': execvp: No such file or directory


> Do you get gzip'ed modules if you use .../gcc/f951 instead of 
> .../gcc/gfortran?

Compiling with COMPILER=/home/sarantis/latestGcc/gcc-build/gcc/f951 leads to
zipped files and no IMPLICIT_PURE. But f951 does not accept -c so no executable
was produced.


It seems it is something trivial but my knowledge outside of fortran is still
rather limited...


[Bug fortran/61073] New: -fcheck='do' leads to twice the amount of GDB steps in a do loop

2014-05-06 Thread sarantis.pantazis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61073

Bug ID: 61073
   Summary: -fcheck='do' leads to twice the amount of GDB steps in
a do loop
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sarantis.pantazis at gmail dot com

I am not sure if this is a bug or the way it is supposed to work, but I could
not find anything relative online. I have written the following code:

##
PROGRAM test
implicit none

integer::i

do i=1,3
write(*,*) 'bla'
end do

end program
##

If I compile with "gfortran -o bla test.f90 -fcheck='do' -g", the steps of
debugging through GDB show that lines 6-7 are accessed six times instead of
three.

##

Breakpoint 1, test () at test.f90:6
6do i=1,3
(gdb) step
7write(*,*) 'bla'
(gdb) 
 bla
6do i=1,3
(gdb) 
7write(*,*) 'bla'
(gdb) 
6do i=1,3
(gdb) 
7write(*,*) 'bla'
(gdb) 
 bla
6do i=1,3
(gdb) 
7write(*,*) 'bla'
(gdb) 
6do i=1,3
(gdb) 
7write(*,*) 'bla'
(gdb) 
 bla
6do i=1,3
(gdb) 
7write(*,*) 'bla'
(gdb) 
6do i=1,3
(gdb) 
10end program
(gdb) 

##

The output of gfortran -v:

Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1'
--with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)


[Bug fortran/60543] New: Random number problems with REAL64 precision at different optimization levels

2014-03-16 Thread sarantis.pantazis at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60543

Bug ID: 60543
   Summary: Random number problems with REAL64 precision at
different optimization levels
   Product: gcc
   Version: 4.8.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sarantis.pantazis at gmail dot com

Created attachment 32365
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32365&action=edit
code and compiled files

The attached code is meant to generate particle velocities with different
magnitudes but uniform angle distribution. In this process, I have checked the
sign of the three velocity components and have found the following:

(1) In DEBUG mode (-O0, please see the included makefile for the exact flags)
no problem appears.
(2) In OPT1 mode (-O1) the number of positive components in the y- and z-
direction seem to be always the same.
(3) In OPT1 mode the code "gets stuck" if I deactivate the WRITE statements of
lines 31 and 34 in bugMain.f.

No error/warning messages given by the compiler.

I have attached a compiled version of (1)-(3) with the -save-temps flag.


The output of lsb_release -a:

LSB Version:   
core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
Distributor ID:Ubuntu
Description:Ubuntu 13.10
Release:13.10
Codename:saucy


The output of gfortran -v:

Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.8.1-10ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu9)