[Bug fortran/77915] New: Internal error for matmul() in forall with optimization

2016-10-10 Thread hroch at physics dot muni.cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77915

Bug ID: 77915
   Summary: Internal error for matmul() in forall with
optimization
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hroch at physics dot muni.cz
  Target Milestone: ---

Dear colleagues,

I encountered an internal problem in gfortran
compiler for matmul() in forall loop, while
optimization is switched on.

There is a minimal code:
---
program x
  integer, parameter :: d = 3
  real,dimension(d,d,d) :: cube,xcube
  real, dimension(d,d) :: cmatrix
  integer :: i,j
  forall(i=1:d,j=1:d)
 xcube(i,j,:) = matmul(cmatrix,cube(i,j,:))
  end forall
end program x
---

which works correctly for

 $ gfortran f.f95

while with optimization flag

 $ gfortran -O f.f95

fails on:

---
f.f95:6:0:

   forall(i=1:d,j=1:d)

internal compiler error: in gfc_trans_forall_1, at fortran/trans-stmt.c:4388
0x6edc26 gfc_trans_forall_1
../../src/gcc/fortran/trans-stmt.c:4388
0x68dfd7 trans_code
../../src/gcc/fortran/trans.c:1832
0x6b167c gfc_generate_function_code(gfc_namespace*)
../../src/gcc/fortran/trans-decl.c:6167
0x649b90 translate_all_program_units
../../src/gcc/fortran/parse.c:5915
0x649b90 gfc_parse_file()
../../src/gcc/fortran/parse.c:6121
0x68b322 gfc_be_parse_file
../../src/gcc/fortran/f95-lang.c:201
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
---

The compiler version is

 $ gfortran --version
GNU Fortran (Debian 6.2.0-5) 6.2.0 20160927
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS

which is from latest GNU/Debian (unstable) compiler collection.
Older compilers (GNU Fortran (Debian 4.9.2-10) 4.9.2) works
correctly. Use of both '-O -finline-matmul-limit=0' is also
successful.


Thank you for developing of gfortran!

[Bug fortran/49280] New: Misinterpretation of -static-libgfortran switch

2011-06-03 Thread hroch at physics dot muni.cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49280

   Summary: Misinterpretation of -static-libgfortran switch
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: hr...@physics.muni.cz


Dear collegues,

I'm just informing, that linking of a trivial source 
with switch -static-libgfortran returns results which 
looks to be misinterpreted:

$ gfortran -static-libgfortran zk.f95
/usr/bin/ld: cannot find -lgfortran
collect2: ld returned 1 exit status

(The same for g++ and -static-libstdc++.)

Note, the switch works cleanly under the 
older gfortran 4.4.5 (Debian Squeeze).

FH


[Bug fortran/49280] Misinterpretation of -static-libgfortran switch

2011-06-06 Thread hroch at physics dot muni.cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49280

--- Comment #4 from Filip Hroch  2011-06-06 
13:49:09 UTC ---
(In reply to comment #2)
> Steve makes a good point.  I have found that some distributions do not install
> the static libraries unless one specifically installs them.  An example is
> Fedora 15.  They are provided, but not installed by default

I confirms that the fail has been appeared under Fedora 15. The installation of
recommended static libraries (libgfortran.a, etc.) solved the problem. Sorry
for inconviences, I'm confused user of Debian based distributions. Thank you
very much!