public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/39360] New: tree-dsa leads to an ICE
@ 2009-03-04 14:35 linuxl4 at sohu dot com
2009-03-04 14:36 ` [Bug middle-end/39360] " linuxl4 at sohu dot com
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: linuxl4 at sohu dot com @ 2009-03-04 14:35 UTC (permalink / raw)
To: gcc-bugs
[~]gcc -v
gcc version 4.4.0 20090304 (experimental) (GCC)
[~]gcc -O2 -c patch_realtek.c
sound/pci/hda/patch_realtek.c: In function 'patch_alc861vd':
sound/pci/hda/patch_realtek.c:14747: internal compiler error: in
referenced_var_lookup, at tree-dfa.c:563
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: tree-dsa leads to an ICE
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: linuxl4 at sohu dot com
GCC build triplet: x86_64-pc-linux-gnu
GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] tree-dsa leads to an ICE
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
@ 2009-03-04 14:36 ` linuxl4 at sohu dot com
2009-03-04 15:03 ` rguenth at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: linuxl4 at sohu dot com @ 2009-03-04 14:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from linuxl4 at sohu dot com 2009-03-04 14:36 -------
Created an attachment (id=17393)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17393&action=view)
the preprocessed source
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] tree-dsa leads to an ICE
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
2009-03-04 14:36 ` [Bug middle-end/39360] " linuxl4 at sohu dot com
@ 2009-03-04 15:03 ` rguenth at gcc dot gnu dot org
2009-03-04 15:16 ` [Bug middle-end/39360] [4.4 Regression] " hjl dot tools at gmail dot com
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-03-04 15:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2009-03-04 15:03 -------
Reducing.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|tree-dsa leads to an ICE |tree-dsa leads to an ICE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] [4.4 Regression] tree-dsa leads to an ICE
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
2009-03-04 14:36 ` [Bug middle-end/39360] " linuxl4 at sohu dot com
2009-03-04 15:03 ` rguenth at gcc dot gnu dot org
@ 2009-03-04 15:16 ` hjl dot tools at gmail dot com
2009-03-04 15:21 ` [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563 rguenth at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-03-04 15:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hjl dot tools at gmail dot com 2009-03-04 15:16 -------
It is most likely caused by revision 144497:
http://gcc.gnu.org/ml/gcc-cvs/2009-02/msg00665.html
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jh at suse dot cz
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-03-04 15:16:02
date| |
Summary|tree-dsa leads to an ICE |[4.4 Regression] tree-dsa
| |leads to an ICE
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
` (2 preceding siblings ...)
2009-03-04 15:16 ` [Bug middle-end/39360] [4.4 Regression] " hjl dot tools at gmail dot com
@ 2009-03-04 15:21 ` rguenth at gcc dot gnu dot org
2009-03-04 16:41 ` rguenth at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-03-04 15:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2009-03-04 15:21 -------
In TODO_recompute_alias after PRE we have something (alc_capture_mixer1, found
through DECL_INITIAL of caps) in gimple_addressable_vars that is no longer
available.
Honza, this is yours again. I guess during inlining we no longer add
referenced vars to the inlined-to function if they are addresses of globals
referenced through initializers of local statics?
static struct snd_kcontrol_new alc_capture_mixer1[];
static void set_capture_mixer(struct alc_spec *spec)
{
static struct snd_kcontrol_new *caps[3] = {
alc_capture_mixer1,
alc_capture_mixer2,
alc_capture_mixer3,
};
if (spec->num_adc_nids > 0 && spec->num_adc_nids <= 3)
spec->cap_mixer = caps[spec->num_adc_nids - 1];
}
inlined into some other function. Proper testcase still reducing.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
Keywords| |ice-on-valid-code
Priority|P3 |P1
Last reconfirmed|2009-03-04 15:16:02 |2009-03-04 15:21:37
date| |
Summary|[4.4 Regression] tree-dsa |[4.4 Regression] ICE in
|leads to an ICE |referenced_var_lookup, at
| |tree-dfa.c:563
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
` (3 preceding siblings ...)
2009-03-04 15:21 ` [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563 rguenth at gcc dot gnu dot org
@ 2009-03-04 16:41 ` rguenth at gcc dot gnu dot org
2009-03-05 2:09 ` hubicka at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-03-04 16:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2009-03-04 16:40 -------
Reduced testcase:
typedef unsigned short u16;
struct snd_kcontrol_new { };
typedef u16 hda_nid_t;
struct alc_spec {
struct snd_kcontrol_new *cap_mixer;
unsigned int num_adc_nids;
};
static struct snd_kcontrol_new alc_capture_mixer1[] = { };
static struct snd_kcontrol_new alc_capture_mixer2[] = { };
static struct snd_kcontrol_new alc_capture_mixer3[] = { };
static void set_capture_mixer(struct alc_spec *spec)
{
static struct snd_kcontrol_new *caps[3] = {
alc_capture_mixer1, alc_capture_mixer2, alc_capture_mixer3
};
if (spec->num_adc_nids > 0 && spec->num_adc_nids <= 3)
spec->cap_mixer = caps[spec->num_adc_nids - 1];
}
static hda_nid_t alc662_adc_nids[1] = { 0x09, };
int patch_alc662(struct hda_codec *codec)
{
struct alc_spec *spec;
spec->num_adc_nids = (sizeof(alc662_adc_nids) / sizeof((alc662_adc_nids)[0])
+ (sizeof(char[1 - 2 *
!!(__builtin_types_compatible_p(typeof(alc662_adc_nids),
typeof(&alc662_adc_nids[0])))]) - 1));
if (!spec->cap_mixer)
set_capture_mixer(spec);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
` (4 preceding siblings ...)
2009-03-04 16:41 ` rguenth at gcc dot gnu dot org
@ 2009-03-05 2:09 ` hubicka at gcc dot gnu dot org
2009-03-06 15:40 ` jakub at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2009-03-05 2:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from hubicka at gcc dot gnu dot org 2009-03-05 02:09 -------
This is curious, since we should see the initializer when adding variable at
first time. I am looking into this.
Honza
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
` (5 preceding siblings ...)
2009-03-05 2:09 ` hubicka at gcc dot gnu dot org
@ 2009-03-06 15:40 ` jakub at gcc dot gnu dot org
2009-03-06 17:24 ` jakub at gcc dot gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-03-06 15:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jakub at gcc dot gnu dot org 2009-03-06 15:39 -------
Smaller testcase:
static int a[] = { 1 };
static inline void
bar (int **x)
{
static int *c[2] = { 0, a };
*x = c[1];
}
int
foo (int **x)
{
bar (x);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
` (6 preceding siblings ...)
2009-03-06 15:40 ` jakub at gcc dot gnu dot org
@ 2009-03-06 17:24 ` jakub at gcc dot gnu dot org
2009-03-06 17:30 ` hubicka at ucw dot cz
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-03-06 17:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jakub at gcc dot gnu dot org 2009-03-06 17:24 -------
I think it is the new:
3384 if (TREE_STATIC (var) && !TREE_ASM_WRITTEN (var))
3385 {
3386 if (var_ann (var) && referenced_var_check_and_insert (var))
3387 cfun->local_decls = tree_cons (NULL_TREE, var,
3388 cfun->local_decls);
3389 }
that causes this. Compared to add_referenced_var this doesn't do the:
/* Scan DECL_INITIAL for pointer variables as they may contain
address arithmetic referencing the address of other
variables.
Even non-constant initializers need to be walked, because
IPA passes might prove that their are invariant later on. */
if (DECL_INITIAL (var)
/* Initializers of external variables are not useful to the
optimizers. */
&& !DECL_EXTERNAL (var))
walk_tree (&DECL_INITIAL (var), find_vars_r, NULL, 0);
part. So, either tree-inline.c needs to do the same, or it can't use
referenced_vars bit as a test whether it has been queued already onto
local_decls or not. Honza?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
` (7 preceding siblings ...)
2009-03-06 17:24 ` jakub at gcc dot gnu dot org
@ 2009-03-06 17:30 ` hubicka at ucw dot cz
2009-03-06 17:53 ` jakub at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hubicka at ucw dot cz @ 2009-03-06 17:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from hubicka at ucw dot cz 2009-03-06 17:30 -------
Subject: Re: [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563
> part. So, either tree-inline.c needs to do the same, or it can't use
> referenced_vars bit as a test whether it has been queued already onto
> local_decls or not. Honza?
Ah I see. Actually original version of patch added function to tree-dfa
to check if variable is referenced and used this predicate followed by
add_referenced_var if it was not, but then I noticed that
referenced_var_check_and_insert is available to I decided to use it.
OK, I will prepare this version of patch tomorrow.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
` (8 preceding siblings ...)
2009-03-06 17:30 ` hubicka at ucw dot cz
@ 2009-03-06 17:53 ` jakub at gcc dot gnu dot org
2009-03-06 19:12 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-03-06 17:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jakub at gcc dot gnu dot org 2009-03-06 17:53 -------
To "do the same" the easiest would be probably change add_referenced_var to
return bool, whatever referenced_var_check_and_insert returned, and use
add_referenced_var instead of referenced_var_check_and_insert in
expand_call_inline.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
` (9 preceding siblings ...)
2009-03-06 17:53 ` jakub at gcc dot gnu dot org
@ 2009-03-06 19:12 ` jakub at gcc dot gnu dot org
2009-03-06 20:45 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-03-06 19:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jakub at gcc dot gnu dot org 2009-03-06 19:11 -------
Created an attachment (id=17412)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17412&action=view)
gcc44-pr39360.patch
Patch I'm bootstrapping/regtesting now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
` (10 preceding siblings ...)
2009-03-06 19:12 ` jakub at gcc dot gnu dot org
@ 2009-03-06 20:45 ` jakub at gcc dot gnu dot org
2009-03-06 22:51 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-03-06 20:45 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2009-
| |03/msg00407.html
Status|NEW |ASSIGNED
Last reconfirmed|2009-03-04 15:21:37 |2009-03-06 20:45:27
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
` (11 preceding siblings ...)
2009-03-06 20:45 ` jakub at gcc dot gnu dot org
@ 2009-03-06 22:51 ` jakub at gcc dot gnu dot org
2009-03-06 22:53 ` jakub at gcc dot gnu dot org
2009-03-07 0:13 ` linuxl4 at sohu dot com
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-03-06 22:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from jakub at gcc dot gnu dot org 2009-03-06 22:51 -------
Subject: Bug 39360
Author: jakub
Date: Fri Mar 6 22:51:28 2009
New Revision: 144683
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144683
Log:
PR middle-end/39360
* tree-flow.h (add_referenced_var): Return bool instead of void.
* tree-dfa.c (add_referenced_var): Return result of
referenced_var_check_and_insert call.
* tree-inline.c (expand_call_inline): Call add_referenced_var instead
of referenced_var_check_and_insert.
* gcc.c-torture/compile/pr39360.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr39360.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-dfa.c
trunk/gcc/tree-flow.h
trunk/gcc/tree-inline.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
` (12 preceding siblings ...)
2009-03-06 22:51 ` jakub at gcc dot gnu dot org
@ 2009-03-06 22:53 ` jakub at gcc dot gnu dot org
2009-03-07 0:13 ` linuxl4 at sohu dot com
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-03-06 22:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from jakub at gcc dot gnu dot org 2009-03-06 22:53 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
` (13 preceding siblings ...)
2009-03-06 22:53 ` jakub at gcc dot gnu dot org
@ 2009-03-07 0:13 ` linuxl4 at sohu dot com
14 siblings, 0 replies; 16+ messages in thread
From: linuxl4 at sohu dot com @ 2009-03-07 0:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from linuxl4 at sohu dot com 2009-03-07 00:12 -------
thanks a lot.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2009-03-07 0:13 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-04 14:35 [Bug middle-end/39360] New: tree-dsa leads to an ICE linuxl4 at sohu dot com
2009-03-04 14:36 ` [Bug middle-end/39360] " linuxl4 at sohu dot com
2009-03-04 15:03 ` rguenth at gcc dot gnu dot org
2009-03-04 15:16 ` [Bug middle-end/39360] [4.4 Regression] " hjl dot tools at gmail dot com
2009-03-04 15:21 ` [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563 rguenth at gcc dot gnu dot org
2009-03-04 16:41 ` rguenth at gcc dot gnu dot org
2009-03-05 2:09 ` hubicka at gcc dot gnu dot org
2009-03-06 15:40 ` jakub at gcc dot gnu dot org
2009-03-06 17:24 ` jakub at gcc dot gnu dot org
2009-03-06 17:30 ` hubicka at ucw dot cz
2009-03-06 17:53 ` jakub at gcc dot gnu dot org
2009-03-06 19:12 ` jakub at gcc dot gnu dot org
2009-03-06 20:45 ` jakub at gcc dot gnu dot org
2009-03-06 22:51 ` jakub at gcc dot gnu dot org
2009-03-06 22:53 ` jakub at gcc dot gnu dot org
2009-03-07 0:13 ` linuxl4 at sohu dot com
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).