http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60438
            Bug ID: 60438
           Summary: dwarf2cfi :2239 still assert,not the same cause as PR
                    59575
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: manjian2006 at gmail dot com

This Bug is cause by csa pass.Which removes REG_ARGS_SIZE unexpectedly.
Let me show the cfg first:

                                            if (hasRelativeWidth ||
hasRelativeHeight)
                                            true                               
false
                                            /                                  
    \
                                           /                                   
     \ 
                                          /                                    
      \
                            ...                                                
    ...
                           call availableWidth()                               
        call size() this function returns a structure,which matches "call_pop"  
                           .cfa_offset 96                                      
    .cfa_offset 92
                                                                               
    push edx (should has a REG_ARGS_SIZE 16 here,but csa eliminates it)
                                          \                                    
    (inlined functions are expanded here)
                                           \                                   
        /
                                            \                                  
       /
                                             \                                 
      /
                                                        add 16,%esp
After the csa pass ,push edx's REG_ARGS_SIZE has gone.
And that further causes the assertion in dwarf2cfi.c:2339:

      /* We ought to have the same state incoming to a given trace no
     matter how we arrive at the trace.  Anything else means we've
     got some kind of optimization error.  */
      gcc_checking_assert (cfi_row_equal_p (cur_row, ti->beg_row));

gcc is configured as :
--target=i686-linux-android --host=x86_64-linux-gnu --build=x86_64-linux-gnu
--with-gnu-as --with-gnu-ld --enable-languages=c,c++
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
--disable-libssp --enable-threads --disable-nls --disable-libmudflap
--disable-libgomp --disable-sjlj-exceptions --disable-tls --disable-libitm
--with-arch=i686 --with-tune=atom --with-fpmath=sse --enable-initfini-array
--disable-nls
--with-sysroot=/home/linzj/android-ndk-r8e/platforms/android-9/arch-x86
--disable-bootstrap --disable-libquadmath --enable-plugins --enable-libgomp
--enable-gold --enable-graphite=yes
--program-transform-name='s&^&i686-linux-android-&' --enable-gold=default
--disable-libcilkrts : (reconfigured) ../building/configure
--target=i686-linux-android --host=x86_64-linux-gnu --build=x86_64-linux-gnu
--with-gnu-as --with-gnu-ld --enable-languages=c,c++
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
--disable-libssp --enable-threads --disable-nls --disable-libmudflap
--disable-libgomp --disable-sjlj-exceptions --disable-tls --disable-libitm
--with-arch=i686 --with-tune=atom --with-fpmath=sse --enable-initfini-array
--disable-nls
--with-sysroot=/home/linzj/android-ndk-r8e/platforms/android-9/arch-x86
--disable-bootstrap --disable-libquadmath --enable-plugins --enable-libgomp
--enable-gold --enable-graphite=yes
--program-transform-name='s&^&i686-linux-android-&' --enable-gold=default
--disable-libcilkrts

compile args:
-ffunction-sections -funwind-tables -no-canonical-prefixes -fstack-protector
-fno-exceptions -fno-rtti -O2 -g -fomit-frame-pointer -fstrict-aliasing
-funswitch-loops -finline-limit=300 -gdwarf-2 -funwind-tables -fno-pic -fPIC
-fno-stack-protector -fvisibility=hidden -gdwarf-2 -funwind-tables -fno-pic
-fPIC -fno-stack-protector -fvisibility=hidden -fvisibility-inlines-hidden
-Wa,--noexecstack   -Os -Wreturn-type -Wuninitialized -c

Reply via email to