Bug 13815 - [3.4/4.0 Regression] ICE in loc_descriptor_from_tree
Summary: [3.4/4.0 Regression] ICE in loc_descriptor_from_tree
Status: RESOLVED DUPLICATE of bug 12934
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-01-22 17:22 UTC by Jakub Jelinek
Modified: 2004-09-13 14:15 UTC (History)
2 users (show)

See Also:
Host:
Target: i386-redhat-linux
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-01-22 17:28:11


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2004-01-22 17:22:18 UTC
--- gcc/testsuite/gcc.dg/debug/debug-7.c 2003-09-15 15:40:47.000000000 +0200
+++ gcc/testsuite/gcc.dg/debug/debug-7.c 2004-01-22 18:18:12.000000000 +0100
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-dA" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+static inline size_t foo (int n)
+{
+  return (n + sizeof (int) * 8 - 1) / (sizeof (int) * 8);
+}
+
+void bar (int, int *);
+
+void baz (int n)
+{
+  int a[foo (n)];
+  bar (n, a);
+}

causes ICE (e.g. at -Os -g, -O1 -g, -O2 -g).
The problem is that EXPR_WITH_FILE_LOCATION (STMT_EXPR ()) is passed to
loc_descriptor_from_tree whcih doesn't handle statement expressions and/or
inline functions and aborts.
Comment 1 Jakub Jelinek 2004-01-22 17:24:18 UTC
This is a regression from GCC 3.3.x (where the debug info was not complete
but at least it did not ICE), the testcase is distilled from Linux kernel.
Comment 2 Andrew Pinski 2004-01-22 17:28:10 UTC
Confirmed, a regression.
From Phil's regression hunter: Search converges between 2003-02-28-trunk (#233) and 2003-03
-01-trunk (#234).
Comment 3 Wolfgang Bangerth 2004-01-22 17:29:59 UTC
Confirmed. It is indeed a regression. 
W. 
Comment 4 Andrew Pinski 2004-01-24 05:41:37 UTC
This is a dup of bug 12934 which has a shorter testcase which fails now.

*** This bug has been marked as a duplicate of 12934 ***