User account creation filtered due to spam.

Bug 14492 - [3.4 Regression] loc_descriptor_from_tree, in dwarf2out.c:9031
Summary: [3.4 Regression] loc_descriptor_from_tree, in dwarf2out.c:9031
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 3.4.3
Assignee: Richard Henderson
URL:
Keywords: ice-checking, ice-on-valid-code
: 14900 17572 20572 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-08 21:01 UTC by Martin Krischik
Modified: 2005-03-20 23:43 UTC (History)
6 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work: 4.0.0
Known to fail: 3.4.1
Last reconfirmed: 2004-09-20 20:54:24


Attachments
Tar with all sources, cmopiler output and project files. (45.04 KB, application/octet-stream)
2004-03-09 08:36 UTC, Martin Krischik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Krischik 2004-03-08 21:01:35 UTC
gnat compile -PAdaCL -Xbc=/opt/ada/include/bc -Xtarget=Linux -vP0 -C
-Xstyle=Debug adacl-astro-planet-cgi.adb
gcc -c -g -gnatf -gnatU -gnatwa -gnatq -gnatQ -gnati1 -gnatT4 -gnata -gnato
-gnatVcdfimorst -g -I- -gnatA
/work/sf.martin/adacl/Include//adacl-astro-planet-cgi.adb

+===========================GNAT BUG DETECTED==============================+
| 3.5.0 20040308 (experimental) (i686-pc-linux-gnu) GCC error:             |
| in loc_descriptor_from_tree, bei dwarf2out.c:9031                        |
| Error detected at adacl-astro-planet-cgi.adb:185:9                       |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact gcc or gnatmake command that you entered.              |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.

/work/sf.martin/adacl/Include//adacl-astro-planet-cgi.adb
/work/sf.martin/adacl/Include//adacl-astro-planet-cgi.ads
/work/sf.martin/adacl/Include//adacl-astro-planet.ads
/work/sf.martin/adacl/Include//adacl-astro.ads
/work/sf.martin/adacl/Include//adacl.ads
/opt/ada/include/xmlada/unicode.ads
/opt/ada/include/xmlada/unicode-names.ads
/opt/ada/include/xmlada/unicode-names-basic_latin.ads
/opt/ada/include/xmlada/unicode-names-miscellaneous_symbols.ads
/opt/ada/include/xmlada/unicode-names-greek.ads
/work/sf.martin/adacl/Include//adacl-astro-tierzeichen.ads
/work/sf.martin/adacl/Include//adacl-cgi.ads
/work/sf.martin/adacl/Include//adacl-cgi-abstract_data.ads
/work/sf.martin/adacl/Include//adacl-astro-planet-list.ads
/opt/ada/include/bc//bc.ads
/work/sf.martin/adacl/Include//bc-indefinite_containers.ads
/work/sf.martin/adacl/Include//bc-indefinite_containers-collections.ads
/work/sf.martin/adacl/Include//bc-indefinite_containers-collections-unbounded.ads
/opt/ada/include/bc//bc-support.ads
/work/sf.martin/adacl/Include//bc-support-indefinite_unbounded.ads
/work/sf.martin/adacl/Include//bc-support-indefinite_reference.ads
/work/sf.martin/adacl/Include//adacl-gc.ads
/work/sf.martin/adacl/Include//adacl-gc-managed.ads
/work/sf.martin/adacl/Include//adacl-astro-planet-collection.ads
/work/sf.martin/adacl/Include//adacl-astro-planet-container.ads
/work/sf.martin/adacl/Include//adacl-gc-managed_controlled.ads
/work/sf.martin/adacl/Include//adacl-sar.ads
/work/sf.martin/adacl/Include//adacl-sar-filter.ads
/work/sf.martin/adacl/Include//adacl-base.ads
/work/sf.martin/adacl/Include//adacl-sar-line.ads
/work/sf.martin/adacl/Include//adacl-sar-line-list.ads
/opt/ada/include/bc//bc-containers.ads
/opt/ada/include/bc//bc-containers-collections.ads
/opt/ada/include/bc//bc-containers-collections-unbounded.ads
/opt/ada/include/bc//bc-support-unbounded.ads
/work/sf.martin/adacl/Include//adacl-sar-line-collection.ads
/work/sf.martin/adacl/Include//adacl-sar-line-container.ads
/work/sf.martin/adacl/Include//adacl-sar-filter-list.ads
/work/sf.martin/adacl/Include//adacl-sar-filter-collection.ads
/work/sf.martin/adacl/Include//adacl-sar-filter-container.ads
/work/sf.martin/adacl/Include//adacl-sar-filter-replace.ads
/work/sf.martin/adacl/Include//adacl-cgi-abstract_data.adb
/work/sf.martin/adacl/Include//bc-indefinite_containers.adb

Well, it's quite a lot of files in different directories so I will only tar them
up if you realy want them

The compiler used is a cvs snapshot from this weekend. configuration used is:

../gcc/configure --prefix=/opt/ada --enable-libada --enable-shared 
--enable-languages=ada,c

The error only apears with the debug compile, not with release.

Thank you

Martin
Comment 1 Andrew Pinski 2004-03-08 21:46:47 UTC
/* Otherwise this is a generic code; we should just lists all of
   these explicitly.  Aborting means we forgot one.  */
Comment 2 Arnaud Charlet 2004-03-08 22:44:12 UTC
Yes, sources are needed to investigate such failures (or at the very
least a gdb session on gnat1 with a few appropriate prints).

