Bug 36986
| Summary: | Tree check error in gcc | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Mikulas Patocka <mikulas> |
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.1 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| 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: | --- | Target Upstream Version: | |
| Embargoed: | |||
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. 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
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. |
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.)