Subject: toolchain/33097: internal compiler error while building pkgsrc/devel/Coin
To: None <toolchain-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Min Sik Kim <minskim@NetBSD.org>
List: netbsd-bugs
Date: 03/18/2006 01:45:00
>Number:         33097
>Category:       toolchain
>Synopsis:       internal compiler error while building pkgsrc/devel/Coin
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 18 01:45:00 +0000 2006
>Originator:     Min Sik Kim
>Release:        NetBSD 3.0_STABLE
>Organization:
>Environment:
System: NetBSD sulley 3.0_STABLE NetBSD 3.0_STABLE (SULLEY) #2: Fri Feb 3 21:06:20 PST 2006
Architecture: i386
Machine: i386
>Description:
Building pkgsrc/devel/Coin on i386 with optimization enabled causes
an internal compiler error.  According to bulk build results, this
error also occurs on -current.
>How-To-Repeat:
The following is the minimal code to reproduce the error.

% cat > pr.cc <<EOF
class A {
public:
  void setOverride(const bool state);
  bool getState(const unsigned int bits);
};

inline bool A::getState(const unsigned int bits) {
  unsigned int flags = 0;
  return (flags & bits) != 0;
}

void A::setOverride(const bool state) {
  if (state != getState(0x80000000)) return;
}
EOF
% g++ -O -c pr.cc
pr.cc: In member function `void A::setOverride(bool)':
pr.cc:8: internal compiler error: in fold_single_bit_test, at fold-const.c:4653
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.netbsd.org/Misc/send-pr.html> for instructions.
%

>Fix: