public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: snyder@fnal.gov
To: gcc-gnats@gcc.gnu.org
Subject: bootstrap/7389: bad declaration of flow_bb_inside_loop_p
Date: Tue, 23 Jul 2002 21:16:00 -0000	[thread overview]
Message-ID: <200207240411.g6O4BDT11200@karma.fnal.gov> (raw)


>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:


             reply	other threads:[~2002-07-24  4:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-23 21:16 snyder [this message]
2003-02-22 22:13 ebotcazou
2003-03-02  1:17 sayle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200207240411.g6O4BDT11200@karma.fnal.gov \
    --to=snyder@fnal.gov \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).