[Bug fortran/33445] openmp invalid multi-thread runtime result (-ffree-form only!)

2007-09-17 Thread burnus at gcc dot gnu dot org


--- Comment #2 from burnus at gcc dot gnu dot org  2007-09-17 06:40 ---
*** Bug 33444 has been marked as a duplicate of this bug. ***


-- 


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



[Bug fortran/33445] openmp invalid multi-thread runtime result (-ffree-form only!)

2007-09-17 Thread burnus at gcc dot gnu dot org


--- Comment #3 from burnus at gcc dot gnu dot org  2007-09-17 06:55 ---
Looking at the dump (GCC 4.3), one sees for the fixed-format code:

 #pragma omp parallel default(shared) reduction(+:kin) reduction(+:pot)
private(d) private(rij) private(k) private(j) private(i)
{
  {
#pragma omp for nowait
for (i = 1; i = D.982; i = i + 1)

and for the free format, one finds:

  D.982 = *np;
  #pragma omp parallel private(k) private(j)
{
  {
#pragma omp for private(i) nowait
for (i = 1; i = D.982; i = i + 1)

In the source:

!$omp  parallel do
!$omp default(shared)
!$omp private(i,j,k,rij,d)
!$omp reduction(+ : pot, kin)
  do i=1,np


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu dot
   ||org, burnus at gcc dot gnu
   ||dot org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||openmp, wrong-code
  Known to fail||4.2.0 4.3.0
   Last reconfirmed|-00-00 00:00:00 |2007-09-17 06:55:32
   date||


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



[Bug fortran/33445] openmp invalid multi-thread runtime result (-ffree-form only!)

2007-09-17 Thread jakub at gcc dot gnu dot org


--- Comment #4 from jakub at gcc dot gnu dot org  2007-09-17 07:16 ---
Why do you think that is a bug?
Please read OpenMP 2.5, 2.1.1 (Fixed Source Form Directives) and 2.1.2
(Free Source Form Directives).  Continuation is done very differently between
fixed and free form.  So, what are you citing above is a valid fixed form
continuation, but not a valid free form continuation:

10
11
12

2.1.2 has:
Continued directive lines must have an ampersand as the last nonblank character
on the line, prior to any comment placed inside the directive. Continuation
directive lines can have an ampersand after the directive sentinel with
optional white space before and after the ampersand.
while 2.1.1 has:
Initial directive lines must have a space or zero in column 6, and continuation
directive lines must have a character other than a space or a zero in column 6.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |WAITING


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



[Bug fortran/33445] openmp invalid multi-thread runtime result (-ffree-form only!)

2007-09-17 Thread burnus at gcc dot gnu dot org


--- Comment #5 from burnus at gcc dot gnu dot org  2007-09-17 07:40 ---
How about giving a diagnostic as ifort does:

fortcom: Error: test2.f90, line 93: Syntax error, found '' when expecting one
of: LABEL END-OF-STATEMENT ; BLOCK BLOCKDATA PROGRAM TYPE COMPLEX BYTE
CHARACTER ...
!$omp default(shared)
---^

or like SUNF95 does:

!$omp default(shared)
 ^
test2.f90, Line = 93, Column = 6: ERROR: Unexpected syntax: OpenMP directive
keyword was expected but found .


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

   Keywords|wrong-code  |accepts-invalid


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



[Bug fortran/33445] openmp invalid multi-thread runtime result (-ffree-form only!)

2007-09-15 Thread fred2 at qnet dot com


--- Comment #1 from fred2 at qnet dot com  2007-09-15 19:52 ---
Created an attachment (id=14209)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14209action=view)
fixed-form source code (runs correctly). see bug description to duplicate error

this attachment (and bug description) was incorrectly omitted from bug 33444


-- 


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