Subject: toolchain/24422: Build failure - fortran
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <john@johnrshannon.com>
List: netbsd-bugs
Date: 02/14/2004 05:44:03
>Number: 24422
>Category: toolchain
>Synopsis: ./build.sh build fails because of undefined symbol in f77 compiler
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Feb 14 12:45:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: John R. Shannon
>Release: NetBSD 1.6ZJ
>Organization:
johnrshannon.com
>Environment:
System: NetBSD colleen.internal.johnrshannon.com 1.6ZJ NetBSD 1.6ZJ (KERNEL) #0: Sat Feb 14 02:54:12 MST 2004 root@colleen.internal.johnrshann
on.com:/usr/obj/usr/src/sys/arch/i386/compile/KERNEL i386
Architecture: i386
Machine: i386
>Description:
From gcc Changelog:
2002-09-19 Roger Sayle <roger@eyesopen.com>
* tree.c (integer_nonzerop): New predicate for nonzero integers.
* tree.h (integer_nonzerop): Add function prototype.
This predicate is referenced in f77 but not defined.
>How-To-Repeat:
./build.sh build or ./build.sh tools
>Fix:
in src/gnu/dist/gcc/gcc:
--- tree.h.orig 2003-10-18 05:06:15.000000000 -0600
+++ tree.h
@@ -2637,6 +2637,11 @@ extern int integer_all_onesp PARAMS ((t
extern int integer_pow2p PARAMS ((tree));
+/* integer_nonzerop (tree x) is nonzero if X is an integer constant
+ with a nonzero value. */
+
+extern int integer_nonzerop (tree);
+
/* staticp (tree x) is nonzero if X is a reference to data allocated
at a fixed address in memory. */
--- tree.c.orig 2003-10-18 05:06:13.000000000 -0600
+++ tree.c
@@ -723,6 +723,23 @@ integer_pow2p (expr)
|| (low == 0 && (high & (high - 1)) == 0));
}
+/* Return 1 if EXPR is an integer constant other than zero or a
+ complex constant other than zero. */
+
+int
+integer_nonzerop (tree expr)
+{
+ STRIP_NOPS (expr);
+
+ return ((TREE_CODE (expr) == INTEGER_CST
+ && ! TREE_CONSTANT_OVERFLOW (expr)
+ && (TREE_INT_CST_LOW (expr) != 0
+ || TREE_INT_CST_HIGH (expr) != 0))
+ || (TREE_CODE (expr) == COMPLEX_CST
+ && (integer_nonzerop (TREE_REALPART (expr))
+ || integer_nonzerop (TREE_IMAGPART (expr)))));
+}
+
/* Return the power of two represented by a tree node known to be a
power of two. */
>Release-Note:
>Audit-Trail:
>Unformatted: