[Bug fortran/85541] ICE with parameterized derived type (PDT) and allocate

2020-06-27 Thread siteg at mathalacarte dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85541

Fred Krogh  changed:

   What|Removed |Added

 CC||siteg at mathalacarte dot com

--- Comment #3 from Fred Krogh  ---
I tried compiling the subroutine uc with GNU Fortran (GCC) 10.1.1 20200507 (Red
Hat 10.1.1-1).  And got this
gfortran -c -o uc.o uc.f90
f951: internal compiler error: Segmentation fault
0x7f8327870aaf ???
   
/usr/src/debug/glibc-2.31-17-gab029a2801/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x7f832785b041 __libc_start_main
../csu/libc-start.c:308
So the problem is still here.

[Bug fortran/94925] Undesired runtime warning message

2020-05-18 Thread siteg at mathalacarte dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94925

--- Comment #4 from Fred Krogh  ---
Before submitting this I tried to make a small test case to show the problem. 
It did not show the problem.  I was hoping that the fact that the message just
started and there were no options that would turn it off would be sufficient.
Sorry.

[Bug fortran/94925] Undesired runtime warning message

2020-05-04 Thread siteg at mathalacarte dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94925

--- Comment #2 from Fred Krogh  ---
I'm unclear on comment 1.  Are you saying the code is such that this diagnostic
can not be turned off and that is the way it should be, or that there is an a
problem in gfortran with the if that is guarding the diagnostic.  And if the
latter, why not mark the status as confirmed.  Thanks.

[Bug fortran/94925] New: Undesired runtime warning message

2020-05-02 Thread siteg at mathalacarte dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94925

Bug ID: 94925
   Summary: Undesired runtime warning message
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: siteg at mathalacarte dot com
  Target Milestone: ---

Just upgraded to GNU Fortran (GCC) 10.0.1 20200328 (Red Hat 10.0.1-0.11), and
am getting this warning at runtime:
"Fortran runtime warning: An array temporary was created"
This did not happen in the past.  I have tried adding the flags
-fcheck=no-array-temps -Wno-array-temporaries
to no effect.  These occur in a large program where these temporary arrays are
used for debugging information that would not be used in production.  I have
not managed to create a small program that illustrates the problem.  I'm hoping
that the fact that this problem occurred between the 9.3.1 compiler and the
current one may help in getting it tracked down.

[Bug fortran/94377] Won't compile when deallocating a parameterized derived type

2020-04-28 Thread siteg at mathalacarte dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94377

--- Comment #4 from Fred Krogh  ---
Same error with GNU Fortran (GCC) 10.0.1 20200328 (Red Hat 10.0.1-0.11)
Error says
internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2830
This one is at a different place in gimplify, but the same error.  See comment
2 for the correct code to try.

[Bug fortran/94377] Won't compile when deallocating a parameterized derived type

2020-04-01 Thread siteg at mathalacarte dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94377

--- Comment #3 from Fred Krogh  ---
Just got GNU Fortran (GCC) 9.3.1 20200317 (Red Hat 9.3.1-1).  I gives the error
$ gfortran -g -o pdt pdt.f90
pdt.f90:20:0:

   20 |   deallocate(av, stat=ista)
  | 
internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2755
0x7f48161671a2 __libc_start_main
../csu/libc-start.c:308

[Bug fortran/94377] Won't compile when deallocating a parameterized derived type

2020-03-28 Thread siteg at mathalacarte dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94377

--- Comment #2 from Fred Krogh  ---
I'm sorry, I made an error when making up this code from a much bigger one. 
There was a missing ')' at line 8.  I've corrected this in the code below. 
Same kind of error here, but that code compiles on both Intel and NAG according
to a friend.

program pdt
  type :: av_t(n)
integer, len :: n
integer :: i   real :: c
real :: u(n)
  end type av_t
  type(av_t(:)), allocatable :: av(:)
  integer :: k2, k3
  k2 = 3
  k3 = 5
contains
  subroutine al_test(k)
integer, intent(in) :: k
integer :: ista
if (k == 1)  then
  allocate ( av_t(k2) :: av(k3), stat=ista) ! For this ista not needed
  return
else
  deallocate(av, stat=ista)
end if
  end subroutine al_test
end program pdt

[Bug fortran/94377] New: Won't compile when deallocating a parameterized derived type

2020-03-27 Thread siteg at mathalacarte dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94377

Bug ID: 94377
   Summary: Won't compile when deallocating a parameterized
derived type
   Product: gcc
   Version: 9.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: siteg at mathalacarte dot com
  Target Milestone: ---

Below is the code with the problem.

program pdt
  type :: av_t(n)
integer, len :: n
integer :: i
real :: c
real :: u(n)
  end type av_t
  type(av_t(:), allocatable :: av(:)
  integer :: k2, k3
  k2 = 3
  k3 = 5
contains
  subroutine al_test(k)
integer, intent(in) :: k
integer :: ista
if (k == 1)  then
  allocate ( av_t(k2) :: av(k3), stat=ista) ! For this ista not needed
  return
else
  deallocate(av, stat=ista)
end if
  end subroutine al_test
end program pdt

Here is the compilation.

gfortran -g -o pdt pdt.f90
pdt.f90:20:0:

   20 |   deallocate(av, stat=ista)
  | 
internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2755
0x7f446356f1a2 __libc_start_main
../csu/libc-start.c:308

[Bug fortran/90294] Compare with NaN failing

2019-04-30 Thread siteg at mathalacarte dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294

--- Comment #8 from Fred Krogh  ---
My apologies for posting this.  In my original code the program just quit at
the point of the test.  I thought I had more or less reproduced this in a small
program.  Clearly that is not the case.  My code has changed to get around the
bug, such change was needed regardless.  I have not idea how to get this
reproduced in a small program.

[Bug fortran/90294] Compare with NaN failing

2019-04-30 Thread siteg at mathalacarte dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294

--- Comment #2 from Fred Krogh  ---
Created attachment 46268
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46268=edit
gfortran -g -o testi testi.f90 gives the error below

Look at r > 0 NaN
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG

[Bug fortran/90294] New: Compare with NaN failing

2019-04-30 Thread siteg at mathalacarte dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294

Bug ID: 90294
   Summary: Compare with NaN failing
   Product: gcc
   Version: 8.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: siteg at mathalacarte dot com
  Target Milestone: ---

Comparing a double real rdat(i) containing a NaN results in

Program received signal SIGFPE, Arithmetic exception.
0x555c2559 in messy_d_m::vec_setup () at Src/messy_bod.F90:1818
1818else if (rdat(i) < 0.0_rk) then