#283835 Illegal program not detected, "/=" when "=" is ambiguous

Package:
gnat-12
Source:
gcc-12
Description:
GNU Ada compiler
Submitter:
Date:
2025-01-09 17:36:09 UTC
Severity:
normal
Tags:
#283835#5
Date:
2004-12-01 18:57:04 UTC
From:
To:
package Test_133 is
   package pak1 is
      type T1 is null record;
   end pak1;

   package pak2 is
      subtype boolean is standard.boolean;
      function "=" (x, y: pak1.T1) return boolean;
   end pak2;

   use pak1, pak2;

   x1: pak1.T1;
   b1: boolean := x1 /= x1;  -- ERROR: ambigous  (gnat misses)
   b2: boolean := x1 = x1;   -- ERROR: ambigous
end Test_133;


The actual output from gnat is:

test_133.ads:15:22: ambiguous expression (cannot resolve ""="")
test_133.ads:15:22: possible interpretation at line 8
test_133.ads:15:22: possible interpretation in package Standard
gnatmake: "test_133.ads" compilation error

Only the second error is detected; the ambiguity of "/=" goes
unnoticed.

#283835#20
Date:
2009-01-02 19:33:00 UTC
From:
To:
found 269948 4.3.2-2
found 276224 4.3.2-2
found 278687 4.3.2-2
found 278831 4.3.2-2
found 279893 4.3.2-2
found 280939 4.3.2-2
found 283835 4.3.2-2
thanks