public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/19315] New: variable is not emitted in the asm
@ 2005-01-07 15:48 pinskia at gcc dot gnu dot org
2005-01-07 16:07 ` [Bug target/19315] " schwab at suse dot de
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-07 15:48 UTC (permalink / raw)
To: gcc-bugs
Take the following code:
void bar (const int * const x);
static const int y[];
void
foo (void)
{
bar (y);
}
This should at assemble but does not.
If I get some time this weekend I will look into fixing this.
--
Summary: variable is not emitted in the asm
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: minor
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc-darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19315
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/19315] variable is not emitted in the asm
2005-01-07 15:48 [Bug target/19315] New: variable is not emitted in the asm pinskia at gcc dot gnu dot org
@ 2005-01-07 16:07 ` schwab at suse dot de
2005-01-07 16:52 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: schwab at suse dot de @ 2005-01-07 16:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schwab at suse dot de 2005-01-07 16:07 -------
Shouldn't this be rejected as y is of incomplete type?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19315
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/19315] variable is not emitted in the asm
2005-01-07 15:48 [Bug target/19315] New: variable is not emitted in the asm pinskia at gcc dot gnu dot org
2005-01-07 16:07 ` [Bug target/19315] " schwab at suse dot de
@ 2005-01-07 16:52 ` pinskia at gcc dot gnu dot org
2005-01-12 5:43 ` pinskia at gcc dot gnu dot org
2005-02-13 16:25 ` [Bug c/19315] " pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-07 16:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-07 16:52 -------
If you trust Comeau's C compiler, then yes this is not valid code and should be rejected.
Also one more note, this was able to compile with 3.3.2 but we called y as an extern symbol which is
just wrong also.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19315
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/19315] variable is not emitted in the asm
2005-01-07 15:48 [Bug target/19315] New: variable is not emitted in the asm pinskia at gcc dot gnu dot org
2005-01-07 16:07 ` [Bug target/19315] " schwab at suse dot de
2005-01-07 16:52 ` pinskia at gcc dot gnu dot org
@ 2005-01-12 5:43 ` pinskia at gcc dot gnu dot org
2005-02-13 16:25 ` [Bug c/19315] " pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-12 5:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-12 05:43 -------
-pedantic rejects the code.
This looks like another undocumened extension and how it works too.
Reading the comment in c-decl.c says this is how it should work but this is just plainly stupid:
/* If a `static' var's size isn't known,
make it extern as well as static, so it does not get
allocated.
If it is not `static', then do not mark extern;
finish_incomplete_decl will give it a default size
and it will get allocated. */
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19315
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/19315] variable is not emitted in the asm
2005-01-07 15:48 [Bug target/19315] New: variable is not emitted in the asm pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-01-12 5:43 ` pinskia at gcc dot gnu dot org
@ 2005-02-13 16:25 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-13 16:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-12 23:29 -------
This looks like one of those undocumented extensions.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|target |c
Ever Confirmed| |1
Keywords|wrong-code |accepts-invalid
Last reconfirmed|0000-00-00 00:00:00 |2005-02-12 23:29:53
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19315
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-02-12 23:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-07 15:48 [Bug target/19315] New: variable is not emitted in the asm pinskia at gcc dot gnu dot org
2005-01-07 16:07 ` [Bug target/19315] " schwab at suse dot de
2005-01-07 16:52 ` pinskia at gcc dot gnu dot org
2005-01-12 5:43 ` pinskia at gcc dot gnu dot org
2005-02-13 16:25 ` [Bug c/19315] " pinskia 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).