[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2006-12-30 08:08 ---
The following is ok:
  static_cast(*this).fun();  //ok

Because you are creating a rvalue to hold "*this" which is then bound to a
const lvalue.

The following is an error:
  fun();   //err  
Because func is not a non_const.

Or I am missing something because all the versions of GCC I tried give an
error.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

  Known to work||4.0.1 4.2.0 4.3.0


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



[Bug c++/30332] New: bit-field: optimization BUG?

2006-12-30 Thread s__nakayama at infoseek dot jp
The output is different by the optimization.

testcase:
#include 

struct S
{
  unsigned int long long a:33;
};


int main ()
{
  struct S x = { -1 };
  typeof(+x.a) z = x.a+10;
  printf("%llx\n", z);

  return 0;
}

result:
$ g++ bug.cpp; ./a
20009

$ g++ -O bug.cpp; ./a
9

gcc version: 4.2 20061212


-- 
   Summary: bit-field: optimization BUG?
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: s__nakayama at infoseek dot jp


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



[Bug c++/30332] bit-field: optimization BUG?

2006-12-30 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2006-12-30 08:28 ---
So we do x.a+10 in unsigned long long and then cast it to the bit-field type. 
I am thinking we are getting the wrong type for the typeof anyways.


-- 


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



[Bug c/5351] function pass-by-value structure copy corrupts structure on stack

2006-12-30 Thread van at wdv dot com


--- Comment #5 from van at wdv dot com  2006-12-30 08:33 ---
I am running cygwin on Windows XP
I am using gcc 3.4.4-3
The bug also manifests itself on my service provider's CPU.
All values should be 100.0. Minimal program below.

cc -o test test.c

My erroneous values:
ListA: (x: 100.0 y: 100.0 z: 100.0 w: 100.0)
ListB: (x: 100.0 y: 100.0 z: 100.0 w: 100.0)
MinA: (x:   0.0 y:   0.0 z:   0.0 w: 100.0)
MinB: (x:   0.0 y:   0.0 z:   0.0 w:   0.0)
AvgA: (x: 100.0 y: 100.0 z: 100.0 w: 100.0)
AvgB: (x: 100.0 y: 100.0 z: 100.0 w: 200.0)

Service provider erroneous values:
ListA: (x: 100.0 y: 100.0 z: 100.0 w: 100.0)
ListB: (x: 100.0 y: 100.0 z: 100.0 w: 100.0)
MinA: (x:  -0.0 y:   0.0 z:   0.0 w: 100.0)
MinB: (x:  -0.0 y:   0.0 z:   0.0 w:  -0.0)
AvgA: (x: 100.0 y: 100.0 z: 100.0 w: 100.0)
AvgB: (x: 100.0 y: 100.0 z: 100.0 w: 200.0)

--- test.c code that fails is here: 

#include 

#define MIN(a,b)  (((a)<=(b))?(a):(b))

#define ENTRIES 1 // put whatever in here, it is still broken

typedef struct
{
double x, y, z, w;
} Entry;

Entry ListA[ENTRIES];
Entry ListB[ENTRIES];

Entry MinA, AvgA;
Entry MinB, AvgB;

extern void printEntry(Entry  fntry, char *label);
extern Entry   Average(Entry *fntry);
extern Entry   Minimum(Entry *fntry);

main(int argc, char **argv)
{
int i;

for(i = 0; i < ENTRIES; i++)
{
ListA[i].x = 100; ListA[i].y = 100; ListA[i].z = 100; ListA[i].w = 100;
ListB[i].x = 100; ListB[i].y = 100; ListB[i].z = 100; ListB[i].w = 100;
}

printEntry(ListA[0], "ListA");
printEntry(ListB[0], "ListB");


// should be same, but aren't
MinA = Minimum(ListA); printEntry(MinA, "MinA");
MinB = Minimum(ListB); printEntry(MinB, "MinB");

// should be same, but aren't
AvgA = Average(ListA); printEntry(AvgA, "AvgA");
AvgB = Average(ListB); printEntry(AvgB, "AvgB");
}

void
printEntry(Entry fntry, char *label)
{
printf("%s: (x: %5.1f y: %5.1f z: %5.1f w: %5.1f)\n",
label, fntry.x, fntry.y, fntry.z, fntry.w);
}


Entry
Average(Entry *fntry)
{
int i;
Entry average;

for (i = 0; i < ENTRIES; i++)
{
average.x += fntry[i].x;
average.y += fntry[i].y;
average.z += fntry[i].z;
average.w += fntry[i].w;
}

average.x /= ENTRIES;
average.y /= ENTRIES;
average.z /= ENTRIES;
average.w /= ENTRIES;

return(average);
}

Entry
Minimum(Entry *fntry)
{
int i;
Entry minimum;

for (i = 0; i < ENTRIES; i++)
{
minimum.x = MIN(minimum.x, fntry[i].x);
minimum.y = MIN(minimum.y, fntry[i].y);
minimum.z = MIN(minimum.z, fntry[i].z);
minimum.w = MIN(minimum.w, fntry[i].w);
}

return(minimum);
}


-- 

van at wdv dot com changed:

   What|Removed |Added

 CC||van at wdv dot com


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



[Bug fortran/30321] program crash for SUM applied to zero-size array

2006-12-30 Thread patchapp at dberlin dot org


--- Comment #4 from patchapp at dberlin dot org  2006-12-30 09:40 ---
Subject: Bug number PR libfortran/30321

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01864.html


-- 


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



[Bug c++/29535] [4.1/4.2/4.3 Regression] ICE in instantiate_class_template, at cp/pt.c:5728

2006-12-30 Thread jakub at gcc dot gnu dot org


--- Comment #7 from jakub at gcc dot gnu dot org  2006-12-30 10:59 ---
Testcase #5 ICEs in instantiate_class_template, the following ICEs in tsubst
the same as the original unreduced testcase:

template  struct SetRegion2D
{
  struct FloodFillControl
  {
struct Allocator{};
  };
};
template 
struct MotionSearcher
{
 typedef SetRegion2D Region_t;
 MotionSearcher (typename Region_t::FloodFillControl::Allocator &a_rAllocator);
};
class MotionSearcherY : public MotionSearcher<1, int> {};


-- 


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



[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread gdr at integrable-solutions dot net


--- Comment #2 from gdr at integrable-solutions dot net  2006-12-30 11:21 
---
Subject: Re:   New: a const member function can call a non_const member
function without const_cast

"hongleij at 126 dot com" <[EMAIL PROTECTED]> writes:

| //const_test.cpp
| struct A
| {
|   A(unsigned int n)
|   {
|  aa=n;
|   }
|   void const_fun() const
|   {
|   static_cast(*this).fun();  //ok

yes, as mandated by C++ semantics -- the static_cast creates a
new object to which fun() is applied.  That is OK.

|  // fun();   //err  

direct call to fun() is an error.

So, this PR does not report an error.  It should be closed as "mistaken".

-- Gaby


-- 


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



[Bug c/30333] New: Segmentation fault for -O2 on legal code

2006-12-30 Thread dcb314 at hotmail dot com
I just tried to compile Suse package gdm-2.16.1-43
with the GNU C compiler version 4.3 snapshot 20061223.

The compiler said

if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I../../gui -I../../daemon
-I../../vicious-extensions -DAUTHDIR=\""/var/lib/gdm"\"
-DDATADIR=\""/opt/gnome/share"\" -DDMCONFDIR=\""/etc/opt/gnome/dm"\"
-DGDM_CONFIG_FILE=\"/etc/opt/gnome/gdm/gdm.conf\"
-DGDMLOCALEDIR=\""/etc/opt/gnome/gdm"\"
-DGNOMELOCALEDIR=\""/opt/gnome/share/locale"\"
-DLIBEXECDIR=\""/opt/gnome/lib64/gdm"\" -DSBINDIR=\""/opt/gnome/sbin"\"
-DPIXMAPDIR=\""/opt/gnome/share/pixmaps"\" -I/usr/include/cairo
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libxml2
-I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib64/gtk-2.0/include
-I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0
-I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib64/glib-2.0/include
-I/opt/gnome/include/libglade-2.0   -I/usr/include/cairo
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libart-2.0
-I/usr/include/libxml2 -I/opt/gnome/include/gtk-2.0
-I/opt/gnome/lib64/gtk-2.0/include -I/opt/gnome/include/atk-1.0
-I/opt/gnome/include/pango-1.0 -I/opt/gnome/include/glib-2.0
-I/opt/gnome/lib64/glib-2.0/include -I/opt/gnome/include/libgnomecanvas-2.0
-I/opt/gnome/include/librsvg-2  -O2 -g -fmessage-length=0
-D_FORTIFY_SOURCE=2 -fno-strict-aliasing  -Wall -Wmissing-prototypes  -MT
greeter_canvas_item.o -MD -MP -MF ".deps/greeter_canvas_item.Tpo" -c -o
greeter_canvas_item.o greeter_canvas_item.c; \
then mv -f ".deps/greeter_canvas_item.Tpo"
".deps/greeter_canvas_item.Po"; else rm -f ".deps/greeter_canvas_item.Tpo";
exit 1; fi
greeter_canvas_item.c:144: warning: no previous prototype for 'menubar_done'
greeter_canvas_item.c: In function 'greeter_item_create_canvas_item':
greeter_canvas_item.c:705: warning: passing argument 2 of 'g_timeout_add' from
incompatible pointer
type
greeter_canvas_item.c:926: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html> for instructions.

Source code attached. Flag -O2 required.

Here is a bit more detail from valgrind

bug31.c: In function 'greeter_item_create_canvas_item':
bug31.c:45565: warning: passing argument 2 of 'g_timeout_add' from incompatible
pointer type
==27527== Invalid read of size 1
==27527==at 0x7BB932: subreg_nregs (rtlanal.c:3153)
==27527==by 0x8DBE2E: add_stored_regs (caller-save.c:548)
==27527==by 0x8DBB16: insert_one_insn (caller-save.c:858)
==27527==by 0x8DBCDD: insert_restore (caller-save.c:698)
==27527==by 0x8DC02E: save_call_clobbered_regs (caller-save.c:487)
==27527==by 0x7B5CA4: reload (reload1.c:976)
==27527==by 0x8FBC22: rest_of_handle_global_alloc (global.c:627)
==27527==by 0x80DE14: execute_one_pass (passes.c:926)
==27527==by 0x80DFDB: execute_pass_list (passes.c:971)
==27527==by 0x80DFED: execute_pass_list (passes.c:972)
==27527==by 0x49E75D: tree_rest_of_compilation (tree-optimize.c:463)
==27527==by 0x40DF0B: c_expand_body (c-decl.c:6855)
==27527==  Address 0xAFAFAFAF002B is not stack'd, malloc'd or (recently)
free'd
bug31.c:45786: internal compiler error: Segmentation fault


-- 
   Summary: Segmentation fault for -O2 on legal code
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: x86_64-suse-linux


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



[Bug c/30333] Segmentation fault for -O2 on legal code

2006-12-30 Thread dcb314 at hotmail dot com


--- Comment #1 from dcb314 at hotmail dot com  2006-12-30 11:35 ---
Created an attachment (id=12846)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12846&action=view)
zipped C source code


-- 


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



[Bug fortran/30321] program crash for SUM applied to zero-size array

2006-12-30 Thread tkoenig at gcc dot gnu dot org


--- Comment #5 from tkoenig at gcc dot gnu dot org  2006-12-30 13:16 ---
Subject: Bug 30321

Author: tkoenig
Date: Sat Dec 30 13:16:36 2006
New Revision: 120287

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120287
Log:
2006-12-30  Thomas Koenig  <[EMAIL PROTECTED]>

PR libfortran/30321
* m4/ifunction.m4 (name`'rtype_qual`_'atype_code):
Check for extents < 0 for zero-sized arrays.  If
no retarray has been specified and the size is zero,
return early.
(`m'name`'rtype_qual`_'atype_code): Likewise.
* generated/all_l16.c: Regenerated.
* generated/all_l4.c: Regenerated.
* generated/all_l8.c: Regenerated.
* generated/any_l16.c: Regenerated.
* generated/any_l4.c: Regenerated.
* generated/any_l8.c: Regenerated.
* generated/count_16_l16.c: Regenerated.
* generated/count_16_l4.c: Regenerated.
* generated/count_16_l8.c: Regenerated.
* generated/count_4_l16.c: Regenerated.
* generated/count_4_l4.c: Regenerated.
* generated/count_4_l8.c: Regenerated.
* generated/count_8_l16.c: Regenerated.
* generated/count_8_l4.c: Regenerated.
* generated/count_8_l8.c: Regenerated.
* generated/cshift1_16.c: Regenerated.
* generated/cshift1_4.c: Regenerated.
* generated/cshift1_8.c: Regenerated.
* generated/maxloc1_16_i16.c: Regenerated.
* generated/maxloc1_16_i4.c: Regenerated.
* generated/maxloc1_16_i8.c: Regenerated.
* generated/maxloc1_16_r10.c: Regenerated.
* generated/maxloc1_16_r16.c: Regenerated.
* generated/maxloc1_16_r4.c: Regenerated.
* generated/maxloc1_16_r8.c: Regenerated.
* generated/maxloc1_4_i16.c: Regenerated.
* generated/maxloc1_4_i4.c: Regenerated.
* generated/maxloc1_4_i8.c: Regenerated.
* generated/maxloc1_4_r10.c: Regenerated.
* generated/maxloc1_4_r16.c: Regenerated.
* generated/maxloc1_4_r4.c: Regenerated.
* generated/maxloc1_4_r8.c: Regenerated.
* generated/maxloc1_8_i16.c: Regenerated.
* generated/maxloc1_8_i4.c: Regenerated.
* generated/maxloc1_8_i8.c: Regenerated.
* generated/maxloc1_8_r10.c: Regenerated.
* generated/maxloc1_8_r16.c: Regenerated.
* generated/maxloc1_8_r4.c: Regenerated.
* generated/maxloc1_8_r8.c: Regenerated.
* generated/maxval_i16.c: Regenerated.
* generated/maxval_i4.c: Regenerated.
* generated/maxval_i8.c: Regenerated.
* generated/maxval_r10.c: Regenerated.
* generated/maxval_r16.c: Regenerated.
* generated/maxval_r4.c: Regenerated.
* generated/maxval_r8.c: Regenerated.
* generated/minloc1_16_i16.c: Regenerated.
* generated/minloc1_16_i4.c: Regenerated.
* generated/minloc1_16_i8.c: Regenerated.
* generated/minloc1_16_r10.c: Regenerated.
* generated/minloc1_16_r16.c: Regenerated.
* generated/minloc1_16_r4.c: Regenerated.
* generated/minloc1_16_r8.c: Regenerated.
* generated/minloc1_4_i16.c: Regenerated.
* generated/minloc1_4_i4.c: Regenerated.
* generated/minloc1_4_i8.c: Regenerated.
* generated/minloc1_4_r10.c: Regenerated.
* generated/minloc1_4_r16.c: Regenerated.
* generated/minloc1_4_r4.c: Regenerated.
* generated/minloc1_4_r8.c: Regenerated.
* generated/minloc1_8_i16.c: Regenerated.
* generated/minloc1_8_i4.c: Regenerated.
* generated/minloc1_8_i8.c: Regenerated.
* generated/minloc1_8_r10.c: Regenerated.
* generated/minloc1_8_r16.c: Regenerated.
* generated/minloc1_8_r4.c: Regenerated.
* generated/minloc1_8_r8.c: Regenerated.
* generated/minval_i16.c: Regenerated.
* generated/minval_i4.c: Regenerated.
* generated/minval_i8.c: Regenerated.
* generated/minval_r10.c: Regenerated.
* generated/minval_r16.c: Regenerated.
* generated/minval_r4.c: Regenerated.
* generated/minval_r8.c: Regenerated.
* generated/product_c10.c: Regenerated.
* generated/product_c16.c: Regenerated.
* generated/product_c4.c: Regenerated.
* generated/product_c8.c: Regenerated.
* generated/product_i16.c: Regenerated.
* generated/product_i4.c: Regenerated.
* generated/product_i8.c: Regenerated.
* generated/product_r10.c: Regenerated.
* generated/product_r16.c: Regenerated.
* generated/product_r4.c: Regenerated.
* generated/product_r8.c: Regenerated.
* generated/sum_c10.c: Regenerated.
* generated/sum_c16.c: Regenerated.
* generated/sum_c4.c: Regenerated.
* generated/sum_c8.c: Regenerated.
* generated/sum_i16.c: Regenerated.
* generated/sum_i4.c: Regenerated.
* generated/sum_i8.c: Regenerated.
* generated/sum_r10.c: Regener

[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread hongleij at 126 dot com


--- Comment #3 from hongleij at 126 dot com  2006-12-30 13:46 ---
the question is : if a const member function can call a non_const member
function
without const_cast,
if fun() changed the member in A,like this:
//const_test.cpp
struct A
{
  A(unsigned int n)
  {
 aa=n;
  }
  void const_fun() const
  {
  static_cast(*this).fun();  //ok
 // fun();   //err  
  }
  void fun()
  {
 aa=78;
  }
  unsigned int aa;
};

int main()
{
const A a(56);
a.const_fun();
}
the sematic of bitwise constness is not confirmed.
this program is inspired from the book (third edition)
Item3: use const whenever possible


-- 


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



[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread hongleij at 126 dot com


--- Comment #4 from hongleij at 126 dot com  2006-12-30 13:48 ---
(In reply to comment #3)
> the question is : if a const member function can call a non_const member
> function
> without const_cast,
> if fun() changed the member in A,like this:
> //const_test.cpp
> struct A
> {
>   A(unsigned int n)
>   {
>  aa=n;
>   }
>   void const_fun() const
>   {
>   static_cast(*this).fun();  //ok
>  // fun();   //err  
>   }
>   void fun()
>   {
>  aa=78;
>   }
>   unsigned int aa;
> };
> 
> int main()
> {
> const A a(56);
> a.const_fun();
> }
> the sematic of bitwise constness is not confirmed.
> this program is inspired from the book (third edition)
> Item3: use const whenever possible
  i do hope the compiler at least give a worning!
> 


-- 


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



[Bug tree-optimization/30177] [4.3 Regression] ICE in ssa_operand_alloc, at tree-ssa-operands.c:365

2006-12-30 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2006-12-30 15:34 ---
Fixed as reported by the reporter to me in a private email.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug pch/13676] GCC failes to recognize files ending in .hpp as headers to be precompiled

2006-12-30 Thread alfred dot minarik dot 1 at aon dot at


--- Comment #11 from alfred dot minarik dot 1 at aon dot at  2006-12-30 
15:35 ---
Created an attachment (id=12847)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12847&action=view)
Updated patch including tcc for mainline

Yes this is right. in Comment #4 there was an update of the first
version for current mainline.
Please note that Benjamin Kosnik has requested another C++ header type for
Template insantiation headers: tcc. 
I have included that then in an updated patch.
http://gcc.gnu.org/ml/gcc-patches/2004-03/msg00597.html

Just saw that I added hpp twice in cp/lang-specs.h. Corrected and
bootstraped/make checked just in case...(no problems)

Added this patch updated for mainline as attachment. 
if you prefere also adding tcc. Please take changelog from mentioned link.

Thanks.


-- 


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



[Bug libfortran/30308] [4.1,4.2,4.3] open_errors.f90 fails on cygwin

2006-12-30 Thread jvdelisle at gcc dot gnu dot org


--- Comment #1 from jvdelisle at gcc dot gnu dot org  2006-12-30 16:20 
---
I just completed a clean reinstall of cygwin and a clean svn checkout and build
of gfortran (for unrelated reasons) and this failure has gone away.  Would
someone else check their system and see if open_errors.f90 passes on cygwin.


-- 


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



[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread gdr at integrable-solutions dot net


--- Comment #5 from gdr at integrable-solutions dot net  2006-12-30 17:51 
---
Subject: Re:  a const member function can call a non_const member function
without const_cast

"hongleij at 126 dot com" <[EMAIL PROTECTED]> writes:

| the question is : if a const member function can call a non_const member
| function
| without const_cast,

[...]

| this program is inspired from the book (third edition)
| Item3: use const whenever possible

This question is better asked and answered on C++ newsgroup.

-- Gaby


-- 


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



[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread gdr at gcc dot gnu dot org


--- Comment #6 from gdr at gcc dot gnu dot org  2006-12-30 17:52 ---
user mistaken.


-- 

gdr at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread pinskia at gcc dot gnu dot org


--- Comment #7 from pinskia at gcc dot gnu dot org  2006-12-30 17:53 ---
Invalid as explained by me and Gaby.


-- 


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



[Bug fortran/27900] ICE using intrinsics as arguments

2006-12-30 Thread pault at gcc dot gnu dot org


--- Comment #10 from pault at gcc dot gnu dot org  2006-12-30 18:14 ---
Patch just submitted.

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2006-10-01 15:02:25 |2006-12-30 18:14:46
   date||


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



[Bug fortran/27900] ICE using intrinsics as arguments

2006-12-30 Thread patchapp at dberlin dot org


--- Comment #11 from patchapp at dberlin dot org  2006-12-30 18:15 ---
Subject: Bug number PR27900

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01874.html


-- 


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



[Bug c++/30195] Using declaration doesn't work in template.

2006-12-30 Thread gdr at gcc dot gnu dot org


--- Comment #2 from gdr at gcc dot gnu dot org  2006-12-30 18:42 ---
indeed a bug.


-- 

gdr at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-12-30 18:42:41
   date||


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



[Bug c++/30205] RFE: g++ --unmangle

2006-12-30 Thread gdr at gcc dot gnu dot org


--- Comment #3 from gdr at gcc dot gnu dot org  2006-12-30 18:54 ---
As noted by pinskia, this really is a linker option as opposed
to front-end option.


-- 

gdr at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|normal  |enhancement
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-12-30 18:54:19
   date||


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



[Bug c++/30309] ICE with g++ -fipa-pta and malloc(?)

2006-12-30 Thread gdr at gcc dot gnu dot org


--- Comment #1 from gdr at gcc dot gnu dot org  2006-12-30 19:00 ---
I can reproduce this.


-- 

gdr at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-12-30 19:00:41
   date||


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



[Bug c++/30111] Value-initialization of POD base class doesn't initialize members

2006-12-30 Thread gdr at gcc dot gnu dot org


--- Comment #5 from gdr at gcc dot gnu dot org  2006-12-30 19:40 ---
Thsi is indeed a bug in g++.
the pod() in inherit() is a value-initialization, not a call to 
default-constructor.


-- 

gdr at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-12-30 19:40:22
   date||


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



[Bug tree-optimization/30334] New: Request for -Wundefined

2006-12-30 Thread gdr at gcc dot gnu dot org
Request for -Wundefined for cases where GCC optimizers can
detect undefined behaviour and actively take advantages of them
for code generation purpose.


-- 
   Summary: Request for -Wundefined
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gdr at gcc dot gnu dot org
  GCC host triplet: platform independent


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



[Bug tree-optimization/30334] Request for -Wundefined

2006-12-30 Thread gdr at gcc dot gnu dot org


--- Comment #1 from gdr at gcc dot gnu dot org  2006-12-30 19:52 ---
working on a patch.


-- 

gdr at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |gdr at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-12-30 19:52:48
   date||


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



[Bug preprocessor/21521] -finput-charset -save-temps converts characters twice

2006-12-30 Thread tromey at gcc dot gnu dot org


--- Comment #3 from tromey at gcc dot gnu dot org  2006-12-30 23:11 ---
FWIW my initial attempt here, namely inserting %http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21521



[Bug pch/30335] New: CreateFileMapping fails in Vista due to lack of admin privileges

2006-12-30 Thread Christoph_vW at reactos dot org
CreateFileMapping fails in Vista due to lack of admin privileges


-- 
   Summary: CreateFileMapping fails in Vista due to lack of admin
privileges
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: pch
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Christoph_vW at reactos dot org
  GCC host triplet: Windows Vista
GCC target triplet: mingw i386


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



[Bug pch/30335] CreateFileMapping fails in Vista due to lack of admin privileges

2006-12-30 Thread Christoph_vW at reactos dot org


--- Comment #1 from Christoph_vW at reactos dot org  2006-12-30 23:46 
---
Created an attachment (id=12848)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12848&action=view)
patch


-- 


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



[Bug pch/30335] CreateFileMapping fails in Vista due to lack of admin privileges

2006-12-30 Thread Christoph_vW at reactos dot org


--- Comment #2 from Christoph_vW at reactos dot org  2006-12-30 23:49 
---
the #include  should be removed from the patch - it doesn't belong
there


-- 

Christoph_vW at reactos dot org changed:

   What|Removed |Added

 CC||Christoph_vW at reactos dot
   ||org


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



[Bug target/30336] New: -mtune=native is wrong when not built with gcc

2006-12-30 Thread hjl at lucon dot org
When gcc isn't built with gcc, we get

  if (arch)
{   
  /* FIXME: i386 is wrong for 64bit compiler.  How can we tell if
 we are generating 64bit or 32bit code?  */
  cpu = "i386";
}   
  else
cpu = "generic";

It is suggested to use size of (void *):

http://gcc.gnu.org/ml/gcc/2006-12/msg00651.html

However, it only checks the pointer size  of the compiler which  is used to
build
gcc, not the pointer size of the gcc.


-- 
   Summary: -mtune=native is wrong when not built with gcc
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl at lucon dot org
GCC target triplet: i686-pc-linux-gnu


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



[Bug target/30336] -mtune=native is wrong when not built with gcc

2006-12-30 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2006-12-31 01:22 ---
I always thought cross compilers needed GCC to compile anyways so I don't see
why this is a bug?
If you mean while bootstrapping and someone uses --with-tune=native, I still
don't see why this is an issue as that would be a bug with their use of options
while configuring.

Can you better explain what exactly what is wrong with this instead of just
saying it is broken?


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING


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



[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread hongleij at 126 dot com


--- Comment #8 from hongleij at 126 dot com  2006-12-31 02:24 ---
(In reply to comment #7)
> Invalid as explained by me and Gaby.
> 

yes,it's my misuse.
really sorry for my wrong report.


-- 


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



[Bug fortran/28172] alternate return in contained procedure segfaults

2006-12-30 Thread pault at gcc dot gnu dot org


--- Comment #2 from pault at gcc dot gnu dot org  2006-12-31 06:43 ---
This fixes it, regtests and even produces the correct code:

Index: gcc/fortran/trans-stmt.c
===
*** gcc/fortran/trans-stmt.c(revision 120243)
--- gcc/fortran/trans-stmt.c(working copy)
*** gfc_trans_call (gfc_code * code, bool de
*** 349,354 
--- 349,356 
  gcc_assert(select_code->op == EXEC_SELECT);
  sym = select_code->expr->symtree->n.sym;
  se.expr = convert (gfc_typenode_for_spec (&sym->ts), se.expr);
+ if (sym->backend_decl == NULL)
+   sym->backend_decl = gfc_get_symbol_decl (sym);
  gfc_add_modify_expr (&se.pre, sym->backend_decl, se.expr);
}
else

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2006-06-30 12:25:01 |2006-12-31 06:43:49
   date||


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



[Bug fortran/23060] %VAL, %REF and %DESCR constructs not implemented

2006-12-30 Thread pault at gcc dot gnu dot org


--- Comment #13 from pault at gcc dot gnu dot org  2006-12-31 06:55 ---
Subject: Bug 23060

Author: pault
Date: Sun Dec 31 06:55:16 2006
New Revision: 120295

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120295
Log:
2006-12-31  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/23060
* intrinsic.c (compare_actual_formal ): Distinguish argument
list functions from keywords.
* intrinsic.c (sort_actual): If formal is NULL, the presence of
an argument list function actual is an error.
* trans-expr.c (conv_arglist_function) : New function to
implement argument list functions %VAL, %REF and %LOC.
(gfc_conv_function_call): Call it.
* resolve.c (resolve_actual_arglist): Add arg ptype and check
argument list functions.
(resolve_function, resolve_call): Set value of ptype before
calls to resolve_actual_arglist.
* primary.c (match_arg_list_function): New function.
(gfc_match_actual_arglist): Call it before trying for a
keyword argument.

2006-12-31  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/23060
* gfortran.dg/c_by_val.c: Called by c_by_val_1.f.
* gfortran.dg/c_by_val_1.f: New test.
* gfortran.dg/c_by_val_2.f: New test.
* gfortran.dg/c_by_val_3.f: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/c_by_val.c
trunk/gcc/testsuite/gfortran.dg/c_by_val_1.f
trunk/gcc/testsuite/gfortran.dg/c_by_val_2.f90
trunk/gcc/testsuite/gfortran.dg/c_by_val_3.f90
trunk/gcc/testsuite/gfortran.dg/char_length_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/interface.c
trunk/gcc/fortran/intrinsic.c
trunk/gcc/fortran/primary.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/29389] Statement functions are not recognized as pure when they are

2006-12-30 Thread pault at gcc dot gnu dot org


--- Comment #2 from pault at gcc dot gnu dot org  2006-12-31 07:39 ---
This is fixed by:

resolve.c:1429

static int
pure_function (gfc_expr * e, const char **name)
{
  int pure;

  /* This is the fix.  */
  if (e->expr_type == EXPR_FUNCTION
&& e->symtree->n.sym->attr.proc == PROC_ST_FUNCTION)
return 1;

  if (e->value.function.esym)

The testcase should set i = 0 and test its value at the end of the main
program, in order to demonstrate that there are no side-effects.

Regtests OK on amd64/Cygwin_NT

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2006-10-08 20:47:53 |2006-12-31 07:39:01
   date||


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



[Bug fortran/27900] ICE using intrinsics as arguments

2006-12-30 Thread pault at gcc dot gnu dot org


--- Comment #12 from pault at gcc dot gnu dot org  2006-12-31 07:51 ---
Subject: Bug 27900

Author: pault
Date: Sun Dec 31 07:51:47 2006
New Revision: 120296

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120296
Log:
2006-12-31  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/27900
* resolve.c (resolve_actual_arglist): If all else fails and a
procedure actual argument has no type, see if a specific
intrinsic matches.

PR fortran/24325
* resolve.c (resolve_function): If the function reference is
FL_VARIABLE this is an error.

2006-12-31  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/27900
* gfortran.dg/intrinsic_actual_4.f90: New test.

PR fortran/24325
* gfortran.dg/func_decl_3.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/func_decl_3.f90
trunk/gcc/testsuite/gfortran.dg/intrinsic_actual_4.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/24325] ICE in gfc_get_function_type

2006-12-30 Thread pault at gcc dot gnu dot org


--- Comment #5 from pault at gcc dot gnu dot org  2006-12-31 07:51 ---
Subject: Bug 24325

Author: pault
Date: Sun Dec 31 07:51:47 2006
New Revision: 120296

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120296
Log:
2006-12-31  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/27900
* resolve.c (resolve_actual_arglist): If all else fails and a
procedure actual argument has no type, see if a specific
intrinsic matches.

PR fortran/24325
* resolve.c (resolve_function): If the function reference is
FL_VARIABLE this is an error.

2006-12-31  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/27900
* gfortran.dg/intrinsic_actual_4.f90: New test.

PR fortran/24325
* gfortran.dg/func_decl_3.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/func_decl_3.f90
trunk/gcc/testsuite/gfortran.dg/intrinsic_actual_4.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog


-- 


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