public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/23944] New: segv in fold_indirect_ref_1 in fold-const.c:11505
@ 2005-09-18 11:41 marcus at jet dot franken dot de
2005-09-18 11:42 ` [Bug c/23944] " marcus at jet dot franken dot de
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: marcus at jet dot franken dot de @ 2005-09-18 11:41 UTC (permalink / raw)
To: gcc-bugs
testcase below (extract from blender) causes a segfault:
LANG=C projects/gcc/BIN/bin/gcc -c constraint.i
constraint.i: In function 'f':
constraint.i:4: internal compiler error: Segmentation fault
gdb shows:
#0 fold_indirect_ref_1 (type=0x2aaaaaea0e70, op0=0x0)
at /home/marcus/projects/gcc/gcc/fold-const.c:11505
11505 STRIP_NOPS (sub);
--
Summary: segv in fold_indirect_ref_1 in fold-const.c:11505
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: marcus at jet dot franken dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23944
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/23944] segv in fold_indirect_ref_1 in fold-const.c:11505
2005-09-18 11:41 [Bug c/23944] New: segv in fold_indirect_ref_1 in fold-const.c:11505 marcus at jet dot franken dot de
@ 2005-09-18 11:42 ` marcus at jet dot franken dot de
2005-09-18 11:55 ` [Bug c/23944] [4.1 Regression] " marcus at jet dot franken dot de
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marcus at jet dot franken dot de @ 2005-09-18 11:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From marcus at jet dot franken dot de 2005-09-18 11:41 -------
Created an attachment (id=9760)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9760&action=view)
constraint.i
gcc -c constraint.i
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23944
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/23944] [4.1 Regression] segv in fold_indirect_ref_1 in fold-const.c:11505
2005-09-18 11:41 [Bug c/23944] New: segv in fold_indirect_ref_1 in fold-const.c:11505 marcus at jet dot franken dot de
2005-09-18 11:42 ` [Bug c/23944] " marcus at jet dot franken dot de
@ 2005-09-18 11:55 ` marcus at jet dot franken dot de
2005-09-18 12:09 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marcus at jet dot franken dot de @ 2005-09-18 11:55 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|segv in fold_indirect_ref_1 |[4.1 Regression] segv in
|in fold-const.c:11505 |fold_indirect_ref_1 in fold-
| |const.c:11505
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23944
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/23944] [4.1 Regression] segv in fold_indirect_ref_1 in fold-const.c:11505
2005-09-18 11:41 [Bug c/23944] New: segv in fold_indirect_ref_1 in fold-const.c:11505 marcus at jet dot franken dot de
` (2 preceding siblings ...)
2005-09-18 12:09 ` rguenth at gcc dot gnu dot org
@ 2005-09-18 12:09 ` rguenth at gcc dot gnu dot org
2005-09-18 12:18 ` [Bug middle-end/23944] " rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-09-18 12:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-18 12:09 -------
The testcase looks like
float f(float src[][4])
{
return *(src[3]);
}
and the C frontend produces
<return_expr 0x40191240
type <void_type 0x4019c8a0 void VOID
align 8 symtab 0 alias set -1
pointer_to_this <pointer_type 0x4019c8fc>>
side-effects
arg 0 <modify_expr 0x40193168
type <real_type 0x4019ca10 float SF
size <integer_cst 0x4018c408 constant invariant 32>
unit size <integer_cst 0x4018c198 constant invariant 4>
align 32 symtab 0 alias set -1 precision 32
pointer_to_this <pointer_type 0x4019cb24>>
side-effects
arg 0 <var_decl 0x40198108 D.1279 type <real_type 0x4019ca10 float>
used ignored SF file /suse/rguenther/src/tests/pr23944.c line 3 size
<integer_cst 0x4018c408 32> unit size <integer_cst 0x4018c198 4>
align 32 context <function_decl 0x4020d100 f>>
arg 1 <array_ref 0x4020ea28 type <real_type 0x4019ca10 float>
arg 0 <indirect_ref 0x40191260 type <array_type 0x4020c398>
>
arg 1 <integer_cst 0x4018c1b0 constant invariant 0>>>
/suse/rguenther/src/tests/pr23944.c:3>
Closer look at the INDIRECT_REF node reveals:
<indirect_ref 0x40191260
type <array_type 0x4020c398
type <real_type 0x4019ca10 float SF
size <integer_cst 0x4018c408 constant invariant 32>
unit size <integer_cst 0x4018c198 constant invariant 4>
align 32 symtab 0 alias set -1 precision 32
pointer_to_this <pointer_type 0x4019cb24>>
BLK
size <integer_cst 0x4018c678 constant invariant 128>
unit size <integer_cst 0x4018c690 constant invariant 16>
align 32 symtab 0 alias set -1
domain <integer_type 0x4020c33c type <integer_type 0x4019c000 unsigned int>
SI size <integer_cst 0x4018c408 32> unit size <integer_cst 0x4018c198 4>
align 32 symtab 0 alias set -1 precision 32 min <integer_cst
0x4018c1b0 0> max <integer_cst 0x4018c378 3>>
pointer_to_this <pointer_type 0x4020c450>>
>
well - there's something missing here. Frontend bug.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23944
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/23944] [4.1 Regression] segv in fold_indirect_ref_1 in fold-const.c:11505
2005-09-18 11:41 [Bug c/23944] New: segv in fold_indirect_ref_1 in fold-const.c:11505 marcus at jet dot franken dot de
2005-09-18 11:42 ` [Bug c/23944] " marcus at jet dot franken dot de
2005-09-18 11:55 ` [Bug c/23944] [4.1 Regression] " marcus at jet dot franken dot de
@ 2005-09-18 12:09 ` rguenth at gcc dot gnu dot org
2005-09-18 12:09 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-09-18 12:09 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-09-18 12:09:23
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23944
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/23944] [4.1 Regression] segv in fold_indirect_ref_1 in fold-const.c:11505
2005-09-18 11:41 [Bug c/23944] New: segv in fold_indirect_ref_1 in fold-const.c:11505 marcus at jet dot franken dot de
` (3 preceding siblings ...)
2005-09-18 12:09 ` rguenth at gcc dot gnu dot org
@ 2005-09-18 12:18 ` rguenth at gcc dot gnu dot org
2005-09-18 12:24 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-09-18 12:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-18 12:17 -------
But this one builds the corrupt node:
#0 build1_stat (code=INDIRECT_REF, type=0x4020c398, node=0x0,
_loc_name=0x86dbfd0 "../../../src/gcc-unpatched/gcc/gimplify.c",
_loc_line=2955, _loc_function=0x86dc518 "fold_indirect_ref_rhs")
at tree.c:2705
#1 0x0811b85c in fold_indirect_ref_rhs (t=0x40191200) at gimplify.c:2955
#2 0x0811baaf in gimplify_modify_expr_rhs (expr_p=0xbff365a0,
from_p=0x40193188, to_p=0x40193184, pre_p=0xbff362c4, post_p=0xbff362c0,
want_value=0 '\0') at gimplify.c:2988
I'll look at this.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Component|c |middle-end
Last reconfirmed|2005-09-18 12:09:23 |2005-09-18 12:17:53
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23944
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/23944] [4.1 Regression] segv in fold_indirect_ref_1 in fold-const.c:11505
2005-09-18 11:41 [Bug c/23944] New: segv in fold_indirect_ref_1 in fold-const.c:11505 marcus at jet dot franken dot de
` (4 preceding siblings ...)
2005-09-18 12:18 ` [Bug middle-end/23944] " rguenth at gcc dot gnu dot org
@ 2005-09-18 12:24 ` rguenth at gcc dot gnu dot org
2005-09-18 14:15 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-09-18 12:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-18 12:24 -------
I have a patch for which after gimplification we end up with
f (src)
{
float D.1279;
float[4] * D.1280;
D.1280 = src + 48B;
D.1279 = (*D.1280)[0];
return D.1279;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23944
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/23944] [4.1 Regression] segv in fold_indirect_ref_1 in fold-const.c:11505
2005-09-18 11:41 [Bug c/23944] New: segv in fold_indirect_ref_1 in fold-const.c:11505 marcus at jet dot franken dot de
` (5 preceding siblings ...)
2005-09-18 12:24 ` rguenth at gcc dot gnu dot org
@ 2005-09-18 14:15 ` cvs-commit at gcc dot gnu dot org
2005-09-18 14:17 ` rguenth at gcc dot gnu dot org
2005-09-18 14:36 ` rguenth at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-18 14:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-18 14:15 -------
Subject: Bug 23944
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: rguenth@gcc.gnu.org 2005-09-18 14:15:20
Modified files:
gcc : ChangeLog gimplify.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.c-torture/compile: pr23944.c
Log message:
2005-09-18 Richard Guenther <rguenther@suse.de>
PR middle-end/23944
* gimplify.c (fold_indirect_ref_rhs): Fix thinko in
fallback.
* gcc.c-torture/compile/pr23944.c: New testcase.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9973&r2=2.9974
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gimplify.c.diff?cvsroot=gcc&r1=2.152&r2=2.153
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6076&r2=1.6077
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr23944.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23944
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/23944] [4.1 Regression] segv in fold_indirect_ref_1 in fold-const.c:11505
2005-09-18 11:41 [Bug c/23944] New: segv in fold_indirect_ref_1 in fold-const.c:11505 marcus at jet dot franken dot de
` (6 preceding siblings ...)
2005-09-18 14:15 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-18 14:17 ` rguenth at gcc dot gnu dot org
2005-09-18 14:36 ` rguenth at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-09-18 14:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-18 14:16 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23944
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/23944] [4.1 Regression] segv in fold_indirect_ref_1 in fold-const.c:11505
2005-09-18 11:41 [Bug c/23944] New: segv in fold_indirect_ref_1 in fold-const.c:11505 marcus at jet dot franken dot de
` (7 preceding siblings ...)
2005-09-18 14:17 ` rguenth at gcc dot gnu dot org
@ 2005-09-18 14:36 ` rguenth at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-09-18 14:36 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23944
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-09-18 14:36 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-18 11:41 [Bug c/23944] New: segv in fold_indirect_ref_1 in fold-const.c:11505 marcus at jet dot franken dot de
2005-09-18 11:42 ` [Bug c/23944] " marcus at jet dot franken dot de
2005-09-18 11:55 ` [Bug c/23944] [4.1 Regression] " marcus at jet dot franken dot de
2005-09-18 12:09 ` rguenth at gcc dot gnu dot org
2005-09-18 12:09 ` rguenth at gcc dot gnu dot org
2005-09-18 12:18 ` [Bug middle-end/23944] " rguenth at gcc dot gnu dot org
2005-09-18 12:24 ` rguenth at gcc dot gnu dot org
2005-09-18 14:15 ` cvs-commit at gcc dot gnu dot org
2005-09-18 14:17 ` rguenth at gcc dot gnu dot org
2005-09-18 14:36 ` rguenth at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).