public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/64362] New: rtl.h:2168:13: error: use of enum 'reg_class' without previous declaration
@ 2014-12-19 14:10 alp at rsu dot ru
  2015-02-10  6:53 ` [Bug other/64362] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: alp at rsu dot ru @ 2014-12-19 14:10 UTC (permalink / raw)
  To: gcc-bugs

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

            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). During
compilation the following error occurs: 

/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/../include 
-I/export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/../libcpp/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 �reg_class� 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 �;� 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 �reg_class� 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 �;� 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 �reg_class� 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 �;� 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 �reg_class� 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 �reg_class� 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 �reg_class� without previous declaration
           enum reg_class);
                ^
/export/home/alp/srcs/oi-userland/components/gcc48/gcc-4.8.4/gcc/rtl.h:2288:31:
error: �FIRST_PSEUDO_REGISTER� was not declared in this scope
   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: �FIRST_PSEUDO_REGISTER� was not declared in this scope
   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 �reg_class� 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: �FIRST_PSEUDO_REGISTER� was not declared in this scope
 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: <gcc-bugs-return-471402-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
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: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
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" <gcc-bugzilla@gcc.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: <bug-63259-4-dTzh3znlFO@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63259-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63259-4@http.gcc.gnu.org/bugzilla/>
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=63259

--- Comment #15 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to thopre01 from comment #14)
> 
> 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 rotation.
> 
> 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?
> 

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:
> > 
> > unsigned int test_0999 (unsigned int a, unsigned int b)
> > {
> >   return (a & 0xFFFF0000) | ((a & 0xFF00) >> 8) | ((a & 0xFF) << 8);
> > }
> > 
> > I was afraid that using a bswap:HI will result in unnecessary code around it:
> > 
> > 
> > 	mov.l	.L6,r0  ! r0 = 0xFFFF0000
> > 	and	r4,r0
> > 	extu.w	r4,r4
> > 	swap.b	r4,r4
> > 	rts
> > 	or	r4,r0
> 
> 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.

> 
> If you have a bswap instruction it seems better to define a pattern for that
> 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 Christmas.

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: <gcc-bugs-return-471403-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
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: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
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" <gcc-bugzilla@gcc.gnu.org>
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: <bug-64362-4-NIPrTrXluh@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64362-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64362-4@http.gcc.gnu.org/bugzilla/>
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?idd362

--- Comment #1 from Alexander Pyhalov <alp at rsu dot ru> ---
Sorry, it seems to be illumos issue.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug other/64362] rtl.h:2168:13: error: use of enum 'reg_class' without previous declaration
  2014-12-19 14:10 [Bug other/64362] New: rtl.h:2168:13: error: use of enum 'reg_class' without previous declaration alp at rsu dot ru
@ 2015-02-10  6:53 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-10  6:53 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Alexander Pyhalov from comment #1)
> Sorry, it seems to be illumos issue.

So closing.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-10  6:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-19 14:10 [Bug other/64362] New: rtl.h:2168:13: error: use of enum 'reg_class' without previous declaration alp at rsu dot ru
2015-02-10  6:53 ` [Bug other/64362] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).