[Bug c++/33046] New: ICE on explicit/partial template static member specialization mix-up

2007-08-11 Thread gcc-bugzilla at waba dot be
g++ 4 will ICE when provided the explicit template specialization of a static
class member with an extra template argument (like for a partial spec):

  template
  struct S { static int v; };

  template // instead of template<>
  int S::v;

g++ 3.3.6 and 3.4.6 compile this without complaining. g++ 4.1.3, 4.2.1 and
yesterday's SVN (r127350) produce an ICE:

  $ bin/g++ -c /tmp/t.cpp
  /tmp/t.cpp:4: internal compiler error: in import_export_decl, at
cp/decl2.c:1965
  Please submit...

Expected output:
  template parameters not used in partial specialization: ‘T’


-- 
   Summary: ICE on explicit/partial template static member
specialization mix-up
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc-bugzilla at waba dot be
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


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



[Bug fortran/32937] segfault with string and -fdefault-integer-8

2007-08-11 Thread fxcoudert at gcc dot gnu dot org


--- Comment #5 from fxcoudert at gcc dot gnu dot org  2007-08-11 11:17 
---
Hurray! It's been my wildest gdb session since a very long time (two sessions
of two hours each), but I've made it at last! My analysis in the previous
comment was right, we are generating a charlen's backend_decl with a wrong
type, which is fixed by:

