public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/48459] New: avr: Assertion failure with -gdwarf-2
@ 2011-04-05 11:56 avr at gjlay dot de
  2011-04-06  0:20 ` [Bug debug/48459] [4.7 Regression] " pinskia at gcc dot gnu.org
                   ` (34 more replies)
  0 siblings, 35 replies; 36+ messages in thread
From: avr at gjlay dot de @ 2011-04-05 11:56 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: avr: Assertion failure with -gdwarf-2
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: avr@gjlay.de


Source:

char c;

char getc (void)
{
    return c;
}

compile with avr-gcc-4.7.0 (SVN 171936)

avr-gcc abi.c -S -Os -gdwarf-2 -v
Using built-in specs.
COLLECT_GCC=/mnt/nfs/home/georg/gnu/install/gcc-4.6/bin/avr-gcc
COLLECT_LTO_WRAPPER=/local/gnu/install/gcc-4.6/libexec/gcc/avr/4.7.0/lto-wrapper
Target: avr
Configured with: ../../gcc.gnu.org/trunk/configure --target=avr
--prefix=/local/gnu/install/gcc-4.6 --enable-languages=c,c++ --disable-libssp
--disable-libada --disable-nls --disable-shared
Thread model: single
gcc version 4.7.0 20110404 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-S' '-Os' '-gdwarf-2' '-v'
 /local/gnu/install/gcc-4.6/libexec/gcc/avr/4.7.0/cc1 -quiet -v abi.c -quiet
-dumpbase abi.c -auxbase abi -gdwarf-2 -Os -version -o abi.s
GNU C (GCC) version 4.7.0 20110404 (experimental) (avr)
        compiled by GNU C version 4.3.2 [gcc-4_3-branch revision 141291], GMP
version 5.0.1, MPFR version 3.0.0-p8, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory
"/local/gnu/install/gcc-4.6/lib/gcc/avr/4.7.0/../../../../avr/sys-include"
#include "..." search starts here:
#include <...> search starts here:
 /local/gnu/install/gcc-4.6/lib/gcc/avr/4.7.0/include
 /local/gnu/install/gcc-4.6/lib/gcc/avr/4.7.0/include-fixed
 /local/gnu/install/gcc-4.6/lib/gcc/avr/4.7.0/../../../../avr/include
End of search list.
GNU C (GCC) version 4.7.0 20110404 (experimental) (avr)
        compiled by GNU C version 4.3.2 [gcc-4_3-branch revision 141291], GMP
version 5.0.1, MPFR version 3.0.0-p8, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 184db0370fcb053833cf7d160d5a7a38
abi.c: In function 'getc':
abi.c:6:1: internal compiler error: in
compute_frame_pointer_to_fb_displacement, at dwarf2out.c:17293
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Something is going wron with argp/fp elimination, presumably due to changes in
http://gcc.gnu.org/viewcvs?view=revision&revision=171731


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

