https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114550

            Bug ID: 114550
           Summary: Weird error when iterating over a character container.
           Product: gcc
           Version: 13.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: p.p11 at orange dot fr
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57841
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57841&action=edit
Reproducer.

When iterating over a character container, Integer is found:
% gcc -c -gnatl -gnat2022 test_20240331_char_iter.adb
GNAT 13.2.0
Copyright 1992-2023, Free Software Foundation, Inc.
Compiling: test_20240331_char_iter.adb
Source file time stamp: 2024-03-31 16:32:13
Compiled at: 2024-03-31 18:59:54
     1. with Ada.Containers.Vectors;
     2.
     3. procedure test_20240331_char_iter is
     4.
     5.    package UCP is new Ada.Containers.Vectors (Positive,
Wide_Wide_Character);
     6.
     7.    UA : Wide_Wide_String := "blah blah";
     8.    US : UCP.Vector;
     9.
    10. begin
    11. US := [for E of UA => E];
                              |
        >>> error: expected type "Standard.Wide_Wide_Character"
        >>> error: found type "Standard.Integer"
    12. end;

Reply via email to