public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/23876] New: Accepts model on local variables
@ 2005-09-14  5:15 pinskia at gcc dot gnu dot org
  2005-09-14  5:18 ` [Bug target/23876] " pinskia at gcc dot gnu dot org
  2005-09-25  4:23 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-14  5:15 UTC (permalink / raw)
  To: gcc-bugs

Take the following code:
void f(void)
{
  int a __attribute__((model(small)));
}

We should reject the attribute but don't as of today even though the code in ia64.c thinks it should be 
rejected:
    case VAR_DECL:
      if ((DECL_CONTEXT (decl) && TREE_CODE (DECL_CONTEXT (decl))
           == FUNCTION_DECL)
          && !TREE_STATIC (decl))
        { 
          error ("%Jan address area attribute cannot be specified for "
                 "local variables", decl);
          *no_add_attrs = true;
        }

-- 
           Summary: Accepts model on local variables
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          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: ia64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23876


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/23876] Accepts model on local variables
  2005-09-14  5:15 [Bug target/23876] New: Accepts model on local variables pinskia at gcc dot gnu dot org
@ 2005-09-14  5:18 ` pinskia at gcc dot gnu dot org
  2005-09-25  4:23 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-14  5:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-14 05:16 -------
(In reply to comment #0)
>       if ((DECL_CONTEXT (decl) && TREE_CODE (DECL_CONTEXT (decl))
>            == FUNCTION_DECL)

One more thing is that the DECL_CONTEXT at the point where we call the function to add the attribute.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23876


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/23876] Accepts model on local variables
  2005-09-14  5:15 [Bug target/23876] New: Accepts model on local variables pinskia at gcc dot gnu dot org
  2005-09-14  5:18 ` [Bug target/23876] " pinskia at gcc dot gnu dot org
@ 2005-09-25  4:23 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-25  4:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-25 04:23 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-09-25 04:23:52
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23876


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-09-25  4:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-14  5:15 [Bug target/23876] New: Accepts model on local variables pinskia at gcc dot gnu dot org
2005-09-14  5:18 ` [Bug target/23876] " pinskia at gcc dot gnu dot org
2005-09-25  4:23 ` 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).