public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/38066]  New: bug6 ambiguous reference
@ 2008-11-09 15:04 clerman at fuse dot net
  2008-11-09 15:05 ` [Bug fortran/38066] " clerman at fuse dot net
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: clerman at fuse dot net @ 2008-11-09 15:04 UTC (permalink / raw)
  To: gcc-bugs

Hello everyone,

  I have created a small example to reproduce another bug I have found when I
attempt to build my lens design program. I will upload a file to you,
bug6M.tgz, as soon as I am assigned a bug number.

  The bug occurs in file bug6M.f90:

bug6M.f90:17.21:

      CALL GetNullSet (search_set)
                    1
Error: Name 'getnullset' at (1) is an ambiguous reference to 'getnullset' from
module 'pbit4set'

This is not correct. The reference is not ambiguous. See file errepsetM.f90 and
the statement.

  use PBit4Set, TErrorBitSet => TPBit4Set

The NAG, Intel and g95 compilers all compile this code.

Thank you for your attention.

Norm Clerman


-- 
           Summary: bug6 ambiguous reference
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: clerman at fuse dot net


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/38066] bug6 ambiguous reference
  2008-11-09 15:04 [Bug fortran/38066] New: bug6 ambiguous reference clerman at fuse dot net
@ 2008-11-09 15:05 ` clerman at fuse dot net
  2008-11-11 15:26 ` burnus at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: clerman at fuse dot net @ 2008-11-09 15:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from clerman at fuse dot net  2008-11-09 15:04 -------
Created an attachment (id=16641)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16641&action=view)
see bug explanation


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/38066] bug6 ambiguous reference
  2008-11-09 15:04 [Bug fortran/38066] New: bug6 ambiguous reference clerman at fuse dot net
  2008-11-09 15:05 ` [Bug fortran/38066] " clerman at fuse dot net
@ 2008-11-11 15:26 ` burnus at gcc dot gnu dot org
  2008-11-11 16:08 ` clerman at fuse dot net
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-11-11 15:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2008-11-11 15:25 -------
> Error: Name 'getnullset' at (1) is an ambiguous reference to
> 'getnullset' from module 'pbit4set'

I have not yet checked the source, but other compilers give similar errors:

* NAG f95:
Error: bug6M.f90, line 17: Symbol GETNULLSET found both in module PBIT4SET and
in PBIT8SET detected at CALL@GETNULLSET
Error: bug6M.f90, line 17: Symbol GETNULLSET found both in module PBIT4SET and
in PBIT8SET detected at CALL@GETNULLSET

* g95:
In file bug6M.f90:22
END MODULE Bug6
               1
Error: Name 'getnullset' at (1) is an ambiguous reference to 'getnullset' from
module 'pbit4set'

* ifort:
bug6M.f90(17): error #6405: The same named entity from different modules and/or
program units cannot be referenced.   [GETNULLSET]
      CALL GetNullSet (search_set)

* openf95:
openf95-486 openf95: ERROR SUB_A, File = bug6M.f90, Line = 17, Column = 12
  "GETNULLSET" has been use associated from module "PBIT4SET" and at least one
more module.  It must not be referenced.

> The NAG, Intel and g95 compilers all compile this code.
Hmm, not here!

You have in bug6M.f90:
  USE PBit4Set
  USE PBit8Set
That makes the following two getNullSet available:

  pure subroutine getNullSet (ANullSet)  ! In pbit4setM.f90
    type (TPBit4Set), intent(out) :: ANullSet

  pure subroutine  getNullSet (ANullSet)  ! In pbit8setM.f90
    type (TPBit8Set), intent(out) :: ANullSet

If you now call "getNullSet" you have a problem since getNullSet exists in both
PBit4Set and PBit8Set. (Note: "getNullSet"  is *not* a generic interface.)


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/38066] bug6 ambiguous reference
  2008-11-09 15:04 [Bug fortran/38066] New: bug6 ambiguous reference clerman at fuse dot net
  2008-11-09 15:05 ` [Bug fortran/38066] " clerman at fuse dot net
  2008-11-11 15:26 ` burnus at gcc dot gnu dot org
@ 2008-11-11 16:08 ` clerman at fuse dot net
  2008-11-11 19:34 ` burnus at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: clerman at fuse dot net @ 2008-11-11 16:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from clerman at fuse dot net  2008-11-11 16:07 -------
Subject: Re:  bug6 ambiguous reference

Hello again,

  Thank you for writing.

  As I mentioned in my original bug report, I created this particular bug from