* [Bug debug/48459] [4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
@ 2011-04-06  0:20 ` pinskia at gcc dot gnu.org
  2011-04-21 10:03 ` gjl at gcc dot gnu.org
                   ` (33 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-04-06  0:20 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
          Component|other                       |debug
   Target Milestone|---                         |4.7.0
            Summary|avr: Assertion failure with |[4.7 Regression] avr:
                   |-gdwarf-2                   |Assertion failure with
                   |                            |-gdwarf-2


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

* [Bug debug/48459] [4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
  2011-04-06  0:20 ` [Bug debug/48459] [4.7 Regression] " pinskia at gcc dot gnu.org
@ 2011-04-21 10:03 ` gjl at gcc dot gnu.org
  2011-04-22  7:45 ` [Bug debug/48459] [4.6/4.7 " gjl at gcc dot gnu.org
                   ` (32 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-04-21 10:03 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
   Last reconfirmed|                            |2011-04-20
                 CC|                            |gjl at gcc dot gnu.org
      Known to fail|                            |4.7.0

--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-04-21 10:02:49 UTC ---
Increased the importance from P3 to P3 because this makes avr-gcc+dwarf-2
completely unusable. 

Configuring as --target=avr --with-dwarf2 fails to build cross compiler.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
  2011-04-06  0:20 ` [Bug debug/48459] [4.7 Regression] " pinskia at gcc dot gnu.org
  2011-04-21 10:03 ` gjl at gcc dot gnu.org
@ 2011-04-22  7:45 ` gjl at gcc dot gnu.org
  2011-06-09 14:01 ` anitha.boyapati at atmel dot com
                   ` (31 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-04-22  7:45 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eric.weddington at atmel
                   |                            |dot com
      Known to work|                            |4.5.3
            Summary|[4.7 Regression] avr:       |[4.6/4.7 Regression] avr:
                   |Assertion failure with      |Assertion failure with
                   |-gdwarf-2                   |-gdwarf-2
      Known to fail|                            |4.6.1

--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-04-22 07:44:30 UTC ---
Mike Stein's gcc-testresults indicate that avr+dwarf2 is already broken
throughout 4.6 and works in 4.5.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (2 preceding siblings ...)
  2011-04-22  7:45 ` [Bug debug/48459] [4.6/4.7 " gjl at gcc dot gnu.org
@ 2011-06-09 14:01 ` anitha.boyapati at atmel dot com
  2011-06-09 14:19 ` jason at gcc dot gnu.org
                   ` (30 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-06-09 14:01 UTC (permalink / raw)
  To: gcc-bugs

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

Anitha Boyapati <anitha.boyapati at atmel dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anitha.boyapati at atmel
                   |                            |dot com

--- Comment #3 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-09 14:01:22 UTC ---
(In reply to comment #1)
> Increased the importance from P3 to P3 because this makes avr-gcc+dwarf-2
> completely unusable. 
> 
> Configuring as --target=avr --with-dwarf2 fails to build cross compiler.

It fails with the message:

configure:3055: /home/anitha/comp/gcc-4.6.0/objdir/./gcc/xgcc
-B/home/anitha/comp/gcc-4.6.0/objdir/./gcc/ -B/home/anitha/install/avr/bin/
-B/home/anitha/install/avr/lib/ -isystem /home/anitha/install/avr/include
-isystem /home/anitha/install/avr/sys-include    -o conftest -O2 -g  
conftest.c  >&5
conftest.c:1:0: internal compiler error: in dwarf2out_frame_init, at
dwarf2out.c:4260


Further analysis shows that the changes introduced in revision 164701 (Found in
Tag: gcc_4_6_0_release) cause ICE.

http://gcc.gnu.org/viewcvs/tags/gcc_4_6_0_release/gcc/dwarf2out.c?r1=164670&r2=164701&diff_format=h

The macros DWARF2_UNWIND_INFO is undefined for AVR Target and hence the
initial_return_save() is neither defined nor called in 4.5.* versions. However
in 4.6.0 these macros are replaced with 'targetm' hooks, which return UI_DWARF2
and hence the function initial_return_save() gets called. Since
INCOMING_RETURN_ADDR_RTX is not defined, it results in ICE. (I have given the
preprocessed output from dwarf2out_frame_init() function).


- if (DWARF2_UNWIND_INFO || DWARF2_FRAME_INFO)
-         initial_return_save (INCOMING_RETURN_ADDR_RTX);

+ if (targetm.debug_unwind_info () == UI_DWARF2
+     || targetm.except_unwind_info (&global_options) == UI_DWARF2)
+    initial_return_save (((fancy_abort ("../../gcc/dwarf2out.c", 4260,
__FUNCTION__)), (rtx) 0));


Replacing DWARF2_UNWIND_INFO with targetm.debug_unwind_info() is either
incorrect or is incomplete for AVR Target. This remains to be analysed. 

This is a blocker for bug #17994


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (3 preceding siblings ...)
  2011-06-09 14:01 ` anitha.boyapati at atmel dot com
@ 2011-06-09 14:19 ` jason at gcc dot gnu.org
  2011-06-09 16:54 ` anitha.boyapati at atmel dot com
                   ` (29 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: jason at gcc dot gnu.org @ 2011-06-09 14:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-06-09 14:17:45 UTC ---
Created attachment 24475
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24475
patch

Here's an untested patch.  Does this fix the problem for you?  Naturally you'll
want to revert it once dwarf2 unwind info is supported.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (4 preceding siblings ...)
  2011-06-09 14:19 ` jason at gcc dot gnu.org
@ 2011-06-09 16:54 ` anitha.boyapati at atmel dot com
  2011-06-09 17:01 ` anitha.boyapati at atmel dot com
                   ` (28 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-06-09 16:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-09 16:54:11 UTC ---
(In reply to comment #4)
> Created attachment 24475 [details]
> patch
> 
> Here's an untested patch.  Does this fix the problem for you?  Naturally you'll
> want to revert it once dwarf2 unwind info is supported.

I don't think this is a proper fix. Current GCC trunk already has support for
DWARF2 CFI emission. But as per internals, emitting CFI can be optional. So
unless DWARF2_UNWIND_INFO or INCOMING_RETURN_ADDR_RTX is defined, the function
initial_return_save() should not be invoked.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (5 preceding siblings ...)
  2011-06-09 16:54 ` anitha.boyapati at atmel dot com
@ 2011-06-09 17:01 ` anitha.boyapati at atmel dot com
  2011-06-09 18:10 ` jason at gcc dot gnu.org
                   ` (27 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-06-09 17:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-09 17:00:20 UTC ---
(In reply to comment #4)
> Created attachment 24475 [details]
> patch
> 
> Here's an untested patch.  Does this fix the problem for you?

I'll try and let you know.

>  Naturally you'll
> want to revert it once dwarf2 unwind info is supported.

I think my other comment (#5) is somewhat ambiguous and incomplete. I am
referring to TARGET_DEBUG_UNWIND_INFO being defined in avr.c. In previous
versions it is optional but now it seems mandatory to avoid ICE.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (6 preceding siblings ...)
  2011-06-09 17:01 ` anitha.boyapati at atmel dot com
@ 2011-06-09 18:10 ` jason at gcc dot gnu.org
  2011-06-10  4:15 ` anitha.boyapati at atmel dot com
                   ` (26 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: jason at gcc dot gnu.org @ 2011-06-09 18:10 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #24475|0                           |1
        is obsolete|                            |

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2011-06-09 18:08:33 UTC ---
Created attachment 24478
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24478
alternate patch

This patch is probably better.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (7 preceding siblings ...)
  2011-06-09 18:10 ` jason at gcc dot gnu.org
@ 2011-06-10  4:15 ` anitha.boyapati at atmel dot com
  2011-06-10  5:24 ` jason at gcc dot gnu.org
                   ` (25 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-06-10  4:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-10 04:13:34 UTC ---
(In reply to comment #7)
> Created attachment 24478 [details]
> alternate patch
> 
> This patch is probably better.

I agree. But this does not fully solve the problem either.
INCOMING_RETURN_ADDR_RTX is being defined in dwarf2out.c to gcc_unreachable()
:-(


http://gcc.gnu.org/viewcvs/tags/gcc_4_6_0_release/gcc/dwarf2out.c?r1=162889&r2=162917

Due to this, we get an ICE - 

../../../../libgcc/../gcc/libgcc2.c: In function '__lshrdi3':
../../../../libgcc/../gcc/libgcc2.c:427:1: internal compiler error: in
dwarf2out_frame_debug_expr, at dwarf2out.c:2677


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (8 preceding siblings ...)
  2011-06-10  4:15 ` anitha.boyapati at atmel dot com
@ 2011-06-10  5:24 ` jason at gcc dot gnu.org
  2011-06-10  7:39 ` anitha.boyapati at atmel dot com
                   ` (24 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: jason at gcc dot gnu.org @ 2011-06-10  5:24 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

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

--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> 2011-06-10 05:22:36 UTC ---
(In reply to comment #8)
> I agree. But this does not fully solve the problem either.
> INCOMING_RETURN_ADDR_RTX is being defined in dwarf2out.c to gcc_unreachable()
> :-(

Why is initial_return_save still being called?  My patch should prevent
debug_unwind_info from returning UI_DWARF2.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (9 preceding siblings ...)
  2011-06-10  5:24 ` jason at gcc dot gnu.org
@ 2011-06-10  7:39 ` anitha.boyapati at atmel dot com
  2011-06-10 16:25 ` jason at gcc dot gnu.org
                   ` (23 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-06-10  7:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-10 07:37:19 UTC ---
(In reply to comment #9)
> (In reply to comment #8)
> > I agree. But this does not fully solve the problem either.
> > INCOMING_RETURN_ADDR_RTX is being defined in dwarf2out.c to gcc_unreachable()
> > :-(
> 
> Why is initial_return_save still being called?  My patch should prevent
> debug_unwind_info from returning UI_DWARF2.


Preprocessed output of default_debug_unwind_info()

enum unwind_info_type
default_debug_unwind_info (void)
{
# 1356 "../../gcc/targhooks.c"
  return UI_NONE;
}


I don't think  initial_return_save() is called now. It passes the compilation
there but gets struck in other places. I think it is because
INCOMING_RETURN_ADDR_RTX is now seen as defined and hence CFI info is emitted.
But this runs into trouble because the above hook is gcc_unreachable().


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (10 preceding siblings ...)
  2011-06-10  7:39 ` anitha.boyapati at atmel dot com
@ 2011-06-10 16:25 ` jason at gcc dot gnu.org
  2011-06-13  6:54 ` anitha.boyapati at atmel dot com
                   ` (22 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: jason at gcc dot gnu.org @ 2011-06-10 16:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Jason Merrill <jason at gcc dot gnu.org> 2011-06-10 16:24:12 UTC ---
(In reply to comment #10)
> I don't think  initial_return_save() is called now. It passes the compilation
> there but gets struck in other places. I think it is because
> INCOMING_RETURN_ADDR_RTX is now seen as defined and hence CFI info is emitted.
> But this runs into trouble because the above hook is gcc_unreachable().

It's only defined in dwarf2out.c, and there it's only used in the call to
initial_return_save.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (11 preceding siblings ...)
  2011-06-10 16:25 ` jason at gcc dot gnu.org
@ 2011-06-13  6:54 ` anitha.boyapati at atmel dot com
  2011-06-13  7:15 ` anitha.boyapati at atmel dot com
                   ` (21 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-06-13  6:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-13 06:53:25 UTC ---
(In reply to comment #11)
> (In reply to comment #10)
> > I don't think  initial_return_save() is called now. It passes the compilation
> > there but gets struck in other places. I think it is because
> > INCOMING_RETURN_ADDR_RTX is now seen as defined and hence CFI info is emitted.
> > But this runs into trouble because the above hook is gcc_unreachable().
> 
> It's only defined in dwarf2out.c, and there it's only used in the call to
> initial_return_save.

Right. This is a new problem, explained below.

The ICE results because dwarf2out_frame_debug_expr() is called(which I think
should not be called unless INCOMING_RETURN_ADDR_RTX/DWARF2_UNWIND_INFO is
defined).The above function(if is not a recursive),is always called from
dwarf2out_debug_frame().


dwarf2out_debug_frame() is required to emit frame information if and only if
dwarf2out_do_frame() is true. The latter going by comments, is required to
determine whether or not to emit a frame related information. Here some
ambiguity lies. In earlier versions, calls to dwarf2out_do_frame() are not
emitted as they are conditionally compiled (#ifdef DWARF2_UNWIND_INFO )

http://gcc.gnu.org/viewcvs/tags/gcc_4_6_0_release/gcc/final.c?r1=164610&r2=164701&diff_format=h

I think with the above patch, conditional compilation w.r.t DWARF2_UNWIND_INFO
macro is removed.  The logic of dwarf2out_do_frame() does not seem to consider
INCOMING_RETURN_ADDR_RTX as optional. Whenever write_symbols is defined to
DWARF2_DEBUG ( This is set by turning on DWARF2_DEBUGGING_MACRO in opts.c), the
function returns true. As a result, dwarf_debug_frame_expr() is always called!

dwarf2out_do_frame() --> dwarf2out_debug_frame() -->
dwarf2out_frame_debug_expr()


I think the function dwarf2out_do_frame() needs to be updated for optional CFI
check. [Not sure if the problem can be solved fully with these changes either]


HTH
Anitha


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (12 preceding siblings ...)
  2011-06-13  6:54 ` anitha.boyapati at atmel dot com
@ 2011-06-13  7:15 ` anitha.boyapati at atmel dot com
  2011-06-13  7:31 ` eric.weddington at atmel dot com
                   ` (20 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-06-13  7:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-13 07:13:41 UTC ---
(In reply to comment #12)

> function returns true. As a result, dwarf_debug_frame_expr() is always called!

Typo - dwarf2out_frame_debug_expr() is always called.


Georg:

Can you change the state to NEW and raise the severity to blocker? I don't have
required privileges.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (13 preceding siblings ...)
  2011-06-13  7:15 ` anitha.boyapati at atmel dot com
@ 2011-06-13  7:31 ` eric.weddington at atmel dot com
  2011-06-13  7:57 ` anitha.boyapati at atmel dot com
                   ` (19 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: eric.weddington at atmel dot com @ 2011-06-13  7:31 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Weddington <eric.weddington at atmel dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|2011-04-20 00:00:00         |2011.06.13 07:30:05
     Ever Confirmed|0                           |1
           Severity|normal                      |major

--- Comment #14 from Eric Weddington <eric.weddington at atmel dot com> 2011-06-13 07:30:05 UTC ---
(In reply to comment #13)

> Can you change the state to NEW and raise the severity to blocker? I don't have
> required privileges.

I've set state to NEW, but raised the severity to MAJOR. You need to understand
that the severity is for the entire GCC project and the AVR target is not even
a "secondary" target, even though it might be critical for Atmel.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (14 preceding siblings ...)
  2011-06-13  7:31 ` eric.weddington at atmel dot com
@ 2011-06-13  7:57 ` anitha.boyapati at atmel dot com
  2011-06-13 14:46 ` jason at gcc dot gnu.org
                   ` (18 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-06-13  7:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-13 07:55:19 UTC ---
(In reply to comment #14)
> (In reply to comment #13)
> 
> > Can you change the state to NEW and raise the severity to blocker? I don't have
> > required privileges.
> 
> I've set state to NEW, but raised the severity to MAJOR. You need to understand
> that the severity is for the entire GCC project and the AVR target is not even
> a "secondary" target, even though it might be critical for Atmel.

Correction: Not for Atmel and I am definitely not representing it.

I am going by the definition given in bug's life cycle. A blocker is described
as some bug which blocks development and/or testing work. The current bug does
when DWARF2 is enabled. But as you said, if more parameters are to be
considered, yes, I need to understand them.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (15 preceding siblings ...)
  2011-06-13  7:57 ` anitha.boyapati at atmel dot com
@ 2011-06-13 14:46 ` jason at gcc dot gnu.org
  2011-06-13 19:29 ` rth at gcc dot gnu.org
                   ` (17 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: jason at gcc dot gnu.org @ 2011-06-13 14:46 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|jason at redhat dot com     |rth at gcc dot gnu.org

--- Comment #16 from Jason Merrill <jason at gcc dot gnu.org> 2011-06-13 14:44:16 UTC ---
rth, this was broken by your change, do do you think it ought to work in the
new hookified world?


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (16 preceding siblings ...)
  2011-06-13 14:46 ` jason at gcc dot gnu.org
@ 2011-06-13 19:29 ` rth at gcc dot gnu.org
  2011-06-14  7:01 ` anitha.boyapati at atmel dot com
                   ` (16 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: rth at gcc dot gnu.org @ 2011-06-13 19:29 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Henderson <rth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #24478|0                           |1
        is obsolete|                            |

--- Comment #17 from Richard Henderson <rth at gcc dot gnu.org> 2011-06-13 19:28:33 UTC ---
Created attachment 24512
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24512
loosen constraints on register elimination

This seems to fix the problem.  At least for this small test case.
A full build for AVR fails, but that seems to be related to other
open bugs.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (17 preceding siblings ...)
  2011-06-13 19:29 ` rth at gcc dot gnu.org
@ 2011-06-14  7:01 ` anitha.boyapati at atmel dot com
  2011-06-14  9:11 ` gjl at gcc dot gnu.org
                   ` (15 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-06-14  7:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-14 07:00:45 UTC ---
(In reply to comment #17)
> Created attachment 24512 [details]
> loosen constraints on register elimination
> 
> This seems to fix the problem.  At least for this small test case.

I think there are 2 issues here. The first issue deals with avr-gcc which was
built without dwarf2 support. The second issue (comment #1 onwards) deals with
avr build errors. Maybe we should separate them.


> A full build for AVR fails, but that seems to be related to other
> open bugs.

Please let me know if any other known bugs exist with regarding to build
failure. AFAIK, there are some open PRs for emitting CFI information but not
for build failures (Bug #44643 is fixed)

But the current 4.6.0 build is without CFI support, which is possible as CFI is
optional. As far as I have analyzed, AVR build with DWARF2 support fails with
the reasons discussed in comment #3 (and later on). All the changes were made
in 4.6.0 release. Since the build is known to pass in 4.5.x release, this is a
regression. And I think we need to address these issues as part of this bug.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (18 preceding siblings ...)
  2011-06-14  7:01 ` anitha.boyapati at atmel dot com
@ 2011-06-14  9:11 ` gjl at gcc dot gnu.org
  2011-06-14  9:48 ` gjl at gcc dot gnu.org
                   ` (14 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-06-14  9:11 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.0                       |4.6.1


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (19 preceding siblings ...)
  2011-06-14  9:11 ` gjl at gcc dot gnu.org
@ 2011-06-14  9:48 ` gjl at gcc dot gnu.org
  2011-06-14 13:28 ` rth at gcc dot gnu.org
                   ` (13 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-06-14  9:48 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gjl at gcc dot gnu.org

--- Comment #19 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-06-14 09:46:21 UTC ---
(In reply to comment #17)

> A full build for AVR fails, but that seems to be related to other
> open bugs.

What bugs? 

I can build avr-gcc SVN 175011 from today without problems on i686-pc-linux-gnu
+ gcc 4.3.2.

Target: avr
Configured with: ../../gcc.gnu.org/trunk/configure --target=avr
--prefix=/local/gnu/install/gcc-4.7 --disable-nls --disable-shared
--enable-languages=c,c++
Thread model: single
gcc version 4.7.0 20110614 (experimental) (GCC)

GNU assembler version 2.21 (avr) using BFD version (GNU Binutils) 2.21

GMP 5.0.1
MPFR 3.0.0
MPC 0.8.2


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (20 preceding siblings ...)
  2011-06-14  9:48 ` gjl at gcc dot gnu.org
@ 2011-06-14 13:28 ` rth at gcc dot gnu.org
  2011-06-14 13:32 ` rth at gcc dot gnu.org
                   ` (12 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: rth at gcc dot gnu.org @ 2011-06-14 13:28 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Henderson <rth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #20 from Richard Henderson <rth at gcc dot gnu.org> 2011-06-14 13:23:53 UTC ---
(In reply to comment #19)
> > A full build for AVR fails, but that seems to be related to other
> > open bugs.
> 
> What bugs? 

Perhaps I shouldn't assume.

../../../../../../comb/newlib/libc/search/hash.c: In function ‘__expand_table’:
../../../../../../comb/newlib/libc/search/hash.c:898:1: error: unable to find a
register to spill in class ‘POINTER_REGS’
../../../../../../comb/newlib/libc/search/hash.c:898:1: error: this is the
insn:
(insn 190 97 191 10 (set (reg:QI 18 r18)
        (mem/c:QI (plus:HI (reg/f:HI 28 r28)
                (const_int 5 [0x5])) [14 S1 A8]))
../../../../../../comb/newlib/libc/search/hash.c:886 4 {*movqi}
     (nil))
../../../../../../comb/newlib/libc/search/hash.c:898:1: internal compiler
error: in spill_failure, at reload1.c:2113
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[8]: *** [lib_a-hash.o] Error 1
make[8]: Leaving directory
`/home/rth/work/gcc/bld-avr/avr-elf/avr25/newlib/libc/search'

I saw r28 in there and assumed it was the same problem with the
frame pointer as PR46779.

Anyway, I believe I've fixed the problem for #c0.  I'll commit it shortly.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (21 preceding siblings ...)
  2011-06-14 13:28 ` rth at gcc dot gnu.org
@ 2011-06-14 13:32 ` rth at gcc dot gnu.org
  2011-06-14 16:32 ` gjl at gcc dot gnu.org
                   ` (11 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: rth at gcc dot gnu.org @ 2011-06-14 13:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from Richard Henderson <rth at gcc dot gnu.org> 2011-06-14 13:31:47 UTC ---
Author: rth
Date: Tue Jun 14 13:31:43 2011
New Revision: 175018

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175018
Log:
PR debug/48459
        * dwarf2out.c (frame_pointer_fb_offset_valid): New.
        (based_loc_descr): Assert it's true.
        (compute_frame_pointer_to_fb_displacement): Set it, rather than
        aborting immediately.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (22 preceding siblings ...)
  2011-06-14 13:32 ` rth at gcc dot gnu.org
@ 2011-06-14 16:32 ` gjl at gcc dot gnu.org
  2011-06-14 19:14 ` rth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-06-14 16:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-06-14 16:32:08 UTC ---
(In reply to comment #20)
> (In reply to comment #19)
> > > A full build for AVR fails, but that seems to be related to other
> > > open bugs.
> > 
> > What bugs? 
> 
> Perhaps I shouldn't assume.
> 
> ../../../../../../comb/newlib/libc/search/hash.c: In function ‘__expand_table’:
> ../../../../../../comb/newlib/libc/search/hash.c:898:1: error: unable to find a
> register to spill in class ‘POINTER_REGS’
> ../../../../../../comb/newlib/libc/search/hash.c:898:1: error: this is the
> insn:
> (insn 190 97 191 10 (set (reg:QI 18 r18)
>         (mem/c:QI (plus:HI (reg/f:HI 28 r28)
>                 (const_int 5 [0x5])) [14 S1 A8]))
> ../../../../../../comb/newlib/libc/search/hash.c:886 4 {*movqi}
>      (nil))
> ../../../../../../comb/newlib/libc/search/hash.c:898:1: internal compiler
> error: in spill_failure, at reload1.c:2113

Oh, I doubt newlib works with avr-gcc. There is just one libc implementation
that cooperates with avr-gcc: avr-libc from
http://avr-libc.nongnu.org/

Note that avr-libc does not support in-tree builds, just set --host=avr
CC=/your/avr-gcc


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (23 preceding siblings ...)
  2011-06-14 16:32 ` gjl at gcc dot gnu.org
@ 2011-06-14 19:14 ` rth at gcc dot gnu.org
  2011-06-14 19:18 ` rth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: rth at gcc dot gnu.org @ 2011-06-14 19:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #23 from Richard Henderson <rth at gcc dot gnu.org> 2011-06-14 19:13:04 UTC ---
Author: rth
Date: Tue Jun 14 19:13:00 2011
New Revision: 175049

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175049
Log:
PR debug/48459
        * dwarf2out.c (frame_pointer_fb_offset_valid): New.
        (based_loc_descr): Assert it's true.
        (compute_frame_pointer_to_fb_displacement): Set it, rather than
        aborting immediately.

Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/dwarf2out.c


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (24 preceding siblings ...)
  2011-06-14 19:14 ` rth at gcc dot gnu.org
@ 2011-06-14 19:18 ` rth at gcc dot gnu.org
  2011-06-15  2:38 ` anitha.boyapati at atmel dot com
                   ` (8 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: rth at gcc dot gnu.org @ 2011-06-14 19:18 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Henderson <rth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #24 from Richard Henderson <rth at gcc dot gnu.org> 2011-06-14 19:15:44 UTC ---
The testcase at the head of the PR is now fixed.

For the 4.6 branch, this required also backporting

2011-03-22  Richard Henderson  <rth@redhat.com>

       * config/avr/avr.c (TARGET_EXCEPT_UNWIND_INFO): New.
       (avr_incoming_return_addr_rtx): New.
       (emit_push_byte): New.
       (expand_prologue): Use it.  Remove incorrect dwarf annotation for
       SREG, RAMPZ, zero register.  Push frame pointer by bytes.  Add dwarf
       annotation for __prologue_saves__.  Fixup dwarf annotation for CFA.
       (emit_pop_byte): New.
       (expand_epilogue): Use it.  Pop frame pointer by bytes.
       * config/avr/avr.h (FRAME_POINTER_CFA_OFFSET): Remove.
       (INCOMING_RETURN_ADDR_RTX): New.
       (INCOMING_FRAME_SP_OFFSET): New.
       (ARG_POINTER_CFA_OFFSET): New.
       * config/avr/avr.md (*pushqi): Fix mode of auto-inc.
       (*pushhi, *pushsi, *pushsf, popqi): Likewise.
       (pophi): Remove.

from mainline.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (25 preceding siblings ...)
  2011-06-14 19:18 ` rth at gcc dot gnu.org
@ 2011-06-15  2:38 ` anitha.boyapati at atmel dot com
  2011-06-15 14:42 ` rth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-06-15  2:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #25 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-15 02:37:59 UTC ---
(In reply to comment #24)
> The testcase at the head of the PR is now fixed.
> 
> For the 4.6 branch, this required also backporting
> 


(Assuming that backporting implies the emission of DWARF2 CFI) Is it not
possible to drop DWARF2 CFI feature (which is optional) and still make 4.6x
build successful? It is quite possible that some target might want to do this.

If the intention is to make CFI mandatory, then internals document should be
updated as well.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (26 preceding siblings ...)
  2011-06-15  2:38 ` anitha.boyapati at atmel dot com
@ 2011-06-15 14:42 ` rth at gcc dot gnu.org
  2011-06-16  6:35 ` anitha.boyapati at atmel dot com
                   ` (6 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: rth at gcc dot gnu.org @ 2011-06-15 14:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #26 from Richard Henderson <rth at gcc dot gnu.org> 2011-06-15 14:40:58 UTC ---
(In reply to comment #25)
> (Assuming that backporting implies the emission of DWARF2 CFI) Is it not
> possible to drop DWARF2 CFI feature (which is optional) and still make 4.6x
> build successful? It is quite possible that some target might want to do this.

Um.  Why?  This is not using dwarf2 cfi for unwinding; that is
still using setjmp.  This is using dwarf2 cfi for debugging,
which is exactly what you asked for when you said -gdwarf-2.

If you mean the assembler .cfi directives, you do not need
that in order for the build to succeed.  But that is detected
at configure time; if you have an assembler that accepts them
we will emit them, otherwise we'll emit the cfi data as .byte.

If you mean something else, I don't know what it is.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (27 preceding siblings ...)
  2011-06-15 14:42 ` rth at gcc dot gnu.org
@ 2011-06-16  6:35 ` anitha.boyapati at atmel dot com
  2011-06-16  6:38 ` anitha.boyapati at atmel dot com
                   ` (5 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-06-16  6:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #27 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-16 06:34:57 UTC ---

(In reply to comment #24)
> The testcase at the head of the PR is now fixed.

I could build avr-gcc from trunk and run couple of simple testcases.

[anitha@turing objdir]$ avr-gcc -v
Using built-in specs.
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/home/anitha/install/libexec/gcc/avr/4.7.0/lto-wrapper
Target: avr
Configured with: ../configure --target=avr --prefix=/home/anitha/install/
--with-dwarf2 --enable-languages=c --disable-libssp --disable-nls
--with-gmp=/proj/install/gmp-4.3.2/ --with-mpc=/proj/install/mpc-0.8.2/
--with-mpfr=/proj/install/mpfr-2.4.2/ CFLAGS=-g
Thread model: single
gcc version 4.7.0 20110615 (experimental) (GCC) 


> 
> For the 4.6 branch, this required also backporting

Any idea if the build succeeded for 4.6 branch? I tried and it failed. (branch:
gcc-4_6-branch)


../../../../libgcc/../gcc/libgcc2.c: In function '__lshrdi3':
../../../../libgcc/../gcc/libgcc2.c:427:1: internal compiler error: in
dwarf2out_frame_debug_expr, at dwarf2out.c:2671
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [_lshrdi3.o] Error 1
make[4]: Leaving directory
`/home/anitha/gcc-4.6-branch/objdir/avr/avr25/libgcc'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/home/anitha/gcc-4.6-branch/objdir/avr/libgcc'


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (28 preceding siblings ...)
  2011-06-16  6:35 ` anitha.boyapati at atmel dot com
@ 2011-06-16  6:38 ` anitha.boyapati at atmel dot com
  2011-06-16 13:55 ` rth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-06-16  6:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #28 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-16 06:35:41 UTC ---

(In reply to comment #24)
> The testcase at the head of the PR is now fixed.

I could build avr-gcc from trunk and run couple of simple testcases.

[anitha@turing objdir]$ avr-gcc -v
Using built-in specs.
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/home/anitha/install/libexec/gcc/avr/4.7.0/lto-wrapper
Target: avr
Configured with: ../configure --target=avr --prefix=/home/anitha/install/
--with-dwarf2 --enable-languages=c --disable-libssp --disable-nls
--with-gmp=/proj/install/gmp-4.3.2/ --with-mpc=/proj/install/mpc-0.8.2/
--with-mpfr=/proj/install/mpfr-2.4.2/ CFLAGS=-g
Thread model: single
gcc version 4.7.0 20110615 (experimental) (GCC) 


> 
> For the 4.6 branch, this required also backporting

Any idea if build succeeded for 4.6 branch? I tried and it failed. (branch:
gcc-4_6-branch)


../../../../libgcc/../gcc/libgcc2.c: In function '__lshrdi3':
../../../../libgcc/../gcc/libgcc2.c:427:1: internal compiler error: in
dwarf2out_frame_debug_expr, at dwarf2out.c:2671
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [_lshrdi3.o] Error 1
make[4]: Leaving directory
`/home/anitha/gcc-4.6-branch/objdir/avr/avr25/libgcc'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/home/anitha/gcc-4.6-branch/objdir/avr/libgcc'


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (29 preceding siblings ...)
  2011-06-16  6:38 ` anitha.boyapati at atmel dot com
@ 2011-06-16 13:55 ` rth at gcc dot gnu.org
  2011-06-17  7:09 ` anitha.boyapati at atmel dot com
                   ` (3 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: rth at gcc dot gnu.org @ 2011-06-16 13:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #29 from Richard Henderson <rth at gcc dot gnu.org> 2011-06-16 13:54:45 UTC ---
Works For Me.

[rth@anchor bld-avr-46]$ size avr/avr25/libgcc/_lshrdi3.o
   text       data        bss        dec        hex    filename
    244          0          0        244         f4   
avr/avr25/libgcc/_lshrdi3.o


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (30 preceding siblings ...)
  2011-06-16 13:55 ` rth at gcc dot gnu.org
@ 2011-06-17  7:09 ` anitha.boyapati at atmel dot com
  2011-06-17 15:52 ` rth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-06-17  7:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #30 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-17 07:07:34 UTC ---
Created attachment 24552
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24552
Make log for gcc-4_6-branch for comment 28

(In reply to comment #29)
> Works For Me.
> 
> [rth@anchor bld-avr-46]$ size avr/avr25/libgcc/_lshrdi3.o
>    text       data        bss        dec        hex    filename
>     244          0          0        244         f4   
> avr/avr25/libgcc/_lshrdi3.o


I have clean built multiple times now and it fails all the times with the same
message. I have got atleast one response in avr-gcc-list reporting the same
error. Also attached the log. Can you double check if dwarf2 is enabled?

svn entries file -

dir
175135
http://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch
http://gcc.gnu.org/svn/gcc

---
http://lists.gnu.org/archive/html/avr-gcc-list/2011-06/msg00034.html


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (31 preceding siblings ...)
  2011-06-17  7:09 ` anitha.boyapati at atmel dot com
@ 2011-06-17 15:52 ` rth at gcc dot gnu.org
  2011-06-17 16:06 ` rth at gcc dot gnu.org
  2011-06-20  5:02 ` anitha.boyapati at atmel dot com
  34 siblings, 0 replies; 36+ messages in thread
From: rth at gcc dot gnu.org @ 2011-06-17 15:52 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Henderson <rth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #31 from Richard Henderson <rth at gcc dot gnu.org> 2011-06-17 15:50:27 UTC ---
You're right.  And now I remember the other patch to dwarf2out.c
that went along with fixing up the errors in avr.c wrt dwarf2.
I must backport them both.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (32 preceding siblings ...)
  2011-06-17 15:52 ` rth at gcc dot gnu.org
@ 2011-06-17 16:06 ` rth at gcc dot gnu.org
  2011-06-20  5:02 ` anitha.boyapati at atmel dot com
  34 siblings, 0 replies; 36+ messages in thread
From: rth at gcc dot gnu.org @ 2011-06-17 16:06 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Henderson <rth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #32 from Richard Henderson <rth at gcc dot gnu.org> 2011-06-17 16:04:43 UTC ---
Fixed with:

2011-06-17  Richard Henderson  <rth@redhat.com>

        Backport from mainline
        2011-03-22  Richard Henderson  <rth@redhat.com>

        * dwarf2out.c (dwarf2out_frame_debug_expr) [rule 11]: Handle post_dec.


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

* [Bug debug/48459] [4.6/4.7 Regression] avr: Assertion failure with -gdwarf-2
  2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
                   ` (33 preceding siblings ...)
  2011-06-17 16:06 ` rth at gcc dot gnu.org
@ 2011-06-20  5:02 ` anitha.boyapati at atmel dot com
  34 siblings, 0 replies; 36+ messages in thread
From: anitha.boyapati at atmel dot com @ 2011-06-20  5:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #33 from Anitha Boyapati <anitha.boyapati at atmel dot com> 2011-06-20 05:00:47 UTC ---
(In reply to comment #32)
> Fixed with:
> 
> 2011-06-17  Richard Henderson  <rth@redhat.com>
> 
>         Backport from mainline
>         2011-03-22  Richard Henderson  <rth@redhat.com>
> 
>         * dwarf2out.c (dwarf2out_frame_debug_expr) [rule 11]: Handle post_dec.

Great! Build succeeds now. I am yet to test it. Thanks Richard.

Anitha


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

end of thread, other threads:[~2011-06-20  5:02 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-05 11:56 [Bug other/48459] New: avr: Assertion failure with -gdwarf-2 avr at gjlay dot de
2011-04-06  0:20 ` [Bug debug/48459] [4.7 Regression] " pinskia at gcc dot gnu.org
2011-04-21 10:03 ` gjl at gcc dot gnu.org
2011-04-22  7:45 ` [Bug debug/48459] [4.6/4.7 " gjl at gcc dot gnu.org
2011-06-09 14:01 ` anitha.boyapati at atmel dot com
2011-06-09 14:19 ` jason at gcc dot gnu.org
2011-06-09 16:54 ` anitha.boyapati at atmel dot com
2011-06-09 17:01 ` anitha.boyapati at atmel dot com
2011-06-09 18:10 ` jason at gcc dot gnu.org
2011-06-10  4:15 ` anitha.boyapati at atmel dot com
2011-06-10  5:24 ` jason at gcc dot gnu.org
2011-06-10  7:39 ` anitha.boyapati at atmel dot com
2011-06-10 16:25 ` jason at gcc dot gnu.org
2011-06-13  6:54 ` anitha.boyapati at atmel dot com
2011-06-13  7:15 ` anitha.boyapati at atmel dot com
2011-06-13  7:31 ` eric.weddington at atmel dot com
2011-06-13  7:57 ` anitha.boyapati at atmel dot com
2011-06-13 14:46 ` jason at gcc dot gnu.org
2011-06-13 19:29 ` rth at gcc dot gnu.org
2011-06-14  7:01 ` anitha.boyapati at atmel dot com
2011-06-14  9:11 ` gjl at gcc dot gnu.org
2011-06-14  9:48 ` gjl at gcc dot gnu.org
2011-06-14 13:28 ` rth at gcc dot gnu.org
2011-06-14 13:32 ` rth at gcc dot gnu.org
2011-06-14 16:32 ` gjl at gcc dot gnu.org
2011-06-14 19:14 ` rth at gcc dot gnu.org
2011-06-14 19:18 ` rth at gcc dot gnu.org
2011-06-15  2:38 ` anitha.boyapati at atmel dot com
2011-06-15 14:42 ` rth at gcc dot gnu.org
2011-06-16  6:35 ` anitha.boyapati at atmel dot com
2011-06-16  6:38 ` anitha.boyapati at atmel dot com
2011-06-16 13:55 ` rth at gcc dot gnu.org
2011-06-17  7:09 ` anitha.boyapati at atmel dot com
2011-06-17 15:52 ` rth at gcc dot gnu.org
2011-06-17 16:06 ` rth at gcc dot gnu.org
2011-06-20  5:02 ` anitha.boyapati at atmel 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).