- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've just run across a funny bug that someone might be able to unmystify/fix for me. Consider the following code
subroutine task_bug() !$ use omp_lib implicit none integer :: alloc !$OMP TASK SHARED(alloc) print *, "Hello from thread ", omp_get_thread_num(), "alloc = ", alloc !$OMP END TASK end subroutine task_bug
We get the following unusual error when compiling
[xxx@yyy] ~/temp/ifort_bug$ ifort -c -openmp test.f90 test.f90(7): error #5082: Syntax error, found 'ALLOC' when expecting one of: <IDENTIFIER> <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT> / !$OMP TASK SHARED(alloc) ------------------^ compilation aborted for test.f90 (code 1) [xxx@yyy] ~/temp/ifort_bug$ ifort --version ifort (IFORT) 14.0.0 20130728 Copyright (C) 1985-2013 Intel Corporation. All rights reserved.
The bug goes away if we rename the variable alloc to, say, alloc2.
Thanks,
Jonathan.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks - we'll investigate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fixing code formatting (rich text seems to bungle things):
I've just run across a funny bug that someone might be able to unmystify/fix for me. Consider the following code
[fortran] subroutine task_bug() !$ use omp_lib implicit none integer :: alloc !$OMP TASK SHARED(alloc) print *, "Hello from thread ", omp_get_thread_num(), "alloc = ", alloc !$OMP END TASK end subroutine task_bug [/fortran]We get the following unusual error when compiling
[bash] [xxx@yyy] ~/temp/ifort_bug$ ifort -c -openmp test.f90 test.f90(7): error #5082: Syntax error, found 'ALLOC' when expecting one of:The bug goes away if we rename the variable alloc to, say, alloc2.
Thanks,
Jonathan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Escalated as issue DPD200253067.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This has been fixed for a future release.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page