public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/33692] New: [4.3 Regression] Type checking error with address-of and volatile
@ 2007-10-08 12:08 rguenth at gcc dot gnu dot org
2007-10-08 12:12 ` [Bug middle-end/33692] " rguenth at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-10-08 12:08 UTC (permalink / raw)
To: gcc-bugs
struct sndrv_pcm_info { };
typedef struct sndrv_pcm_info snd_pcm_info_t;
typedef struct {
snd_pcm_info_t info;
} snd_pcm_shm_ctrl_t;
int pcm_shm_cmd(volatile snd_pcm_shm_ctrl_t *ctrl)
{
snd_pcm_info((snd_pcm_info_t *) &ctrl->info);
}
aserver.3.min.i: In function 'pcm_shm_cmd':
aserver.3.min.i:7: error: type mismatch in address expression
volatile struct snd_pcm_info_t *
struct snd_pcm_info_t *
D.1548 = &ctrl->info
aserver.3.min.i:7: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: [4.3 Regression] Type checking error with address-of and
volatile
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, ice-checking
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33692
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/33692] [4.3 Regression] Type checking error with address-of and volatile
2007-10-08 12:08 [Bug middle-end/33692] New: [4.3 Regression] Type checking error with address-of and volatile rguenth at gcc dot gnu dot org
@ 2007-10-08 12:12 ` rguenth at gcc dot gnu dot org
2007-10-09 10:57 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-10-08 12:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2007-10-08 12:12 -------
Mine.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-10-08 12:12:30
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33692
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/33692] [4.3 Regression] Type checking error with address-of and volatile
2007-10-08 12:08 [Bug middle-end/33692] New: [4.3 Regression] Type checking error with address-of and volatile rguenth at gcc dot gnu dot org
2007-10-08 12:12 ` [Bug middle-end/33692] " rguenth at gcc dot gnu dot org
@ 2007-10-09 10:57 ` rguenth at gcc dot gnu dot org
2007-10-09 11:39 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-10-09 10:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2007-10-09 10:56 -------
This happens because we canonicalize the component ref (as we pretend an rvalue
is ok) via gimplify_addr_expr:
/* We use fb_either here because the C frontend sometimes takes
the address of a call that returns a struct; see
gcc.dg/c99-array-lval-1.c. The gimplifier will correctly make
the implied temporary explicit. */
/* Mark the RHS addressable. */
ret = gimplify_expr (&TREE_OPERAND (expr, 0), pre_p, post_p,
is_gimple_addressable, fb_either);
and gimplify_compound_lval which canonicalizes the outermost component
reference. Which is incorrect in this case, as it strips type qualifiers.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33692
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/33692] [4.3 Regression] Type checking error with address-of and volatile
2007-10-08 12:08 [Bug middle-end/33692] New: [4.3 Regression] Type checking error with address-of and volatile rguenth at gcc dot gnu dot org
2007-10-08 12:12 ` [Bug middle-end/33692] " rguenth at gcc dot gnu dot org
2007-10-09 10:57 ` rguenth at gcc dot gnu dot org
@ 2007-10-09 11:39 ` rguenth at gcc dot gnu dot org
2007-10-09 15:52 ` rguenth at gcc dot gnu dot org
2007-10-10 9:57 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-10-09 11:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2007-10-09 11:39 -------
In fact, all of canonicalize_component_ref but maybe the bit-field case should
be removed and remaining errors declared FE bugs.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33692
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/33692] [4.3 Regression] Type checking error with address-of and volatile
2007-10-08 12:08 [Bug middle-end/33692] New: [4.3 Regression] Type checking error with address-of and volatile rguenth at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-10-09 11:39 ` rguenth at gcc dot gnu dot org
@ 2007-10-09 15:52 ` rguenth at gcc dot gnu dot org
2007-10-10 9:57 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-10-09 15:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2007-10-09 15:51 -------
Subject: Bug 33692
Author: rguenth
Date: Tue Oct 9 15:51:46 2007
New Revision: 129167
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129167
Log:
2007-10-09 Richard Guenther <rguenther@suse.de>
PR middle-end/33692
* gimplify.c (canonicalize_component_ref): Honor qualifiers
of referenced structure and component.
* gcc.dg/pr33692.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/pr33692.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimplify.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33692
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/33692] [4.3 Regression] Type checking error with address-of and volatile
2007-10-08 12:08 [Bug middle-end/33692] New: [4.3 Regression] Type checking error with address-of and volatile rguenth at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-10-09 15:52 ` rguenth at gcc dot gnu dot org
@ 2007-10-10 9:57 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-10-10 9:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2007-10-10 09:57 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33692
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-10 9:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-08 12:08 [Bug middle-end/33692] New: [4.3 Regression] Type checking error with address-of and volatile rguenth at gcc dot gnu dot org
2007-10-08 12:12 ` [Bug middle-end/33692] " rguenth at gcc dot gnu dot org
2007-10-09 10:57 ` rguenth at gcc dot gnu dot org
2007-10-09 11:39 ` rguenth at gcc dot gnu dot org
2007-10-09 15:52 ` rguenth at gcc dot gnu dot org
2007-10-10 9:57 ` 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).