public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/58209] New: ICE in extract_range_from_binary_expr, at tree-vrp.c:2294
@ 2013-08-21 10:15 doko at gcc dot gnu.org
  2013-08-21 10:26 ` [Bug tree-optimization/58209] " mpolacek at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2013-08-21 10:15 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58209
           Summary: ICE in extract_range_from_binary_expr, at
                    tree-vrp.c:2294
           Product: gcc
           Version: 4.7.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org

seen with 4.6.4, 4.7.3, 4.8.1 and trunk with -O2, lowering to -O1 works around
the issue.

$ gcc-4.7 -c -O2 foo.c 
foo.c: In function 'pow2_s':
foo.c:3:7: internal compiler error: in build2_stat, at tree.c:3785
Please submit a full bug report,
with preprocessed source if appropriate.

$ /usr/lib/gcc-snapshot/bin/gcc -c -O2 foo.c 
foo.c: In function 'pow2_s':
foo.c:25:1: error: invalid (pointer) operands to plus/minus
 }
 ^
acc_tmp_14 = add_acc_5 + _1;
foo.c:25:1: internal compiler error: verify_gimple failed
Please submit a full bug report,


$ cat foo.c
#include <stdint.h>

void *pow2_s(void *arg)
{
    intptr_t n = (intptr_t)arg;

    if (n == 0)
        return (void *)1;

    n--;

    intptr_t s1 = (intptr_t)pow2_s((void *)n);
    intptr_t s2 = (intptr_t)pow2_s((void *)n);

    return (void *)(s1 + s2);
}

int main(void)
{
    intptr_t n = 5;

    pow2_s((void *)n);

    return 0;
}


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

end of thread, other threads:[~2014-05-07 16:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-21 10:15 [Bug c/58209] New: ICE in extract_range_from_binary_expr, at tree-vrp.c:2294 doko at gcc dot gnu.org
2013-08-21 10:26 ` [Bug tree-optimization/58209] " mpolacek at gcc dot gnu.org
2013-08-21 10:39 ` mpolacek at gcc dot gnu.org
2013-08-21 10:50 ` mpolacek at gcc dot gnu.org
2013-08-21 11:42 ` mpolacek at gcc dot gnu.org
2013-08-21 12:06 ` [Bug tree-optimization/58209] [4.7/4.8/4.9 Regression] " jakub at gcc dot gnu.org
2013-08-22  9:27 ` jakub at gcc dot gnu.org
2013-08-23  7:47 ` [Bug tree-optimization/58209] [4.7 " jakub at gcc dot gnu.org
2014-05-07 16:01 ` jakub at gcc dot gnu.org
2014-05-07 16:18 ` jakub at gcc dot gnu.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).