From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe30.google.com (mail-vs1-xe30.google.com [IPv6:2607:f8b0:4864:20::e30]) by sourceware.org (Postfix) with ESMTPS id 3B98F3858CDA for ; Thu, 14 Sep 2023 04:40:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3B98F3858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cs.washington.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.washington.edu Received: by mail-vs1-xe30.google.com with SMTP id ada2fe7eead31-44d5c49af07so272643137.2 for ; Wed, 13 Sep 2023 21:40:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.washington.edu; s=goo201206; t=1694666434; x=1695271234; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kl6AdRT7b4ybV9mdF7WrEPDby2B+cvLX7gbKBAxWlpM=; b=HiB5v4uBBdp1HJAySbbux5XMULwAqp6jkjvYo7qCgwtT+hHDaizjarzvm6Aq5IsJTO Ej6T2FTzTwIbCero47ijZ6BlgSM1vW7TlGYdYpauYKO/rN7qM4UnA44B39kLMkFc8m3W Y/JPBJXVleBsOZlZawBMFnoN0UWGIfHqRHfpk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694666434; x=1695271234; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kl6AdRT7b4ybV9mdF7WrEPDby2B+cvLX7gbKBAxWlpM=; b=dnLNxRIUqOkwvVD9EWPl8BYf5zCD/84dKw1KIEujZSXwENsII6cGkhwMdFgq2X3+dG GnyWXKar0EBtdd/FD1e4Ye+XZGwMgzjJlWpcm14oFMDxRAbaRwjC0XUNJ3pj5kqmHXvP gyKd78eJWFwyUkYu1xNa4bKIQSXuNzTxmRDQyN857KvHhiO2nyFMGBNCeBKPGKpaxrSw 8ud/a5yI4qL9narj6ofLY/4oba4KAzUU4HSiB2jpSByq0xcO1tHUvqV0241J8fgc9pQ+ YYOX64QyTB1ULk4QZSCNDOb7866vxP0bpWuqOaIhA2NPNlkNyFtj14FZrAAMxAU78cRp Gw+g== X-Gm-Message-State: AOJu0Ywx032RPRvuIeOldHjjETJhIlGNIUurcTKDEo5utNuAvL25eCTV 7espd0BM3OzTJ039N1O/6R8f9Gol3Uzrii/OI4yu27pc6av8+gSI X-Google-Smtp-Source: AGHT+IFa6gIdynGdpC15sdCNxI2AR8ah8AloS2KnK/22RGKzZeARtnfzw+8M2dIGrT1/k8B07shiGgTq0Bl0YrF7dfM= X-Received: by 2002:a67:f308:0:b0:44d:4e08:ccc8 with SMTP id p8-20020a67f308000000b0044d4e08ccc8mr4360011vsf.24.1694666434405; Wed, 13 Sep 2023 21:40:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ken Matsui Date: Wed, 13 Sep 2023 21:39:58 -0700 Message-ID: Subject: Re: Compilation Error Regarding RID_MAX To: Andrew Pinski Cc: gcc@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_FILL_THIS_FORM_SHORT autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Sep 13, 2023 at 9:38=E2=80=AFPM Andrew Pinski w= rote: > > On Wed, Sep 13, 2023 at 9:35=E2=80=AFPM Ken Matsui wrote: > > > > On Wed, Sep 13, 2023 at 9:23=E2=80=AFPM Andrew Pinski wrote: > > > > > > On Wed, Sep 13, 2023 at 9:09=E2=80=AFPM Ken Matsui via Gcc wrote: > > > > > > > > Hi, > > > > > > > > I have merged all my patches into a single branch for better > > > > maintainability for me, but I am unable to build GCC. Initially, I > > > > faced an error related to RID_MAX, which was fixed in > > > > https://github.com/ken-matsui/gcc-gsoc23/commit/c32d49bc990acde4d3e= c5654ddb81b0a7d081378. > > > > The ICE was caused by gcc_assert (RID_MAX <=3D 255) in gcc/c/c-pars= er.c. > > > > At this point, my new built-in exceeded the max keyword bound since > > > > c_token->keyword has 8 bits. This patch increased the bit size to 1= 6 > > > > and compiled GCC successfully. > > > > > > > > However, I still encountered an unusual error and am unable to buil= d > > > > GCC on https://github.com/ken-matsui/gcc-gsoc23/commit/c32d49bc990a= cde4d3ec5654ddb81b0a7d081378. > > > > This is the 4th built-in implementation after the previous RID_MAX = fix > > > > patch (i.e., this increases the total number of keywords, now RID_M= AX > > > > =3D 260). The error message indicates that there is a missing > > > > parenthesis after 'unsigned' for the expression (unsigned __int128)= . > > > > > > > > /home/kmatsui/gcc/objdir/gcc/include/bmi2intrin.h:86:38: error: > > > > expected =E2=80=98)=E2=80=99 before =E2=80=98__int128=E2=80=99 > > > > 86 | unsigned __int128 __res =3D (unsigned __int128) __X * __Y= ; > > > > | ~ ^~~~~~~~~ > > > > | ) > > > > /home/kmatsui/gcc/objdir/gcc/include/bmi2intrin.h:86:29: error: > > > > initializer element is not constant > > > > 86 | unsigned __int128 __res =3D (unsigned __int128) __X * __Y= ; > > > > | > > > > > > > > I reordered the commits, but it seems that the 4th built-in (RID_MA= X =3D > > > > 260) after the RID_MAX tweak fails, regardless of what the 4th is. > > > > (i.e., the __remove_pointer implementation itself is not the reason= .) > > > > > > From c-common.h: > > > #define C_SET_RID_CODE(id, code) \ > > > (((struct c_common_identifier *) (id))->node.rid_code =3D (unsigned= char) code) > > > > > > This is definitely incorrect now. It should be using `unsigned short`= . > > > > > > > That worked! Thank you so much! > > > > I would like to attribute this change to you, but if you're > > comfortable with it, could you please share the relevant commit > > information (name and email address)? > > Andrew Pinski > Thank you! > Thanks, > Andrew > > > > > > Thanks, > > > Andrew > > > > > > > > > > > I have pushed the > > > > branch to https://github.com/ken-matsui/gcc-gsoc23/commits/me/gsoc2= 3. > > > > Could someone please help me inspect the issue and provide your > > > > suggestions? > > > > > > > > Sincerely, > > > > Ken Matsui