bootstrap/7389: bad declaration of flow_bb_inside_loop_p
snyder@fnal.gov
snyder@fnal.gov
Wed Jul 24 04:12:00 GMT 2002
>Number: 7389
>Category: bootstrap
>Synopsis: bad declaration of flow_bb_inside_loop_p
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 23 21:16:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:
>Release: 3.2 20020718 (experimental)
>Organization:
>Environment:
System: OSF1 d0ola.fnal.gov V5.1 732 alpha
Machine: alpha
host: alpha-dec-osf5.1
build: alpha-dec-osf5.1
target: alpha-dec-osf5.1
configured with: ../gcc/configure --prefix=/scratch/snyder/gcc/inst --enable-languages=c,c++,f77 --enable-threads=posix --enable-long-long
>Description:
When i try to bootstrap the current cvs version of gcc on tru64 (5.1),
i get this error:
cc: Error: ../../gcc/gcc/cfgloop.c, line 956: In the definition of the function "flow_bb_inside_loop_p", the promoted type of bb is incompatible with the type of the corresponding parameter in a prior declaration. (promotmatch)
const basic_block bb;
The configuration was as shown above.
The C compiler version is
Compaq C V6.3-029 on Compaq Tru64 UNIX V5.1 (Rev. 732)
Compiler Driver V6.3-029 (sys) cc Driver
Indeed, the declaration in basic_block.h is
extern bool flow_bb_inside_loop_p PARAMS ((const struct loop *, basic_block));
and the definition in cfgloop.c is
bool
flow_bb_inside_loop_p (loop, bb)
const struct loop *loop;
const basic_block bb;
{
So there's a constness difference in the second argument.
Adding a const to the prototype fixes the problem (patch below).
>How-To-Repeat:
See above.
>Fix:
2002-07-23 scott snyder <snyder@fnal.gov>
* basic-block.h: Add `const' to the second argument of
flow_bb_inside_loop_p.
Index: basic-block.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/basic-block.h,v
retrieving revision 1.156
diff -u -c -r1.156 basic-block.h
*** basic-block.h 15 Jul 2002 14:07:05 -0000 1.156
--- basic-block.h 23 Jul 2002 22:16:51 -0000
***************
*** 722,728 ****
extern void verify_flow_info PARAMS ((void));
extern bool flow_loop_outside_edge_p PARAMS ((const struct loop *, edge));
extern bool flow_loop_nested_p PARAMS ((const struct loop *, const struct loop *));
! extern bool flow_bb_inside_loop_p PARAMS ((const struct loop *, basic_block));
extern basic_block *get_loop_body PARAMS ((const struct loop *));
extern int dfs_enumerate_from PARAMS ((basic_block, int,
bool (*)(basic_block, void *),
--- 722,728 ----
extern void verify_flow_info PARAMS ((void));
extern bool flow_loop_outside_edge_p PARAMS ((const struct loop *, edge));
extern bool flow_loop_nested_p PARAMS ((const struct loop *, const struct loop *));
! extern bool flow_bb_inside_loop_p PARAMS ((const struct loop *, const basic_block));
extern basic_block *get_loop_body PARAMS ((const struct loop *));
extern int dfs_enumerate_from PARAMS ((basic_block, int,
bool (*)(basic_block, void *),
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list