public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42129] ICE in pointer difference with sizeof(int)>sizeof(void *)
       [not found] <bug-42129-4@http.gcc.gnu.org/bugzilla/>
@ 2011-11-06 23:07 ` paolo.carlini at oracle dot com
  2011-11-07  0:06 ` froydnj at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-06 23:07 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |froydnj at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org,
                   |                            |rth at gcc dot gnu.org

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-11-06 23:06:27 UTC ---
I guess somebody knowledgeable about this target should have a look. Adding
Jason too, maybe the issue doesn't exist anymore, no idea.


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

* [Bug c++/42129] ICE in pointer difference with sizeof(int)>sizeof(void *)
       [not found] <bug-42129-4@http.gcc.gnu.org/bugzilla/>
  2011-11-06 23:07 ` [Bug c++/42129] ICE in pointer difference with sizeof(int)>sizeof(void *) paolo.carlini at oracle dot com
@ 2011-11-07  0:06 ` froydnj at gcc dot gnu.org
  2011-11-07  0:20 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: froydnj at gcc dot gnu.org @ 2011-11-07  0:06 UTC (permalink / raw)
  To: gcc-bugs

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

Nathan Froyd <froydnj at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-11-07
     Ever Confirmed|0                           |1

--- Comment #2 from Nathan Froyd <froydnj at gcc dot gnu.org> 2011-11-07 00:06:11 UTC ---
I can confirm that the problem still happens with the given options (-mh -mn
-mint32).  I don't know much about this target, but the equivalent C front-end
code has:

  /* Determine integer type to perform computations in.  This will usually
     be the same as the result type (ptrdiff_t), but may need to be a wider
     type if pointers for the address space are wider than ptrdiff_t.  */
  if (TYPE_PRECISION (restype) < TYPE_PRECISION (TREE_TYPE (op0)))
    inttype = lang_hooks.types.type_for_size
        (TYPE_PRECISION (TREE_TYPE (op0)), 0);
  else
    inttype = restype;

and uses that as the result of the division, with a conversion to restype
(ptrdiff_type_node) as in Paolo's patch.

I think it'd be better to try to make the C and C++ front-ends as close as
possible on this; I can try a patch that combines the above and Paolo's, but
I'm not sure I'd get to it before stage 1 closes.


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

* [Bug c++/42129] ICE in pointer difference with sizeof(int)>sizeof(void *)
       [not found] <bug-42129-4@http.gcc.gnu.org/bugzilla/>
  2011-11-06 23:07 ` [Bug c++/42129] ICE in pointer difference with sizeof(int)>sizeof(void *) paolo.carlini at oracle dot com
  2011-11-07  0:06 ` froydnj at gcc dot gnu.org
@ 2011-11-07  0:20 ` paolo.carlini at oracle dot com
  2012-05-24 12:17 ` paolo.carlini at oracle dot com
  2013-05-24  8:59 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-07  0:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-11-07 00:19:45 UTC ---
Nathan, if you can take care of this issue, it would be great. Feel free to
assign it to yourself.

Note, I didn't write any code, draft patch is submitter's.


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

* [Bug c++/42129] ICE in pointer difference with sizeof(int)>sizeof(void *)
       [not found] <bug-42129-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-11-07  0:20 ` paolo.carlini at oracle dot com
@ 2012-05-24 12:17 ` paolo.carlini at oracle dot com
  2013-05-24  8:59 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-05-24 12:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-05-24 12:04:17 UTC ---
Pinging Nathan, maybe we can do this for 4.8...


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

* [Bug c++/42129] ICE in pointer difference with sizeof(int)>sizeof(void *)
       [not found] <bug-42129-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2012-05-24 12:17 ` paolo.carlini at oracle dot com
@ 2013-05-24  8:59 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-05-24  8:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Nathan?


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

end of thread, other threads:[~2013-05-24  8:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-42129-4@http.gcc.gnu.org/bugzilla/>
2011-11-06 23:07 ` [Bug c++/42129] ICE in pointer difference with sizeof(int)>sizeof(void *) paolo.carlini at oracle dot com
2011-11-07  0:06 ` froydnj at gcc dot gnu.org
2011-11-07  0:20 ` paolo.carlini at oracle dot com
2012-05-24 12:17 ` paolo.carlini at oracle dot com
2013-05-24  8:59 ` paolo.carlini at oracle 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).