my lens design program, which, as you know, contains much more code. I thought
I had correctly reproduced it, but I did not check it on some other compilers.
Obviously I should have.

  I will go back to my lens design program. I will recreate the bug I am seeing
and proceed from there. Once I do, should I submit a new bug report, if
necessary, or should I append this existing one?

  Thank you very much for your assistance.

Yours truly,

Norm Clerman

---- burnus at gcc dot gnu dot org <gcc-bugzilla@gcc.gnu.org> wrote: 
> 
> 
> ------- Comment #2 from burnus at gcc dot gnu dot org  2008-11-11 15:25 -------
> > Error: Name 'getnullset' at (1) is an ambiguous reference to
> > 'getnullset' from module 'pbit4set'
> 
> I have not yet checked the source, but other compilers give similar errors:
> 
> * NAG f95:
> Error: bug6M.f90, line 17: Symbol GETNULLSET found both in module PBIT4SET and
> in PBIT8SET detected at CALL@GETNULLSET
> Error: bug6M.f90, line 17: Symbol GETNULLSET found both in module PBIT4SET and
> in PBIT8SET detected at CALL@GETNULLSET
> 
> * g95:
> In file bug6M.f90:22
> END MODULE Bug6
>                1
> Error: Name 'getnullset' at (1) is an ambiguous reference to 'getnullset' from
> module 'pbit4set'
> 
> * ifort:
> bug6M.f90(17): error #6405: The same named entity from different modules and/or
> program units cannot be referenced.   [GETNULLSET]
>       CALL GetNullSet (search_set)
> 
> * openf95:
> openf95-486 openf95: ERROR SUB_A, File = bug6M.f90, Line = 17, Column = 12
>   "GETNULLSET" has been use associated from module "PBIT4SET" and at least one
> more module.  It must not be referenced.
> 
> > The NAG, Intel and g95 compilers all compile this code.
> Hmm, not here!
> 
> You have in bug6M.f90:
>   USE PBit4Set
>   USE PBit8Set
> That makes the following two getNullSet available:
> 
>   pure subroutine getNullSet (ANullSet)  ! In pbit4setM.f90
>     type (TPBit4Set), intent(out) :: ANullSet
> 
>   pure subroutine  getNullSet (ANullSet)  ! In pbit8setM.f90
>     type (TPBit8Set), intent(out) :: ANullSet
> 
> If you now call "getNullSet" you have a problem since getNullSet exists in both
> PBit4Set and PBit8Set. (Note: "getNullSet"  is *not* a generic interface.)
> 
> 
> -- 
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38066
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/38066] bug6 ambiguous reference
  2008-11-09 15:04 [Bug fortran/38066] New: bug6 ambiguous reference clerman at fuse dot net
                   ` (2 preceding siblings ...)
  2008-11-11 16:08 ` clerman at fuse dot net
@ 2008-11-11 19:34 ` burnus at gcc dot gnu dot org
  2008-11-11 23:20 ` clerman at fuse dot net
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-11-11 19:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2008-11-11 19:33 -------
(In reply to comment #3)
>   I will go back to my lens design program. I will recreate the bug I am seeing
> and proceed from there. Once I do, should I submit a new bug report, if
> necessary, or should I append this existing one?

It think appending would be preferred.

(By the way, if you reply to the bug email, could you delete the quoted text?
The reason is that the whole text of the email is added to the bugreport -
including the quotes. The quoted text makes it more difficult hard to read
through the comments using the web interface; quoting a line or two is OK, if
one explicitly refers to those lines in the comment.)


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/38066] bug6 ambiguous reference
  2008-11-09 15:04 [Bug fortran/38066] New: bug6 ambiguous reference clerman at fuse dot net
                   ` (3 preceding siblings ...)
  2008-11-11 19:34 ` burnus at gcc dot gnu dot org
@ 2008-11-11 23:20 ` clerman at fuse dot net
  2008-11-11 23:23 ` clerman at fuse dot net
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: clerman at fuse dot net @ 2008-11-11 23:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from clerman at fuse dot net  2008-11-11 23:19 -------
Subject: Re:  bug6 ambiguous reference

Attached is a file that will allow you to reproduce the problem. Run the shell
script bug6.sh. The error occurs in file mtfmodM.f90:

mtfmodM.f90:2810.17:

end module MTFMod
                1
Error: Name 'getnullset' at (1) is an ambiguous reference to 'getnullset' from
module 'pbit4set'
mtfmodM.f90:2810.17:

end module MTFMod
                1
