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

            Bug ID: 110865
           Summary: Unable to access copied const array
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: gaius at gcc dot gnu.org
  Target Milestone: ---

As reported on the gm2 mailing list:

> MODULE MayBeBuggy;
>
> TYPE  V5    = ARRAY [1.. 5] OF LONGREAL;
>
> CONST wg10  = V5{
> 6.66713443086881375935688098933317928579E-02,
> 1.49451349150580593145776339657697332403E-01,
> 2.19086362515982043995534934228163192459E-01,
> 2.69266719309996355091226921569469352860E-01,
> 2.95524224714752870173892994651338329421E-01
>               }; (* weights of the 10-point Gauss-Konrod rule *)
>
> CONST WG  = wg10;
>
> VAR   x   : LONGREAL;
> BEGIN
>       x := wg10[3]; (* OK     *)
>
>       x := WG[3];   (* NOT OK *)
> END MayBeBuggy.

Reply via email to