This is a general dwarf2 bug, not an Ada bug, so recategorizing and
putting on hold waiting for the sources.

Arno
Comment 3 Martin Krischik 2004-03-09 08:36:22 UTC
Created attachment 5889 [details]
Tar with all sources, cmopiler output and project files.

I used "make -k" - the problems appears with 2 files.
I added both lists of files.
For 20 odd files tar seemd more appropiate.
Comment 4 Martin Krischik 2004-03-09 08:39:11 UTC
I have added the requested sources.
Comment 5 shalla 2004-04-09 14:50:05 UTC
I have a nearly identical dwarf2 bug in C/C++, and a trivial test case. Here:

///////////////////////////////////
int main() {
  double d = 1.0;
  char x[(int) d];
  return 0;
}
///////////////////////////////////

g++34 -g ice.bug.c
ice.bug.c: In function `int main()':
ice.bug.c:5: internal compiler error: in loc_descriptor_from_tree, at
dwarf2out.c:8863
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Of course, if I leave the -g off, it compiles and executes properly.

I am using the prerelease snapshot of 3.4.0. on i686-pc-linux-gnu as well.
Comment 6 Andrew Pinski 2004-04-09 15:01:29 UTC
Since I do not have an Ada compiler on any machine that has dwarf2 support could someone run in this 
in the debuger and see what the debug_tree(loc) prints out.

Also the shalla's testcase is filed under 149000.
Comment 7 Mark Mitchell 2004-05-31 22:08:31 UTC
Jason, Paul --

Jason, you're the DWARF2 maintainer.

Paul, IIRC, you fixed some bugs in this area on the csl-arm-branch.  Does one of
those fix this bug?  If so, would you please ask Jason to approve it for 3.4.1?
 If not, please let Jason know that your patches don't help.

Thanks,

-- Mark
Comment 8 Paul Brook 2004-06-01 20:58:14 UTC
My changes in this area are already on the 3.4 branch. I added 
EXPR_WITH_FILE_LOCATION to fix PR12943 
 
Paul 
 
Comment 9 Mark Mitchell 2004-06-18 23:58:17 UTC
Postponed until GCC 3.4.2.
Comment 11 CVS Commits 2004-08-24 02:10:19 UTC
Subject: Bug 14492

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-08-24 02:10:12

Modified files:
	gcc            : ChangeLog dwarf2out.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg/debug: crash1.c 

Log message:
	PR c/14492
	* dwarf2out.c (loc_descriptor_from_tree): Robustify.
	
	PR c/14492
	* gcc.dg/debug/crash1.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5047&r2=2.5048
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&r1=1.541&r2=1.542
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4176&r2=1.4177
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/crash1.c.diff?cvsroot=gcc&r1=1.1&r2=1.2

Comment 12 Mark Mitchell 2004-08-24 02:18:33 UTC
Fixed in GCC 3.4.2 -- by not outputting the array bound.

Fixed better in GCC 3.5.0.
Comment 13 Mark Mitchell 2004-08-24 02:21:42 UTC
*** Bug 14900 has been marked as a duplicate of this bug. ***
Comment 14 Eric Botcazou 2004-08-31 11:58:09 UTC
Just to make it clear that the problem is not really fixed on the 3.4 branch,
merely swept under the rug.  An --enable-checking build will have 6 failures:

FAIL: gcc.dg/debug/crash1.c -gdwarf-2 (test for excess errors)
FAIL: gcc.dg/debug/crash1.c -gdwarf-2 -O (test for excess errors)
FAIL: gcc.dg/debug/crash1.c -gdwarf-2 -O3 (test for excess errors)
FAIL: gcc.dg/debug/crash1.c -gdwarf-23 (test for excess errors)
FAIL: gcc.dg/debug/crash1.c -gdwarf-23 -O (test for excess errors)
FAIL: gcc.dg/debug/crash1.c -gdwarf-23 -O3 (test for excess errors)
Comment 15 Andrew Pinski 2004-09-20 20:46:32 UTC
Reopening because it is still a problem with checking turned on.  It also only effects 3.4.x
Comment 16 Andrew Pinski 2004-09-20 20:47:15 UTC
*** Bug 17572 has been marked as a duplicate of this bug. ***
Comment 17 Andrew Pinski 2004-09-20 20:54:24 UTC
Confirmed.
Comment 18 Richard Henderson 2004-10-14 21:38:33 UTC
We're just missing some case entries in loc_descriptor_from_tree.
Comment 19 CVS Commits 2004-10-14 23:28:03 UTC
Subject: Bug 14492

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	rth@gcc.gnu.org	2004-10-14 23:27:57

Modified files:
	gcc            : ChangeLog dwarf2out.c 

Log message:
	PR debug/14492
	* dwarf2out.c (loc_descriptor_from_tree): Handle FIX_*_EXPR.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.662&r2=2.2326.2.663
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.478.2.12&r2=1.478.2.13

Comment 20 CVS Commits 2004-10-14 23:30:24 UTC
Subject: Bug 14492

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2004-10-14 23:30:21

Modified files:
	gcc            : ChangeLog dwarf2out.c 

Log message:
	PR debug/14492
	* dwarf2out.c (loc_descriptor_from_tree): Handle FIX_*_EXPR.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5890&r2=2.5891
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&r1=1.555&r2=1.556

Comment 21 Richard Henderson 2004-10-14 23:31:19 UTC
Fixed.
Comment 22 Andrew Pinski 2005-03-20 23:43:40 UTC
*** Bug 20572 has been marked as a duplicate of this bug. ***