This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/82402] New: [5/6/7/8 Regression] error: SSA_NAME_OCCURS_IN_ABNORMAL_PHI should be set


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82402

            Bug ID: 82402
           Summary: [5/6/7/8 Regression] error:
                    SSA_NAME_OCCURS_IN_ABNORMAL_PHI should be set
           Product: gcc
           Version: unknown
               URL: https://raw.githubusercontent.com/byronh/school-simple
                    scalar/master/tests/src/anagram.c
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: edlinger at gcc dot gnu.org
  Target Milestone: ---

Starting with GCC 4.9, we ICE on anagram.c:

$ gcc anagram.c -O3 -c --param max-inline-insns-auto=1352250387
anagram.c: In function ‘BuildMask’:
anagram.c:315:5: warning: implicit declaration of function ‘bzero’
[-Wimplicit-function-declaration]
     bzero(alPhrase, sizeof(Letter)*ALPHABET);
     ^~~~~
anagram.c:315:5: warning: incompatible implicit declaration of built-in
function ‘bzero’
anagram.c: In function ‘BuildWord’:
anagram.c:406:5: warning: incompatible implicit declaration of built-in
function ‘bzero’
     bzero(cchFrequency, sizeof(unsigned char)*ALPHABET);
     ^~~~~
anagram.c: In function ‘GetPhrase’:
anagram.c:603:9: warning: implicit declaration of function ‘gets’; did you mean
‘fgets’? [-Wimplicit-function-declaration]
     if (gets(pch) == NULL) {
         ^~~~
         fgets
anagram.c:603:19: warning: comparison between pointer and integer
     if (gets(pch) == NULL) {
                   ^~
anagram.c: In function ‘main’:
anagram.c:623:20: warning: implicit declaration of function ‘isatty’
[-Wimplicit-function-declaration]
     fInteractive = isatty(1);
                    ^~~~~~
anagram.c:615:11: error: SSA_NAME_OCCURS_IN_ABNORMAL_PHI should be set
 int Cdecl main(int cpchArgc, char **ppchArgv) {
           ^~~~
for SSA_NAME: .MEM_184 in statement:
.MEM_17(ab) = PHI <.MEM_20(D)(ab)(3), .MEM_24(ab)(6), .MEM_27(ab)(7),
.MEM_36(ab)(10), .MEM_34(ab)(12), .MEM_218(ab)(27), .MEM_204(ab)(35),
.MEM_33(ab)(67), .MEM_38(ab)(68), .MEM_40(ab)(72), .MEM_197(ab)(77),
.MEM_207(ab)(57), .MEM_184(54), .MEM_195(ab)(76), .MEM_196(ab)(75)>
PHI argument
.MEM_184
for PHI node
.MEM_17(ab) = PHI <.MEM_20(D)(ab)(3), .MEM_24(ab)(6), .MEM_27(ab)(7),
.MEM_36(ab)(10), .MEM_34(ab)(12), .MEM_218(ab)(27), .MEM_204(ab)(35),
.MEM_33(ab)(67), .MEM_38(ab)(68), .MEM_40(ab)(72), .MEM_197(ab)(77),
.MEM_207(ab)(57), .MEM_184(54), .MEM_195(ab)(76), .MEM_196(ab)(75)>
during GIMPLE pass: vect
anagram.c:615:11: internal compiler error: verify_ssa failed
0xdd382b verify_ssa(bool, bool)
        .././../gcc/tree-ssa.c:1188
0xabe537 execute_function_todo
        .././../gcc/passes.c:1999
0xabf462 execute_todo
        .././../gcc/passes.c:2046

I have a reduced test-case that started to ICE with r239092:

$ cat ice.c
#include <stdlib.h>
#include <setjmp.h>

jmp_buf jbAnagram;
int a[6];
int d;
int b () { exit (1); }
int c () { b (); }
int e ()
{
  int f = 0;
  for (; f < 6; f++)
    a[f] = d;
  c ();
  setjmp (jbAnagram);
}

$ gcc ice.c -O3 -c --param max-inline-insns-auto=1352250387
ice.c: In function ‘e’:
ice.c:9:5: error: SSA_NAME_OCCURS_IN_ABNORMAL_PHI should be set
 int e ()
     ^
for SSA_NAME: .MEM_12 in statement:
.MEM_4(ab) = PHI <.MEM_12(8), .MEM_6(ab)(9)>
PHI argument
.MEM_12
for PHI node
.MEM_4(ab) = PHI <.MEM_12(8), .MEM_6(ab)(9)>
during GIMPLE pass: vect
ice.c:9:5: internal compiler error: verify_ssa failed
0xdd382b verify_ssa(bool, bool)
        .././../gcc/tree-ssa.c:1188
0xabe537 execute_function_todo
        .././../gcc/passes.c:1999
0xabf462 execute_todo
        .././../gcc/passes.c:2046

But it's probably just path of original problem.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]