From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24831 invoked by alias); 19 Dec 2014 14:10:20 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24423 invoked by uid 48); 19 Dec 2014 14:10:08 -0000 From: "alp at rsu dot ru" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/64362] New: rtl.h:2168:13: error: use of enum 'reg_class' without previous declaration Date: Fri, 19 Dec 2014 14:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 4.8.4 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: alp at rsu dot ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-12/txt/msg02408.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64362 Bug ID: 64362 Summary: rtl.h:2168:13: error: use of enum 'reg_class' without previous declaration Product: gcc Version: 4.8.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: alp at rsu dot ru Can't compile gcc 4.8.4 with gcc 4.8.3 on illumos (OpenIndiana Hipster). Du= ring compilation the following error occurs:=20 /usr/gcc/4.8/bin/g++ -c -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc -I/export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/build -I/export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/../inclu= de=20 -I/export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/../libcp= p/include \ -o build/genflags.o /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/genflags.c In file included from /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/genflags.c= :27:0: /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/rtl.h:2168= :13: error: use of enum =EF=BF=BDreg_class=EF=BF=BD without previous declaration extern enum reg_class reg_preferred_class (int); ^ /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/rtl.h:2168= :48: error: invalid type in declaration before =EF=BF=BD;=EF=BF=BD token extern enum reg_class reg_preferred_class (int); ^ /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/rtl.h:2169= :13: error: use of enum =EF=BF=BDreg_class=EF=BF=BD without previous declaration extern enum reg_class reg_alternate_class (int); ^ /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/rtl.h:2169= :48: error: invalid type in declaration before =EF=BF=BD;=EF=BF=BD token extern enum reg_class reg_alternate_class (int); ^ /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/rtl.h:2170= :13: error: use of enum =EF=BF=BDreg_class=EF=BF=BD without previous declaration extern enum reg_class reg_allocno_class (int); ^ /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/rtl.h:2170= :46: error: invalid type in declaration before =EF=BF=BD;=EF=BF=BD token extern enum reg_class reg_allocno_class (int); ^ /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/rtl.h:2171= :42: error: use of enum =EF=BF=BDreg_class=EF=BF=BD without previous declaration extern void setup_reg_classes (int, enum reg_class, enum reg_class, ^ /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/rtl.h:2171= :58: error: use of enum =EF=BF=BDreg_class=EF=BF=BD without previous declaration extern void setup_reg_classes (int, enum reg_class, enum reg_class, ^ /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/rtl.h:2172= :16: error: use of enum =EF=BF=BDreg_class=EF=BF=BD without previous declaration enum reg_class); ^ /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/rtl.h:2288= :31: error: =EF=BF=BDFIRST_PSEUDO_REGISTER=EF=BF=BD was not declared in this sco= pe rtx x_initial_regno_reg_rtx[FIRST_PSEUDO_REGISTER]; ^ /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/rtl.h:2295= :31: error: =EF=BF=BDFIRST_PSEUDO_REGISTER=EF=BF=BD was not declared in this sco= pe rtx x_static_reg_base_value[FIRST_PSEUDO_REGISTER]; ^ /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/rtl.h:2668= :55: error: use of enum =EF=BF=BDreg_class=EF=BF=BD without previous declaration extern bool invalid_mode_change_p (unsigned int, enum reg_class); ^ /export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/rtl.h:2795= :38: error: =EF=BF=BDFIRST_PSEUDO_REGISTER=EF=BF=BD was not declared in this sco= pe extern tree GTY(()) global_regs_decl[FIRST_PSEUDO_REGISTER]; ^ make[4]: *** [build/genflags.o] Error 1 make[4]: Leaving directory `/export/home/alp/srcs/oi-userland/components/gcc48/build/i86/gcc' make[3]: *** [all-stage1-gcc] Error 2 make[3]: Leaving directory `/export/home/alp/srcs/oi-userland/components/gcc48/build/i86' make[2]: *** [stage1-bubble] Error 2 make[2]: Leaving directory `/export/home/alp/srcs/oi-userland/components/gcc48/build/i86' make[1]: *** [all] Error 2 make[1]: Leaving directory `/export/home/alp/srcs/oi-userland/components/gcc48/build/i86' >>From gcc-bugs-return-471402-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Dec 19 14:13:13 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 29131 invoked by alias); 19 Dec 2014 14:13:13 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 29038 invoked by uid 48); 19 Dec 2014 14:13:07 -0000 From: "olegendo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/63259] Detecting byteswap sequence Date: Fri, 19 Dec 2014 14:13:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: olegendo at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: thopre01 at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-12/txt/msg02409.txt.bz2 Content-length: 2090 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63259 --- Comment #15 from Oleg Endo --- (In reply to thopre01 from comment #14) >=20 > It's rather the contrary. The bswap pass will replace the statements by a= 8 > bit rotation if the value is 16bit and the expander will choose a bswaphi > pattern for that if the backend has one, otherwise it will keep the rotat= ion. >=20 > The problem is that currently the bswap pass still bails out if there is = no > 16 bit bswap available. I shall fix that. Ah, I see. > You mean with the added bswaphi2 pattern the pattern is still unchanged? >=20 After adding bswaphi2, the bswap pass does the transformation. Except for = the non-working 'signed short' mentioned above. But we already figured that out earlier. > > On SH the bswap:HI HW insn actually doesn't modify the upper 16 bit of = the > > 32 bit register. What it does is: > >=20 > > unsigned int test_0999 (unsigned int a, unsigned int b) > > { > > return (a & 0xFFFF0000) | ((a & 0xFF00) >> 8) | ((a & 0xFF) << 8); > > } > >=20 > > I was afraid that using a bswap:HI will result in unnecessary code arou= nd it: > >=20 > >=20 > > mov.l .L6,r0 ! r0 =3D 0xFFFF0000 > > and r4,r0 > > extu.w r4,r4 > > swap.b r4,r4 > > rts > > or r4,r0 >=20 > Looks good to me, what exactly is the problem? The expected sequence for the function above is: rts swap.b r4,r0 i.e. no anding and oring of lower/higher 16 bit word, since the swap.b insn operates on a SImode value and does not alter the high 16 bits. >=20 > If you have a bswap instruction it seems better to define a pattern for t= hat > which the expander will use. That's the job of the bswap pass to detect a > bswap, it shouldn't be done by combine. The combine parts I was talking about are to eliminate the anding and oring= of higher 16 bits when a 16 bit byte swap is done on a 32 bit value. > > Ok so the limit ought to be increased and the check for bswaphi removed. > I'll take a stab at that but that will probably make it only after Christ= mas. No problem. >>From gcc-bugs-return-471403-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Dec 19 14:25:14 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 2622 invoked by alias); 19 Dec 2014 14:25:13 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 2585 invoked by uid 48); 19 Dec 2014 14:25:08 -0000 From: "alp at rsu dot ru" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/64362] rtl.h:2168:13: error: use of enum 'reg_class' without previous declaration Date: Fri, 19 Dec 2014 14:25:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 4.8.4 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: alp at rsu dot ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-12/txt/msg02410.txt.bz2 Content-length: 152 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64362 --- Comment #1 from Alexander Pyhalov --- Sorry, it seems to be illumos issue.