I do not think there is a law about same-sex children sharing a room, at least not in Canada anyways. Really - how are they going to monitor that? Talk about letting Big Brother into the bedroom! My older two (boy/girl) shared a room until they were 5 & 7 and I don't see a problem with that. They are brother and sister! What do people think is going to happen? I think that rule would apply with foster children, now with biological children.
As for the bunk beds - our older started sharing them at 2.5 and 4.5 years with the 4.5 year old in the top bunk. We were having another baby, what are you going to do. The youngest started sharing the bunk beds with her sister (to give our son his own room) when she was 22 months and older sister was 5. Again not a problem.