public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc/24868]  New: objc-act.c builds non-type-safe structure
@ 2005-11-15  0:20 sabre at nondot dot org
  2005-11-15  4:50 ` [Bug objc/24868] " pinskia at gcc dot gnu dot org
  2010-08-09 21:19 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: sabre at nondot dot org @ 2005-11-15  0:20 UTC (permalink / raw)
  To: gcc-bugs

The init_objc_symtab builds a structure with two short data members, but passes
NULL_TREE into build_int_cst.  These:

---
  /* cls_def_cnt = { ..., 5, ... } */
  initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, imp_count),
initlist);
  /* cat_def_cnt = { ..., 5, ... } */
  initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, cat_count),
initlist);
---

Should be changed to pass short_integer_type_node to build_int_cst instead of
NULL_TREE.  Passing NULL_TREE results in a 32-bit int.  This appears to not
cause a problem with the current code generator, but seems like a nasty latent
bug.

-Chris


-- 
           Summary: objc-act.c builds non-type-safe structure
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: objc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sabre at nondot dot org


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


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

* [Bug objc/24868] objc-act.c builds non-type-safe structure
  2005-11-15  0:20 [Bug objc/24868] New: objc-act.c builds non-type-safe structure sabre at nondot dot org
@ 2005-11-15  4:50 ` pinskia at gcc dot gnu dot org
  2010-08-09 21:19 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-15  4:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-11-15 04:50 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
OtherBugsDependingO|                            |22368
              nThis|                            |
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-11-15 04:50:13
               date|                            |


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


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

* [Bug objc/24868] objc-act.c builds non-type-safe structure
  2005-11-15  0:20 [Bug objc/24868] New: objc-act.c builds non-type-safe structure sabre at nondot dot org
  2005-11-15  4:50 ` [Bug objc/24868] " pinskia at gcc dot gnu dot org
@ 2010-08-09 21:19 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-08-09 21:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2010-08-09 21:19 -------
Fixed by:
gcc/objc/

        PR objc/44140
        (init_objc_symtab): Use integer_zero_node, make the short
        integer type specific on relevant nodes.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.6.0


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


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

end of thread, other threads:[~2010-08-09 21:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-15  0:20 [Bug objc/24868] New: objc-act.c builds non-type-safe structure sabre at nondot dot org
2005-11-15  4:50 ` [Bug objc/24868] " pinskia at gcc dot gnu dot org
2010-08-09 21:19 ` 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).