Index: trans-array.c
===
--- trans-array.c   (revision 127334)
+++ trans-array.c   (working copy)
@@ -4547,9 +4547,7 @@ gfc_conv_expr_descriptor (gfc_se * se, g
  else if (expr->ts.cl->length
 && expr->ts.cl->length->expr_type == EXPR_CONSTANT)
{
- expr->ts.cl->backend_decl
-   = gfc_conv_mpz_to_tree (expr->ts.cl->length->value.integer,
-   expr->ts.cl->length->ts.kind);
+ gfc_conv_const_charlen (expr->ts.cl);
  loop.temp_ss->data.temp.type
= gfc_typenode_for_spec (&expr->ts);
  loop.temp_ss->string_length

(we even have a function ready for that case, mind you). I'm regtesting, and
I'll commit as obvious shortly after.

/me goes for a shower and an afternoon far away from gdb


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

   Keywords||patch
   Target Milestone|--- |4.3.0


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



[Bug c++/33046] ICE on explicit/partial template static member specialization mix-up

2007-08-11 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2007-08-11 11:27 ---


*** This bug has been marked as a duplicate of 24791 ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


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



[Bug c++/24791] ICE on invalid instantiation of template's static member

2007-08-11 Thread pinskia at gcc dot gnu dot org


--- Comment #10 from pinskia at gcc dot gnu dot org  2007-08-11 11:27 
---
*** Bug 33046 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||gcc-bugzilla at waba dot be


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



[Bug libfortran/26252] FAIL: gfortran.fortran-torture/execute/nan_inf_fmt.f90 execution

2007-08-11 Thread dave at hiauly1 dot hia dot nrc dot ca


--- Comment #7 from dave at hiauly1 dot hia dot nrc dot ca  2007-08-11 
13:05 ---
Subject: Re:  FAIL: gfortran.fortran-torture/execute/nan_inf_fmt.f90 execution

> write_float uses isfinite (n) and isnan (n) to determine if "Infinite" or 
> "NaN"
> is emitted and in that case exits before calling output_float.  So if 
> execution
> is reaching output_float, one or both of the aforementioned functions is
> probably broken or configured incorrectly.

I tried the attached change.  It results in the correct configure
results.  However, the test still fails.  So, probably the isfinite
and isnan defines in libgfortran.h need checking.  Don't have time
to look at this until week after next.

Regard write_float, it looks as if output_float will be called without
any finite or nan checks for B, O and Z formats.

Dave


--- Comment #8 from dave at hiauly1 dot hia dot nrc dot ca  2007-08-11 
13:05 ---
Created an attachment (id=14052)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14052&action=view)


-- 


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



[Bug libfortran/26252] FAIL: gfortran.fortran-torture/execute/nan_inf_fmt.f90 execution

2007-08-11 Thread jvdelisle at gcc dot gnu dot org


--- Comment #9 from jvdelisle at gcc dot gnu dot org  2007-08-11 15:04 
---
Regarding comment #7, The finite and nan have no meaning in the context of
binary, octal, or hex output.


-- 


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



[Bug libfortran/32784] [win32] Using 'con' as assigned file generates Fortran runtime error: File 'con' does not exist

2007-08-11 Thread jvdelisle at gcc dot gnu dot org


--- Comment #21 from jvdelisle at gcc dot gnu dot org  2007-08-11 15:38 
---
Changing to enhancement.  STANDARD I/O works fine.


-- 

jvdelisle at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|normal  |enhancement


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



[Bug c++/33047] New: "extern template" GNU extension makes static data member definition a declaration

2007-08-11 Thread gcc-bugzilla at waba dot be
Using the GNU extension for forward declaration of explicit instantiations
("extern template...") seems to make static member definitions fall under the
rules of declarations:

  $ cat /tmp/t.cpp
  struct C {};

  template
  struct S { static T v; };

  template
  T S::v = T();

  extern template class S;

  C c = S::v;


  $ bin/g++ -c /tmp/t.cpp
  /tmp/t.cpp: In instantiation of ‘C S::v’:
  /tmp/t.cpp:11:   instantiated from here
  /tmp/t.cpp:7: error: ‘S::v’ cannot be initialized by a non-constant
expression when being declared


  $ bin/g++ -v
  Using built-in specs.
  Target: x86_64-unknown-linux-gnu
  Configured with: ../gcc/configure --prefix=/M/src/inst --enable-languages=c++
--disable-bootstrap --disable-multilib
  Thread model: posix
  gcc version 4.3.0 20070810 (experimental)


Known workarounds for this issue are:
 1. using g++ 3.x rather than the 4.1.3, 4.2.1 or trunk (r127350) that I tried
 2. removing the "extern template" line
 3. changing the order of the structure declaration, data member definition and
forward declaration lines
 4. providing an explicit specialization of the static data members for the
forward-declared instantiations


-- 
   Summary: "extern template" GNU extension makes static data member
definition a declaration
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc-bugzilla at waba dot be
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


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



[Bug libfortran/32784] [win32] Using 'con' as assigned file generates Fortran runtime error: File 'con' does not exist

2007-08-11 Thread steven dot chapel at sbcglobal dot net


--- Comment #22 from steven dot chapel at sbcglobal dot net  2007-08-11 
15:54 ---
This is *not* an enhancement. It is a *regression* that causes an important
application not to work.


-- 


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



[Bug libfortran/32784] [win32] Using 'con' as assigned file generates Fortran runtime error: File 'con' does not exist

2007-08-11 Thread kargl at gcc dot gnu dot org


--- Comment #23 from kargl at gcc dot gnu dot org  2007-08-11 16:11 ---
(In reply to comment #22)
> This is *not* an enhancement. It is a *regression* that causes an important
> application not to work.
> 

A regression with respect to what version of gfortran?  A scan of the
audit trail did not reveal the working version.

If the important application is that important, you can always roll
up your sleeves and help fix the problem.


-- 


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



[Bug tree-optimization/32723] [4.2 Regression] memory hog in solve_graph

2007-08-11 Thread pixel at mandriva dot com


--- Comment #10 from pixel at mandriva dot com  2007-08-11 17:08 ---
are you sure it fixes it? it still takes 1G here...


-- 

pixel at mandriva dot com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |


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



[Bug libfortran/32784] [win32] Using 'con' as assigned file generates Fortran runtime error: File 'con' does not exist

2007-08-11 Thread jvdelisle at gcc dot gnu dot org


--- Comment #24 from jvdelisle at gcc dot gnu dot org  2007-08-11 17:49 
---
Sorry for the spin up here.  I have a patch ready, still trying to test.


-- 


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



[Bug c/33048] New: Warn on incorrect __attribute__((pure)), __attribute__((const))

2007-08-11 Thread ed at catmur dot co dot uk
gcc should warn when a function that is declared with __attribute__((pure)) or
__attribute__((const)) is defined in a way that appears to break those
guarantees.

i.e. an __attribute__((const)) function should not be allowed to dereference
pointers or call non-__attribute__((const)) functions (except perhaps
__attribute__((pure)) functions with pointer arguments only allowed to be
references to local variables?); __attribute__((pure)) similarly.


-- 
   Summary: Warn on incorrect __attribute__((pure)),
__attribute__((const))
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ed at catmur dot co dot uk


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



[Bug c/33049] New: AVR: bit extraction non optimal, inversing logic solves problem

2007-08-11 Thread wvangulik at xs4all dot nl
Using this version/config:

~
Using built-in specs.
Target: avr
Configured with: ../gcc-4.1.2/configure --prefix=/c/WinAVR --target=avr
--enable
-languages=c,c++ --with-dwarf2 --enable-win32-registry=WinAVR-20070525
--disable
-nls --with-gmp=/usr/local --with-mpfr=/usr/local --enable-doc --disable-libssp
Thread model: single
gcc version 4.1.2 (WinAVR 20070525)

~~
I compiled the source using this command line:

avr-gcc -S -Os test.c -mmcu=atmega16

These examples also suffers from double and instruction missed (bugID 11259)

The key point is that writing an expression like:
tmp = 0; if(var&(1<>N)&1) tmp|=1;
This uses a swap instruction and then shifts. It's optimal (except from the
same loss as bugID 12259 for N >= 4)

Maybe this gives a hint on where the shifting is generally going wrong. I tried
3 approaches in the test.c file.

Another interresting thing is the removal off the extra and instructions in the
last examples in the file.


-- 
   Summary: AVR: bit extraction non optimal, inversing logic solves
problem
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: wvangulik at xs4all dot nl


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



[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2007-08-11 Thread pinskia at gcc dot gnu dot org


--- Comment #4 from pinskia at gcc dot gnu dot org  2007-08-11 17:54 ---
*** Bug 33048 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||ed at catmur dot co dot uk


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



[Bug c/33048] Warn on incorrect __attribute__((pure)), __attribute__((const))

2007-08-11 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2007-08-11 17:54 ---


*** This bug has been marked as a duplicate of 18487 ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


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



[Bug c/33049] AVR: bit extraction non optimal, inversing logic solves problem

2007-08-11 Thread wvangulik at xs4all dot nl


--- Comment #1 from wvangulik at xs4all dot nl  2007-08-11 17:56 ---
Created an attachment (id=14053)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14053&action=view)
examples of good extraction and bad extraction

Adding the test file showing the missed optimization


-- 


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



[Bug target/33049] AVR: bit extraction non optimal, inversing logic solves problem

2007-08-11 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2007-08-11 17:58 ---
It might be interesting if you tried 4.2.1.


-- 


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



[Bug c/33050] New: AVR unnessary register save

2007-08-11 Thread wvangulik at xs4all dot nl
Using this version/config:

~`
Using built-in specs.
Target: avr
Configured with: ../gcc-4.1.2/configure --prefix=/c/WinAVR --target=avr
--enable
-languages=c,c++ --with-dwarf2 --enable-win32-registry=WinAVR-20070525
--disable
-nls --with-gmp=/usr/local --with-mpfr=/usr/local --enable-doc --disable-libssp
Thread model: single
gcc version 4.1.2 (WinAVR 20070525)

~~
Using this command line to compile:

avr-gcc -S -Os test.c -mmcu=atmega16

~~~

The test case:

extern unsigned char foo(unsigned char in);
unsigned char test2(unsigned char input) {

  input += foo(0xA); //use input
  foo(0xA);  //make sure input must be saved over the call
  return input;
}


The assembler output:
/* prologue: frame size=0 */
push r16
push r17

[Bug c/33050] AVR unnessary register save

2007-08-11 Thread wvangulik at xs4all dot nl


--- Comment #1 from wvangulik at xs4all dot nl  2007-08-11 18:14 ---
Created an attachment (id=14054)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14054&action=view)
Example

C source showing non optimal code


-- 


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



[Bug c++/33051] New: g++-4.2: Internal error: Segmentation fault (program cc1plus)

2007-08-11 Thread bumens at dingens dot org
[EMAIL PROTECTED]:~ % cat dingens.cc
#include 

template class A {
public:
size_t operator()(const T& o) {
if (sizeof(T)==sizeof(size_t))
return (const size_t) o;
else
return 42;
}
};

struct B { unsigned int n; };

int main() {
A hash;

std::cout << hash(B()) << std::endl;
return 0;
}

[EMAIL PROTECTED]:~ % g++-4.2 -o dingens dingens.cc
g++-4.2: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
.


-- 
   Summary: g++-4.2: Internal error: Segmentation fault (program
cc1plus)
   Product: gcc
   Version: 4.2.1
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bumens at dingens dot org
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug c++/33051] g++-4.2: Internal error: Segmentation fault (program cc1plus)

2007-08-11 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2007-08-11 18:50 ---
The trunk (and 4.0.2) gives:
t.cc: In member function 'size_t A::operator()(const T&) [with T = B]':
t.cc:19:   instantiated from here
t.cc:8: error: invalid cast from type 'const B' to type 'const size_t'


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|major   |normal


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



[Bug libfortran/32972] performance of pack/unpack

2007-08-11 Thread tkoenig at gcc dot gnu dot org


--- Comment #3 from tkoenig at gcc dot gnu dot org  2007-08-11 20:34 ---
Created an attachment (id=14055)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14055&action=view)
proposed patch

Here's a patch, which is currently regtesting.

We'll absolutely need to check this on a big-endian machine
before committing it, though.


-- 

tkoenig at gcc dot gnu dot org changed:

   What|Removed |Added

  Attachment #14051|0   |1
is obsolete||


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



[Bug target/29258] internal compiler error: Segmentation fault

2007-08-11 Thread chandleg at wizardsworks dot org


--- Comment #6 from chandleg at wizardsworks dot org  2007-08-11 20:37 
---
I have the same problem as listed here, building a x86_64 cross compiler using
32bit gcc-4.1.2

bash-3.1$ gcc -v
Reading specs from /usr/lib/gcc/i486-slackware-linux/4.1.2/specs
Target: i486-slackware-linux
Configured with: ../gcc-4.1.2/configure --prefix=/usr --enable-shared
--enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix
--enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose
--with-arch=i486 --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 4.1.2

Here is a link to the FULL output of the build.  The error is at the bottom.
http://wizardsworks.org/chandleg/gcc-bug.ouput


-- 

chandleg at wizardsworks dot org changed:

   What|Removed |Added

 CC||chandleg at wizardsworks dot
   ||org


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



[Bug fortran/32937] segfault with string and -fdefault-integer-8

2007-08-11 Thread fxcoudert at gcc dot gnu dot org


--- Comment #6 from fxcoudert at gcc dot gnu dot org  2007-08-11 21:31 
---
Subject: Bug 32937

Author: fxcoudert
Date: Sat Aug 11 21:31:35 2007
New Revision: 127363

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127363
Log:
PR fortran/32937

* trans-array.c (gfc_conv_expr_descriptor): Use
gfc_conv_const_charlen to generate backend_decl of right type.
* trans-expr.c (gfc_conv_expr_op): Use correct return type.
(gfc_build_compare_string): Use int type instead of default
integer kind for single character comparison.
(gfc_conv_aliased_arg): Give backend_decl the right type.
* trans-decl.c (gfc_build_intrinsic_function_decls): Make
compare_string return an int.

* gfortran.dg/char_length_6.f90: New test.

* intrinsics/string_intrinsics.c (compare_string): Return an int.
* libgfortran.h (compare_string): Likewise.

Added:
trunk/gcc/testsuite/gfortran.dg/char_length_6.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog
trunk/libgfortran/ChangeLog
trunk/libgfortran/intrinsics/string_intrinsics.c
trunk/libgfortran/libgfortran.h


-- 


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



[Bug fortran/31189] Support backtracing for non-library errors

2007-08-11 Thread fxcoudert at gcc dot gnu dot org


--- Comment #5 from fxcoudert at gcc dot gnu dot org  2007-08-11 21:52 
---
Subject: Bug 31189

Author: fxcoudert
Date: Sat Aug 11 21:52:22 2007
New Revision: 127364

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127364
Log:
PR fortran/31189

* runtime/backtrace.c (show_backtrace): Skip _gfortrani_handler
when displaying backtrace.
* runtime/compile_options.c: Include .
(handler): New function.
(set_options): Set signal handlers for backtrace.
* libgfortran.h (handler): Add prototype.

* invoke.texi (-fbacktrace): Document the new behaviour.

Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/invoke.texi
trunk/libgfortran/ChangeLog
trunk/libgfortran/libgfortran.h
trunk/libgfortran/runtime/backtrace.c
trunk/libgfortran/runtime/compile_options.c


-- 


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



[Bug fortran/32937] segfault with string and -fdefault-integer-8

2007-08-11 Thread fxcoudert at gcc dot gnu dot org


--- Comment #7 from fxcoudert at gcc dot gnu dot org  2007-08-11 21:53 
---
Fixed.


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/29635] debug info of modules

2007-08-11 Thread dfranke at gcc dot gnu dot org


--- Comment #3 from dfranke at gcc dot gnu dot org  2007-08-11 22:08 ---
gfortran seems to lack the following information:

 1. DW_TAG_module
to describe the module at hand
 2. DW_TAG_imported_declaration/DW_TAG_imported_module/DW_AT_import
to describe use-associated variables (dwarf2, sec. 4.3; dwarf3, sec. 3.2.3
and 3.2.4)

The former is generated by ifort, the latter is not.

As dwarf3, sec 3.2, indicates similarities of modules to C++ namespaces, it
could be worth a try to see how it is implemented over there. The equivalent
C++-code:

$> cat a.cpp
#include 

namespace foo {
  int i = 42;
}

int main() {
  using namespace foo;

  printf("%d\n", i);
  return 0;
}

$> g++ -g a.cpp
$> readelf 
[...]
 <1>: Abbrev Number: 29 (DW_TAG_subprogram)
 DW_AT_external: 1
 DW_AT_name: main
 DW_AT_decl_file   : 1
 DW_AT_decl_line   : 17
 DW_AT_type: <109>
 DW_AT_low_pc  : 0x8048484
 DW_AT_high_pc : 0x80484b8
 DW_AT_frame_base  : 0  (location list)
 DW_AT_sibling : 
 <2>: Abbrev Number: 30 (DW_TAG_imported_module)
 DW_AT_decl_file   : 1
 DW_AT_decl_line   : 18
 DW_AT_import  : 
 <1>: Abbrev Number: 4 (DW_TAG_namespace)
 DW_AT_name: foo
 DW_AT_decl_file   : 1
 DW_AT_decl_line   : 13
 DW_AT_sibling : 
 <2>: Abbrev Number: 31 (DW_TAG_variable)
 DW_AT_name: i
 DW_AT_decl_file   : 1
 DW_AT_decl_line   : 14
 DW_AT_MIPS_linkage_name: _ZN3foo1iE
 DW_AT_type: <109>
 DW_AT_external: 1
 DW_AT_declaration : 1
 <1>: Abbrev Number: 32 (DW_TAG_variable)
 DW_AT_specification: 
 DW_AT_location: 5 byte block: 3 ec 96 4 8  (DW_OP_addr: 80496ec)
[...]

Steven, are you (still) working on this?


-- 

dfranke at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dfranke at gcc dot gnu dot
   ||org


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



[Bug fortran/30964] optional arguments to random_seed

2007-08-11 Thread fxcoudert at gcc dot gnu dot org


--- Comment #7 from fxcoudert at gcc dot gnu dot org  2007-08-11 23:22 
---
(In reply to comment #6)
> For the first one, gfc_conv_missing_dummy() is called, which leads to correct
> code. For the second one, gfc_conv_missing_dummy() is not called, leading to
> wrong-code.

The reason for that is in gfc_trans_call, around line 2316 (the call to
gfc_conv_missing_dummy): when we come here, we check both the list of actual
args and the list of formal args for optional args. This is need, because we
need the type of the formal arg. Problem is that apparently intrinsic
subroutines don't have a list of formal args when we come up here.


-- 


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



[Bug fortran/30964] optional arguments to random_seed

2007-08-11 Thread fxcoudert at gcc dot gnu dot org


--- Comment #8 from fxcoudert at gcc dot gnu dot org  2007-08-11 23:33 
---
(In reply to comment #7)
> The reason for that is in gfc_trans_call

This should be: gfc_conv_function_call


-- 


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



[Bug fortran/30964] optional arguments to random_seed

2007-08-11 Thread fxcoudert at gcc dot gnu dot org


--- Comment #9 from fxcoudert at gcc dot gnu dot org  2007-08-12 00:16 
---
Haven't yet had time to regtest this patch, but it should fix the bug:

Index: trans-expr.c
===
--- trans-expr.c(revision 127363)
+++ trans-expr.c(working copy)
@@ -2303,36 +2303,38 @@ gfc_conv_function_call (gfc_se * se, gfc
} 
}

-  if (fsym)
-   {
- if (e)
+  /* The case with fsym->attr.optional is that of a user subroutine
+with an interface indicating an optional argument.  When we call
+an intrinsic subroutine, however, fsym is NULL, but we might still
+have an optional argument, so we proceed to the substitution
+just in case.  */
+  if (e && (fsym == NULL || fsym->attr.optional))
+   {
+ /* If an optional argument is itself an optional dummy argument,
+check its presence and substitute a null if absent.  */
+ if (e->expr_type == EXPR_VARIABLE
+ && e->symtree->n.sym->attr.optional)
+   gfc_conv_missing_dummy (&parmse, e, fsym ? fsym->ts : e->ts);
+   }
+
+  if (fsym && e)
+   {
+ /* Obtain the character length of an assumed character length
+length procedure from the typespec.  */
+ if (fsym->ts.type == BT_CHARACTER
+ && parmse.string_length == NULL_TREE
+ && e->ts.type == BT_PROCEDURE
+ && e->symtree->n.sym->ts.type == BT_CHARACTER
+ && e->symtree->n.sym->ts.cl->length != NULL)
{
- /* If an optional argument is itself an optional dummy
-argument, check its presence and substitute a null
-if absent.  */
- if (e->expr_type == EXPR_VARIABLE
-   && e->symtree->n.sym->attr.optional
-   && fsym->attr.optional)
-   gfc_conv_missing_dummy (&parmse, e, fsym->ts);
-
- /* Obtain the character length of an assumed character
-length procedure from the typespec.  */
- if (fsym->ts.type == BT_CHARACTER
-   && parmse.string_length == NULL_TREE
-   && e->ts.type == BT_PROCEDURE
-   && e->symtree->n.sym->ts.type == BT_CHARACTER
-   && e->symtree->n.sym->ts.cl->length != NULL)
-   {
- gfc_conv_const_charlen (e->symtree->n.sym->ts.cl);
- parmse.string_length
-   = e->symtree->n.sym->ts.cl->backend_decl;
-   }
+ gfc_conv_const_charlen (e->symtree->n.sym->ts.cl);
+ parmse.string_length = e->symtree->n.sym->ts.cl->backend_decl;
}
-
- if (need_interface_mapping)
-   gfc_add_interface_mapping (&mapping, fsym, &parmse);
}

+  if (fsym && need_interface_mapping)
+   gfc_add_interface_mapping (&mapping, fsym, &parmse);
+
   gfc_add_block_to_block (&se->pre, &parmse.pre);
   gfc_add_block_to_block (&post, &parmse.post);



-- 


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



[Bug bootstrap/33031] [4.3 Regression] Bootstrap fails on gcc/tree.c

2007-08-11 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

Summary|Bootstrap fails on  |[4.3 Regression] Bootstrap
   |gcc/tree.c  |fails on gcc/tree.c
   Target Milestone|--- |4.3.0


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



[Bug c++/8007] typeof(...) as template arg doesn't work

2007-08-11 Thread pinskia at gcc dot gnu dot org


--- Comment #7 from pinskia at gcc dot gnu dot org  2007-08-12 02:02 ---
Trunk gives:
t.cc: In function 'void g()':
t.cc:3: error: invalid use of non-static member function 'int B::f()'
t.cc:3: error: template argument 1 is invalid
t.cc:3: error: invalid type in declaration before ';' token


-- 


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



[Bug c++/6709] typeof() cannot be used with the :: operator

2007-08-11 Thread pinskia at gcc dot gnu dot org


--- Comment #8 from pinskia at gcc dot gnu dot org  2007-08-12 02:05 ---
Hmm, I wonder what the current draft of C++0x says of decltype with this
respect (right now we reject it).


-- 


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



[Bug c++/33045] [c++0x] Incorrect decltype result for function calls.

2007-08-11 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2007-08-12 02:22 ---
Looks like __typeof__ does the same thing.


-- 


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