Bug 36986 - Tree check error in gcc
Summary: Tree check error in gcc
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.1
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-04-21 15:11 UTC by Mikulas Patocka
Modified: 2007-04-18 16:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-25 16:45:13 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2001:082 high SHIPPED_LIVE New version of GCC 2.96-RH available fixing several bugs 2001-06-14 04:00:00 UTC

Description Mikulas Patocka 2001-04-21 15:11:59 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.16 i586; Nav)


When passing bogus parameters to inline function, gcc 2.96-80 reports
internal 'tree check' error.

Reproducible: Always
Steps to Reproduce:
1. Create file bug.c:
__inline__ g(int x)
{
}

f()
{
        g(blablabla);
}

2. Compile it gcc -O bug.c

Actual Results:  compiler output:
bug.c: In function `f':
bug.c:7: `blablabla' undeclared (first use in this function)
bug.c:7: (Each undeclared identifier is reported only once
bug.c:7: for each function it appears in.)
bug.c:7: Tree check: expected class 't', have 'x' (error_mark)
bug.c:7: confused by earlier errors, bailing out

Expected Results:  expected output:
bug.c: In function `f':
bug.c:7: `blablabla' undeclared (first use in this function)
bug.c:7: (Each undeclared identifier is reported only once
bug.c:7: for each function it appears in.)

Comment 1 Jakub Jelinek 2001-04-24 16:26:36 UTC
Are you sure this is gcc-2.96-80? None of 2.96-40+ rpms are built with
tree checking, so they cannot generate such ICE.
Anyway, I cannot reproduce it even with --enable-checking=tree compiler,
neither in 2.96-8x, nor on gcc-3_0-branch, nor on gcc HEAD.

Comment 2 Mikulas Patocka 2001-04-24 22:07:41 UTC
It's not original RPM. I actually brought gcc 2.96-80 SRPM to redhat 7.1 system,
applied patches with rpm -bp, copied the tree to my own machine and compiled it
with ./configure, make, make install. That's because I do not want to completely
overwrite my partition with redhat 7.1 installation. The only option I gave to
./configure was --disable-nls. I compiled gcc-2.96-80 with itself, given flags
-O2 (or -O3, I don't remember) -mpentium -fomit-frame-pointer
-mpreferred-stack-boundary=2.

BTW. tree checking is default setting.
cd /usr/src/gcc-2.96-80/gcc
./configure --help
  --enable-checking[=LIST]
                          enable expensive run-time checks.  With LIST,
                          enable only specific categories of checks.
                          Categories are: misc,tree,rtl,gc,gcac; default
                          is misc,tree,gc

BTW2:

I tried 20010423 snapshot compiled with --enable-checking=misc,tree,rtl,gc,gcac.
Under the same conditions (function is inline, optimization used) it writes
"blablabla undeclared; confised by earlier errors, bailing out", but no "tree
check". Without inline function, it reports "blablabla undeclared" error and
goes on.


Mikulas


Comment 3 Jakub Jelinek 2001-04-25 16:45:09 UTC
Oh, I see it in gcc HEAD.
Should be fixed by http://gcc.gnu.org/ml/gcc-patches/2001-04/msg01207.html
and I'll include the patch into 2.96-82.


Note You need to log in before you can comment on or make changes to this bug.