Consider the following test case (t.c): -------------------------------- struct tree_common { int code; }; union tree_node { struct tree_common common; }; typedef union tree_node *tree; extern tree test (tree, int, int); extern tree foo (void); extern void abort (void) __attribute__ ((__noreturn__)); tree test (tree expr, int t, int D17630) { int __i; L0: if (expr->common.code != 142) goto L23; else goto L2; L2: __i = 0; goto L10; L10: __i = __i + 1; if (D17630 != __i) goto L8; else goto L19; L8: if (t) goto L15; else goto L10; L15: expr = foo (); if (expr->common.code != 142) goto L23; else goto L0; L19: abort (); L23: return expr; } -------------------------------- $ ./cc1 -quiet -O3 -dG --param max-cse-path-length=1 -fdump-tree-vars t.c $ grep "Bypass edge" t.c.07.bypass Bypass edge from 5->1 to 2 # ./cc1 --version GNU C version 4.1.0 20050506 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.1.0 20050506 (experimental). GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
-- Summary: Missed jump threading opportunity on trees Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: missed-optimization, TREE Severity: normal Priority: P2 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: steven at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org,law at redhat dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21417