Error: Name 'getnullset' at (1) is an ambiguous reference to 'getnullset' from
module 'pbit4set'
mtfmodM.f90:2810.17:

end module MTFMod
                1
Error: Name 'getnullset' at (1) is an ambiguous reference to 'getnullset' from
module 'pbit4set'

The other compilers will compile this code. It has been part of my production
lens design program for years.

Thanks for you patience on this.

Norm Clerman


------- Comment #6 from clerman at fuse dot net  2008-11-11 23:19 -------
Created an attachment (id=16656)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16656&action=view)


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/38066] bug6 ambiguous reference
  2008-11-09 15:04 [Bug fortran/38066] New: bug6 ambiguous reference clerman at fuse dot net
                   ` (4 preceding siblings ...)
  2008-11-11 23:20 ` clerman at fuse dot net
@ 2008-11-11 23:23 ` clerman at fuse dot net
  2008-11-20 13:44 ` mikael at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: clerman at fuse dot net @ 2008-11-11 23:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from clerman at fuse dot net  2008-11-11 23:22 -------
I have just sent an e-mail in response to your latest one. Attached to it is a
file that will allow you to reproduce the problem.

Thank you for your patience on this matter.

Norm Clerman


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/38066] bug6 ambiguous reference
  2008-11-09 15:04 [Bug fortran/38066] New: bug6 ambiguous reference clerman at fuse dot net
                   ` (5 preceding siblings ...)
  2008-11-11 23:23 ` clerman at fuse dot net
@ 2008-11-20 13:44 ` mikael at gcc dot gnu dot org
  2008-11-24  2:19 ` clerman at fuse dot net
  2008-11-28 21:04 ` dfranke at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: mikael at gcc dot gnu dot org @ 2008-11-20 13:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from mikael at gcc dot gnu dot org  2008-11-20 13:43 -------
Created an attachment (id=16727)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16727&action=view)
much more manageable testcase

I think the testcase is invalid as both PBit4set and PBit8set contain a
getNullSet function and are included together in module bug6 without renaming. 


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/38066] bug6 ambiguous reference
  2008-11-09 15:04 [Bug fortran/38066] New: bug6 ambiguous reference clerman at fuse dot net
                   ` (6 preceding siblings ...)
  2008-11-20 13:44 ` mikael at gcc dot gnu dot org
@ 2008-11-24  2:19 ` clerman at fuse dot net
  2008-11-28 21:04 ` dfranke at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: clerman at fuse dot net @ 2008-11-24  2:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from clerman at fuse dot net  2008-11-24 02:18 -------
Subject: Re:  bug6 ambiguous reference

Mikael,

  Thank you for responding to this bug report, and please excuse my delay in
replying.

  I have rewritten the code in question, and it now works fine.

  Thanks to everyone for their attention and assistance.

Norm Clerman

---- mikael at gcc dot gnu dot org <gcc-bugzilla@gcc.gnu.org> wrote: 
> 
> 
> ------- Comment #8 from mikael at gcc dot gnu dot org  2008-11-20 13:43 -------
> Created an attachment (id=16727)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16727&action=view)
>  --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16727&action=view)
> much more manageable testcase
> 
> I think the testcase is invalid as both PBit4set and PBit8set contain a
> getNullSet function and are included together in module bug6 without renaming. 
> 
> 
> -- 
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38066
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/38066] bug6 ambiguous reference
  2008-11-09 15:04 [Bug fortran/38066] New: bug6 ambiguous reference clerman at fuse dot net
                   ` (7 preceding siblings ...)
  2008-11-24  2:19 ` clerman at fuse dot net
@ 2008-11-28 21:04 ` dfranke at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-11-28 21:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from dfranke at gcc dot gnu dot org  2008-11-28 21:03 -------
Closing as reporter is happy again ...


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WORKSFORME


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-11-28 21:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-09 15:04 [Bug fortran/38066] New: bug6 ambiguous reference clerman at fuse dot net
2008-11-09 15:05 ` [Bug fortran/38066] " clerman at fuse dot net
2008-11-11 15:26 ` burnus at gcc dot gnu dot org
2008-11-11 16:08 ` clerman at fuse dot net
2008-11-11 19:34 ` burnus at gcc dot gnu dot org
2008-11-11 23:20 ` clerman at fuse dot net
2008-11-11 23:23 ` clerman at fuse dot net
2008-11-20 13:44 ` mikael at gcc dot gnu dot org
2008-11-24  2:19 ` clerman at fuse dot net
2008-11-28 21:04 ` dfranke at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).